diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 98e9af0527d..e9206d81b08 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - submodules: true + submodules: recursive - name: Clone SDL Android repo run: | diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 52feff5cde7..9aad082567d 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -42,7 +42,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Build in FreeBSD if: ${{ matrix.vm_os == 'freebsd' }} diff --git a/.github/workflows/gnulinux.yml b/.github/workflows/gnulinux.yml index ad9d1619177..cd0eb204462 100644 --- a/.github/workflows/gnulinux.yml +++ b/.github/workflows/gnulinux.yml @@ -62,7 +62,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Install 64-bit dependencies if: ${{ matrix.arch == 64 }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8f9513b0ce7..ffcf46e2b6e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,7 +46,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Install macos dependencies if: ${{ matrix.os == 'macos-12' }} diff --git a/.github/workflows/scripting.yml b/.github/workflows/scripting.yml index c4ce2f82b2a..64c796115c8 100644 --- a/.github/workflows/scripting.yml +++ b/.github/workflows/scripting.yml @@ -20,7 +20,8 @@ on: push: branches: [ "master" ] paths: - - src/scripting/*.hpp + - src/* + - tools/scripting_docs_gen/* workflow_dispatch: jobs: @@ -56,31 +57,42 @@ jobs: cmake --version mkdir build cd build - cmake .. -DBUILD_SCRIPTING_DOCUMENTATION=ON + cmake .. -DBUILD_DOCUMENTATION_WITH_SCRIPTING=ON make - name: Generate scripting reference working-directory: tools/scripting_docs_gen/build run: | - doxygen docs/scripting/Doxyfile + doxygen docs/Doxyfile rm ../../../wiki/Scripting*.md - ./ScriptingDocsGen --dir docs/scripting/doxygen/xml \ + ./ScriptingDocsGen --dir docs/doxygen/xml \ --home ../../../wiki/templates/ScriptingHome.md \ --page ../../../wiki/templates/ScriptingPage.md \ --output ../../../wiki + - name: Check for changes + working-directory: wiki + run: | + REF_UPDATED=true + if git diff --exit-code; then + REF_UPDATED=false + fi + echo "REFERENCE_UPDATED=$(echo $REF_UPDATED)" >> $GITHUB_ENV + - name: Install SSH key + if: ${{ env.REFERENCE_UPDATED == 'true' }} uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.wiki_repo_key }} known_hosts: ${{ secrets.wiki_repo_hosts }} - name: Push changes to wiki + if: ${{ env.REFERENCE_UPDATED == 'true' }} working-directory: wiki run: | git --version git status - git config --global user.email "supertux-bot" + git config --global user.email "SuperTux-bot@users.noreply.github.com" git config --global user.name "SuperTux Bot" git add . git commit -m "Update scripting reference (SuperTux/supertux@${{ github.sha }})" diff --git a/.github/workflows/ubuntu-touch.yml b/.github/workflows/ubuntu-touch.yml index 001d5629f8f..abb445f3990 100644 --- a/.github/workflows/ubuntu-touch.yml +++ b/.github/workflows/ubuntu-touch.yml @@ -45,7 +45,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Install clickable run: | diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index f34e245ce70..bbb29c0dc79 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -38,7 +38,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Install emscripten tools run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5b4077a1c87..73ed5ab1653 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -50,7 +50,7 @@ jobs: with: # Fetch the whole tree so git describe works fetch-depth: 0 - submodules: true + submodules: recursive - name: Use cached dependencies id: cache-dependencies @@ -104,21 +104,56 @@ jobs: run: | "./$Env:BUILD_TYPE/run_tests.exe" - - name: Package + - name: Package MSI Installer + shell: pwsh working-directory: build env: BUILD_TYPE: ${{ matrix.build_type }} run: | cpack -C $Env:BUILD_TYPE - mkdir upload - mv *.msi upload/ + if ($LASTEXITCODE -ne 0) + { + $code = $LASTEXITCODE + type ./_CPack_Packages/win64/WIX/wix.log + exit $code + } + else + { + mkdir upload + mv *.msi upload/ + } - - uses: actions/upload-artifact@v4 + - name: Upload MSI Installer + uses: actions/upload-artifact@v4 with: name: "windows-${{ matrix.arch }}-${{ matrix.build_type }}${{ matrix.glbinding == 'ON' && '-glbinding' || '' }}-installer" path: build/upload/*.msi if-no-files-found: ignore + - name: Package Portable Archive + working-directory: build + env: + BUILD_TYPE: ${{ matrix.build_type }} + run: | + mkdir -Force SuperTux-${{ github.sha }}-portable + cmake --install . --config $Env:BUILD_TYPE --prefix .\SuperTux-${{ github.sha }}-portable + + # Because github puts assets in zips, if you upload a zip, + # it will upload another zip. I have disabled this code because + # of that, but in case you wanted to know how to generate a portable release, + # here it is. + <# + cpack -C $Env:BUILD_TYPE -G ZIP + mv *.zip SuperTux-${{ github.sha }}-portable/ + #> + + - name: Upload Portable Package + uses: actions/upload-artifact@v4 + with: + name: "windows-${{ matrix.arch }}-${{ matrix.build_type }}${{ matrix.glbinding == 'ON' && '-glbinding' || '' }}-portable" + path: build/SuperTux-${{ github.sha }}-portable + if-no-files-found: ignore + - uses: anshulrgoyal/upload-s3-action@master if: matrix.release && env.CI_KEY != null env: @@ -147,5 +182,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - files: 'build/upload/SuperTux-*' + files: 'build/upload/SuperTux-*.msi' draft: true diff --git a/.gitmodules b/.gitmodules index a758a02e929..eef1724a1e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "external/tinygettext"] path = external/tinygettext url = https://github.com/SuperTux/tinygettext.git -[submodule "external/squirrel"] - path = external/squirrel - url = https://github.com/albertodemichelis/squirrel.git [submodule "external/sexp-cpp"] path = external/sexp-cpp url = https://github.com/SuperTux/sexp-cpp.git @@ -19,9 +16,9 @@ [submodule "external/fmt"] path = external/fmt url = https://github.com/fmtlib/fmt.git -[submodule "tools/miniswig"] - path = tools/miniswig - url = https://github.com/WindstilleTeam/miniswig [submodule "external/glm"] path = external/glm url = https://github.com/g-truc/glm.git +[submodule "external/simplesquirrel"] + path = external/simplesquirrel + url = https://github.com/SuperTux/simplesquirrel diff --git a/CMakeLists.txt b/CMakeLists.txt index 25d5edcf7e5..8133c22ac5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,7 +174,7 @@ include(SuperTux/ProvideOpenAL) include(SuperTux/ProvideOggVorbis) include(SuperTux/ProvidePhysfs) include(SuperTux/ProvideCurl) -include(SuperTux/ProvideSquirrel) +include(SuperTux/ProvideSimpleSquirrel) include(SuperTux/ProvideTinygettext) include(SuperTux/ProvideSDL2_ttf) include(SuperTux/ProvideDiscord) @@ -187,7 +187,6 @@ include(SuperTux/ProvideOpenGL) include(SuperTux/BuildVersion) include(SuperTux/BuildDocumentation) include(SuperTux/BuildMessagePot) -include(SuperTux/BuildMiniswigWrapper) ## Build list of sources for supertux binary file(GLOB SUPERTUX_SOURCES_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} external/obstack/*.c external/findlocale/findlocale.c) @@ -205,10 +204,6 @@ list(SORT SUPERTUX_SOURCES_C) list(SORT SUPERTUX_SOURCES_CXX) list(SORT SUPERTUX_RESOURCES) -if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.cpp) - set(SUPERTUX_SOURCES_CXX ${SUPERTUX_SOURCES_CXX} ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.cpp) -endif() - ## On Windows, add an icon if(WIN32) if(MINGW) @@ -269,8 +264,7 @@ endif() ## Link supertux binary with squirrel and other libraries -target_link_libraries(supertux2_lib PUBLIC LibSquirrel) -target_link_libraries(supertux2_lib PUBLIC LibSqstdlib) +target_link_libraries(supertux2_lib PUBLIC LibSimpleSquirrel) target_link_libraries(supertux2_lib PUBLIC LibTinygettext) target_link_libraries(supertux2_lib PUBLIC LibSexp) target_link_libraries(supertux2_lib PUBLIC LibSavePNG) diff --git a/data/AUTHORS b/data/AUTHORS index 5a102951416..28245a32652 100644 --- a/data/AUTHORS +++ b/data/AUTHORS @@ -86,6 +86,8 @@ All files in data/music created by wansti and licensed under GPLv2+CC-by-sa, unl * snowfort.ogg - By SnugglyBun, licensed under CC-BY-SA 4.0 * icecastle.ogg - By SnugglyBun, based on the original fortress theme by Wansti. licensed under CC-BY-SA 4.0 * yetiboss.ogg - By SnugglyBun, cover of the original boss battle theme by Wansti. licensed under CC-BY-SA 4.0 +* forest_midday.ogg - By SnugglyBun, based on the original forest theme by Wansti. licensed under CC-BY-SA 4.0 +* forest_midday_alt.ogg - By SnugglyBun, based on forest.ogg and forest3.ogg by Wansti. licensed under CC-BY-SA 4.0 == Scripts == diff --git a/data/images/autotiles.satc b/data/images/autotiles.satc index 3450d468084..44b7eec1162 100644 --- a/data/images/autotiles.satc +++ b/data/images/autotiles.satc @@ -1196,349 +1196,767 @@ (mask "00100100") ) ) - (autotileset - (name "crystal_solid") - (default 2451) + (autotileset + (name "crystal") + (default 4750) + (autotile + (id 4736) + (solid #t) + (mask "*0*01*11") + ) + (autotile + (id 4737) + (alt-id + (id 4738) + (weight 0.5) + ) + (solid #t) + (mask "*0*11111") + ) + (autotile + (id 7298) + (alt-id + (id 7299) + (weight 0.5) + ) + (solid #f) + (mask "010**111") + ) + (autotile + (id 4739) + (solid #t) + (mask "*0*1011*") + ) + (autotile + (id 4740) + (solid #t) + (mask "11111011") + ) + (autotile + (id 7301) + (solid #f) + (mask "010**010") + ) (autotile (id 4750) (alt-id (id 4751) - (weight 0.2) + (weight 0.25) ) (alt-id (id 4763) - (weight 0.2) + (weight 0.25) ) (alt-id (id 4764) - (weight 0.2) + (weight 0.25) ) (solid #t) - (mask "********") - ) + (mask "11111111") ) - (autotileset - (name "forest_unisolid") - (default 1024) (autotile - (id 7062) + (id 4752) (alt-id - (id 7070) - (weight 0.2) + (id 4765) + (weight 0.5) ) + (solid #t) + (mask "11*1011*") + ) + (autotile + (id 4753) + (solid #t) + (mask "11011111") + ) + (autotile + (id 4762) (alt-id - (id 7071) - (weight 0.2) + (id 4749) + (weight 0.5) ) (solid #t) - (mask "********") - ) - (autotile - (id 7062) - (solid #f) - (mask "*1****1*") - (mask "***11***") - ) + (mask "*1101*11") + ) (autotile - (id 7055) - (solid #f) - (mask "00000001") - ) + (id 4766) + (solid #t) + (mask "11111110") + ) (autotile - (id 7056) - (solid #f) - (mask "00000*1*") - ) + (id 4775) + (solid #t) + (mask "*1101*0*") + ) (autotile - (id 7057) - (solid #f) - (mask "00000100") - ) + (id 4777) + (alt-id + (id 4776) + (weight 0.5) + ) + (solid #t) + (mask "11111*0*") + ) (autotile - (id 7061) - (solid #f) - (mask "00*0100*") - ) + (id 4778) + (solid #t) + (mask "11*10*0*") + ) (autotile - (id 7063) + (id 7215) (solid #f) - (mask "*0010*00") - ) + (mask "*0***010") + ) (autotile - (id 7067) - (solid #f) - (mask "00100000") - ) + (id 7216) + (solid #t) + (mask "*0*00*1*") + ) (autotile - (id 7068) - (solid #f) - (mask "*1*00000") - ) + (id 7217) + (alt-id + (id 7218) + (weight 0.5) + ) + (solid #t) + (mask "*1*00*1*") + ) (autotile - (id 7069) - (solid #f) - (mask "10000000") - ) + (id 7219) + (solid #t) + (mask "*1*00*0*") + ) (autotile - (id 7058) + (id 4788) (solid #f) - (mask "*1*10*00") - (mask "*0110*00") - (mask "*1*00100") - ) + (mask "011***0*") + ) (autotile - (id 7059) - (solid #f) - (mask "*1*0100*") - (mask "10*0100*") - (mask "*1*00001") - ) + (id 7221) + (solid #t) + (mask "*0*01*0*") + ) (autotile - (id 7064) - (solid #f) - (mask "*0010*1*") - (mask "*0010*01") - (mask "10000*1*") - ) + (id 7222) + (alt-id + (id 7223) + (weight 0.5) + ) + (solid #t) + (mask "*0*11*0*") + ) (autotile - (id 7065) + (id 4791) (solid #f) - (mask "00*01*1*") - (mask "00100*1*") - (mask "00*0110*") - ) + (mask "110***0*") + ) (autotile - (id 7060) - (solid #f) - (mask "10000001") - ) + (id 7224) + (solid #t) + (mask "*0*10*0*") + ) (autotile - (id 7066) - (solid #f) - (mask "00100100") - ) + (id 7225) + (solid #t) + (mask "*0*00*0*") ) - (autotileset - (name "corrupted_unisolid") - (default 1362) (autotile - (id 6417) - (alt-id - (id 6425) - (weight 0.2) - ) - (alt-id - (id 6426) - (weight 0.2) - ) + (id 7226) (solid #t) - (mask "********") - ) + (mask "*0*01*10") + ) (autotile - (id 6417) - (solid #f) - (mask "*1****1*") - (mask "***11***") - ) + (id 7227) + (solid #t) + (mask "*0*11110") + ) (autotile - (id 6410) - (solid #f) - (mask "00000001") - ) + (id 7228) + (solid #t) + (mask "*0*11011") + ) (autotile - (id 6411) - (solid #f) - (mask "00000*1*") - ) + (id 7229) + (solid #t) + (mask "*0*1001*") + ) (autotile - (id 6412) - (solid #f) - (mask "00000100") - ) + (id 7230) + (solid #t) + (mask "*1101*10") + ) (autotile - (id 6416) - (solid #f) - (mask "00*0100*") - ) + (id 7231) + (solid #t) + (mask "*1001*10") + ) (autotile - (id 6418) - (solid #f) - (mask "*0010*00") - ) + (id 7232) + (solid #t) + (mask "01*1001*") + ) (autotile - (id 6422) - (solid #f) - (mask "00100000") - ) + (id 7233) + (solid #t) + (mask "11*1001*") + ) (autotile - (id 6423) - (solid #f) - (mask "*1*00000") - ) + (id 7234) + (solid #t) + (mask "*1001*11") + ) (autotile - (id 6424) - (solid #f) - (mask "10000000") - ) + (id 7235) + (solid #t) + (mask "*0*11010") + ) (autotile - (id 6413) + (id 7236) + (solid #t) + (mask "01011*0*") + ) + (autotile + (id 7237) + (solid #t) + (mask "01*1011*") + ) + (autotile + (id 7238) + (solid #t) + (mask "*1001*0*") + ) + (autotile + (id 7239) + (solid #t) + (mask "11011*0*") + ) + (autotile + (id 7240) + (solid #t) + (mask "01111*0*") + ) + (autotile + (id 7241) + (solid #t) + (mask "01*10*0*") + ) + (autotile + (id 7242) + (solid #t) + (mask "01111011") + ) + (autotile + (id 7243) + (solid #t) + (mask "11011110") + ) + (autotile + (id 7244) + (solid #t) + (mask "01011111") + ) + (autotile + (id 7245) + (solid #t) + (mask "01111110") + ) + (autotile + (id 7246) + (solid #t) + (mask "11011011") + ) + (autotile + (id 7247) + (solid #t) + (mask "11111010") + ) + (autotile + (id 7248) + (solid #t) + (mask "01011011") + ) + (autotile + (id 7249) + (solid #t) + (mask "01011110") + ) + (autotile + (id 7250) + (solid #t) + (mask "01011010") + ) + (autotile + (id 7251) + (solid #t) + (mask "01111010") + ) + (autotile + (id 7252) + (solid #t) + (mask "11011010") + ) + (autotile + (id 7296) (solid #f) - (mask "*1*10*00") - (mask "*0110*00") - (mask "*1*00100") - ) + (mask "110**010") + ) (autotile - (id 6414) + (id 7277) (solid #f) - (mask "*1*0100*") - (mask "10*0100*") - (mask "*1*00001") - ) + (mask "011**011") + ) (autotile - (id 6419) + (id 7278) + (alt-id + (id 7279) + (weight 0.5) + ) (solid #f) - (mask "*0010*1*") - (mask "*0010*01") - (mask "10000*1*") - ) + (mask "011**111") + ) (autotile - (id 6420) + (id 7300) (solid #f) - (mask "00*01*1*") - (mask "00100*1*") - (mask "00*0110*") - ) + (mask "010**110") + ) (autotile - (id 6415) + (id 7280) (solid #f) - (mask "10000001") - ) + (mask "011**110") + ) (autotile - (id 6421) + (id 7281) (solid #f) - (mask "00100100") - ) + (mask "011**010") + ) + (autotile + (id 7282) + (alt-id + (id 7287) + (weight 0.5) + ) + (solid #f) + (mask "111**011") + ) + (autotile + (id 7283) + (alt-id + (id 7284) + (weight 0.25) + ) + (alt-id + (id 7288) + (weight 0.25) + ) + (alt-id + (id 7289) + (weight 0.25) + ) + (solid #f) + (mask "111**111") + ) + (autotile + (id 4724) + (alt-id + (id 4725) + (weight 0.5) + ) + (solid #f) + (mask "*0***111") + ) + (autotile + (id 7285) + (alt-id + (id 7290) + (weight 0.5) + ) + (solid #f) + (mask "111**110") + ) + (autotile + (id 4726) + (solid #f) + (mask "*0***110") + ) + (autotile + (id 4727) + (solid #t) + (mask "01111111") + ) + (autotile + (id 7297) + (solid #f) + (mask "010**011") + ) + (autotile + (id 7286) + (alt-id + (id 7291) + (weight 0.5) + ) + (solid #f) + (mask "111**010") + ) + (autotile + (id 4789) + (alt-id + (id 4790) + (weight 0.5) + ) + (solid #f) + (mask "111***0*") + ) + (autotile + (id 7220) + (solid #f) + (mask "010***0*") + ) + (autotile + (id 7292) + (solid #f) + (mask "110**011") + ) + (autotile + (id 7293) + (alt-id + (id 7294) + (weight 0.5) + ) + (solid #f) + (mask "110**111") + ) + (autotile + (id 4723) + (solid #f) + (mask "*0***011") + ) + (autotile + (id 7295) + (solid #f) + (mask "110**110") + ) ) (autotileset - (name "ruin_backwall") - (default 1476) + (name "forest_unisolid") + (default 1024) (autotile - (id 4454) + (id 7062) (alt-id - (id 1476) + (id 7070) (weight 0.2) ) (alt-id - (id 1477) + (id 7071) (weight 0.2) ) (solid #t) (mask "********") ) (autotile - (id 4454) + (id 7062) (solid #f) (mask "*1****1*") (mask "***11***") ) (autotile - (id 4448) + (id 7055) (solid #f) (mask "00000001") ) (autotile - (id 4449) + (id 7056) (solid #f) (mask "00000*1*") ) (autotile - (id 4450) + (id 7057) (solid #f) (mask "00000100") ) (autotile - (id 4453) + (id 7061) (solid #f) (mask "00*0100*") ) (autotile - (id 4455) + (id 7063) (solid #f) (mask "*0010*00") ) (autotile - (id 4458) + (id 7067) (solid #f) (mask "00100000") ) (autotile - (id 4459) + (id 7068) (solid #f) (mask "*1*00000") ) (autotile - (id 4460) + (id 7069) (solid #f) (mask "10000000") ) (autotile - (id 4451) + (id 7058) (solid #f) (mask "*1*10*00") (mask "*0110*00") (mask "*1*00100") ) (autotile - (id 4452) + (id 7059) (solid #f) (mask "*1*0100*") (mask "10*0100*") (mask "*1*00001") ) (autotile - (id 4456) + (id 7064) (solid #f) (mask "*0010*1*") (mask "*0010*01") (mask "10000*1*") ) (autotile - (id 4457) + (id 7065) (solid #f) (mask "00*01*1*") (mask "00100*1*") (mask "00*0110*") ) (autotile - (id 4461) + (id 7060) (solid #f) (mask "10000001") ) (autotile - (id 4462) + (id 7066) (solid #f) (mask "00100100") ) ) (autotileset - (name "forest") - (default 1010) - (autotile - (id 1000) - (solid #f) - (mask "*****011") - ) + (name "corrupted_unisolid") + (default 1362) (autotile - (id 1001) + (id 6417) (alt-id - (id 1002) - (weight 0.5) + (id 6425) + (weight 0.2) ) - (solid #f) - (mask "*****111") + (alt-id + (id 6426) + (weight 0.2) + ) + (solid #t) + (mask "********") ) (autotile - (id 1003) + (id 6417) + (solid #f) + (mask "*1****1*") + (mask "***11***") + ) + (autotile + (id 6410) + (solid #f) + (mask "00000001") + ) + (autotile + (id 6411) + (solid #f) + (mask "00000*1*") + ) + (autotile + (id 6412) + (solid #f) + (mask "00000100") + ) + (autotile + (id 6416) + (solid #f) + (mask "00*0100*") + ) + (autotile + (id 6418) + (solid #f) + (mask "*0010*00") + ) + (autotile + (id 6422) + (solid #f) + (mask "00100000") + ) + (autotile + (id 6423) + (solid #f) + (mask "*1*00000") + ) + (autotile + (id 6424) + (solid #f) + (mask "10000000") + ) + (autotile + (id 6413) + (solid #f) + (mask "*1*10*00") + (mask "*0110*00") + (mask "*1*00100") + ) + (autotile + (id 6414) + (solid #f) + (mask "*1*0100*") + (mask "10*0100*") + (mask "*1*00001") + ) + (autotile + (id 6419) + (solid #f) + (mask "*0010*1*") + (mask "*0010*01") + (mask "10000*1*") + ) + (autotile + (id 6420) + (solid #f) + (mask "00*01*1*") + (mask "00100*1*") + (mask "00*0110*") + ) + (autotile + (id 6415) + (solid #f) + (mask "10000001") + ) + (autotile + (id 6421) + (solid #f) + (mask "00100100") + ) + ) + (autotileset + (name "ruin_backwall") + (default 1476) + (autotile + (id 4454) + (alt-id + (id 1476) + (weight 0.2) + ) + (alt-id + (id 1477) + (weight 0.2) + ) + (solid #t) + (mask "********") + ) + (autotile + (id 4454) + (solid #f) + (mask "*1****1*") + (mask "***11***") + ) + (autotile + (id 4448) + (solid #f) + (mask "00000001") + ) + (autotile + (id 4449) + (solid #f) + (mask "00000*1*") + ) + (autotile + (id 4450) + (solid #f) + (mask "00000100") + ) + (autotile + (id 4453) + (solid #f) + (mask "00*0100*") + ) + (autotile + (id 4455) + (solid #f) + (mask "*0010*00") + ) + (autotile + (id 4458) + (solid #f) + (mask "00100000") + ) + (autotile + (id 4459) + (solid #f) + (mask "*1*00000") + ) + (autotile + (id 4460) + (solid #f) + (mask "10000000") + ) + (autotile + (id 4451) + (solid #f) + (mask "*1*10*00") + (mask "*0110*00") + (mask "*1*00100") + ) + (autotile + (id 4452) + (solid #f) + (mask "*1*0100*") + (mask "10*0100*") + (mask "*1*00001") + ) + (autotile + (id 4456) + (solid #f) + (mask "*0010*1*") + (mask "*0010*01") + (mask "10000*1*") + ) + (autotile + (id 4457) + (solid #f) + (mask "00*01*1*") + (mask "00100*1*") + (mask "00*0110*") + ) + (autotile + (id 4461) + (solid #f) + (mask "10000001") + ) + (autotile + (id 4462) + (solid #f) + (mask "00100100") + ) + ) + (autotileset + (name "forest") + (default 1010) + (autotile + (id 1000) + (solid #f) + (mask "*****011") + ) + (autotile + (id 1001) + (alt-id + (id 1002) + (weight 0.5) + ) + (solid #f) + (mask "*****111") + ) + (autotile + (id 1003) (solid #f) (mask "*****110") ) @@ -2653,7 +3071,7 @@ (mask "*0*01111") ) (autotile - (id 3378) + (id 6546) (solid #t) (mask "01011010") ) @@ -2713,12 +3131,12 @@ (mask "*1*00010") ) (autotile - (id 6546) + (id 3378) (solid #t) (mask "01011111") ) (autotile - (id 3401) + (id 6545) (solid #t) (mask "11111010") ) @@ -4367,452 +4785,1326 @@ (mask "*1*01*1*") ) (autotile - (id 5299) - (solid #f) - (mask "*1*11*0*") - ) + (id 5299) + (solid #f) + (mask "*1*11*0*") + ) + (autotile + (id 5300) + (solid #f) + (mask "*0*11*0*") + ) + (autotile + (id 5334) + (solid #f) + (mask "00100*1*") + ) + (autotile + (id 5335) + (solid #f) + (mask "10000*1*") + ) + (autotile + (id 5336) + (solid #f) + (mask "10100*1*") + ) + (autotile + (id 5337) + (solid #f) + (mask "10100000") + ) + (autotile + (id 3965) + (solid #f) + (mask "*1*00001") + ) + (autotile + (id 3959) + (solid #f) + (mask "*1*00100") + ) + (autotile + (id 5340) + (solid #f) + (mask "*1*00101") + ) + (autotile + (id 5341) + (solid #f) + (mask "*1*11*1*") + ) + (autotile + (id 5342) + (solid #f) + (mask "00*0110*") + ) + (autotile + (id 5343) + (solid #f) + (mask "*0010*01") + ) + (autotile + (id 5344) + (solid #f) + (mask "10100001") + ) + (autotile + (id 5345) + (solid #f) + (mask "10100101") + ) + (autotile + (id 5346) + (solid #f) + (mask "10*0100*") + ) + (autotile + (id 5347) + (solid #f) + (mask "*0110*00") + ) + (autotile + (id 5348) + (solid #f) + (mask "10100100") + ) + (autotile + (id 5349) + (solid #f) + (mask "10000101") + ) + (autotile + (id 5350) + (solid #f) + (mask "10*0110*") + ) + (autotile + (id 5351) + (solid #f) + (mask "*0110*01") + ) + (autotile + (id 5352) + (solid #f) + (mask "*1*10*01") + ) + (autotile + (id 5353) + (solid #f) + (mask "00100101") + ) + (autotile + (id 5354) + (solid #f) + (mask "10*01*1*") + ) + (autotile + (id 5355) + (solid #f) + (mask "*0110*1*") + ) + (autotile + (id 5356) + (solid #f) + (mask "*1*0110*") + ) + ) + (autotileset + (name "ice_chunks") + (default 3977) + (autotile + (id 3972) + (solid #t) + (mask "*0*01*11") + ) + (autotile + (id 3973) + (solid #t) + (mask "*0*11111") + ) + (autotile + (id 3974) + (solid #t) + (mask "*0*1011*") + ) + (autotile + (id 3975) + (solid #t) + (mask "11011111") + ) + (autotile + (id 3976) + (solid #t) + (mask "*1101*11") + ) + (autotile + (id 3977) + (solid #t) + (mask "11111111") + ) + (autotile + (id 3978) + (solid #t) + (mask "11*1011*") + ) + (autotile + (id 3979) + (solid #t) + (mask "01111111") + ) + (autotile + (id 3980) + (solid #t) + (mask "*1101*0*") + ) + (autotile + (id 3981) + (solid #t) + (mask "11111*0*") + ) + (autotile + (id 3982) + (solid #t) + (mask "11*10*0*") + ) + (autotile + (id 3983) + (solid #t) + (mask "11111011") + ) + (autotile + (id 3984) + (solid #t) + (mask "*1*00*0*") + ) + (autotile + (id 3985) + (solid #t) + (mask "11011011") + ) + (autotile + (id 3986) + (solid #t) + (mask "01111110") + ) + (autotile + (id 3987) + (solid #t) + (mask "11111110") + ) + (autotile + (id 5206) + (solid #t) + (mask "11011110") + ) + (autotile + (id 5207) + (solid #t) + (mask "*0*11*0*") + ) + (autotile + (id 5208) + (solid #t) + (mask "01111011") + ) + (autotile + (id 5209) + (solid #t) + (mask "11111010") + ) + (autotile + (id 5210) + (solid #t) + (mask "*0*01*0*") + ) + (autotile + (id 5211) + (solid #t) + (mask "*0*10*0*") + ) + (autotile + (id 5212) + (solid #t) + (mask "*0*00*1*") + ) + (autotile + (id 5213) + (solid #t) + (mask "*1*00*1*") + ) + (autotile + (id 5214) + (solid #t) + (mask "11011*0*") + ) + (autotile + (id 5215) + (solid #t) + (mask "01111*0*") + ) + (autotile + (id 5216) + (solid #t) + (mask "01011*0*") + ) + (autotile + (id 5217) + (solid #t) + (mask "01011111") + ) + (autotile + (id 5218) + (solid #t) + (mask "*0*11110") + ) + (autotile + (id 5219) + (solid #t) + (mask "*0*11011") + ) + (autotile + (id 5220) + (solid #t) + (mask "*0*11010") + ) + (autotile + (id 5221) + (solid #t) + (mask "*0*00*0*") + ) + (autotile + (id 5222) + (solid #t) + (mask "11*1001*") + ) + (autotile + (id 5223) + (solid #t) + (mask "*1101*10") + ) + (autotile + (id 5224) + (solid #t) + (mask "01011110") + ) + (autotile + (id 5225) + (solid #t) + (mask "01011010") + ) + (autotile + (id 5226) + (solid #t) + (mask "01*1011*") + ) + (autotile + (id 5227) + (solid #t) + (mask "*1001*11") + ) + (autotile + (id 5228) + (solid #t) + (mask "01011011") + ) + (autotile + (id 5229) + (solid #t) + (mask "01111010") + ) + (autotile + (id 5230) + (solid #t) + (mask "01*1001*") + ) + (autotile + (id 5231) + (solid #t) + (mask "*1001*10") + ) + (autotile + (id 5232) + (solid #t) + (mask "*0*01*10") + ) + (autotile + (id 5233) + (solid #t) + (mask "11011010") + ) + (autotile + (id 5234) + (solid #t) + (mask "01*10*0*") + ) + (autotile + (id 5235) + (solid #t) + (mask "*1001*0*") + ) + (autotile + (id 5236) + (solid #t) + (mask "*0*1001*") + ) + ) + (autotileset + (name "rope") + (default 3459) + (autotile + (id 4334) + (solid #t) + (mask "*0*01*1*") + ) + (autotile + (id 4335) + (solid #t) + (mask "*0*10*1*") + ) + (autotile + (id 3064) + (solid #t) + (mask "*1*01*1*") + ) + (autotile + (id 3065) + (solid #t) + (mask "*0*11*1*") + ) + (autotile + (id 4338) + (solid #t) + (mask "*1*01*0*") + ) + (autotile + (id 4339) + (solid #t) + (mask "*1*10*0*") + ) + (autotile + (id 3067) + (solid #t) + (mask "*1*11*0*") + ) + (autotile + (id 3066) + (solid #t) + (mask "*1*10*1*") + ) + (autotile + (id 4332) + (solid #t) + (mask "*0*01*0*") + ) + (autotile + (id 4336) + (solid #t) + (mask "*0*00*1*") + ) + (autotile + (id 3062) + (solid #t) + (mask "*0*11*0*") + ) + (autotile + (id 3060) + (solid #t) + (mask "*1*00*1*") + ) + (autotile + (id 3061) + (solid #t) + (mask "*1*00*0*") + ) + (autotile + (id 4333) + (solid #t) + (mask "*0*10*0*") + ) + (autotile + (id 3063) + (solid #t) + (mask "*1*11*1*") + ) + (autotile + (id 4337) + (solid #t) + (mask "*0*00*0*") + ) + ) + (autotileset + (name "retro castle") + (default 64) + (autotile + (id 64) + (solid #t) + (mask "*1*11111") + (mask "11010101") + ) + (autotile + (id 3521) + (solid #t) + (mask "*0*01*0*") + ) + (autotile + (id 66) + (solid #t) + (mask "*1*11*0*") + (mask "*1*11010") + ) + (autotile + (id 5123) + (solid #t) + (mask "*0*00*1*") + ) + (autotile + (id 68) + (solid #t) + (mask "*0*01011") + (mask "*0101111") + (mask "*0*01111") + ) + (autotile + (id 69) + (solid #t) + (mask "*0*10110") + (mask "10*10111") + (mask "*0*10111") + ) + (autotile + (id 5128) + (solid #t) + (mask "*1*01*11") + ) + (autotile + (id 7273) + (solid #t) + (mask "*0*01*10") + ) + (autotile + (id 5130) + (solid #t) + (mask "*1*1011*") + ) + (autotile + (id 5131) + (solid #t) + (mask "*1*00*1*") + ) + (autotile + (id 5134) + (solid #t) + (mask "*0*11110") + ) + (autotile + (id 3279) + (solid #t) + (mask "*0*11*0*") + (mask "*0*11010") + ) + (autotile + (id 5139) + (solid #t) + (mask "*1*00*0*") + ) + (autotile + (id 5140) + (solid #t) + (mask "*1101*10") + (mask "*1*01*10") + ) + (autotile + (id 5141) + (solid #t) + (mask "*1*1001*") + ) + (autotile + (id 7274) + (solid #t) + (mask "*0*1001*") + ) + (autotile + (id 5135) + (solid #t) + (mask "*0*11011") + ) + (autotile + (id 3522) + (solid #t) + (mask "*0*00*0*") + ) + (autotile + (id 65) + (solid #t) + (mask "*0*11111") + ) + (autotile + (id 67) + (solid #t) + (mask "01101*0*") + (mask "*1001*0*") + (mask "11101*01") + (mask "1110100*") + (mask "11101100") + ) + (autotile + (id 3516) + (solid #t) + (mask "*0*10*0*") + ) + (autotile + (id 3517) + (solid #t) + (mask "*1*11110") + (mask "11*11110") + ) + (autotile + (id 3518) + (solid #t) + (mask "*1*1000*") + (mask "11010100") + (mask "11110001") + (mask "01*1010*") + (mask "1111010*") + ) + (autotile + (id 3519) + (solid #t) + (mask "*1*11011") + (mask "*1*11011") + ) + ) + (autotileset + (name "retro cave") + (default 36) + (autotile + (id 1815) + (solid #t) + (mask "*1*00*0*") + ) + (autotile + (id 1816) + (solid #t) + (mask "*0*00*0*") + ) + (autotile + (id 32) + (solid #f) + (mask "*****111") + ) + (autotile + (id 33) + (solid #f) + (mask "*****011") + ) + (autotile + (id 5154) + (solid #t) + (mask "*0*01111") + ) + (autotile + (id 5155) + (solid #t) + (mask "*0*10111") + ) + (autotile + (id 36) + (solid #t) + (mask "11111111") + ) + (autotile + (id 37) + (solid #t) + (mask "*0*11111") + ) + (autotile + (id 38) + (solid #t) + (mask "*1101011") + ) + (autotile + (id 39) + (solid #t) + (mask "*0*10110") + ) + (autotile + (id 40) + (solid #t) + (mask "*1101*0*") + ) + (autotile + (id 41) + (solid #t) + (mask "11111*0*") + ) + (autotile + (id 42) + (solid #t) + (mask "11*10*0*") + ) + (autotile + (id 43) + (solid #t) + (mask "11*10110") + ) + (autotile + (id 5168) + (solid #t) + (mask "01111111") + ) + (autotile + (id 5169) + (solid #t) + (mask "11011111") + ) + (autotile + (id 5170) + (solid #t) + (mask "01011111") + ) + (autotile + (id 5175) + (solid #t) + (mask "11111011") + ) + (autotile + (id 5176) + (solid #t) + (mask "11111110") + ) + (autotile + (id 5177) + (solid #t) + (mask "11111010") + ) + (autotile + (id 5178) + (solid #t) + (mask "*0*01010") + ) + (autotile + (id 5179) + (solid #t) + (mask "*0*11010") + ) + (autotile + (id 5180) + (solid #t) + (mask "*0*10010") + ) + (autotile + (id 5181) + (solid #t) + (mask "11011*0*") + ) + (autotile + (id 5182) + (solid #t) + (mask "01111*0*") + ) + (autotile + (id 5183) + (solid #t) + (mask "*0*11110") + ) + (autotile + (id 5184) + (solid #t) + (mask "*0*11011") + ) + (autotile + (id 5185) + (solid #t) + (mask "*1001*0*") + ) + (autotile + (id 5186) + (solid #t) + (mask "01011*0*") + ) + (autotile + (id 5187) + (solid #t) + (mask "01*10*0*") + ) + (autotile + (id 5188) + (solid #t) + (mask "*1001011") + ) + (autotile + (id 5189) + (solid #t) + (mask "01*10110") + ) + (autotile + (id 5190) + (solid #t) + (mask "*1*00011") + ) + (autotile + (id 5191) + (solid #t) + (mask "*0*00110") + ) + (autotile + (id 1739) + (solid #t) + (mask "*1*00010") + ) + (autotile + (id 1740) + (solid #t) + (mask "*0*00010") + ) + (autotile + (id 1741) + (solid #f) + (mask "*****010") + ) + (autotile + (id 5198) + (solid #t) + (mask "*0*00011") + ) + (autotile + (id 7253) + (solid #t) + (mask "01*10011") + ) + (autotile + (id 7254) + (solid #t) + (mask "11*10011") + ) + (autotile + (id 7255) + (solid #t) + (mask "01*10010") + ) + (autotile + (id 7256) + (solid #t) + (mask "*1001110") + ) + (autotile + (id 7257) + (solid #t) + (mask "*1101110") + ) + (autotile + (id 7258) + (solid #t) + (mask "01001010") + (mask "*1001010") + (mask "11001010") + ) + (autotile + (id 7259) + (solid #t) + (mask "01111010") + ) + (autotile + (id 7260) + (solid #t) + (mask "01*10111") + ) + (autotile + (id 7261) + (solid #t) + (mask "*1001111") + ) + (autotile + (id 7262) + (solid #t) + (mask "01111110") + ) + (autotile + (id 7263) + (solid #t) + (mask "11011011") + ) (autotile - (id 5300) - (solid #f) - (mask "*0*11*0*") - ) + (id 7264) + (solid #t) + (mask "11011110") + ) (autotile - (id 5334) - (solid #f) - (mask "00100*1*") - ) + (id 7265) + (solid #t) + (mask "01111011") + ) (autotile - (id 5335) - (solid #f) - (mask "10000*1*") - ) + (id 7266) + (solid #t) + (mask "11011010") + ) (autotile - (id 5336) - (solid #f) - (mask "10100*1*") - ) + (id 7267) + (solid #t) + (mask "01011110") + (mask "01011110") + ) (autotile - (id 5337) - (solid #f) - (mask "10100000") - ) + (id 7268) + (solid #t) + (mask "01011011") + (mask "01011011") + ) (autotile - (id 3965) - (solid #f) - (mask "*1*00001") - ) + (id 7269) + (solid #t) + (mask "11*10010") + ) (autotile - (id 3959) - (solid #f) - (mask "*1*00100") - ) + (id 7270) + (solid #t) + (mask "*1101010") + ) (autotile - (id 5340) - (solid #f) - (mask "*1*00101") - ) + (id 7271) + (solid #t) + (mask "*0*10011") + ) (autotile - (id 5341) - (solid #f) - (mask "*1*11*1*") - ) + (id 7272) + (solid #t) + (mask "*0*01110") + ) (autotile - (id 5342) - (solid #f) - (mask "00*0110*") - ) + (id 5156) + (solid #t) + (mask "*0*00111") + ) (autotile - (id 5343) - (solid #f) - (mask "*0010*01") - ) + (id 5162) + (solid #t) + (mask "11*10111") + ) (autotile - (id 5344) - (solid #f) - (mask "10100001") - ) + (id 119) + (solid #t) + (mask "*0*01*0*") + ) (autotile - (id 5345) - (solid #f) - (mask "10100101") - ) + (id 120) + (solid #t) + (mask "*0*10*0*") + ) (autotile - (id 5346) - (solid #f) - (mask "10*0100*") - ) + (id 121) + (solid #t) + (mask "*0*11*0*") + ) (autotile - (id 5347) - (solid #f) - (mask "*0110*00") - ) + (id 5163) + (solid #t) + (mask "*1*00111") + ) (autotile - (id 5348) - (solid #f) - (mask "10100100") - ) + (id 5161) + (solid #t) + (mask "*1101111") + ) (autotile - (id 5349) - (solid #f) - (mask "10000101") - ) + (id 35) + (solid #t) + (mask "*0*01011") + ) (autotile - (id 5350) + (id 34) (solid #f) - (mask "10*0110*") - ) + (mask "*****110") + ) (autotile - (id 5351) - (solid #f) - (mask "*0110*01") - ) + (id 5197) + (solid #t) + (mask "*1*00110") + ) (autotile - (id 5352) - (solid #f) - (mask "*1*10*01") + (id 5196) + (solid #t) + (mask "01011010") ) + ) + (autotileset + (name "retro snow") + (default 4000) (autotile - (id 5353) + (id 4100) (solid #f) - (mask "00100101") - ) + (mask "*****011") + ) (autotile - (id 5354) + (id 4101) (solid #f) - (mask "10*01*1*") - ) + (mask "*****110") + ) (autotile - (id 5355) + (id 4102) (solid #f) - (mask "*0110*1*") - ) + (mask "*****111") + ) (autotile - (id 5356) - (solid #f) - (mask "*1*0110*") - ) + (id 4103) + (solid #t) + (mask "*1101*0*") ) - (autotileset - (name "ice_chunks") - (default 3977) (autotile - (id 3972) + (id 4000) + (alt-id + (id 4078) + (weight 0.01) + ) (solid #t) - (mask "*0*01*11") - ) + (mask "11111111") + ) (autotile - (id 3973) + (id 4001) + (alt-id + (id 4002) + (weight 0.2) + ) + (alt-id + (id 4003) + (weight 0.1) + ) (solid #t) (mask "*0*11111") - ) + ) (autotile - (id 3974) + (id 4157) (solid #t) - (mask "*0*1011*") - ) + (mask "*0*01011") + ) (autotile - (id 3975) + (id 4158) (solid #t) - (mask "11011111") - ) + (mask "*0*10110") + ) (autotile - (id 3976) + (id 4159) (solid #t) - (mask "*1101*11") - ) + (mask "*1101111") + ) (autotile - (id 3977) + (id 4160) (solid #t) - (mask "11111111") - ) + (mask "11*10111") + ) (autotile - (id 3978) + (id 4161) (solid #t) - (mask "11*1011*") - ) + (mask "*1101011") + ) (autotile - (id 3979) + (id 4162) (solid #t) - (mask "01111111") - ) + (mask "11*10110") + ) (autotile - (id 3980) + (id 4163) (solid #t) - (mask "*1101*0*") - ) + (mask "01111111") + ) (autotile - (id 3981) + (id 4164) (solid #t) - (mask "11111*0*") - ) + (mask "11011111") + ) (autotile - (id 3982) + (id 4165) (solid #t) (mask "11*10*0*") - ) + ) + (autotile + (id 4166) + (solid #t) + (mask "11111011") + ) + (autotile + (id 4167) + (solid #t) + (mask "11111110") + ) + (autotile + (id 4168) + (solid #t) + (mask "*0*01111") + ) + (autotile + (id 4169) + (solid #t) + (mask "*0*10111") + ) + (autotile + (id 4170) + (alt-id + (id 4171) + (weight 0.2) + ) + (alt-id + (id 4172) + (weight 0.1) + ) + (solid #t) + (mask "*0*11*0*") + ) (autotile - (id 3983) + (id 4173) (solid #t) - (mask "11111011") - ) + (mask "*1*00110") + ) (autotile - (id 3984) + (id 4174) (solid #t) - (mask "*1*00*0*") - ) + (mask "01*10010") + ) (autotile - (id 3985) + (id 4175) (solid #t) - (mask "11011011") - ) + (mask "*1*00011") + ) (autotile - (id 3986) + (id 4176) (solid #t) - (mask "01111110") - ) + (mask "*1001010") + ) (autotile - (id 3987) + (id 4177) (solid #t) - (mask "11111110") - ) + (mask "01111011") + ) (autotile - (id 5206) + (id 4178) (solid #t) (mask "11011110") - ) - (autotile - (id 5207) - (solid #t) - (mask "*0*11*0*") - ) + ) (autotile - (id 5208) + (id 4179) (solid #t) - (mask "01111011") - ) + (mask "*1*00111") + ) (autotile - (id 5209) + (id 4180) (solid #t) - (mask "11111010") - ) + (mask "01011010") + ) (autotile - (id 5210) + (id 4181) (solid #t) (mask "*0*01*0*") - ) + ) (autotile - (id 5211) + (id 4182) (solid #t) (mask "*0*10*0*") - ) + ) (autotile - (id 5212) + (id 4183) (solid #t) - (mask "*0*00*1*") - ) + (mask "01011111") + ) (autotile - (id 5213) + (id 4184) (solid #t) - (mask "*1*00*1*") - ) + (mask "11111010") + ) (autotile - (id 5214) - (solid #t) - (mask "11011*0*") - ) + (id 4185) + (solid #f) + (mask "*****010") + ) (autotile - (id 5215) + (id 4186) (solid #t) - (mask "01111*0*") - ) + (mask "*0*00010") + ) (autotile - (id 5216) + (id 4187) (solid #t) - (mask "01011*0*") - ) + (mask "*1*00010") + ) (autotile - (id 5217) + (id 4188) (solid #t) - (mask "01011111") - ) + (mask "*1*00*0*") + ) (autotile - (id 5218) + (id 4189) (solid #t) - (mask "*0*11110") - ) + (mask "*0*00*0*") + ) (autotile - (id 5219) + (id 4190) (solid #t) - (mask "*0*11011") - ) + (mask "01*10110") + ) (autotile - (id 5220) + (id 4191) (solid #t) - (mask "*0*11010") - ) + (mask "11*10010") + ) (autotile - (id 5221) + (id 4192) (solid #t) - (mask "*0*00*0*") - ) + (mask "*1001011") + ) (autotile - (id 5222) + (id 4193) (solid #t) - (mask "11*1001*") - ) + (mask "*1101010") + ) (autotile - (id 5223) + (id 4194) (solid #t) - (mask "*1101*10") - ) + (mask "*0*00111") + ) (autotile - (id 5224) + (id 5093) (solid #t) (mask "01011110") - ) - (autotile - (id 5225) - (solid #t) - (mask "01011010") - ) + ) (autotile - (id 5226) + (id 5094) (solid #t) - (mask "01*1011*") - ) + (mask "*0*00011") + ) (autotile - (id 5227) + (id 5095) (solid #t) - (mask "*1001*11") - ) + (mask "01011*0*") + ) (autotile - (id 5228) + (id 5096) (solid #t) (mask "01011011") - ) - (autotile - (id 5229) - (solid #t) - (mask "01111010") - ) + ) (autotile - (id 5230) + (id 5097) (solid #t) - (mask "01*1001*") - ) + (mask "*0*00110") + ) (autotile - (id 5231) + (id 5098) (solid #t) - (mask "*1001*10") - ) + (mask "11011*0*") + ) (autotile - (id 5232) + (id 5099) (solid #t) - (mask "*0*01*10") - ) + (mask "01*10*0*") + ) (autotile - (id 5233) + (id 5100) (solid #t) - (mask "11011010") - ) + (mask "01*10111") + ) (autotile - (id 5234) + (id 5101) (solid #t) - (mask "01*10*0*") - ) + (mask "01111*0*") + ) (autotile - (id 5235) + (id 5102) (solid #t) (mask "*1001*0*") - ) + ) (autotile - (id 5236) + (id 5103) (solid #t) - (mask "*0*1001*") - ) + (mask "*1001111") ) - (autotileset - (name "rope") - (default 3459) (autotile - (id 4334) + (id 5104) (solid #t) - (mask "*0*01*1*") - ) + (mask "*0*11010") + ) (autotile - (id 4335) + (id 5105) (solid #t) - (mask "*0*10*1*") - ) + (mask "*0*10010") + ) (autotile - (id 3064) + (id 5106) (solid #t) - (mask "*1*01*1*") - ) + (mask "*0*10011") + ) (autotile - (id 3065) + (id 5107) (solid #t) - (mask "*0*11*1*") - ) + (mask "01*10011") + ) (autotile - (id 4338) + (id 5108) (solid #t) - (mask "*1*01*0*") - ) + (mask "*0*11110") + (mask "00111110") + ) (autotile - (id 4339) + (id 5109) (solid #t) - (mask "*1*10*0*") - ) + (mask "*0*01010") + ) (autotile - (id 3067) + (id 5110) (solid #t) - (mask "*1*11*0*") - ) + (mask "*0*01110") + ) (autotile - (id 3066) + (id 5111) (solid #t) - (mask "*1*10*1*") - ) + (mask "*1001110") + ) (autotile - (id 4332) + (id 5112) (solid #t) - (mask "*0*01*0*") - ) + (mask "*0*11011") + (mask "10011011") + ) (autotile - (id 4336) + (id 5113) (solid #t) - (mask "*0*00*1*") - ) + (mask "11011010") + ) (autotile - (id 3062) + (id 5114) (solid #t) - (mask "*0*11*0*") - ) + (mask "01111010") + ) (autotile - (id 3060) + (id 5115) (solid #t) - (mask "*1*00*1*") - ) + (mask "11011011") + ) (autotile - (id 3061) + (id 5116) (solid #t) - (mask "*1*00*0*") - ) + (mask "01111110") + ) (autotile - (id 4333) + (id 7275) (solid #t) - (mask "*0*10*0*") - ) + (mask "*1101110") + ) (autotile - (id 3063) + (id 7276) (solid #t) - (mask "*1*11*1*") - ) + (mask "11*10011") + ) (autotile - (id 4337) + (id 4079) + (alt-id + (id 4080) + (weight 0.2) + ) + (alt-id + (id 4081) + (weight 0.1) + ) (solid #t) - (mask "*0*00*0*") + (mask "11111*0*") ) ) ) diff --git a/data/images/creatures/ghosttree/hudlife.png b/data/images/creatures/ghosttree/hudlife.png new file mode 100644 index 00000000000..80d24a63c60 Binary files /dev/null and b/data/images/creatures/ghosttree/hudlife.png differ diff --git a/data/images/engine/editor/objects.stoi b/data/images/engine/editor/objects.stoi index 090bfbc3ef9..a0314e2b306 100644 --- a/data/images/engine/editor/objects.stoi +++ b/data/images/engine/editor/objects.stoi @@ -177,7 +177,10 @@ (icon "images/engine/editor/stalactite_ice_yeti.png")) (object (class "dart") - (icon "images/creatures/darttrap/granito/root_dart_left.png")) + (icon "images/creatures/darttrap/granito/root_dart_left.png")) + (object + (class "bigsnowball") + (icon "images/objects/big_snowball/big_snowball.png")) ) (objectgroup diff --git a/data/images/objects/big_snowball/big_snowball.png b/data/images/objects/big_snowball/big_snowball.png new file mode 100644 index 00000000000..f8e7f6d46e7 Binary files /dev/null and b/data/images/objects/big_snowball/big_snowball.png differ diff --git a/data/images/objects/big_snowball/big_snowball.sprite b/data/images/objects/big_snowball/big_snowball.sprite new file mode 100644 index 00000000000..73ea8fd4c4b --- /dev/null +++ b/data/images/objects/big_snowball/big_snowball.sprite @@ -0,0 +1,11 @@ +(supertux-sprite + (action + (name "default") + (hitbox 6 6 87 84) + (images "big_snowball.png")) + + (action + (name "particle") + (hitbox 2 2 29 28) + (images "big_snowball_particle.png")) +) diff --git a/data/images/objects/big_snowball/big_snowball_particle.png b/data/images/objects/big_snowball/big_snowball_particle.png new file mode 100644 index 00000000000..1a6ba6c96dd Binary files /dev/null and b/data/images/objects/big_snowball/big_snowball_particle.png differ diff --git a/data/images/objects/platforms/big.png b/data/images/objects/platforms/big.png index 61f59fc07da..ab7e91031c5 100644 Binary files a/data/images/objects/platforms/big.png and b/data/images/objects/platforms/big.png differ diff --git a/data/images/objects/platforms/small.png b/data/images/objects/platforms/small.png index 301653f9ced..6c1d54eed1b 100644 Binary files a/data/images/objects/platforms/small.png and b/data/images/objects/platforms/small.png differ diff --git a/data/images/objects/platforms/vertical-wood.png b/data/images/objects/platforms/vertical-wood.png index 06c7de58f91..54f9ba800ad 100644 Binary files a/data/images/objects/platforms/vertical-wood.png and b/data/images/objects/platforms/vertical-wood.png differ diff --git a/data/images/objects/platforms/wood-fivetiles.png b/data/images/objects/platforms/wood-fivetiles.png index ac87565fc1b..5f15d86e945 100644 Binary files a/data/images/objects/platforms/wood-fivetiles.png and b/data/images/objects/platforms/wood-fivetiles.png differ diff --git a/data/images/objects/platforms/wood-tiny.png b/data/images/objects/platforms/wood-tiny.png index 60f78f5b69d..084ef372103 100644 Binary files a/data/images/objects/platforms/wood-tiny.png and b/data/images/objects/platforms/wood-tiny.png differ diff --git a/data/images/particles/rain0.png b/data/images/particles/rain0.png index f9cbf3a60da..2d19ed9f5f7 100644 Binary files a/data/images/particles/rain0.png and b/data/images/particles/rain0.png differ diff --git a/data/images/particles/rain1.png b/data/images/particles/rain1.png index 04dc1e16fd7..eb915aea9d9 100644 Binary files a/data/images/particles/rain1.png and b/data/images/particles/rain1.png differ diff --git a/data/images/particles/rainsplash-1.png b/data/images/particles/rainsplash-1.png index 2748e11482f..5a9c6ddd959 100644 Binary files a/data/images/particles/rainsplash-1.png and b/data/images/particles/rainsplash-1.png differ diff --git a/data/images/particles/rainsplash-2.png b/data/images/particles/rainsplash-2.png index 26d4c9cf4c1..ca35d5298ca 100644 Binary files a/data/images/particles/rainsplash-2.png and b/data/images/particles/rainsplash-2.png differ diff --git a/data/images/particles/rainsplash-3.png b/data/images/particles/rainsplash-3.png index 9ef77933937..b7f6176a1ff 100644 Binary files a/data/images/particles/rainsplash-3.png and b/data/images/particles/rainsplash-3.png differ diff --git a/data/images/particles/rainsplash-4.png b/data/images/particles/rainsplash-4.png index 3e6a83c65d2..39df79b8020 100644 Binary files a/data/images/particles/rainsplash-4.png and b/data/images/particles/rainsplash-4.png differ diff --git a/data/images/tiles.strf b/data/images/tiles.strf index 0df7786eeb0..20d8eed0090 100644 --- a/data/images/tiles.strf +++ b/data/images/tiles.strf @@ -1,5 +1,5 @@ ;; -*- scheme -*- -;; This file contains the mapping from tile-ids to image files as well +;; This file contains the mapping from tile-ids to images files as well ;; as the tile properties (unisolid, solid, ice, water, etc.). Since ;; it is important that the tile-ids don't change once created and ;; used in a level some care has to be taken when editing this file, @@ -19,52 +19,42 @@ (source "autotiles.satc") ) - ;; next-id: 7195 + ;; next-id: 7312 ;; free/skipped ids (please use before any other): 101 - ;; 2080-2084 are empty tiles, 4619-4660, 4719-4722, 5023-5092, 5205, 5268-5283, 5433-5527, 6962-6977, 7002 7005 7007 7008 7173 + ;; 2080-2084 are empty tiles, 4619-4660, 4719-4722, 5037-5092, 5205, 5268-5283, 5433-5527, 6962-6977, 7002 7005 7007 7008 7173 ;; No group ids are currently skipped! Delete this line if any are and replace it with said ids... (tilegroup (name (_ "Snow")) (tiles 7 8 9 202 - 13 14 15 204 + 13 14 15 203 10 11 12 206 - 16 17 18 205 - - 5238 5239 5240 5241 - 5244 5245 0 5247 - 5250 5251 0 5253 - 0 5257 5258 0 - 5262 5263 5264 5265 - 5242 5243 5254 5255 - 5248 5249 5260 5261 - 0 0 5266 5267 - - 30 31 114 113 - 21 22 19 203 - 20 23 207 208 - 3044 3045 3046 3047 - 3048 3049 3050 3051 - 3052 3053 3055 1539 - 3056 3057 3059 0 - 4009 4010 4011 4012 - 4013 4014 4015 4016 - 4017 4018 4019 4020 - 4021 4022 4023 4024 - 4025 4026 4027 4028 - 4029 4030 4031 4032 - 4033 4034 4035 214 - 5528 5529 0 0 - 5532 5533 0 0 + 16 17 18 3059 + + 8 8 8 8 + 14 3988 3989 3990 + 5368 5369 19 1539 + 3991 3991 3991 3991 115 116 5364 5365 117 118 5366 5367 + 5238 5239 5240 5241 + 5244 5245 11 5247 + 202 7 8 9 + 5250 5251 14 5253 + 30 31 7 9 + 21 22 114 113 + 20 23 23 20 + + 3055 204 0 0 + 205 214 0 0 + 5538 5539 5540 0 5544 5545 5546 5553 5550 5551 5552 5554 5541 5542 5543 5549 - 5547 5548 0 0 + 5547 5548 5536 5537 2121 2123 5530 5531 2131 2133 5534 5535 @@ -73,44 +63,78 @@ 2124 2132 2125 0 2128 0 2126 0 2129 2122 2130 0 - 5536 5537 0 0 - - 3988 3989 3990 3991 - - 5368 5369 5370 5371 - 5372 5373 5374 5375 - 5376 5377 5378 5379 - 5380 5381 0 0 - 5384 5385 5386 5387 - 5388 5389 5390 5391 - 5392 5393 0 0 - 5396 5397 0 0 - - 2909 2910 2913 2914 - 2911 2912 2915 2916 - 1834 0 0 1835 - 2917 2918 2921 2922 - 2919 2920 2923 2924 - 0 1826 1827 0 + + 0 1826 1827 0 1829 1830 1831 1832 1833 1834 1835 1836 - 3139 3140 3141 3142 - 3143 3144 3145 3146 - 0 3147 3148 0 - 3149 0 0 3150 - 3151 3152 3153 3154 - 3155 3156 3157 3158 - 0 1835 1834 0 - 1837 1838 1843 1844 - 1839 1840 1845 1846 - 1841 1842 1847 1848 - 0 0 1849 1850 - 2925 2926 2929 2930 0 2928 2931 0 + 0 0 1843 1844 + 1837 1838 1845 1846 + 1839 1840 1847 1848 + 1841 1842 1849 1850 2933 2935 2937 2940 2934 2936 2938 2941 0 0 2939 2942 + + 0 1826 1827 0 + 5384 1830 1831 5385 + 5388 1834 1835 5389 + 5372 2926 2929 5373 + 0 2928 2931 0 + 0 0 1843 1844 + 1837 1838 1845 1846 + 5386 5387 5392 5393 + 5390 5391 5396 5397 + 5370 5371 5374 5375 + 2934 2936 2938 2941 + 0 0 2939 2942 + + 0 5257 5258 0 + 5262 5263 5264 5265 + 0 0 5254 5255 + 5242 5243 5260 5261 + 5248 5249 5266 5267 + + 0 5257 5258 0 + 5376 5263 5264 5377 + 0 0 5254 5255 + 5242 5243 5260 5261 + 5378 5379 5380 5381 + + 0 0 2909 2910 + 2921 2922 2911 2912 + 2923 2924 1834 11 + 2913 2914 0 0 + 2915 2916 2917 2918 + 11 1835 2919 2920 + + 3139 3140 0 0 + 3143 3144 3149 0 + 11 3147 3151 3152 + 5368 5369 3155 3156 + 11 5368 5369 1835 + + 0 0 3141 3142 + 0 3150 3145 3146 + 3153 3154 3148 11 + 3157 3158 5368 5369 + 1834 5368 5369 11 + + 3044 3045 3046 3047 + 3048 3049 3050 3051 + 3052 3053 207 5532 + 3056 3057 208 5533 + 4009 4010 4011 4012 + 4013 4014 4015 4016 + 4017 4018 4019 4020 + 4021 4022 4023 4024 + 4025 4026 4027 4028 + 4029 4030 4031 4032 + 4033 4034 4035 0 + 5528 5529 0 0 + + ;; Walljump + Unisolid + Ice Spike 4104 4105 4106 0 4109 4110 4111 0 @@ -123,13 +147,13 @@ 2057 2058 2059 5423 2062 2063 2064 0 2067 2068 2069 0 + 5428 5429 5430 0 2072 2073 2074 0 5411 2068 5415 2070 2077 2073 2078 2071 5416 5417 5408 5409 5412 5413 5431 5432 5421 5427 5420 5426 - 5428 5429 5430 0 5418 5419 5424 5425 5410 5414 0 0 @@ -141,6 +165,8 @@ 2155 2156 2157 2163 2158 2159 2154 0 2160 2161 2162 0 + + ;; Underground Snow 2384 2385 2386 2949 2387 2388 2389 2950 @@ -151,46 +177,46 @@ 2957 2962 2398 2396 2958 2961 2399 2397 2959 2960 2997 2998 - - 4037 4038 4039 4040 - 4041 4042 4043 4044 - 4045 4046 4047 4048 - 4049 4050 4051 4052 - 4053 4054 4055 4056 - 4057 4058 4059 4060 - 4061 4062 4063 4064 - 4065 4066 4067 4068 - 4069 4070 4071 4072 - 4073 4074 4075 4076 - - 4077 0 2963 2969 + + 0 2986 2990 0 + 2983 2987 2991 2994 + 2984 2988 2992 2995 + 2962 2391 2391 2957 + 2985 2989 2993 2996 + 0 0 2963 2969 2975 2979 2964 2970 2976 2980 2965 2971 2977 2981 2966 2972 + 2962 2957 2962 2957 2978 2982 2967 2973 0 0 2968 2974 + 0 2986 2990 0 - 2983 2987 2991 2994 - 2984 2988 2992 2995 - 2985 2989 2993 2996 + 7053 2987 2991 7054 + 5639 2988 2992 5640 - 6978 6979 6980 6981 - 6982 6983 6984 6985 - 2988 0 0 2992 - 6986 6987 6988 6989 - 6990 6991 6992 6993 - 6994 6995 6996 6997 - 6998 6999 7000 7001 - 0 7003 7004 0 - 7006 0 0 7009 - 7010 7011 7012 7013 - 7014 7015 7016 7017 - 0 2992 2988 0 - - 7053 7054 5604 5605 - 5639 5640 5614 5629 - 5636 5673 0 0 - 5684 5695 0 0 + 0 0 2963 2969 + 2975 2979 2964 2970 + 5604 5605 5636 5673 + 5614 5629 5684 5695 + + 6980 6981 0 0 + 6984 6985 6986 6987 + 2391 2992 6990 6991 + 0 0 6978 6979 + 6988 6989 6982 6983 + 6992 6993 2988 2391 + + 6994 6995 0 0 + 6998 6999 7006 0 + 2391 7003 7010 7011 + 0 2391 7014 7015 + 0 0 2391 2992 + 0 0 6996 6997 + 0 7009 7000 7001 + 7012 7013 7004 2391 + 7016 7017 2391 0 + 2988 2391 0 0 7018 7019 7020 0 7025 0 7027 0 @@ -201,7 +227,21 @@ 7028 7029 7030 7031 7035 7036 7037 7038 7042 7043 7044 7045 - + + 4037 4038 4039 4040 + 4041 4042 4043 4044 + 4045 4046 4047 4048 + 4049 4050 4051 4052 + 4053 4054 4055 4056 + 4057 4058 4059 4060 + 4061 4062 4063 4064 + 4065 4066 4067 4068 + 4069 4070 4071 4072 + 4073 4074 4075 4076 + 4077 0 0 0 + + ;; Snowfort + Ice Chunck + 3930 3931 3932 3939 3933 3934 3935 3941 3936 3937 3938 3940 @@ -233,18 +273,26 @@ 5302 5303 5304 5305 5306 5307 5308 5309 - 3972 3973 3974 3975 - 3976 3977 3978 3979 - 3980 3981 3982 3983 - 3984 3985 3986 3987 - 5206 5207 5208 5209 - 5210 5211 5212 5213 - 5214 5215 5216 5217 - 5218 5219 5220 5221 - 5222 5223 5224 5225 - 5226 5227 5228 5229 - 5230 5231 5232 5233 - 5234 5235 5236 0 + 3972 3973 3974 5212 + 3976 3977 3978 5213 + 3980 3981 3982 3984 + 5210 5207 5211 5221 + 7195 7196 7197 7198 + 7199 7200 7201 7202 + 7203 7204 7207 7209 + 7205 7206 7208 7210 + 0 0 7211 7212 + 0 0 7213 7214 + 3987 3983 5232 5236 + 3975 3979 5235 5234 + 5225 5209 5224 5228 + 5206 5208 5217 3985 + 5233 5229 3986 0 + 5214 5215 5216 0 + 5218 5219 5220 0 + 5222 5223 0 0 + 5226 5227 0 0 + 5230 5231 0 0 ) ) @@ -275,11 +323,6 @@ 1329 1330 1331 1332 1333 1334 1335 1336 - 85 86 87 88 - 89 90 91 92 - 3419 3420 3421 3422 - 3423 3424 3425 3426 - 2611 2612 2613 2614 2619 2620 2621 2622 2623 2624 2625 2626 @@ -297,28 +340,65 @@ ) (tilegroup - (name (_ "Crystal")) - (tiles + (name (_ "Crystal")) + (tiles 4723 4724 4725 4726 4736 4737 4738 4739 4749 4750 4751 4752 4762 4763 4764 4765 4775 4776 4777 4778 4788 4789 4790 4791 + + 4723 4724 4725 4726 + 7221 7222 7223 7224 + 4788 4789 4790 4791 + 7215 7215 4766 4740 + 7216 7225 4753 4727 + 7217 7220 0 0 + 7218 0 0 0 + 7219 0 0 0 + 7220 0 0 0 4728 4729 4730 4731 4741 4742 4743 4744 4754 4755 4756 4757 4767 4768 4769 4770 - 0 4781 4782 0 4732 4733 4734 4735 4745 4746 4747 4748 4758 4759 4760 4761 4771 4772 4773 4774 - 4784 4785 4786 4787 - 4797 4798 4766 4740 - 4810 4811 4753 4727 + 4784 4785 0 0 + 4797 4798 0 0 + + 4728 4729 4730 4731 + 5023 4742 4743 5024 + 5025 4755 4756 5026 + 5027 4768 4769 5028 + + 4732 4733 4734 4735 + 4745 4746 5029 5030 + 5033 5034 5031 5032 + 5035 5036 4773 4774 + 4784 4785 0 0 + 4797 4798 0 0 + + 7226 7227 7228 7229 + 7230 7231 7232 7233 + 7234 7235 7236 7237 + 7238 7239 7240 7241 + 7242 7243 7244 0 + 7245 7246 7247 0 + 7248 7249 7250 0 + 7251 7252 0 0 + + 7277 7278 7279 7280 + 7282 7283 7284 7285 + 7287 7288 7289 7290 + 7292 7293 7294 7295 + 7297 7298 7299 7300 + 7281 7286 7291 7296 + 7301 0 0 0 4814 4815 4816 4817 4824 4825 4826 4827 @@ -327,19 +407,22 @@ 4854 4855 4856 4857 4864 4865 4866 4867 - 4818 4819 4820 4821 - 4828 4829 4830 4831 - 4838 4839 4840 4841 - 4848 4849 4850 4851 - 4858 4859 4860 4861 - 4868 4869 4870 4871 + 4814 4815 4816 4817 + 4824 4825 4826 4827 + 4834 4835 4836 4837 + 4844 4845 4846 4847 + 4854 4855 4856 4857 + 4864 4865 4866 4867 + 4814 4815 4816 4817 4874 4875 4878 4879 4884 4885 4888 4889 - 4876 4877 4852 4853 - 4886 4887 4862 4863 - 4822 4823 4872 4873 - 4832 4833 4882 4883 - 4842 4843 4892 4893 + 4864 4865 4866 4867 + 4822 4823 0 0 + 4832 4833 0 0 + 4842 4843 0 0 + 4872 4873 0 0 + 4882 4883 0 0 + 4892 4893 0 0 4894 4895 4896 4909 4900 4901 4902 4915 @@ -360,7 +443,7 @@ 4954 4955 0 0 0 4960 0 0 ) - ) + ) (tilegroup (name (_ "Forest")) @@ -370,117 +453,197 @@ 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 - 3621 3622 3623 3624 + 1000 1001 1002 1003 + 3621 3622 3623 3624 + 1723 1724 1725 1726 1817 1013 1014 1820 - 5559 5560 0 5562 - 0 5566 5567 0 - 5571 5572 5573 5574 - 5555 5556 5563 5564 - 5557 5558 5569 5570 - 1819 0 5575 5576 - 1818 1533 1534 1535 - 3472 1536 1537 1538 - 3462 3463 3464 3465 - 3466 3467 3468 3469 - 3470 3471 0 0 - 7070 7071 7060 7066 + 1819 1038 1000 1003 + 1818 5560 5559 5562 + 0 1533 1534 1535 + 0 1536 1537 1538 + + 0 0 1038 1819 + 4317 4318 1044 1738 + 1035 1034 1033 1818 + 1041 1040 1039 1009 + 1000 1003 1038 1038 + 1036 1037 1737 4327 + 1040 1041 1039 3472 + + 5606 5607 5608 0 + 5613 0 5615 0 + 5620 5621 5622 0 + 5627 5628 5637 5638 + 5634 5635 5632 5633 + 5609 5610 5611 5612 + 5616 5617 5618 5619 + 5623 5624 5625 5626 + 5630 5631 0 0 + 0 1060 1061 0 1063 1064 1065 1066 1067 1068 1069 1070 - 1045 1046 1051 1052 - 1047 1048 1053 1054 - 1049 1050 1055 1056 - 1042 1043 1057 1058 - 6044 6045 6046 6047 - 6048 6049 6050 6051 - 6052 6053 0 0 - 6056 6057 0 0 - 6060 6061 6062 6063 - 6064 6065 0 0 - 1035 1034 7058 7059 - 1041 1040 7064 7065 - 1036 1037 1737 1038 - 7055 7056 7057 1044 - 7061 7062 7063 1033 - 7067 7068 7069 1039 + 4318 1009 1009 4317 + 3462 3463 3464 3465 + 0 0 1051 1052 + 1045 1046 1053 1054 + 1047 1048 1055 1056 + 1049 1050 1057 1058 + 4318 4317 4318 4317 + 3468 3469 3466 3467 + 0 0 3470 3471 + + 0 1060 1061 0 + 6044 1064 1065 6045 + 6048 1068 1069 6049 + 0 0 1051 1052 + 1045 1046 1053 1054 + 6046 6047 6052 6053 + 6050 6051 6056 6057 + + 0 5566 5567 0 + 5571 5572 5573 5574 + 0 0 5563 5564 + 5555 5556 5569 5570 + 5557 5558 5575 5576 + + 0 5566 5567 0 + 6060 5572 5573 6061 + 0 0 5563 5564 + 5555 5556 5569 5570 + 6062 6063 6064 6065 + + 6006 6007 0 0 + 6010 6011 6012 6013 + 1009 1069 6016 6017 + 0 0 6004 6005 + 6014 6015 6008 6009 + 6018 6019 1068 1009 + + 6020 6021 0 0 + 6024 6025 6032 0 + 1009 6029 6036 6037 + 1013 1014 6040 6041 + 1009 1013 1014 1069 + 0 0 6022 6023 + 0 6035 6026 6027 + 6038 6039 6030 1009 + 6042 6043 1013 1014 + 1068 1013 1014 1009 + 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 - 4317 4318 4319 4320 - 4321 4322 4323 4324 - 4325 4326 4327 1738 + 4321 4322 4319 4320 + 4325 4326 4323 4324 4328 4329 4330 4331 5586 5587 5588 5589 5591 5592 5593 5594 5596 5597 5598 5599 5600 5601 5602 5603 - 5590 5595 0 0 + 5590 5595 1042 1043 + + ;; Branch + Spike Vine + Foreground + + 4961 4962 4963 0 + 4964 4965 4966 0 + 1569 1571 4119 4120 1570 1573 4121 4122 1572 1574 4123 4124 - 3435 3436 3437 0 - 5606 5607 5608 0 - 5613 0 5615 0 - 5620 5621 5622 0 - 5627 5628 0 0 - 5634 5635 0 0 - 5609 5610 5611 5612 - 5616 5617 5618 5619 - 5623 5624 5625 5626 - 5630 5631 5632 5633 - 5637 5638 0 0 - 6004 6005 6006 6007 - 6008 6009 6010 6011 - 1068 0 0 1069 - 6012 6013 6014 6015 - 6016 6017 6018 6019 - 6020 6021 6022 6023 - 6024 6025 6026 6027 - 6028 6029 6030 6031 - 6032 6033 6034 6035 - 6036 6037 6038 6039 - 6040 6041 6042 6043 - 0 1069 1068 0 - 4961 4962 4963 0 - 4964 4965 4966 0 1972 1976 1980 1984 1973 1977 1981 1985 1974 1978 1982 1986 1975 1979 1983 1987 - 5577 5578 5579 0 - 5580 5581 5582 0 - 5583 5584 5585 0 - + 5577 5578 5583 5579 + 5582 5581 0 0 + 5580 0 0 0 + 5584 0 0 0 + 5585 0 0 0 + + 7055 7056 7057 0 + 7061 7062 7063 0 + 7067 7068 7069 0 + 7058 7059 7070 7071 + 7064 7065 7060 7066 + + ;; Underground Forest + 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1879 1880 + 1860 1861 1862 1863 3479 3480 3481 3482 - 3473 3474 0 0 - 3475 3476 3477 3478 - 3483 0 0 0 - 3484 3485 3488 3489 - 3486 3487 0 0 - 7136 7137 7138 7139 - 7140 7141 7142 0 + + 0 0 3483 3483 + 7136 7137 3484 3484 + 3473 3474 3485 3486 + 3475 3476 3487 3488 + 1860 1863 3483 3483 + 3478 3477 3489 7142 + 3476 3475 3487 0 + 7048 7049 7080 7095 7051 7052 7170 7172 7050 7041 7167 0 - 3491 3492 3493 3494 - 3495 3496 3497 3498 - 3499 3500 0 0 + + 7072 7073 7074 0 + 7079 0 7081 0 + 7086 7087 7088 0 + 7093 7094 0 0 + 7100 7101 0 0 + 7075 7076 7077 7078 + 7082 7083 7084 7085 + 7089 7090 7091 7092 + 7096 7097 7098 7099 + 0 1890 1891 0 1892 1893 1894 1895 1896 1897 1898 1899 + 7137 1869 1869 7136 + 3491 3492 3493 3494 0 0 3507 3508 3501 3502 3509 3510 3503 3504 3511 3512 3505 3506 3513 3514 + 7137 7136 7137 7136 + 3497 3498 3495 3496 + 0 0 3499 3500 + + 0 1890 1891 0 + 7183 1893 1894 7184 + 7187 1897 1898 7188 + 0 0 3507 3508 + 3501 3502 3509 3510 + 7185 7186 7191 7192 + 7189 7190 7193 7194 + + + 7145 7146 0 0 + 7149 7150 7151 7152 + 1869 1898 7155 7156 + 0 0 7143 7144 + 7153 7154 7147 7148 + 7157 7158 1897 1869 + + 7159 7160 0 0 + 7163 7164 7171 0 + 1869 7168 7175 7176 + 1873 1874 7179 7180 + 1869 1873 1874 1898 + 0 0 7161 7162 + 0 7174 7165 7166 + 7177 7178 7169 1869 + 7181 7182 1873 1874 + 1897 1873 1874 1869 + + 7138 7139 7140 7141 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 @@ -490,48 +653,6 @@ 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 0 0 - 7183 7184 7185 7186 - 7187 7188 7189 7190 - 7191 7192 0 0 - 7193 7194 0 0 - - 7143 7144 7145 7146 - 7147 7148 7149 7150 - 1897 0 0 1898 - 7151 7152 7153 7154 - 7155 7156 7157 7158 - 7159 7160 7161 7162 - 7163 7164 7165 7166 - 0 7168 7169 0 - 7171 0 0 7174 - 7175 7176 7177 7178 - 7179 7180 7181 7182 - 0 1898 1897 0 - - 7072 7073 7074 0 - 7079 0 7081 0 - 7086 7087 7088 0 - 7093 7094 0 0 - 7100 7101 0 0 - 7075 7076 7077 7078 - 7082 7083 7084 7085 - 7089 7090 7091 7092 - 7096 7097 7098 7099 - - 1900 1901 1902 1903 - 1904 1905 1906 1907 - 1908 1909 1910 1911 - 1912 1913 1914 1915 - 1956 1957 1958 1959 - 1960 1961 1962 1963 - 1964 1965 1966 1967 - 1968 1969 1970 1971 - - 1936 1937 1938 1939 - 1940 1941 1942 1943 - 1944 1945 1946 1947 - 1948 1949 1950 1951 - 1952 1953 1954 1955 ) ) @@ -547,11 +668,26 @@ 5641 5642 5647 5648 5652 5653 5669 5670 5655 5656 5657 5647 - 5661 0 5660 5659 + 5661 5658 5660 5659 5649 5678 5650 5682 5691 5654 5692 5683 5693 5694 5671 5672 5651 5662 0 0 + + 1900 1901 1902 1903 + 1904 1905 1906 1907 + 1908 1909 1910 1911 + 1912 1913 1914 1915 + 1956 1957 1958 1959 + 1960 1961 1962 1963 + 1964 1965 1966 1967 + 1968 1969 1970 1971 + + 1936 1937 1938 1939 + 1940 1941 1942 1943 + 1944 1945 1946 1947 + 1948 1949 1950 1951 + 1952 1953 1954 1955 402 403 404 405 406 407 408 409 @@ -568,9 +704,9 @@ 450 451 452 453 454 455 456 457 - 323 324 322 360 - 325 326 0 0 - 327 328 0 0 + 323 324 322 0 + 325 326 360 0 + 327 328 6609 0 329 330 0 0 5996 5997 5998 5999 6000 6001 6002 6003 @@ -592,9 +728,9 @@ 2603 2604 2605 2606 2607 2608 2609 2610 - 0 0 5919 5920 - 0 5924 5925 5926 - 0 5930 5931 5932 + 0 0 5919 5920 + 0 5924 5925 5926 + 0 5930 5931 5932 5935 5936 5937 5938 5941 5942 5943 5944 5947 5948 5949 5950 @@ -670,20 +806,20 @@ 5789 5790 5791 0 5798 5799 5800 0 5807 5808 5809 0 - + 6068 6069 6070 6071 6075 6076 6077 6078 6082 6083 6084 6085 6089 6090 6091 6092 - 6096 6097 6098 6099 - 6103 6104 6105 6106 + 5985 5986 5904 5905 + 5991 5992 5912 5913 6072 6073 6074 0 6079 6080 6081 0 6086 6087 6088 0 6093 6094 6095 0 - 6100 6101 6102 0 - 6107 6108 6109 0 - ) + 5798 5799 5800 0 + 5807 5808 5809 0 + ) ) (tilegroup @@ -694,51 +830,81 @@ 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 + 1423 1424 1425 1426 3923 3924 3925 3926 + 6193 6194 6195 6196 + 6199 1432 1432 6202 + 6201 6541 1423 1426 + 6200 6206 6205 6208 + + 6545 3415 3414 6541 + 3417 3373 3374 6542 + 3378 3379 3380 6544 + 6541 1423 1426 6547 + 6543 3375 3376 6541 + 3378 3379 3380 6548 + + 6311 6312 6313 0 + 6318 0 6320 0 + 6325 6326 6327 0 + 6332 6333 0 0 + 6339 6340 0 0 + 6314 6315 6316 6317 + 6321 6322 6323 6324 + 6328 6329 6330 6331 + 6335 6336 6337 6338 + 6342 6343 0 0 + 0 1443 1444 0 1445 1446 1447 1448 1449 1450 1451 1452 - - 3417 3373 3374 3375 - 3378 3379 3380 3381 - 3376 6541 3414 3415 - 3382 6542 3390 3391 + 3415 1432 1432 3414 + 3406 3407 3408 3409 + 0 0 3390 3391 3384 3385 3392 3393 3386 3387 3394 3395 3388 3389 3396 3397 - 6705 6706 6707 6708 - 6709 6710 6711 6712 - 6713 6714 0 0 - 6717 6718 0 0 - 6721 6722 6723 6724 - 6725 6726 0 0 - - 6271 6272 6273 6274 - 6275 6276 6277 6278 - 1450 0 0 1451 - 6279 6280 6281 6282 - 6283 6284 6285 6286 - 6287 6288 6289 6290 - 6291 6292 6293 6294 - 0 6296 6297 0 - 6299 0 0 6302 - 6303 6304 6305 6306 - 6307 6308 6309 6310 - 0 1451 1450 0 - - 6543 6544 6546 3401 - 3406 3407 3408 3409 - 6547 6548 6205 6206 + 3415 3414 3415 3414 3410 3411 3412 3413 - 6208 0 3416 3418 - 6193 6194 6196 6201 - 6199 6195 6202 6200 - 6549 6550 6551 6552 - 6211 6212 6213 6214 + 0 0 3416 3418 + + 0 6212 6213 0 6217 6218 6219 6220 - 6197 6198 6209 6210 - 6203 6204 6215 6216 - 0 0 6221 6222 + 0 0 6209 6210 + 6197 6198 6215 6216 + 6203 6204 6221 6222 + + 0 6212 6213 0 + 6721 6218 6219 6722 + 0 0 6209 6210 + 6197 6198 6215 6216 + 6723 6724 6725 6726 + 0 1443 1444 0 + 6705 1446 1447 6706 + 6709 1450 1451 6710 + 0 0 3390 3391 + 3384 3385 3392 3393 + 6707 6708 6713 6714 + 6711 6712 6717 6718 + + 0 0 6271 6272 + 6281 6282 6275 6276 + 6285 6286 1450 1432 + 6273 6274 0 0 + 6277 6278 6279 6280 + 1432 1451 6283 6284 + 0 0 6289 6290 + 0 6302 6293 6294 + 6305 6306 6297 1432 + 6309 6310 1436 1437 + 1450 1436 1437 1432 + 6287 6288 0 0 + 6291 6292 6299 0 + 1432 6296 6303 6304 + 1436 1437 6307 6308 + 1432 1436 1437 1451 + + 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 @@ -750,18 +916,10 @@ 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 - 6597 6598 0 0 - - 6311 6312 6313 0 - 6318 0 6320 0 - 6325 6326 6327 0 - 6332 6333 0 0 - 6339 6340 0 0 - 6314 6315 6316 6317 - 6321 6322 6323 6324 - 6328 6329 6330 6331 - 6335 6336 6337 6338 - 6342 6343 0 0 + 6597 6598 6539 6540 + 6546 0 0 0 + + ;; Branch + Spike Vine + Foreground 4961 4962 4963 0 4964 4965 4966 0 @@ -770,37 +928,91 @@ 6117 6118 6119 6120 6124 6125 6126 6127 6131 6132 6133 6134 - 6114 6115 6116 0 - 6121 6122 6123 0 - 6129 6130 6137 0 + 6114 6115 6129 6116 + 6123 6122 0 0 + 6121 0 0 0 + 6130 0 0 0 + 6137 0 0 0 6410 6411 6412 0 6416 6417 6418 0 6422 6423 6424 0 6413 6414 6425 6415 6419 6420 6426 6421 + + ;; Underground Corrupted Forest 6808 6809 6810 6811 6822 6823 6824 6825 6836 6837 6838 6839 6850 6851 6852 6853 6864 6865 6866 6867 + 6808 6809 6810 6811 6804 6805 6806 6807 + + 0 0 6888 6888 + 6878 6879 6889 6889 + 6880 6881 6893 6891 + 6882 6883 6892 6896 + 6808 6811 6888 6888 + 6884 6885 6890 6897 + 6883 6882 6892 0 + + 6950 6951 6956 6957 + 6953 6954 6959 6960 + 6952 6955 6958 0 + + 6769 6770 6771 0 + 6776 0 6778 0 + 6783 6784 6785 0 + 6790 6791 0 0 + 6797 6798 0 0 + 6772 6773 6774 6775 + 6779 6780 6781 6782 + 6786 6787 6788 6789 + 6793 6794 6795 6796 + 0 6813 6814 0 6826 6827 6828 6829 6840 6841 6842 6843 + 6879 6837 6837 6878 6854 6855 6856 6857 - 6816 6817 6818 6819 - 6830 6831 6832 6833 - 6844 6845 6846 6847 - 6858 6859 6860 6861 - 6878 6879 6820 6821 - 6880 6881 6834 6835 - 6882 6883 6884 6885 + 0 0 6818 6819 + 6816 6817 6832 6833 + 6830 6831 6846 6847 + 6844 6845 6860 6861 + 6879 6878 6879 6878 + 6858 6859 6820 6821 + 0 0 6834 6835 + + 0 6813 6814 0 + 6934 6827 6828 6935 + 6938 6841 6842 6939 + 0 0 6818 6819 + 6816 6817 6832 6833 + 6936 6937 6942 6943 + 6940 6941 6946 6947 + + 6731 6732 0 0 + 6735 6736 6737 6738 + 6837 6842 6741 6742 + 0 0 6729 6730 + 6739 6740 6733 6734 + 6743 6744 6841 6837 + + 6745 6746 0 0 + 6749 6750 6757 0 + 6837 6754 6761 6762 + 6851 6852 6765 6766 + 6837 6851 6852 6842 + + 0 0 6747 6748 + 0 6760 6751 6752 + 6763 6764 6755 6837 + 6767 6768 6851 6852 + 6841 6851 6852 6837 + 6886 6887 6894 6895 - 6888 6889 6896 6897 - 6890 6891 6894 6895 - 6892 6893 0 0 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 @@ -810,36 +1022,6 @@ 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 0 0 - 6950 6951 6956 6957 - 6953 6954 6959 6960 - 6952 6955 6958 0 - 6934 6935 6936 6937 - 6938 6939 6940 6941 - 6942 6943 0 0 - 6946 6947 0 0 - - 6729 6730 6731 6732 - 6733 6734 6735 6736 - 6841 0 0 6842 - 6737 6738 6739 6740 - 6741 6742 6743 6744 - 6745 6746 6747 6748 - 6749 6750 6751 6752 - 0 6754 6755 0 - 6757 0 0 6760 - 6761 6762 6763 6764 - 6765 6766 6767 6768 - 0 6842 6841 0 - - 6769 6770 6771 0 - 6776 0 6778 0 - 6783 6784 6785 0 - 6790 6791 0 0 - 6797 6798 0 0 - 6772 6773 6774 6775 - 6779 6780 6781 6782 - 6786 6787 6788 6789 - 6793 6794 6795 6796 6619 6620 6621 6622 6627 6628 6629 6630 @@ -864,6 +1046,7 @@ 6703 6704 0 0 ) ) + (tilegroup (name (_ "Corrupted Background")) (tiles @@ -897,12 +1080,25 @@ 6398 6399 6400 6401 6406 6407 6408 6409 - 6601 6602 6610 6609 + 6601 6602 6610 0 6603 6604 0 0 6605 6606 0 0 6607 6608 0 0 6611 0 0 6614 6615 6616 6617 6618 + + 0 0 2471 2631 + 2634 2515 2516 2517 + 2518 4153 4154 4155 + 2529 2530 2531 2532 + 2533 2534 2539 2540 + 2541 2542 2543 2544 + 2545 2546 2547 2548 + 2549 2550 2555 2566 + 2571 2572 2573 2574 + 2575 2576 2577 2578 + 2579 2580 2581 2582 + 2587 2588 2589 2590 0 0 0 6225 0 0 6230 6231 @@ -1057,11 +1253,11 @@ 4347 4348 4349 4350 4354 4355 4356 4357 4361 4362 4363 4364 - 4344 4351 4358 4365 - 4345 4346 0 0 - 4352 4353 0 0 - 4359 4360 0 0 - 4366 4367 0 0 + 4344 4358 4365 0 + 4351 4345 4346 0 + 0 4352 4353 0 + 0 4359 4360 0 + 0 4366 4367 0 ) ) @@ -1112,60 +1308,90 @@ (tilegroup (name (_ "Liquid")) (tiles + + ;; Water + 2019 2140 2141 2142 - 2020 0 0 0 + 2020 2020 2020 2020 + 191 192 193 194 187 188 189 190 183 184 185 186 179 180 181 182 175 176 177 178 - 195 0 196 0 - 197 198 199 0 - + 195 176 177 196 + 197 198 198 199 + + ;; Lava + 2136 2137 2138 2139 - 4004 0 0 0 + 4004 4004 4004 4004 ) ) - (tilegroup + (tilegroup (name (_ "Castle")) (tiles - 4553 4554 4555 4556 - 4564 4565 4566 4567 - 4575 4576 4577 4578 - 4557 4558 4559 4560 - 4568 4569 4570 4571 - 4579 4580 4581 4582 - 4561 4583 4592 4593 - 4572 0 0 0 - - 4562 4563 4586 4587 - 4573 4574 4597 4598 - 4584 4585 4608 4609 - 4595 4596 4600 4601 - 4606 4607 4611 4612 - 4588 4589 4590 4591 - 4599 0 0 4602 - - 4463 4464 4465 4466 - 4478 4479 4480 4481 - 4493 4494 4495 4496 - 4467 4468 4469 4470 - 4482 4483 4484 4485 - 4497 4498 4499 4500 - 4471 4501 4514 4515 - 4486 0 0 0 + ;; Ice Castle + + 4553 4569 4555 4556 + 4564 4565 4566 4558 + 4557 4566 4565 4567 + 4575 4577 4580 4578 + + 4581 4582 4559 4560 + 4592 4593 4570 4571 + 4568 4554 0 0 + 4579 4576 0 0 + + 4562 4563 4561 0 + 4573 4574 4572 0 + 4584 4585 4583 0 + 4595 4596 0 0 + 4606 4607 0 0 + + 4586 4587 4586 4587 + 4597 4598 4608 4609 + + 0 0 4588 4600 + 4588 4589 4611 4565 + 4599 4566 4565 4566 + 4601 4591 0 0 + 4565 4612 4590 4591 + 4566 4565 4566 4602 + + ;; Forest Castle + + 4463 4483 4465 4466 + 4478 4479 4480 4468 + 4467 4480 4479 4481 + 4493 4495 4498 4496 + + 4499 4500 4469 4470 + 4514 4515 4484 4485 + 4482 4464 0 0 + 4497 4494 0 0 4543 4544 4545 4546 4516 4529 4530 4531 - 4472 4473 4508 4509 - 4487 4488 4523 4524 - 4502 4503 4538 4539 - 4517 4518 4526 4527 - 4532 4533 4541 4542 - 4510 4511 4512 4513 - 4525 0 0 4528 + 4472 4473 4471 0 + 4487 4488 4486 0 + 4502 4503 4501 0 + 4517 4518 0 0 + 4532 4533 0 0 + + 4508 4509 4508 4509 + 4523 4524 4538 4539 + 0 0 4510 4511 + 4510 4526 4525 4480 + 4541 4479 4480 4479 + 4512 4513 0 0 + 4480 4528 4527 4513 + 4479 4480 4479 4542 + + ;; Ruin + 4474 4475 4476 4477 4489 4490 4491 4492 4504 4505 4506 4507 @@ -1199,10 +1425,8 @@ 1490 1491 1492 0 1497 1498 1499 0 1504 1505 1506 0 - - 1519 1520 1521 1522 - 1523 1524 1525 1526 - 1527 1528 1529 1530 + + ;; Chains 4661 4662 4663 4664 4665 4666 4667 4668 @@ -1211,7 +1435,9 @@ 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 - + + ;; Misc + 1511 1512 1355 0 1513 1514 1356 0 1515 1516 1411 0 @@ -1280,7 +1506,7 @@ 3203 3204 3205 3206 3171 3172 3183 3184 3177 3178 3176 3182 - ) + ) ) (tilegroup @@ -1313,20 +1539,23 @@ (tilegroup (name (_ "Miscellaneous")) (tiles - 130 129 4967 0 - 4970 4969 4968 0 - 3285 3286 2047 3927 - 3287 3288 2048 3928 - 3289 3290 2049 3929 - - 1988 1989 3060 3064 - 1990 1991 3061 3065 - 1992 1993 3062 3066 - 1994 1995 3063 3067 - 3438 3439 4332 4333 - 3440 3441 4336 4337 - 3442 3443 4334 4335 - 3444 3445 4338 4339 + 130 4970 2047 3927 + 129 4969 2048 3928 + 4967 4968 2049 3929 + + 85 86 87 88 + 89 90 91 92 + 3419 3420 3421 3422 + 3423 3424 3425 3426 + + 3285 3286 0 0 + 3287 3288 0 0 + 3289 3290 0 0 + + 3060 3064 4332 4333 + 3061 3065 4336 4337 + 3062 3066 4334 4335 + 3063 3067 4338 4339 2203 2204 2205 0 2206 2207 2208 0 @@ -1334,40 +1563,61 @@ 2523 2524 0 0 2525 2526 0 0 2527 2528 0 0 + + 0 5117 0 0 + 5118 5119 5120 0 + 5121 5122 5124 0 + 5125 5126 5127 0 + 0 7302 0 0 + 7303 7304 7305 0 + 7306 7307 7308 0 + 7309 7310 7311 0 ) ) - (tilegroup (name (_ "Retro Tiles")) (tiles - 4000 4001 4002 4003 - 4078 4079 4080 4081 - 4100 4101 4102 0 - 4157 4158 4159 4160 + + ;; Retro Snow + + 4185 4102 4102 4102 + 4186 4001 4002 4003 + 4187 4000 4000 4000 + 4188 4079 4080 4081 + 4100 4101 4100 4101 + 4157 4158 4168 4169 4161 4162 4163 4164 4103 4165 4166 4167 - 4168 4169 4181 4182 - 4170 4171 4172 4190 - 4173 4175 4185 4191 - 4174 4176 4186 4192 - 4177 4178 4187 4193 - 4179 4183 4188 4194 - 4180 4184 4189 0 + 4100 4101 4159 4160 + 4181 4182 4163 4164 + 4185 4102 4102 4102 + 4189 4170 4171 4172 + 4185 4184 4078 0 + 4194 4179 0 0 + 4183 4183 0 0 + + 4173 4175 4190 4192 + 4174 4176 4191 4193 + 4177 4178 4180 0 5093 5094 5096 5097 5099 5100 5102 5103 5106 5107 5110 5111 5113 5114 5115 5116 5109 5105 5095 5098 5101 5104 5108 5112 - + 7275 7276 0 0 + 93 94 95 96 97 98 99 100 + + ;; Retro Cave 33 32 34 1741 35 37 39 1740 38 36 43 1739 40 41 42 1815 + 33 32 34 1741 119 121 120 1816 5154 5155 5156 5191 @@ -1375,16 +1625,23 @@ 5168 5169 5170 5190 5175 5176 5177 5197 5181 5182 5183 5184 - 5188 5189 5196 0 - 5178 5179 5180 0 - 5185 5186 5187 0 + 5188 5189 5196 7267 + 5178 5179 5180 7268 + 5185 5186 5187 7266 + 7253 7260 7267 7259 + 7254 7261 7268 7265 + 7255 7262 7256 7263 + 7257 7264 7258 7269 + 7270 7271 7272 0 + + ;; Retro Castle 68 65 69 5123 5128 64 5130 5131 67 66 3518 5139 - 3521 3279 3516 5134 - 3517 3519 3522 5135 - 5140 5141 0 0 + 3521 3279 3516 3522 + 3517 3519 5134 5135 + 5140 5141 7273 7274 5144 3277 5146 0 3280 3278 5149 0 ) @@ -1604,9 +1861,9 @@ ) (solid #t) ) + (tiles - (width 13) - (height 5) + (width 13)(height 5) (ids 7 8 9 0 1826 1827 0 1837 1838 1843 1844 2937 2940 13 14 15 1829 1830 1831 1832 1839 1840 1845 1846 2938 2941 @@ -1628,12 +1885,11 @@ 0 0 0 33 17 19 35 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/snow/convex.png") + (images "tiles/snow/convex.png") ) (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 30 31 21 22 @@ -1644,11 +1900,11 @@ 1 1 1 1 ) - (image "tiles/snow/concave.png") + (images "tiles/snow/concave.png") ) + (tiles - (width 2) - (height 5) + (width 2)(height 5) (ids 115 116 117 118 @@ -1663,11 +1919,11 @@ 1 1 1 1 ) - (image "tiles/snow/variants.png") + (images "tiles/snow/variants.png") ) + (tiles - (width 2) - (height 5) + (width 2)(height 5) (ids 114 113 207 208 @@ -1682,11 +1938,11 @@ 1 1 1 1 ) - (image "tiles/snow/special.png") + (images "tiles/snow/special.png") ) + (tiles - (width 3) - (height 3) + (width 3)(height 3) (ids 122 209 123 124 210 125 @@ -1697,22 +1953,20 @@ 0 0 0 0 0 0 ) - (image "tiles/snow/background2.png") + (images "tiles/snow/background2.png") ) + (tile (id 24) - (images - "tiles/snow/grass2.png" - ) + (images "tiles/snow/grass2.png") ) ; Duplicate of 24, retrocompatibility (tile (id 25) (deprecated #t) - (images - "tiles/snow/grass2.png" - ) + (images "tiles/snow/grass2.png") ) + (tile ; dupe of tile 83, this one will be removed. (id 26) @@ -1736,17 +1990,7 @@ (fps 2) (deprecated #t) ) - (tiles - (width 3) - (height 1) - (ids - 27 28 29 - ) - (attributes - 1 1 1 - ) - (image "tiles/blocks/block_horiz.png") - ) + (tile (id 44) (images @@ -1770,20 +2014,13 @@ (object-name "coin") (fps 15) ) - (tile - (id 47) - (images - "tiles/blocks/block4.png" - ) - (solid #t) - ) + (tile (id 48) - (images - "tiles/blocks/block5.png" - ) + (images "tiles/blocks/block5.png") (solid #t) ) + (tiles (width 2) (height 2) @@ -1795,8 +2032,9 @@ 1 1 1 1 ) - (image "tiles/blocks/bigblock.png") + (images "tiles/blocks/bigblock.png") ) + (tile (id 61) (images @@ -1804,6 +2042,7 @@ ) (solid #t) ) + (tile (id 62) (images @@ -1811,6 +2050,7 @@ ) (solid #t) ) + (tile ; dupe of tile 70, this one will be removed. (id 63) @@ -1820,6 +2060,7 @@ ) (solid #t) ) + (tiles (width 2) (height 1) @@ -1829,58 +2070,53 @@ (attributes 1 0 ) - (image "tiles/castle/deprecated/grey_brick_moss.png") + (images "tiles/castle/deprecated/grey_brick_moss.png") (deprecated #t) ) + (tile ; dupe of tile 63, this one will be kept. (id 70) (deprecated #t) - (images - "tiles/snow/underground/background.png" - ) + (images "tiles/snow/underground/background.png") (solid #t) ) + (tile (id 71) (deprecated #t) - (images - "tiles/background/deprecated/backgroundtile2.png" - ) + (images "tiles/background/deprecated/backgroundtile2.png") (solid #t) ) + (tile (id 72) (deprecated #t) - (images - "tiles/background/deprecated/backgroundtile3.png" - ) + (images "tiles/background/deprecated/backgroundtile3.png") (solid #t) ) + (tile (id 73) (deprecated #t) - (images - "tiles/background/deprecated/backgroundtile4.png" - ) + (images "tiles/background/deprecated/backgroundtile4.png") (solid #t) ) + (tile (id 74) (deprecated #t) - (images - "tiles/background/deprecated/backgroundtile5.png" - ) + (images "tiles/background/deprecated/backgroundtile5.png") (solid #t) ) + (tile (id 75) - (images - "tiles/water/deprecated/water.png" - ) + (images "tiles/water/deprecated/water.png") (water #t) (deprecated #t) ) + (tile (id 76) (images @@ -1892,42 +2128,39 @@ (fps 10) (deprecated #t) ) + (tile (id 77) - (images - "tiles/blocks/brick0.png" - ) + (images "tiles/blocks/brick0.png") (solid #t) (object-name "brick") (object-data "(breakable #t) (sprite \"images/objects/bonus_block/brick.sprite\")") ) + (tile (id 78) - (images - "tiles/blocks/brick1.png" - ) + (images "tiles/blocks/brick1.png") (solid #t) - (object-name "brick") + (object-name "brick") (object-data "(breakable #t) (sprite \"images/objects/bonus_block/brickIce.sprite\")") ) + (tile (id 3159) - (images - "tiles/blocks/brick2.png" - ) + (images "tiles/blocks/brick2.png") (solid #t) (object-name "brick") (object-data "(breakable #t) (sprite \"images/objects/bonus_block/brickWeb.sprite\")") ) + (tile (id 7026) - (images - "tiles/blocks/brick3.png" - ) + (images "tiles/blocks/brick3.png") (solid #t) (object-name "heavy-brick") (object-data "(breakable #t)") ) + (tile (id 81) (images @@ -1937,6 +2170,7 @@ (fps 10) (deprecated #t) ) + (tile ; dupe of tile 26, this one will be kept. (id 83) @@ -1959,34 +2193,37 @@ (data 1) (fps 15) ) + (tile (id 84) (images - (surface (diffuse-texture (file "objects/bonus_block/empty.png")) - (displacement-texture (file "objects/bonus_block/displacement.png")) + (surface + (diffuse-texture (file "objects/bonus_block/empty.png")) + (displacement-texture (file "objects/bonus_block/displacement.png")) ) ) (solid #t) ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 85 86 87 88 89 90 91 92 ) - (image "tiles/background/cloud.png") + (images "tiles/background/cloud.png") ) + (tiles ; 93 is a dupe of tile 101, 93 will be kept. - (width 4) - (height 2) + (width 4)(height 2) (ids 93 94 95 96 97 98 99 100 ) - (image "tiles/retro/retro_background.png") + (images "tiles/retro/retro_background.png") ) + (tile (id 102) (images @@ -2009,6 +2246,7 @@ (data 2) (fps 2) ) + (tile (id 103) (images @@ -2031,69 +2269,66 @@ (data 3) (fps 2) ) + (tile (id 104) - (images - "tiles/blocks/brick0.png" - ) + (images "tiles/blocks/brick0.png") (editor-images "tiles/blocks/brick0_full.png") (solid #t) (object-name "brick") (object-data "(breakable #f) (sprite \"images/objects/bonus_block/brick.sprite\")") ) + (tile (id 105) - (images - "tiles/blocks/brick1.png" - ) + (images "tiles/blocks/brick1.png") (editor-images "tiles/blocks/brick1_full.png") (solid #t) (object-name "brick") (object-data "(breakable #f) (sprite \"images/objects/bonus_block/brickIce.sprite\")") ) + (tile (id 3160) - (images - "tiles/blocks/brick2.png" - ) + (images "tiles/blocks/brick2.png") (editor-images "tiles/blocks/brick2_full.png") (solid #t) (object-name "brick") (object-data "(breakable #f) (sprite \"images/objects/bonus_block/brickWeb.sprite\")") ) + (tiles - (width 3) - (height 2) + (width 3)(height 2) (ids 106 107 108 109 110 111 ) - (image "tiles/snow/background.png") + (images "tiles/snow/background.png") ) + (tile (id 112) (solid #t) (object-name "invisible_block") (editor-images "objects/bonus_block/bonus-invisible.png") ) + (tile (id 126) (deprecated #t) - (images - "tiles/goal/deprecated/exitbg.png" - ) + (images "tiles/goal/deprecated/exitbg.png") (object-name "decal") (object-data "(sprite \"images/decal/snow/exitbg.png\") (z-pos -100)") ) + (tile (id 127) (deprecated #t) - (images - "tiles/goal/deprecated/exitfg.png" - ) + (images "tiles/goal/deprecated/exitfg.png") (object-name "decal") (object-data "(sprite \"images/decal/snow/exitfg.png\") (z-pos 200)") ) + (tile (id 128) (images @@ -2116,6 +2351,7 @@ (data 4) (fps 2) ) + (tile (id 4967) (images @@ -2134,6 +2370,7 @@ ) (fps 10) ) + (tile (id 129) (images @@ -2152,6 +2389,7 @@ ) (fps 10) ) + (tile (id 130) (images @@ -2170,6 +2408,7 @@ ) (fps 10) ) + (tile (id 4968) (images @@ -2188,6 +2427,7 @@ ) (fps 10) ) + (tile (id 4969) (images @@ -2206,6 +2446,7 @@ ) (fps 10) ) + (tile (id 4970) (images @@ -2224,6 +2465,7 @@ ) (fps 10) ) + (tile (id 131) (deprecated #t) @@ -2231,6 +2473,7 @@ "tiles/auxiliary/black.png" ) ) + (tile (id 132) (deprecated #t) @@ -2239,6 +2482,7 @@ (editor-images "tiles/auxiliary/finalgoal.png") (data 1) ) + (tile (id 133) (deprecated #t) @@ -2270,7 +2514,7 @@ 136 137 138 139 ) - (image "tiles/signs/run.png") + (images "tiles/signs/run.png") ) (tile @@ -2297,42 +2541,42 @@ ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 141 142 143 144 ) - (image "tiles/signs/right.png") + (images "tiles/signs/right.png") ) (tiles - (width 5) - (height 3) + (width 5)(height 3) (ids 149 150 151 158 242 152 153 154 159 243 155 156 157 245 244 ) - (image "tiles/background/deprecated/snow-para-1.png") + (images "tiles/background/deprecated/snow-para-1.png") (deprecated #t) ) + (tile (id 160) (images "tiles/background/deprecated/tile-160.png") (deprecated #t) ) + (tiles - (width 5) - (height 3) + (width 5)(height 3) (ids 161 162 163 170 254 164 165 166 171 255 167 168 169 257 256 ) - (image "tiles/background/deprecated/snow-para-2.png") + (images "tiles/background/deprecated/snow-para-2.png") (deprecated #t) ) + (tile (id 173) (images @@ -2347,6 +2591,7 @@ (fps 10) (deprecated #t) ) + (tile (id 174) (images @@ -2361,9 +2606,9 @@ (fps 10) (deprecated #t) ) + (tiles - (width 4) - (height 5) + (width 4)(height 5) (ids 191 192 193 194 187 188 189 190 @@ -2378,7 +2623,7 @@ 512 512 512 512 512 512 512 512 ) - (image + (images "tiles/waterfall/trans-0.png" "tiles/waterfall/trans-1.png" "tiles/waterfall/trans-2.png" @@ -2386,6 +2631,7 @@ ) (fps 10) ) + (tiles (width 3)(height 2) (ids @@ -2398,21 +2644,21 @@ "tiles/waterfall/foam-2.png" "tiles/waterfall/foam-3.png" ) - (attributes + (attributes 512 0 512 512 512 512 ) (water #t) (fps 10) ) + (tile (id 200) - (images - "tiles/water/deprecated/water-trans.png" - ) + (images "tiles/water/deprecated/water-trans.png") (water #t) (deprecated #t) ) + (tile (id 201) (images @@ -2424,33 +2670,35 @@ (fps 10) (deprecated #t) ) + (tiles - (width 1) - (height 3) + (width 3)(height 4) (ids - 211 - 212 - 213 + 27 28 29 + 211 47 0 + 212 0 0 + 213 0 0 ) (attributes - 1 - 1 - 1 + 1 1 1 + 1 1 0 + 1 0 0 + 1 0 0 ) - (image "tiles/blocks/block_vert.png") + (images "tiles/blocks/block_wood.png") ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 172 246 247 248 ) - (image "tiles/signs/platform.png") + (images "tiles/signs/platform.png") ) + (tiles - (width 4) - (height 5) + (width 4)(height 5) (ids 291 292 293 294 287 288 289 290 @@ -2465,7 +2713,7 @@ 512 512 512 512 512 512 512 512 ) - (image + (images "tiles/waterfall/deprecated/waterfall-0.png" "tiles/waterfall/deprecated/waterfall-1.png" "tiles/waterfall/deprecated/waterfall-2.png" @@ -2476,8 +2724,7 @@ ) (tiles - (width 5) - (height 5) + (width 5)(height 5) (ids 217 218 238 219 220 221 222 223 224 225 @@ -2504,8 +2751,7 @@ ) (tiles - (width 3) - (height 3) + (width 3)(height 3) (ids 301 302 303 304 305 306 @@ -2516,12 +2762,12 @@ 1 1 1 1 1 1 ) - (image "tiles/jungle/deprecated/convex.png") + (images "tiles/jungle/deprecated/convex.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 343 344 311 310 @@ -2530,9 +2776,10 @@ 1 1 1 1 ) - (image "tiles/jungle/deprecated/concave.png") + (images "tiles/jungle/deprecated/concave.png") (deprecated #t) ) + (tile (id 312) (images @@ -2553,9 +2800,9 @@ (fps 10) (deprecated #t) ) + (tiles - (width 3) - (height 3) + (width 3)(height 3) (ids 345 346 347 348 349 350 @@ -2566,12 +2813,12 @@ 1 1 1 1 1 1 ) - (image "tiles/jungle/deprecated/special.png") + (images "tiles/jungle/deprecated/special.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 313 314 315 316 @@ -2580,12 +2827,12 @@ 0 0 0 0 ) - (image "tiles/doodads/deprecated/stone1.png") + (images "tiles/doodads/deprecated/stone1.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 317 318 319 320 @@ -2594,29 +2841,28 @@ 0 0 0 0 ) - (image "tiles/doodads/deprecated/stone2.png") + (images "tiles/doodads/deprecated/stone2.png") (deprecated #t) ) + (tile (id 322) - (images - "tiles/forest/plant1.png" - ) + (images "tiles/forest/plant1.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 323 324 325 326 327 328 329 330 ) - (image "tiles/forest/liane.png") + (images "tiles/forest/liane.png") ) + (tiles - (width 3) - (height 2) + (width 3)(height 2) (ids 337 338 339 340 341 342 @@ -2625,27 +2871,23 @@ 1 1 1 1 1 1 ) - (image "tiles/blocks/rock_plate.png") + (images "tiles/blocks/rock_plate.png") ) ; experimental unisolid tile (tile (id 359) - (images - "tiles/auxiliary/notile.png" - ) + (images "tiles/auxiliary/notile.png") (unisolid #t) ) (tile (id 360) - (images - "tiles/forest/mushrooms.png" - ) + (images"tiles/forest/mushrooms.png") ) + (tiles - (width 8) - (height 8) + (width 8)(height 8) (ids 402 403 404 405 426 427 428 429 406 407 408 409 430 431 432 433 @@ -2656,11 +2898,11 @@ 0 0 0 0 450 451 452 453 0 0 0 0 454 455 456 457 ) - (image "tiles/forest/foresttiles-12.png") + (images "tiles/forest/foresttiles-12.png") ) + (tiles - (width 3) - (height 5) + (width 3)(height 5) (ids 458 459 460 461 462 463 @@ -2668,42 +2910,42 @@ 467 468 469 470 471 472 ) - (image "tiles/forest/deprecated/brush2.png") + (images "tiles/forest/deprecated/brush2.png") (deprecated #t) ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 473 474 475 476 477 478 ) - (image "tiles/forest/deprecated/hole2.png") + (images "tiles/forest/deprecated/hole2.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 479 480 481 482 ) - (image "tiles/signs/platform_wood.png") + (images "tiles/signs/platform_wood.png") ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 483 484 485 486 487 488 489 490 ) - (image "tiles/pole/deprecated/misc.png") + (images "tiles/pole/deprecated/misc.png") (deprecated #t) ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 491 492 493 494 495 496 497 498 @@ -2712,12 +2954,12 @@ 0 0 0 0 1 1 1 1 ) - (image "tiles/ghostwood/deprecated/earth-floor.png") + (images "tiles/ghostwood/deprecated/earth-floor.png") (deprecated #t) ) + (tiles - (width 4) - (height 5) + (width 4)(height 5) (ids 1000 1001 1002 1003 1004 1005 1006 1007 @@ -2732,22 +2974,22 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/forest/foresttiles-1.png") + (images "tiles/forest/foresttiles-1.png") ) + (tiles - (width 4) - (height 1) + (width 4)(height 1) (ids 3621 3622 3623 3624 ) (attributes 1 1 1 1 ) - (image "tiles/forest/foresttiles-1a.png") + (images "tiles/forest/foresttiles-1a.png") ) + (tiles - (width 3) - (height 3) + (width 3)(height 3) (ids 1020 1021 1022 1023 1024 1025 @@ -2758,12 +3000,12 @@ 1 1 1 1 1 1 ) - (image "tiles/forest/deprecated/foresttiles-2.png") + (images "tiles/forest/deprecated/foresttiles-2.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1029 1030 1031 1032 @@ -2772,12 +3014,12 @@ 1 1 1 1 ) - (image "tiles/forest/deprecated/foresttiles-3.png") + (images "tiles/forest/deprecated/foresttiles-3.png") (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1035 1034 1041 1040 @@ -2786,11 +3028,11 @@ 1 1 1 1 ) - (image "tiles/forest/concave.png") + (images "tiles/forest/concave.png") ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1036 1037 1042 1043 @@ -2799,11 +3041,11 @@ 1 1 1 1 ) - (image "tiles/forest/steps.png") + (images "tiles/forest/steps.png") ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 1038 1044 1737 1738 @@ -2814,11 +3056,11 @@ 1 1 1 1 ) - (image "tiles/forest/wall.png") + (images "tiles/forest/wall.png") ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 1045 1046 1047 1048 @@ -2834,11 +3076,11 @@ 2 0 0 0 ) - (image "tiles/forest/foresttiles-5.png") + (images "tiles/forest/foresttiles-5.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 1051 1052 1053 1054 @@ -2857,11 +3099,11 @@ 50 64 0 0 ) - (image "tiles/forest/foresttiles-6.png") + (images "tiles/forest/foresttiles-6.png") ) + (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids 0 1060 1061 0 1063 1064 1065 1066 @@ -2877,11 +3119,11 @@ 18 34 32 16 0 0 0 0 ) - (image "tiles/forest/foresttiles-7.png") + (images "tiles/forest/foresttiles-7.png") ) + (tiles - (width 8) - (height 12) + (width 8)(height 12) (ids 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 @@ -2910,12 +3152,12 @@ 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 ) - (image "tiles/forest/deprecated/foresttiles-8.png") + (images "tiles/forest/deprecated/foresttiles-8.png") (deprecated #t) ) + (tiles - (width 6) - (height 12) + (width 6)(height 12) (ids 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 @@ -2930,22 +3172,22 @@ 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 ) - (image "tiles/forest/deprecated/foresttiles-9.png") + (images "tiles/forest/deprecated/foresttiles-9.png") (deprecated #t) ) + (tiles - (width 3) - (height 2) + (width 3)(height 2) (ids 2045 1219 1220 2046 1225 1226 ) - (image "tiles/forest/deprecated/foresttiles-9a.png") + (images "tiles/forest/deprecated/foresttiles-9a.png") (deprecated #t) ) + (tiles - (width 4) - (height 12) + (width 4)(height 12) (ids 1239 1240 1241 1242 1243 1244 1245 1246 @@ -2960,12 +3202,12 @@ 1279 1280 1281 1282 1283 1284 1285 1286 ) - (image "tiles/forest/deprecated/foresttiles-10.png") + (images "tiles/forest/deprecated/foresttiles-10.png") (deprecated #t) ) + (tiles - (width 2) - (height 12) + (width 2)(height 12) (ids 1287 1288 1289 1290 @@ -2980,14 +3222,16 @@ 1307 1308 1309 1310 ) - (image "tiles/forest/deprecated/foresttiles-11.png") + (images "tiles/forest/deprecated/foresttiles-11.png") (deprecated #t) ) + (tile (id 1311) (solid #t) (editor-images "tiles/auxiliary/invisible-editor.png") ) + (tile (id 1312) (deprecated #t) @@ -2995,94 +3239,119 @@ (hidden #t) (images "tiles/doodads/deprecated/havoktux-0.png") ) + (tile (id 1313) (deprecated #t) (solid #f) - (images "particles/rainsplash-1.png" - "particles/rainsplash-2.png" - "particles/rainsplash-3.png" - "particles/rainsplash-4.png" - "tiles/auxiliary/blank.png") + (images + "particles/rainsplash-1.png" + "particles/rainsplash-2.png" + "particles/rainsplash-3.png" + "particles/rainsplash-4.png" + "tiles/auxiliary/blank.png" + ) (fps 18) ) + (tile (id 1314) (deprecated #t) (solid #f) - (images "particles/rainsplash-2.png" - "particles/rainsplash-3.png" - "particles/rainsplash-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-1.png") + (images + "particles/rainsplash-2.png" + "particles/rainsplash-3.png" + "particles/rainsplash-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-1.png" + ) (fps 20) ) + (tile (id 1315) (deprecated #t) (solid #f) - (images "particles/rainsplash-3.png" - "particles/rainsplash-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-1.png" - "particles/rainsplash-2.png") + (images + "particles/rainsplash-3.png" + "particles/rainsplash-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-1.png" + "particles/rainsplash-2.png" + ) (fps 22) ) + (tile (id 1316) (deprecated #t) (solid #f) - (images "particles/rainsplash-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-1.png" - "particles/rainsplash-2.png" - "particles/rainsplash-3.png") + (images + "particles/rainsplash-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-1.png" + "particles/rainsplash-2.png" + "particles/rainsplash-3.png" + ) (fps 24) ) + (tile (id 1317) (deprecated #t) (solid #f) - (images "particles/rainsplash-vertical-1.png" - "particles/rainsplash-vertical-2.png" - "particles/rainsplash-vertical-3.png" - "particles/rainsplash-vertical-4.png" - "tiles/auxiliary/blank.png") + (images + "particles/rainsplash-vertical-1.png" + "particles/rainsplash-vertical-2.png" + "particles/rainsplash-vertical-3.png" + "particles/rainsplash-vertical-4.png" + "tiles/auxiliary/blank.png" + ) (fps 21) ) + (tile (id 1318) (deprecated #t) (solid #f) - (images "particles/rainsplash-vertical-2.png" - "particles/rainsplash-vertical-3.png" - "particles/rainsplash-vertical-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-vertical-1.png") + (images + "particles/rainsplash-vertical-2.png" + "particles/rainsplash-vertical-3.png" + "particles/rainsplash-vertical-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-vertical-1.png" + ) (fps 19) ) + (tile (id 1319) (deprecated #t) (solid #f) - (images "particles/rainsplash-vertical-3.png" - "particles/rainsplash-vertical-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-vertical-1.png" - "particles/rainsplash-vertical-2.png") + (images + "particles/rainsplash-vertical-3.png" + "particles/rainsplash-vertical-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-vertical-1.png" + "particles/rainsplash-vertical-2.png" + ) (fps 17) ) + (tile (id 1320) (deprecated #t) (solid #f) - (images "particles/rainsplash-vertical-4.png" - "tiles/auxiliary/blank.png" - "particles/rainsplash-vertical-1.png" - "particles/rainsplash-vertical-2.png" - "particles/rainsplash-vertical-3.png") + (images + "particles/rainsplash-vertical-4.png" + "tiles/auxiliary/blank.png" + "particles/rainsplash-vertical-1.png" + "particles/rainsplash-vertical-2.png" + "particles/rainsplash-vertical-3.png" + ) (fps 15) ) + (tiles (width 4) (height 4) @@ -3092,8 +3361,9 @@ 1329 1330 1331 1332 1333 1334 1335 1336 ) - (image "tiles/snow/iceshrub.png") + (images "tiles/snow/iceshrub.png") ) + (tile (id 1342) (images @@ -3102,6 +3372,7 @@ (solid #t) (deprecated #t) ) + (tile (id 1343) (images @@ -3109,6 +3380,7 @@ ) (deprecated #t) ) + (tile (id 1350) (images @@ -3117,7 +3389,6 @@ (deprecated #t) ) - (tiles (width 3) (height 5) @@ -3128,9 +3399,10 @@ 2008 1354 2013 2009 1821 2014 ) - (image "tiles/forest/deprecated/hole.png") + (images "tiles/forest/deprecated/hole.png") (deprecated #t) ) + (tiles (width 1) (height 3) @@ -3144,13 +3416,15 @@ 1 1 ) - (image "tiles/castle/pedestal.png") + (images "tiles/castle/pedestal.png") ) + (tile (id 1357) (images "tiles/forest/deprecated/vine1.png") (deprecated #t) ) + (tiles (width 3) (height 3) @@ -3159,9 +3433,10 @@ 1361 1362 1363 1364 1365 1366 ) - (image "tiles/forest/deprecated/brush.png") + (images "tiles/forest/deprecated/brush.png") (deprecated #t) ) + (tiles (width 8) (height 6) @@ -3182,7 +3457,7 @@ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) - (image "tiles/castle/deprecated/stone.png") + (images "tiles/castle/deprecated/stone.png") (deprecated #t) ) ;dupe of 1385 ; this one should be removed @@ -3194,6 +3469,7 @@ (solid #t) (deprecated #t) ) + (tiles (width 1) (height 4) @@ -3209,9 +3485,10 @@ 1 1 ) - (image "tiles/castle/deprecated/window.png") + (images "tiles/castle/deprecated/window.png") (deprecated #t) ) + (tile (id 1421) (images @@ -3223,6 +3500,7 @@ (water #t) (deprecated #t) ) + (tile (id 1422) (images @@ -3234,9 +3512,9 @@ (water #t) (deprecated #t) ) + (tiles - (width 4) - (height 5) + (width 4)(height 5) (ids 1423 1424 1425 1426 1427 1428 1429 1430 @@ -3251,42 +3529,42 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/ghostwood/ghostwood-1.png") + (images "tiles/ghostwood/ghostwood-1.png") ) + (tiles - (width 4) - (height 1) + (width 4)(height 1) (ids 3923 3924 3925 3926 ) (attributes 1 1 1 1 ) - (image "tiles/ghostwood/ghostwood-1a.png") + (images "tiles/ghostwood/ghostwood-1a.png") ) + (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids - 0 1443 1444 0 - 1445 1446 1447 1448 - 1449 1450 1451 1452 + 0 1443 1444 0 + 1445 1446 1447 1448 + 1449 1450 1451 1452 ) (attributes - 0 0 0 0 - 17 17 17 17 - 1 1 1 1 + 0 0 0 0 + 17 17 17 17 + 1 1 1 1 ) (datas - 0 0 0 0 - 18 34 32 16 - 0 0 0 0 + 0 0 0 0 + 18 34 32 16 + 0 0 0 0 ) - (image "tiles/ghostwood/ghostwood-7.png") + (images "tiles/ghostwood/ghostwood-7.png") ) + (tiles - (width 1) - (height 5) + (width 1)(height 5) (ids 1482 1489 @@ -3301,18 +3579,18 @@ 1 1 ) - (image "tiles/castle/deprecated/castle_wall.png") + (images "tiles/castle/deprecated/castle_wall.png") (deprecated #t) ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 1511 1512 1513 1514 1515 1516 ) - (image "tiles/castle/deprecated/stonewindow.png") + (images "tiles/castle/deprecated/stonewindow.png") ) (tile @@ -3337,6 +3615,7 @@ (fps 10) (deprecated #t) ) + (tile (id 1518) (images @@ -3344,20 +3623,19 @@ ) (deprecated #t) ) + (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 ) - (image "tiles/castle/deprecated/door.png") + (images "tiles/castle/deprecated/door.png") ) (tiles - (width 3) - (height 2) + (width 3)(height 2) (ids 1533 1534 1535 1536 1537 1538 @@ -3366,11 +3644,11 @@ 1 1 1 1 1 1 ) - (image "tiles/forest/fishbone.png") + (images "tiles/forest/fishbone.png") ) + (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids 1551 1540 1541 1542 1543 1544 1545 1546 @@ -3381,9 +3659,10 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/blocks/deprecated/icebridge.png") + (images "tiles/blocks/deprecated/icebridge.png") (deprecated #t) ) + (tile (id 1568) (images @@ -3392,89 +3671,81 @@ (solid #t) (deprecated #t) ) + (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1600 1601 1602 1603 ) - (image "tiles/signs/rightup.png") + (images "tiles/signs/rightup.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1604 1605 1606 1607 ) - (image "tiles/signs/rightdown.png") + (images "tiles/signs/rightdown.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1608 1609 1610 1611 ) - (image "tiles/signs/left.png") + (images "tiles/signs/left.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1612 1613 1614 1615 ) - (image "tiles/signs/leftup.png") + (images "tiles/signs/leftup.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1616 1617 1618 1619 ) - (image "tiles/signs/leftdown.png") + (images "tiles/signs/leftdown.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1620 1621 1622 1623 ) - (image "tiles/signs/up.png") + (images "tiles/signs/up.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1624 1625 1626 1627 ) - (image "tiles/signs/down.png") + (images "tiles/signs/down.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids 1628 1629 1630 1631 ) - (image "tiles/signs/danger.png") + (images "tiles/signs/danger.png") ) (tiles - (width 7) - (height 7) + (width 7)(height 7) (ids 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 @@ -3493,9 +3764,10 @@ 0 0 0 0 0 1 0 0 0 0 0 0 1 0 ) - (image "tiles/forest/deprecated/exit-tree.png") + (images "tiles/forest/deprecated/exit-tree.png") (deprecated #t) ) + (tile (id 1700) (images @@ -3510,6 +3782,7 @@ (fps 8) (deprecated #t) ) + (tile (id 1701) (images @@ -3524,6 +3797,7 @@ (fps 8) (deprecated #t) ) + (tile (id 1702) (images @@ -3541,6 +3815,7 @@ (fps 8) (deprecated #t) ) + (tile (id 1703) (images @@ -3557,6 +3832,7 @@ (fps 8) (deprecated #t) ) + (tile (id 1704) (images @@ -3574,13 +3850,15 @@ (fps 8) (deprecated #t) ) + (tile (id 1705) (images "tiles/lava/deprecated/zone/body-2-1.png" "tiles/lava/deprecated/zone/body-2-2.png" "tiles/lava/deprecated/zone/body-2-3.png" - "tiles/lava/deprecated/zone/body-2-4.png") + "tiles/lava/deprecated/zone/body-2-4.png" + ) (water #t) (hurts #t) (fire #t) @@ -3588,13 +3866,15 @@ (fps 8) (deprecated #t) ) + (tile (id 1706) (images "tiles/lava/deprecated/zone/body-bottom-1-1.png" "tiles/lava/deprecated/zone/body-bottom-1-2.png" "tiles/lava/deprecated/zone/body-bottom-1-3.png" - "tiles/lava/deprecated/zone/body-bottom-1-4.png") + "tiles/lava/deprecated/zone/body-bottom-1-4.png" + ) (water #t) (hurts #t) (fire #t) @@ -3602,89 +3882,104 @@ (fps 8) (deprecated #t) ) + (tile (id 1707) (images "tiles/lava/deprecated/zone/edge-right-1-1.png" "tiles/lava/deprecated/zone/edge-right-1-2.png" "tiles/lava/deprecated/zone/edge-right-1-3.png" - "tiles/lava/deprecated/zone/edge-right-1-4.png") + "tiles/lava/deprecated/zone/edge-right-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1708) (images "tiles/lava/deprecated/zone/surface-1-1.png" "tiles/lava/deprecated/zone/surface-1-2.png" "tiles/lava/deprecated/zone/surface-1-3.png" - "tiles/lava/deprecated/zone/surface-1-4.png") + "tiles/lava/deprecated/zone/surface-1-4.png" + ) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1709) (images "tiles/lava/deprecated/zone/edge-left-1-1.png" "tiles/lava/deprecated/zone/edge-left-1-2.png" "tiles/lava/deprecated/zone/edge-left-1-3.png" - "tiles/lava/deprecated/zone/edge-left-1-4.png") + "tiles/lava/deprecated/zone/edge-left-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1710) (images "tiles/lava/deprecated/zone/edge-right-1-4.png" "tiles/lava/deprecated/zone/edge-right-1-3.png" "tiles/lava/deprecated/zone/edge-right-1-2.png" - "tiles/lava/deprecated/zone/edge-right-1-1.png") + "tiles/lava/deprecated/zone/edge-right-1-1.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1711) (images "tiles/lava/deprecated/zone/edge-left-1-4.png" "tiles/lava/deprecated/zone/edge-left-1-3.png" "tiles/lava/deprecated/zone/edge-left-1-3.png" - "tiles/lava/deprecated/zone/edge-left-1-4.png") + "tiles/lava/deprecated/zone/edge-left-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1712) (images "tiles/lava/deprecated/zone/edge-flip-1-1.png" "tiles/lava/deprecated/zone/edge-flip-1-2.png" "tiles/lava/deprecated/zone/edge-flip-1-3.png" - "tiles/lava/deprecated/zone/edge-flip-1-4.png") + "tiles/lava/deprecated/zone/edge-flip-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1713) (images "tiles/lava/deprecated/zone/bubble-bottom-1-1.png" "tiles/lava/deprecated/zone/bubble-bottom-1-2.png" "tiles/lava/deprecated/zone/bubble-bottom-1-3.png" - "tiles/lava/deprecated/zone/bubble-bottom-1-4.png") + "tiles/lava/deprecated/zone/bubble-bottom-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1714) (images @@ -3695,12 +3990,14 @@ "tiles/lava/deprecated/zone/bubble-out-1-1.png" "tiles/lava/deprecated/zone/bubble-out-1-2.png" "tiles/lava/deprecated/zone/bubble-out-1-3.png" - "tiles/lava/deprecated/zone/bubble-out-1-4.png") + "tiles/lava/deprecated/zone/bubble-out-1-4.png" + ) (fire #t) (solid #f) (fps 8) (deprecated #t) ) + (tile (id 1715) (images @@ -3711,7 +4008,8 @@ "tiles/lava/deprecated/zone/rest.png" "tiles/lava/deprecated/zone/rest.png" "tiles/lava/deprecated/zone/rest.png" - "tiles/lava/deprecated/zone/rest.png") + "tiles/lava/deprecated/zone/rest.png" + ) (fire #t) (solid #f) (fps 8) @@ -3735,6 +4033,7 @@ (fps 8) (deprecated #t) ) + (tiles (width 6) (height 5) @@ -3759,8 +4058,9 @@ 0 0 0 0 66 48 18 34 32 16 50 64 ) - (image "tiles/forest/earth-floor.png") + (images "tiles/forest/earth-floor.png") ) + (tiles (width 2) (height 2) @@ -3768,8 +4068,9 @@ 1727 1728 1729 1730 ) - (image "tiles/signs/color_cyan.png") + (images "tiles/signs/color_cyan.png") ) + (tiles (width 2) (height 2) @@ -3777,17 +4078,19 @@ 1731 1732 1733 1734 ) - (image "tiles/signs/color_yellow.png") + (images "tiles/signs/color_yellow.png") ) + (tiles (width 2) (height 2) (ids - 3992 3993 + 3992 3993 3994 3995 ) - (image "tiles/signs/color_green.png") + (images "tiles/signs/color_green.png") ) + (tiles (width 2) (height 2) @@ -3795,8 +4098,9 @@ 3996 3997 3998 3999 ) - (image "tiles/signs/color_magenta.png") + (images "tiles/signs/color_magenta.png") ) + (tile (id 1735) (images @@ -3810,14 +4114,15 @@ (fps 2) (deprecated #t) ) + (tile (id 1736) (images - "tiles/forest/deprecated/exit/bottom1.png" - "tiles/forest/deprecated/exit/bottom2.png" - "tiles/forest/deprecated/exit/bottom3.png" - "tiles/forest/deprecated/exit/bottom2.png" - ) + "tiles/forest/deprecated/exit/bottom1.png" + "tiles/forest/deprecated/exit/bottom2.png" + "tiles/forest/deprecated/exit/bottom3.png" + "tiles/forest/deprecated/exit/bottom2.png" + ) (hurts #t) (solid #f) (fps 2) @@ -3844,9 +4149,10 @@ 3 3 3 3 0 0 0 0 ) - (image "tiles/forest/deprecated/branch.png") + (images "tiles/forest/deprecated/branch.png") (deprecated #t) ) + (tiles (width 2) (height 6) @@ -3866,11 +4172,12 @@ 1 1 1 1 ) - (image "tiles/castle/deprecated/column.png") + (images "tiles/castle/deprecated/column.png") (deprecated #t) ) + (tiles - (width 5) + (width 5) (height 7) (ids 1774 1775 1776 1777 1778 @@ -3890,13 +4197,13 @@ 1 1 1 1 1 1 1 1 1 1 ) - (image "tiles/castle/deprecated/brown.png") + (images "tiles/castle/deprecated/brown.png") (deprecated #t) ) ;Snow Castle, Tile ID 3878-3922 (tiles - (width 4) + (width 4) (height 12) (ids 3878 3879 3880 3881 @@ -3926,7 +4233,7 @@ 0 0 0 0 3 3 3 3 ) - (image "tiles/castle/deprecated/snowcastle.png") + (images "tiles/castle/deprecated/snowcastle.png") (deprecated #t) ) @@ -3939,8 +4246,9 @@ 1810 1813 1811 1814 ) - (image "tiles/castle/nolok-statue.png") + (images "tiles/castle/nolok-statue.png") ) + (tiles (width 2) (height 2) @@ -3948,8 +4256,9 @@ 1822 1823 1824 1825 ) - (image "tiles/signs/needrock.png") + (images "tiles/signs/needrock.png") ) + (tiles (width 4) (height 5) @@ -3967,28 +4276,30 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/forest/underground/groundtiles-1.png") + (images "tiles/forest/underground/groundtiles-1.png") ) + (tiles (width 4) (height 3) (ids - 0 1890 1891 0 - 1892 1893 1894 1895 - 1896 1897 1898 1899 + 0 1890 1891 0 + 1892 1893 1894 1895 + 1896 1897 1898 1899 ) (attributes - 0 0 0 0 - 17 17 17 17 - 1 1 1 1 + 0 0 0 0 + 17 17 17 17 + 1 1 1 1 ) (datas - 0 0 0 0 - 18 34 32 16 - 0 0 0 0 + 0 0 0 0 + 18 34 32 16 + 0 0 0 0 ) - (image "tiles/forest/underground/slope-1.png") + (images "tiles/forest/underground/slope-1.png") ) + (tiles (width 4) (height 4) @@ -4004,8 +4315,9 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/forest/underground/background1.png") + (images "tiles/forest/underground/background1.png") ) + (tiles (width 4) (height 5) @@ -4023,9 +4335,10 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/forest/underground/deprecated/background.png") + (images "tiles/forest/underground/deprecated/background.png") (deprecated #t) ) + (tiles (width 4) (height 5) @@ -4036,8 +4349,9 @@ 1948 1949 1950 1951 1952 1953 1954 1955 ) - (image "tiles/forest/underground/roots.png") + (images "tiles/forest/underground/roots.png") ) + (tiles (width 4) (height 4) @@ -4053,8 +4367,9 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/forest/underground/background2.png") + (images "tiles/forest/underground/background2.png") ) + (tiles (width 7) (height 4) @@ -4070,8 +4385,9 @@ 1024 1024 1024 1024 0 1024 1024 1024 1024 1024 1024 0 0 1024 ) - (image "tiles/forest/spikevine.png") + (images "tiles/forest/spikevine.png") ) + (tiles (width 2) (height 4) @@ -4087,8 +4403,9 @@ 1 1 1 1 ) - (image "tiles/forest/statue.png") + (images "tiles/forest/statue.png") ) + (tiles (width 2) (height 1) @@ -4098,9 +4415,10 @@ (attributes 1 1 ) - (image "tiles/forest/deprecated/dangersign.png") + (images "tiles/forest/deprecated/dangersign.png") (deprecated #t) ) + (tiles (width 3) (height 4) @@ -4116,9 +4434,10 @@ 1 1 1 1 1 1 ) - (image "tiles/forest/deprecated/exit/outhouse.png") + (images "tiles/forest/deprecated/exit/outhouse.png") (deprecated #t) ) + (tiles (width 4) (height 4) @@ -4126,10 +4445,11 @@ 2032 2033 2034 2035 2036 2037 0 2038 2039 0 0 2040 - 0 2041 2042 0 + 0 2041 2042 0 ) - (image "tiles/lightmap/lightmap-bw.png") + (images "tiles/lightmap/lightmap-bw.png") ) + (tiles (width 4) (height 4) @@ -4139,8 +4459,9 @@ 4203 4204 4205 4206 0 4207 4208 4209 ) - (image "tiles/lightmap/lightmap-white.png") + (images "tiles/lightmap/lightmap-white.png") ) + (tiles (width 4) (height 4) @@ -4150,7 +4471,7 @@ 4218 4219 4220 4221 0 4222 4223 4224 ) - (image "tiles/lightmap/lightmap-black.png") + (images "tiles/lightmap/lightmap-black.png") ) ; NOT dupes of 57/58 - unisolid (tiles @@ -4162,9 +4483,10 @@ (attributes 3 3 ) - (image "tiles/pipe/green.png") + (images "tiles/pipe/green.png") (deprecated #t) ) + (tiles (width 1) (height 3) @@ -4173,7 +4495,7 @@ 2048 2049 ) - (image "tiles/forest/ladder.png") + (images "tiles/forest/ladder.png") ) (tiles @@ -4185,43 +4507,44 @@ (attributes 512 512 512 512 ) - (image - (surface (diffuse-texture (file "tiles/water/antarctic-1.png")) + (images + (surface (diffuse-texture (file "tiles/water/antarctic-1.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-2.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-2.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-3.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-3.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-4.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-4.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-5.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-5.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-6.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-6.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-7.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-7.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) - (surface (diffuse-texture (file "tiles/water/antarctic-8.png")) + (surface (diffuse-texture (file "tiles/water/antarctic-8.png")) (displacement-texture (file "tiles/water/antarctic-displacement.png"))) ) (fps 16) ) + (tile (id 2020) (images - "tiles/water/antarctic.png") + "tiles/water/antarctic.png") (water #t) ) (tiles - (width 5) + (width 5) (height 7) (ids 2091 2092 2093 2094 2095 - 2096 2097 2098 2099 2100 - 2101 2102 2103 2104 2105 - 2106 2107 2108 2109 2110 - 2111 2112 2113 2114 2115 - 2116 2117 2118 2119 2120 - 3515 0 0 0 0 + 2096 2097 2098 2099 2100 + 2101 2102 2103 2104 2105 + 2106 2107 2108 2109 2110 + 2111 2112 2113 2114 2115 + 2116 2117 2118 2119 2120 + 3515 0 0 0 0 ) (attributes 1 1 1 1 1 @@ -4232,7 +4555,7 @@ 1 1 1 1024 1024 1 0 0 0 0 ) - (image "tiles/castle/deprecated/foreground.png") + (images "tiles/castle/deprecated/foreground.png") (deprecated #t) ) @@ -4245,7 +4568,7 @@ (attributes 3584 3584 3584 3584 ) - (image + (images "tiles/lava/lava-1.png" "tiles/lava/lava-2.png" "tiles/lava/lava-3.png" @@ -4261,7 +4584,7 @@ (tile (id 4004) (images - "tiles/lava/lava.png") + "tiles/lava/lava.png") (water #t) (hurts #t) (fire #t) @@ -4275,9 +4598,8 @@ (editor-images "tiles/auxiliary/invisible-unisolid-editor.png") ) - (tiles - (width 6) + (width 6) (height 2) (ids 2158 2159 2154 2155 2156 2157 @@ -4287,21 +4609,21 @@ 0 0 0 3 3 3 0 0 0 3 3 3 ) - (image "tiles/snow/air.png") + (images "tiles/snow/air.png") ) (tiles - (width 4) + (width 4) (height 3) (ids - 2166 2167 2168 2169 - 2170 2171 2172 2173 - 2174 2175 2176 2177) + 2166 2167 2168 2169 + 2170 2171 2172 2173 + 2174 2175 2176 2177) (attributes - 3 3 3 3 - 0 0 0 0 - 0 0 0 0) - (image "tiles/snow/deprecated/unisolid.png") + 3 3 3 3 + 0 0 0 0 + 0 0 0 0) + (images "tiles/snow/deprecated/unisolid.png") (deprecated #t) ) @@ -4316,30 +4638,28 @@ ) (tiles - (width 8) + (width 8) (height 3) (ids - 2179 2180 2181 2182 2183 2184 2185 2186 - 2187 2188 2189 2190 2191 2192 2193 2194 - 2195 2196 2197 2198 2199 2200 2201 2202) - - (image "tiles/snow/background3.png")) + 2179 2180 2181 2182 2183 2184 2185 2186 + 2187 2188 2189 2190 2191 2192 2193 2194 + 2195 2196 2197 2198 2199 2200 2201 2202) + (images "tiles/snow/background3.png")) (tiles - (width 3) + (width 3) (height 3) (ids - 2203 2204 2205 - 2206 2207 2208 - 2209 2210 2211) + 2203 2204 2205 + 2206 2207 2208 + 2209 2210 2211) (attributes - 1 1 1 - 1 1 1 - 1 1 1) - (image "tiles/test/test.png")) - + 1 1 1 + 1 1 1 + 1 1 1) + (images "tiles/test/test.png")) (tiles - (width 12) + (width 12) (height 14) (ids 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 @@ -4356,17 +4676,17 @@ 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379) - (image "tiles/castle/deprecated/background.png") + (images "tiles/castle/deprecated/background.png") (deprecated #t) ) (tiles - (width 2) + (width 2) (height 2) (ids 2380 2381 2382 2383) - (image "tiles/castle/deprecated/stones.png") + (images "tiles/castle/deprecated/stones.png") (deprecated #t) ) @@ -4389,7 +4709,7 @@ 1 1 1 1 1 1 1 1 ) - (image "tiles/snow/underground/convex.png") + (images "tiles/snow/underground/convex.png") ) (tiles @@ -4403,7 +4723,7 @@ 0 0 0 0 ) - (image "tiles/signs/trampoline.png") + (images "tiles/signs/trampoline.png") ) ; NOT dupes of 2085/2086 - unisolid @@ -4416,7 +4736,7 @@ (attributes 3 3 ) - (image "tiles/pipe/blue.png") + (images "tiles/pipe/blue.png") (deprecated #t) ) @@ -4433,36 +4753,36 @@ (width 18) (height 8) (ids - 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2519 2520 2521 2522 - 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2535 2536 2537 2538 - 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2551 2552 2553 2554 - 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 0 0 2461 2462 2567 2568 2569 2570 - 2463 2464 2465 2466 2467 2468 2469 0 0 2472 2473 2474 2475 2476 2583 2584 2585 2586 - 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2599 2600 2601 2602 - 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2615 2616 2617 2618 - 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 0 0 0 0 0 2632 2633 0 - ) - (attributes - 0 0 0 0 0 0 1 1 1 1 17 17 17 17 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 17 17 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 17 17 17 - 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 17 17 0 - 1 1 1 1 1 1 1 0 0 1 17 17 17 17 1 0 0 1 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 0 0 1 17 17 17 17 - 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 - ) + 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2519 2520 2521 2522 + 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2535 2536 2537 2538 + 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2551 2552 2553 2554 + 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 0 0 2461 2462 2567 2568 2569 2570 + 2463 2464 2465 2466 2467 2468 2469 0 0 2472 2473 2474 2475 2476 2583 2584 2585 2586 + 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2599 2600 2601 2602 + 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2615 2616 2617 2618 + 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 0 0 0 0 0 2632 2633 0 + ) + (attributes + 0 0 0 0 0 0 1 1 1 1 17 17 17 17 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 17 17 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 17 17 17 + 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 17 17 0 + 1 1 1 1 1 1 1 0 0 1 17 17 17 17 1 0 0 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 0 0 1 17 17 17 17 + 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 + ) (datas - 0 0 0 0 0 0 0 0 0 0 2 0 66 48 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 50 64 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 49 67 3 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65 51 0 - 0 0 0 0 0 0 0 0 0 0 18 34 32 16 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 17 19 35 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 2 0 66 48 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 50 64 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 49 67 3 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65 51 0 + 0 0 0 0 0 0 0 0 0 0 18 34 32 16 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 17 19 35 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/crystalcave/deprecated/ground.png") + (images "tiles/crystalcave/deprecated/ground.png") (deprecated #t) ) @@ -4485,7 +4805,7 @@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/crystalcave/deprecated/background.png") + (images "tiles/crystalcave/deprecated/background.png") (deprecated #t) ) @@ -4522,7 +4842,7 @@ 0 0 0 0 0 0 0 0 1 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 3 0 0 0 ) - (image "tiles/snowmountain/deprecated/ground.png") + (images "tiles/snowmountain/deprecated/ground.png") (deprecated #t) ) @@ -4537,20 +4857,20 @@ 2815 2816 ) (attributes - 0 3 - 0 3 - 0 3 + 0 3 + 0 3 + 0 3 19 19 - 0 0 + 0 0 ) (datas - 0 0 - 0 0 - 0 0 - 2 0 - 0 0 + 0 0 + 0 0 + 0 0 + 2 0 + 0 0 ) - (image "tiles/castle/deprecated/chain.png") + (images "tiles/castle/deprecated/chain.png") (deprecated #t) ) @@ -4566,20 +4886,20 @@ 2837 2838 2839 2840 ) (attributes - 3 3 3 3 - 19 19 19 19 - 19 19 19 19 - 19 19 19 19 - 19 19 19 19 - 19 19 19 19 + 3 3 3 3 + 19 19 19 19 + 19 19 19 19 + 19 19 19 19 + 19 19 19 19 + 19 19 19 19 ) (datas - 0 1 2 3 - 0 1 2 3 - 16 17 18 19 - 32 33 34 35 - 48 49 50 51 - 64 65 66 67 + 0 1 2 3 + 0 1 2 3 + 16 17 18 19 + 32 33 34 35 + 48 49 50 51 + 64 65 66 67 ) (editor-images "tiles/auxiliary/invisible-unisolid-slopes.png") ) @@ -4588,108 +4908,107 @@ (width 4) (height 11) (ids - 57 58 2841 2842 - 59 60 2843 2844 - 1742 1743 2845 2846 - 53 55 1744 2847 - 54 56 1745 2848 - 2849 2851 2852 2853 - 2850 2854 2855 2856 - 2857 2858 2859 2860 - 2861 2862 2863 2864 - 2865 2866 2867 2868 - 2869 2870 2871 2872 - ) - (attributes - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 17 1 1 17 - 1 1 1 1 - 1 1 1 1 - 17 1 1 17 + 57 58 2841 2842 + 59 60 2843 2844 + 1742 1743 2845 2846 + 53 55 1744 2847 + 54 56 1745 2848 + 2849 2851 2852 2853 + 2850 2854 2855 2856 + 2857 2858 2859 2860 + 2861 2862 2863 2864 + 2865 2866 2867 2868 + 2869 2870 2871 2872 + ) + (attributes + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 17 1 1 17 + 1 1 1 1 + 1 1 1 1 + 17 1 1 17 ) (datas - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 2 0 0 0 - 0 0 0 0 - 0 0 0 0 - 1 0 0 3 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 2 0 0 0 + 0 0 0 0 + 0 0 0 0 + 1 0 0 3 ) - (image "tiles/pipe/green.png") + (images "tiles/pipe/green.png") ) (tiles (width 4) (height 11) (ids - 2085 2086 2873 2874 - 2087 2088 2875 2876 - 2089 2090 2877 2878 - 2143 2144 2145 2879 - 2146 2147 2148 2880 - 2881 2883 2884 2885 - 2882 2886 2887 2888 - 2889 2890 2891 2892 - 2893 2894 2895 2896 - 2897 2898 2899 2900 - 2901 2902 2903 2904 - ) - (attributes - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 1 1 1 1 - 17 1 1 17 - 1 1 1 1 - 1 1 1 1 - 17 1 1 17 + 2085 2086 2873 2874 + 2087 2088 2875 2876 + 2089 2090 2877 2878 + 2143 2144 2145 2879 + 2146 2147 2148 2880 + 2881 2883 2884 2885 + 2882 2886 2887 2888 + 2889 2890 2891 2892 + 2893 2894 2895 2896 + 2897 2898 2899 2900 + 2901 2902 2903 2904 + ) + (attributes + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 17 1 1 17 + 1 1 1 1 + 1 1 1 1 + 17 1 1 17 ) (datas - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 2 0 0 0 - 0 0 0 0 - 0 0 0 0 - 1 0 0 3 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 2 0 0 0 + 0 0 0 0 + 0 0 0 0 + 1 0 0 3 ) - (image "tiles/pipe/blue.png") + (images "tiles/pipe/blue.png") ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids - 2905 2906 - 2907 2908 + 2905 2906 + 2907 2908 ) (attributes - 0 0 - 0 0 + 0 0 + 0 0 ) - (image "tiles/pipe/mask.png") - ) + (images "tiles/pipe/mask.png") + ) - (tiles - (width 4 )(height 10 ) + (tiles + (width 4)(height 10) (ids 2909 2910 2913 2914 2911 2912 2915 2916 @@ -4697,38 +5016,38 @@ 2919 2920 2923 2924 3139 3140 3141 3142 3143 3144 3145 3146 - 0 3147 3148 0 - 3149 0 0 3150 + 0 3147 3148 0 + 3149 0 0 3150 3151 3152 3153 3154 3155 3156 3157 3158 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 0 1 1 0 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 0 1 1 0 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 - 34 0 0 32 - 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 - + 0 0 0 0 + 34 0 0 32 + 16 0 0 18 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/snow/slope_transitions.png" ) + (images "tiles/snow/slope_transitions.png" ) ) + (tiles (width 2)(height 4) (ids @@ -4743,36 +5062,38 @@ 1 1 1 1 ) - (image "tiles/snow/underground/concave.png") + (images "tiles/snow/underground/concave.png") ) + (tiles (width 8)(height 6) (ids - 0 0 0 0 0 0 2963 2969 - 0 2986 2990 0 2975 2979 2964 2970 + 0 0 0 0 0 0 2963 2969 + 0 2986 2990 0 2975 2979 2964 2970 2983 2987 2991 2994 2976 2980 2965 2971 2984 2988 2992 2995 2977 2981 2966 2972 2985 2989 2993 2996 2978 2982 2967 2973 - 0 0 0 0 0 0 2968 2974 + 0 0 0 0 0 0 2968 2974 ) (attributes - 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 17 17 + 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 17 17 17 17 17 17 17 17 17 17 - 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 17 17 17 17 17 17 17 17 - 0 0 0 0 0 0 17 17 + 0 0 0 0 0 0 17 17 ) (datas - 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 66 48 - 18 34 32 16 2 0 50 64 - 0 0 0 0 0 0 0 0 - 33 17 19 35 1 3 49 67 - 0 0 0 0 0 0 65 51 + 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 66 48 + 18 34 32 16 2 0 50 64 + 0 0 0 0 0 0 0 0 + 33 17 19 35 1 3 49 67 + 0 0 0 0 0 0 65 51 ) - (image "tiles/snow/underground/slope.png") + (images "tiles/snow/underground/slope.png") ) + (tiles (width 4)(height 10) (ids @@ -4787,23 +5108,33 @@ 3031 3032 3033 3034 3035 3036 0 0 ) - (image "tiles/pole/diagonals.png") + (images "tiles/pole/diagonals.png") ) + (tiles (width 3)(height 1) - (ids 3041 3042 3043) - (attributes 257 257 257) + (ids + 3041 3042 3043 + ) + (attributes + 257 257 257 + ) (deprecated #t) (images - (surface (diffuse-texture (file "objects/icecube/iceslick.png")) - (displacement-texture (file "objects/icecube/iceslick-displacement.png"))))) + (surface + (diffuse-texture (file "objects/icecube/iceslick.png")) + (displacement-texture (file "objects/icecube/iceslick-displacement.png")) + ) + ) + ) + (tiles (width 4)(height 4) (ids 3044 3045 3046 3047 3048 3049 3050 3051 - 3052 3053 0 3055 - 3056 3057 0 3059 + 3052 3053 0 3055 + 3056 3057 0 3059 ) (attributes 1 1 1 1 @@ -4811,8 +5142,9 @@ 1 1 1 1 1 1 1 0 ) - (image "tiles/snow/special2.png") + (images "tiles/snow/special2.png") ) + (tiles (width 1)(height 2) (ids @@ -4823,9 +5155,10 @@ 1 1 ) - (image (region "tiles/snow/special2.png" 32 0 32 64)) + (images (region "tiles/snow/special2.png" 32 0 32 64)) (deprecated #t) ) + (tiles (width 4)(height 4) (ids @@ -4834,10 +5167,9 @@ 4332 4333 4334 4335 4336 4337 4338 4339 ) - (image "tiles/background/rope.png") + (images "tiles/background/rope.png") ) - (tiles (width 4)(height 5) (ids @@ -4854,10 +5186,9 @@ 0 1 1 0 0 0 0 0 ) - (image "tiles/halloween/base.png") + (images "tiles/halloween/base.png") ) - (tiles (width 2)(height 4) (ids @@ -4872,7 +5203,7 @@ 1 1 0 0 ) - (image "tiles/halloween/inner.png") + (images "tiles/halloween/inner.png") ) (tiles @@ -4885,10 +5216,9 @@ 1 1 1 1 ) - (image "tiles/halloween/variation.png") + (images "tiles/halloween/variation.png") ) - (tiles (width 2)(height 2) (ids @@ -4899,7 +5229,7 @@ 1 1 1 1 ) - (image "tiles/halloween/outerdarkness.png") + (images "tiles/halloween/outerdarkness.png") ) (tiles @@ -4907,12 +5237,12 @@ (ids 3102 3103 3104 3105 - ) + ) (attributes 1 1 1 1 ) - (image "tiles/halloween/innerdarkness.png") + (images "tiles/halloween/innerdarkness.png") ) (tiles @@ -4923,7 +5253,7 @@ 3122 3108 3109 3127 3128 3129 0 3131 3132 3133 3134 3135 3136 0 ) - (image "tiles/halloween/darkness.png") + (images "tiles/halloween/darkness.png") ) (tiles @@ -4936,37 +5266,35 @@ 1 1 1 1 ) - (image "tiles/halloween/deprecated/black.png") + (images "tiles/halloween/deprecated/black.png") (deprecated #t) ) (tiles - (width 2) - (height 2) - (ids - 3163 3164 - 3165 3166 - ) - (image "tiles/signs/icehold.png") + (width 2)(height 2) + (ids + 3163 3164 + 3165 3166 + ) + (images "tiles/signs/icehold.png") ) (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 3257 3258 3269 3270 - 3259 3260 3271 3272 + 3259 3260 3271 3272 ) (attributes 1 1 1 1 1 1 1 1 ) - (image "tiles/castle/deprecated/grey_misc.png") + (images "tiles/castle/deprecated/grey_misc.png") (deprecated #t) ) + (tiles - (width 6) - (height 7) + (width 6)(height 7) (ids 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 @@ -4977,28 +5305,28 @@ 3203 3204 3205 3206 0 0 ) (attributes - 0 0 0 1 17 17 - 0 0 0 1 17 17 - 0 0 0 1 1 1 - 1 1 17 17 1 1 - 1 1 17 17 0 0 - 1024 1024 1024 1024 0 0 - 1024 1024 1024 1024 0 0 + 0 0 0 1 17 17 + 0 0 0 1 17 17 + 0 0 0 1 1 1 + 1 1 17 17 1 1 + 1 1 17 17 0 0 + 1024 1024 1024 1024 0 0 + 1024 1024 1024 1024 0 0 ) (datas - 0 0 0 0 2 0 - 0 0 0 0 1 3 - 0 0 0 0 0 0 - 0 0 2 0 0 0 - 0 0 1 3 0 0 - 0 0 0 0 0 0 - 0 0 0 0 0 0 + 0 0 0 0 2 0 + 0 0 0 0 1 3 + 0 0 0 0 0 0 + 0 0 2 0 0 0 + 0 0 1 3 0 0 + 0 0 0 0 0 0 + 0 0 0 0 0 0 ) - (image "tiles/blocks/industrial.png") + (images "tiles/blocks/industrial.png") ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 3261 3262 3263 3264 3265 3266 3267 3268 @@ -5007,73 +5335,70 @@ 1 1 0 0 1 1 0 0 ) - (image "tiles/snow/deprecated/custom.png") + (images "tiles/snow/deprecated/custom.png") (deprecated #t) ) (tiles - (width 3) - (height 1) + (width 3)(height 1) (ids 3281 3282 3520 ) (attributes 3 3 3 ) - (datas + (datas 0 0 0 ) - (image "tiles/castle/deprecated/grey_unisolid.png") + (images "tiles/castle/deprecated/grey_unisolid.png") (deprecated #t) ) (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids - 3285 3286 - 3287 3288 - 3289 3290 + 3285 3286 + 3287 3288 + 3289 3290 ) - (image "tiles/doodads/tux-statue.png") + (images "tiles/doodads/tux-statue.png") ) (tiles - (width 16) - (height 8) + (width 16)(height 8) (ids - 0 0 3291 0 3292 0 3293 0 0 3294 0 3295 0 3296 0 0 - 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 - 3313 3314 3315 3316 0 0 0 3317 3318 0 0 0 0 0 0 0 - 3319 3320 3321 3322 0 3323 3324 3325 3326 3327 3328 0 0 0 0 0 - 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 0 0 0 0 - 0 3341 3342 0 3343 3344 3345 3346 3347 3348 3349 3350 0 0 0 0 - 3351 3352 3353 3354 0 3355 3356 3357 3358 3359 3360 0 0 0 0 0 - 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 0 0 0 0 + 0 0 3291 0 3292 0 3293 0 0 3294 0 3295 0 3296 0 0 + 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 + 3313 3314 3315 3316 0 0 0 3317 3318 0 0 0 0 0 0 0 + 3319 3320 3321 3322 0 3323 3324 3325 3326 3327 3328 0 0 0 0 0 + 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 0 0 0 0 + 0 3341 3342 0 3343 3344 3345 3346 3347 3348 3349 3350 0 0 0 0 + 3351 3352 3353 3354 0 3355 3356 3357 3358 3359 3360 0 0 0 0 0 + 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 0 0 0 0 ) (attributes - 0 0 17 0 17 0 17 0 0 17 0 17 0 17 0 0 - 17 17 1 17 1 17 1 17 17 1 17 1 17 1 17 17 + 0 0 17 0 17 0 17 0 0 17 0 17 0 17 0 0 + 17 17 1 17 1 17 1 17 17 1 17 1 17 1 17 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 0 0 17 17 17 17 0 0 0 0 0 0 - 1 1 1 1 17 17 1 1 1 1 17 17 0 0 0 0 - 0 17 17 0 1 1 1 1 1 1 1 1 0 0 0 0 - 17 17 17 17 0 17 17 17 17 17 17 0 0 0 0 0 - 17 1 1 17 17 1 1 1 1 1 1 17 0 0 0 0 + 1 1 1 1 0 0 17 17 17 17 0 0 0 0 0 0 + 1 1 1 1 17 17 1 1 1 1 17 17 0 0 0 0 + 0 17 17 0 1 1 1 1 1 1 1 1 0 0 0 0 + 17 17 17 17 0 17 17 17 17 17 17 0 0 0 0 0 + 17 1 1 17 17 1 1 1 1 1 1 17 0 0 0 0 ) (datas - 0 0 18 0 18 0 18 0 0 16 0 16 0 16 0 0 - 18 34 0 34 0 34 0 34 32 0 32 0 32 0 32 16 + 0 0 18 0 18 0 18 0 0 16 0 16 0 16 0 0 + 18 34 0 34 0 34 0 34 32 0 32 0 32 0 32 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 18 34 32 16 0 0 0 0 0 0 - 0 0 0 0 18 34 0 0 0 0 32 16 0 0 0 0 - 0 66 48 0 0 0 0 0 0 0 0 0 0 0 0 0 - 66 50 64 48 0 2 2 2 0 0 0 0 0 0 0 0 - 50 0 0 64 2 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 18 34 32 16 0 0 0 0 0 0 + 0 0 0 0 18 34 0 0 0 0 32 16 0 0 0 0 + 0 66 48 0 0 0 0 0 0 0 0 0 0 0 0 0 + 66 50 64 48 0 2 2 2 0 0 0 0 0 0 0 0 + 50 0 0 64 2 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/snowmountain/deprecated/ground2.png") + (images "tiles/snowmountain/deprecated/ground2.png") (deprecated #t) ) + (tiles - (width 5) - (height 2) + (width 5)(height 2) (ids 3417 3373 3374 3375 3376 3378 3379 3380 3381 3382 @@ -5082,11 +5407,11 @@ 1 1 1 1 1 1 1 1 1 1 ) - (image "tiles/ghostwood/ghostwood-4.png") + (images "tiles/ghostwood/ghostwood-4.png") ) + (tiles - (width 1) - (height 2) + (width 1)(height 2) (deprecated #t) (ids 3377 @@ -5096,31 +5421,31 @@ 0 1 ) - (image (region "tiles/ghostwood/ghostwood-4.png" 160 0 32 64)) + (images (region "tiles/ghostwood/ghostwood-4.png" 160 0 32 64)) ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 3384 3385 3386 3387 3388 3389 ) (attributes - 0 0 + 0 0 17 17 - 1 1 + 1 1 ) (datas - 0 0 - 2 0 - 0 0 + 0 0 + 2 0 + 0 0 ) - (image "tiles/ghostwood/ghostwood-5.png") + (images "tiles/ghostwood/ghostwood-5.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 3390 3391 3392 3393 @@ -5128,54 +5453,54 @@ 3396 3397 ) (attributes - 0 0 + 0 0 17 17 17 17 - 1 1 + 1 1 ) (datas - 0 0 + 0 0 66 48 50 64 - 0 0 + 0 0 ) - (image "tiles/ghostwood/ghostwood-6.png") + (images "tiles/ghostwood/ghostwood-6.png") ) + (tiles - (width 8) - (height 3) + (width 8)(height 3) (ids - 0 0 0 3401 0 0 0 0 + 0 0 0 3401 0 0 0 0 3406 3407 3408 3409 3410 3411 3412 3413 - 3414 3415 0 0 0 0 3416 3418 + 3414 3415 0 0 0 0 3416 3418 ) (attributes - 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 17 17 17 17 17 17 17 17 - 1 1 0 0 0 0 17 17 + 1 1 0 0 0 0 17 17 ) (datas - 0 0 0 0 0 0 0 0 - 33 17 19 35 1 3 49 67 - 0 0 0 0 0 0 65 51 + 0 0 0 0 0 0 0 0 + 33 17 19 35 1 3 49 67 + 0 0 0 0 0 0 65 51 ) - (image "tiles/ghostwood/ghostwood-2.png") + (images "tiles/ghostwood/ghostwood-2.png") ) + (tiles - (width 8) - (height 1) + (width 8)(height 1) (deprecated #t) (ids 3398 3399 3400 0 3402 3403 3404 3405 ) (attributes - 1 1 1 0 1 1 1 1 + 1 1 1 0 1 1 1 1 ) - (image "tiles/ghostwood/ghostwood-2.png") + (images "tiles/ghostwood/ghostwood-2.png") ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 3419 3420 3421 3422 3423 3424 3425 3426 @@ -5184,36 +5509,36 @@ 0 0 0 0 0 0 0 0 ) - (image "tiles/background/storm-cloud.png") + (images "tiles/background/storm-cloud.png") ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 3427 3428 3429 3430 3431 3432 3433 3434 ) (attributes - 0 0 0 0 - 3 3 3 3 + 0 0 0 0 + 3 3 3 3 ) - (image "tiles/background/storm-cloud.png") + (images "tiles/background/storm-cloud.png") (deprecated #t) ) + (tiles - (width 3) - (height 1) + (width 3)(height 1) (ids 3435 3436 3437 ) (attributes - 1 1 1 + 1 1 1 ) - (image "tiles/forest/forestlog.png") + (images "tiles/forest/forestlog.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 3438 3439 3440 3441 @@ -5226,7 +5551,7 @@ 1 1 1 1 ) - (image "tiles/forest/statue2.png") + (images "tiles/forest/statue2.png") ) (tile @@ -5235,18 +5560,21 @@ (hurts #t) (deprecated #t) ) + (tile (id 3447) (images "tiles/spike/deprecated/spikedown.png") (hurts #t) (deprecated #t) ) + (tile (id 3448) (images "tiles/spike/deprecated/spikeleft.png") (hurts #t) (deprecated #t) ) + (tile (id 3449) (images "tiles/spike/deprecated/spikeright.png") @@ -5255,8 +5583,7 @@ ) (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 3450 3451 3452 3453 @@ -5269,7 +5596,7 @@ 1 1 1 1 ) - (image "tiles/forest/deprecated/nolok_statue.png") + (images "tiles/forest/deprecated/nolok_statue.png") (deprecated #t) ) @@ -5279,18 +5606,21 @@ (hurts #t) (deprecated #t) ) + (tile (id 3459) (images "tiles/spike/deprecated/spikedown2.png") (hurts #t) (deprecated #t) ) + (tile (id 3460) (images "tiles/spike/deprecated/spikeleft2.png") (hurts #t) (deprecated #t) ) + (tile (id 3461) (images "tiles/spike/deprecated/spikeright2.png") @@ -5299,8 +5629,7 @@ ) (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids 3462 3463 3464 3465 3466 3467 3468 3469 @@ -5311,16 +5640,16 @@ 17 17 17 17 17 17 0 1 ) - (datas - 33 17 19 35 - 49 67 1 3 - 65 51 0 0 + (datas + 33 17 19 35 + 49 67 1 3 + 65 51 0 0 ) - (image "tiles/forest/ceiling-slopes.png") + (images "tiles/forest/ceiling-slopes.png") ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 3473 3474 3475 3476 @@ -5331,22 +5660,22 @@ 1 1 1 1 ) - (image "tiles/forest/underground/convex.png") + (images "tiles/forest/underground/convex.png") ) + (tiles - (width 4) - (height 1) + (width 4)(height 1) (ids 3479 3480 3481 3482 ) (attributes 1 1 1 1 ) - (image "tiles/forest/underground/groundtiles-2.png") + (images "tiles/forest/underground/groundtiles-2.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 3483 0 3484 3485 @@ -5359,17 +5688,18 @@ 1 1 1 1 ) - (image "tiles/forest/underground/wall.png") + (images "tiles/forest/underground/wall.png") ) + (tile (id 3490) (images "tiles/forest/underground/deprecated/variation-1.png") (solid #t) (deprecated #t) ) + (tiles - (width 4) - (height 3) + (width 4)(height 3) (ids 3491 3492 3493 3494 3495 3496 3497 3498 @@ -5380,16 +5710,16 @@ 17 17 17 17 17 17 0 0 ) - (datas - 33 17 19 35 - 49 67 1 3 - 65 51 0 0 + (datas + 33 17 19 35 + 49 67 1 3 + 65 51 0 0 ) - (image "tiles/forest/underground/ceiling-slopes.png") + (images "tiles/forest/underground/ceiling-slopes.png") ) + (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids 3501 3502 3503 3504 @@ -5405,11 +5735,11 @@ 2 0 0 0 ) - (image "tiles/forest/underground/slope-2.png") + (images "tiles/forest/underground/slope-2.png") ) + (tiles - (width 2) - (height 4) + (width 2)(height 4) (ids 3507 3508 3509 3510 @@ -5428,11 +5758,11 @@ 50 64 0 0 ) - (image "tiles/forest/underground/slope-3.png") + (images "tiles/forest/underground/slope-3.png") ) + (tiles - (width 4) - (height 2) + (width 4)(height 2) (ids 3523 3524 3525 3526 3527 3528 3529 3530 @@ -5441,125 +5771,117 @@ 1024 1024 1024 1024 1024 1024 1024 1024 ) - (image "tiles/background/deprecated/storm-cloud-electrified.png") + (images "tiles/background/deprecated/storm-cloud-electrified.png") (deprecated #t) ) (tiles - (width 4) - (height 4) - (image "tiles/snow/underground/background.png") + (width 4)(height 4) + (images "tiles/snow/underground/background.png") (ids - 3541 3542 3543 3544 - 3545 3546 3547 3548 - 3549 3550 3551 3552 - 3553 3554 3555 3556 + 3541 3542 3543 3544 + 3545 3546 3547 3548 + 3549 3550 3551 3552 + 3553 3554 3555 3556 ) ) (tiles - (width 4) - (height 4) - (image "tiles/background/deprecated/backgroundtile2.png") + (width 4)(height 4) + (images "tiles/background/deprecated/backgroundtile2.png") (ids - 3557 3558 3559 3560 - 3561 3562 3563 3564 - 3565 3566 3567 3568 - 3569 3570 3571 3572 + 3557 3558 3559 3560 + 3561 3562 3563 3564 + 3565 3566 3567 3568 + 3569 3570 3571 3572 ) (deprecated #t) ) (tiles - (width 4) - (height 4) - (image "tiles/background/deprecated/backgroundtile3.png") + (width 4)(height 4) + (images "tiles/background/deprecated/backgroundtile3.png") (ids - 3573 3574 3575 3576 - 3577 3578 3579 3580 - 3581 3582 3583 3584 - 3585 3586 3587 3588 + 3573 3574 3575 3576 + 3577 3578 3579 3580 + 3581 3582 3583 3584 + 3585 3586 3587 3588 ) (deprecated #t) ) (tiles - (width 4) - (height 4) - (image "tiles/background/deprecated/backgroundtile4.png") + (width 4)(height 4) + (images "tiles/background/deprecated/backgroundtile4.png") (ids - 3589 3590 3591 3592 - 3593 3594 3595 3596 - 3597 3598 3599 3600 - 3601 3602 3603 3604 + 3589 3590 3591 3592 + 3593 3594 3595 3596 + 3597 3598 3599 3600 + 3601 3602 3603 3604 ) (deprecated #t) ) (tiles - (width 4) - (height 4) - (image "tiles/background/deprecated/backgroundtile5.png") + (width 4)(height 4) + (images "tiles/background/deprecated/backgroundtile5.png") (ids - 3605 3606 3607 3608 - 3609 3610 3611 3612 - 3613 3614 3615 3616 - 3617 3618 3619 3620 + 3605 3606 3607 3608 + 3609 3610 3611 3612 + 3613 3614 3615 3616 + 3617 3618 3619 3620 ) (deprecated #t) ) (tiles - (width 4) - (height 11) - (image "tiles/forest/deprecated/treelarge.png") + (width 4)(height 11) + (images "tiles/forest/deprecated/treelarge.png") (ids - 3625 3626 3627 3628 - 3629 3630 3631 3632 - 3633 3634 3635 3636 - 3637 3638 3639 3640 - 3641 3642 3643 3644 - 3645 3646 3647 3648 - 3649 3650 3651 3652 - 3653 3654 3655 3656 - 3657 3658 3659 3660 - 3661 3662 3663 3664 - 3665 3666 3667 3668 + 3625 3626 3627 3628 + 3629 3630 3631 3632 + 3633 3634 3635 3636 + 3637 3638 3639 3640 + 3641 3642 3643 3644 + 3645 3646 3647 3648 + 3649 3650 3651 3652 + 3653 3654 3655 3656 + 3657 3658 3659 3660 + 3661 3662 3663 3664 + 3665 3666 3667 3668 ) (deprecated #t) ) (tiles - (width 2) - (height 9) - (image "tiles/forest/deprecated/treesmall.png") + (width 2)(height 9) + (images "tiles/forest/deprecated/treesmall.png") (ids - 3669 3670 - 3671 3672 - 3673 3674 - 3675 3676 - 3677 3678 - 3679 3680 - 3681 3682 - 3683 3684 - 3685 3686 + 3669 3670 + 3671 3672 + 3673 3674 + 3675 3676 + 3677 3678 + 3679 3680 + 3681 3682 + 3683 3684 + 3685 3686 ) (deprecated #t) ) (tiles - (width 4) - (height 8) - (image "tiles/forest/deprecated/rock1.png") + (width 4)(height 8) + (images "tiles/forest/deprecated/rock1.png") (ids - 3687 3688 3689 3690 - 3691 3692 3693 3694 - 3695 3696 3697 3698 - 3699 3700 3701 3702 - 3703 3704 3705 3706 - 3707 3708 3709 3710 - 3711 3712 3713 3714 - 3715 3716 3717 3728 + 3687 3688 3689 3690 + 3691 3692 3693 3694 + 3695 3696 3697 3698 + 3699 3700 3701 3702 + 3703 3704 3705 3706 + 3707 3708 3709 3710 + 3711 3712 3713 3714 + 3715 3716 3717 3728 ) (attributes 1 1 1 1 @@ -5570,14 +5892,13 @@ 1 1 1 1 1 1 1 1 1 1 1 1 - ) + ) (deprecated #t) ) (tiles - (width 4) - (height 26) - (image "tiles/forest/deprecated/rock3.png") + (width 4)(height 26) + (images "tiles/forest/deprecated/rock3.png") (ids 3769 3770 3771 3772 3773 3774 3775 3776 @@ -5605,8 +5926,8 @@ 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 - ) - (attributes + ) + (attributes 1 1 1 1 1 1 1 1 1 1 1 1 @@ -5624,135 +5945,144 @@ 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - ) + 1 1 1 1 + 1 1 1 1 + ) (deprecated #t) ) (tiles - (width 4) - (height 10) - (image "tiles/forest/deprecated/rock2.png") - (ids - 3729 3730 3731 3732 - 3733 3734 3735 3736 - 3737 3738 3739 3740 - 3741 3742 3743 3744 - 3745 3746 3747 3748 - 3749 3750 3751 3752 - 3753 3754 3755 3756 - 3757 3758 3759 3760 - 3761 3762 3763 3764 - 3765 3766 3767 3768 - ) - (attributes - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 - 17 17 17 17 + (width 4)(height 10) + (images "tiles/forest/deprecated/rock2.png") + (ids + 3729 3730 3731 3732 + 3733 3734 3735 3736 + 3737 3738 3739 3740 + 3741 3742 3743 3744 + 3745 3746 3747 3748 + 3749 3750 3751 3752 + 3753 3754 3755 3756 + 3757 3758 3759 3760 + 3761 3762 3763 3764 + 3765 3766 3767 3768 + ) + (attributes + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 + 17 17 17 17 ) (datas - 18 34 18 34 - 33 17 33 17 - 32 16 32 16 - 19 35 19 35 - 2 0 2 0 - 1 3 1 3 - 66 48 66 48 - 50 64 50 64 - 49 67 49 67 - 65 51 65 51 + 18 34 18 34 + 33 17 33 17 + 32 16 32 16 + 19 35 19 35 + 2 0 2 0 + 1 3 1 3 + 66 48 66 48 + 50 64 50 64 + 49 67 49 67 + 65 51 65 51 ) (deprecated #t) ) (tiles - (width 4) - (height 1) - (fps 16) - (water #t) - (hurts #t) - (images "tiles/water/antarctic-1a.png" - "tiles/water/antarctic-1b.png") + (width 4)(height 1) + (fps 16) + (water #t) + (hurts #t) + (images + "tiles/water/antarctic-1a.png" + "tiles/water/antarctic-1b.png" + ) (ids - 3873 3874 3875 3876 - ) - (attributes - 1024 1024 1024 1024 - ) + 3873 3874 3875 3876 + ) + (attributes + 1024 1024 1024 1024 + ) ) (tile - (fps 16) - (water #t) - (hurts #t) - (images "tiles/water/antarctic-1c.png" - "tiles/water/antarctic-1d.png") - (id - 3877 - ) + (fps 16) + (water #t) + (hurts #t) + (images + "tiles/water/antarctic-1c.png" + "tiles/water/antarctic-1d.png" + ) + (id 3877) ) (tiles - (width 1) - (height 3) - (image "tiles/snow/flagpole.png") + (width 1)(height 3) + (images "tiles/snow/flagpole.png") (ids - 3927 3928 3929 - ) + 3927 3928 3929 + ) ) (tiles - (width 4)(height 12) + (width 9)(height 11) + (images "tiles/snow/icechunk.png") (ids - 3972 3973 3974 3975 - 3976 3977 3978 3979 - 3980 3981 3982 3983 - 3984 3985 3986 3987 - 5206 5207 5208 5209 - 5210 5211 5212 5213 - 5214 5215 5216 5217 - 5218 5219 5220 5221 - 5222 5223 5224 5225 - 5226 5227 5228 5229 - 5230 5231 5232 5233 - 5234 5235 5236 0 - ) - (attributes - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 257 - 257 257 257 0 - ) - (image "tiles/snow/icechunk.png") + 3972 3973 3974 3987 3983 7195 7196 7197 7198 + 3976 3977 3978 3975 3979 7199 7200 7201 7202 + 3980 3981 3982 5225 5209 7203 7204 7207 7209 + 5212 5210 5207 5211 5217 7205 7206 7208 7210 + 5213 5221 0 5206 5208 0 0 7211 7212 + 3984 5224 5228 5233 5229 0 0 7213 7214 + 5214 5215 5216 5232 5236 0 0 0 0 + 5218 5219 5220 5235 5234 0 0 0 0 + 5222 5223 3985 0 0 0 0 0 0 + 5226 5227 3986 0 0 0 0 0 0 + 5230 5231 0 0 0 0 0 0 0 + ) + (attributes + 257 257 257 257 257 17 17 17 17 + 257 257 257 257 257 17 17 17 17 + 257 257 257 257 257 17 17 17 17 + 257 257 257 257 257 17 17 17 17 + 257 257 0 257 257 0 0 17 17 + 257 257 257 257 257 0 0 17 17 + 257 257 257 257 257 0 0 0 0 + 257 257 257 257 257 0 0 0 0 + 257 257 257 0 0 0 0 0 0 + 257 257 257 0 0 0 0 0 0 + 257 257 0 0 0 0 0 0 0 + ) + (datas + 0 0 0 0 0 18 34 32 16 + 0 0 0 0 0 33 17 19 35 + 0 0 0 0 0 2 0 66 48 + 0 0 0 0 0 1 3 50 64 + 0 0 0 0 0 0 0 49 67 + 0 0 0 0 0 0 0 65 51 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + ) ) (tiles - (width 4) - (height 9) - (image "tiles/snow/variants2.png") + (width 4)(height 9) + (images "tiles/snow/variants2.png") (ids 3988 3989 3990 3991 5368 5369 5370 5371 @@ -5764,7 +6094,7 @@ 5392 5393 0 0 5396 5397 0 0 ) - (attributes + (attributes 1 1 1 0 1 1 17 17 17 17 17 17 @@ -5775,7 +6105,7 @@ 17 17 0 0 1 1 0 0 ) - (datas + (datas 0 0 0 0 0 0 1 3 33 35 49 67 @@ -5785,13 +6115,12 @@ 0 0 0 0 50 64 0 0 0 0 0 0 - ) + ) ) - (tiles - (width 11) - (height 7) - (image "tiles/retro/retro_snow.png") + (tiles + (width 11)(height 7) + (images "tiles/retro/retro_snow.png") (ids 4000 4001 4002 4003 4170 4171 4172 4190 5093 5094 5095 4078 4079 4080 4081 4173 4175 4185 4191 5096 5097 5098 @@ -5799,7 +6128,7 @@ 4157 4158 4159 4160 4177 4178 4187 4193 5102 5103 5104 4161 4162 4163 4164 4179 4183 4188 5105 5106 5107 5108 4103 4165 4166 4167 4180 4184 4189 5109 5110 5111 5112 - 4168 4169 4181 4182 5113 5114 5115 5116 0 0 0 + 4168 4169 4181 4182 5113 5114 5115 5116 7275 7276 0 ) (attributes 1 1 1 1 1 1 1 1 1 1 1 @@ -5808,14 +6137,13 @@ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 0 0 0 + 1 1 1 1 1 1 1 1 1 1 0 ) ) - (tiles - (width 4) - (height 1) - (image "tiles/blocks/deprecated/block_season.png") + (tiles + (width 4)(height 1) + (images "tiles/blocks/deprecated/block_season.png") (ids 4005 4006 4007 4008 ) @@ -5845,7 +6173,7 @@ 0 0 0 0 0 0 0 0 ) - (image "tiles/snow/special3.png") + (images "tiles/snow/special3.png") ) (tiles @@ -5876,145 +6204,143 @@ 1 1 1 1 1 0 0 0 ) - (image "tiles/snow/underground/special.png") + (images "tiles/snow/underground/special.png") ) (tiles (width 2)(height 3) - (image "tiles/castle/nolok-statue-forest.png") + (images "tiles/castle/nolok-statue-forest.png") (ids 4082 4083 4084 4085 4086 4087 - ) - (attributes - 0 0 - 0 0 - 0 0 - ) - ) - - (tiles - (width 2)(height 3) - (image "tiles/castle/nolok-statue-ghost.png") - (ids - 4088 4089 - 4090 4091 - 4092 4093 - ) - (atrributes - 0 0 - 0 0 - 0 0 - ) ) + (attributes + 0 0 + 0 0 + 0 0 + ) + ) - (tiles - (width 2)(height 3) - (image "tiles/castle/nolok-statue-snow.png") - (ids - 4094 4095 - 4096 4097 - 4098 4099 - ) - (attributes - 0 0 - 0 0 - 0 0 - ) - ) - - (tiles - (width 2) - (height 3) + (tiles + (width 2)(height 3) + (images "tiles/castle/nolok-statue-ghost.png") + (ids + 4088 4089 + 4090 4091 + 4092 4093 + ) + (atrributes + 0 0 + 0 0 + 0 0 + ) + ) + + (tiles + (width 2)(height 3) + (images "tiles/castle/nolok-statue-snow.png") + (ids + 4094 4095 + 4096 4097 + 4098 4099 + ) + (attributes + 0 0 + 0 0 + 0 0 + ) + ) + + (tiles + (width 2)(height 3) (ids - 2523 2524 - 2525 2526 - 2527 2528) + 2523 2524 + 2525 2526 + 2527 2528) (attributes - 4096 4096 - 4096 4096 - 4096 4096) - (image "tiles/test/walljump-test.png")) - + 4096 4096 + 4096 4096 + 4096 4096) + (images "tiles/test/walljump-test.png") + ) (tiles - (width 5) - (height 3) + (width 5)(height 3) (ids - 4104 4105 4106 4107 4108 - 4109 4110 4111 4112 4113 - 4114 4115 4116 0 0) + 4104 4105 4106 4107 4108 + 4109 4110 4111 4112 4113 + 4114 4115 4116 0 0) (attributes - 4096 1 4096 1 1 - 4096 1 4096 1 1 - 4096 1 4096 0 0) - (image "tiles/snow/snow-walljump.png")) + 4096 1 4096 1 1 + 4096 1 4096 1 1 + 4096 1 4096 0 0) + (images "tiles/snow/snow-walljump.png") + ) (tiles - (width 2) - (height 3) + (width 2)(height 3) (ids - 4119 4120 - 4121 4122 - 4123 4124) + 4119 4120 + 4121 4122 + 4123 4124) (attributes - 4096 4096 - 4096 4096 - 4096 4096) - (image "tiles/forest/leaf-walljump.png")) + 4096 4096 + 4096 4096 + 4096 4096) + (images "tiles/forest/leaf-walljump.png") + ) (tiles - (width 2) - (height 2) + (width 2)(height 2) (ids - 4125 4126 - 4127 4128) - (image "tiles/signs/walljump.png")) + 4125 4126 + 4127 4128) + (images "tiles/signs/walljump.png") + ) (tiles - (width 4) - (height 16) - (ids - 2460 2470 2471 2631 - 2634 2515 2516 2517 - 2518 4153 4154 4155 - 2529 2530 2531 2532 - 2533 2534 2539 2540 - 2541 2542 2543 2544 - 2545 2546 2547 2548 - 2549 2550 2555 2566 - 2571 2572 2573 2574 - 2575 2576 2577 2578 - 2579 2580 2581 2582 - 2587 2588 2589 2590 - 2591 2592 2593 2594 - 2595 2596 2597 2598 - 2603 2604 2605 2606 - 2607 2608 2609 2610) - (image "tiles/forest/rocks-forest.png")) + (width 4)(height 16) + (ids + 2460 2470 2471 2631 + 2634 2515 2516 2517 + 2518 4153 4154 4155 + 2529 2530 2531 2532 + 2533 2534 2539 2540 + 2541 2542 2543 2544 + 2545 2546 2547 2548 + 2549 2550 2555 2566 + 2571 2572 2573 2574 + 2575 2576 2577 2578 + 2579 2580 2581 2582 + 2587 2588 2589 2590 + 2591 2592 2593 2594 + 2595 2596 2597 2598 + 2603 2604 2605 2606 + 2607 2608 2609 2610) + (images "tiles/forest/rocks-forest.png") + ) (tiles - (width 4) - (height 13) - (ids - 2611 2612 2613 2614 - 2619 2620 2621 2622 - 2623 2624 2625 2626 - 2627 2628 2629 2630 - 2635 2636 2637 2638 - 2639 2640 2641 2642 - 2643 2644 2645 2646 - 4129 4130 4131 4132 - 4133 4134 4135 4136 - 4137 4138 4139 4140 - 4141 4142 4143 4144 - 4145 4146 4147 4148 - 4149 4150 4151 4152) - (image "tiles/snow/rocks-snow.png")) - - (tiles - (width 10) - (height 9) + (width 4)(height 13) + (ids + 2611 2612 2613 2614 + 2619 2620 2621 2622 + 2623 2624 2625 2626 + 2627 2628 2629 2630 + 2635 2636 2637 2638 + 2639 2640 2641 2642 + 2643 2644 2645 2646 + 4129 4130 4131 4132 + 4133 4134 4135 4136 + 4137 4138 4139 4140 + 4141 4142 4143 4144 + 4145 4146 4147 4148 + 4149 4150 4151 4152) + (images "tiles/snow/rocks-snow.png") + ) + + (tiles + (width 10)(height 9) (ids 4225 4226 4227 4228 0 0 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 @@ -6037,12 +6363,12 @@ 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 0 0 ) - (image "tiles/crystalcave/deprecated/ground_extra.png") + (images "tiles/crystalcave/deprecated/ground_extra.png") (deprecated #t) ) + (tiles - (width 4) - (height 10) + (width 4)(height 10) (ids 4293 4294 4295 4296 4297 4298 4299 4300 @@ -6067,7 +6393,7 @@ 1 1 1 0 1 1 1 1 ) - (image "tiles/forest/foresttiles-13.png") + (images "tiles/forest/foresttiles-13.png") ) (tiles @@ -6078,7 +6404,7 @@ 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 ) - (image "tiles/blocks/block_overlays.png") + (images "tiles/blocks/block_overlays.png") ) (tiles @@ -6097,7 +6423,7 @@ 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 ) - (image "tiles/blocks/bridge_brown.png") + (images "tiles/blocks/bridge_brown.png") ) (tiles @@ -6116,7 +6442,7 @@ 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 ) - (image "tiles/blocks/bridge_ice.png") + (images "tiles/blocks/bridge_ice.png") ) (tiles @@ -6126,8 +6452,9 @@ 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 ) - (image "tiles/castle/castle_corner.png") + (images "tiles/castle/castle_corner.png") ) + (tiles (width 15)(height 6) (ids @@ -6154,8 +6481,9 @@ 0 0 0 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/castle/castle_forest.png") + (images "tiles/castle/castle_forest.png") ) + (tiles (width 11)(height 6) (ids @@ -6182,8 +6510,9 @@ 0 0 0 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/castle/castle_snow.png") + (images "tiles/castle/castle_snow.png") ) + (tiles (width 6)(height 7) (ids @@ -6195,8 +6524,9 @@ 1467 1468 1469 1470 0 0 1471 1472 1473 1474 0 0 ) - (image "tiles/castle/castle_wall.png") + (images "tiles/castle/castle_wall.png") ) + (tiles (width 4)(height 7) (ids @@ -6208,16 +6538,18 @@ 4681 4682 4683 4684 4685 4686 4687 4688 ) - (image "tiles/castle/chain.png") + (images "tiles/castle/chain.png") ) + (tiles (width 2)(height 1) (deprecated #t) (ids 4671 4672 ) - (image (region "tiles/castle/chain.png" 64 64 64 32)) + (images (region "tiles/castle/chain.png" 64 64 64 32)) ) + (tiles (width 5)(height 6) (ids @@ -6236,8 +6568,9 @@ 1 1 0 1 1 1 1 0 1 1 ) - (image "tiles/castle/ruins.png") + (images "tiles/castle/ruins.png") ) + (tiles (width 2)(height 2) (ids @@ -6246,65 +6579,152 @@ ) (attributes 1024 1024 - 1024 1024 + 1024 1024 ) - (image "tiles/castle/ruin_spikes.png") + (images "tiles/castle/ruin_spikes.png") ) + (tiles (width 13)(height 7) (ids - 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 - 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 - 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 - 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 - 4775 4776 4777 4778 0 0 4781 4782 0 4784 4785 4786 4787 - 4788 4789 4790 4791 0 0 0 0 0 4797 4798 0 0 - 0 0 0 0 0 0 0 0 0 4810 4811 0 0 + 4723 4724 4725 4726 7215 4728 4729 4730 4731 4734 4735 4732 4733 + 4736 4737 4738 4739 7216 4741 4742 4743 4744 4747 4748 4745 4746 + 4749 4750 4751 4752 7217 4754 4755 4756 4757 4760 4761 4758 4759 + 4762 4763 4764 4765 7218 4767 4768 4769 4770 4773 4774 4771 4772 + 4775 4776 4777 4778 7219 4727 4753 0 0 0 0 4784 4785 + 4788 4789 4790 4791 7220 4740 4766 0 0 0 0 4797 4798 + 7221 7222 7223 7224 7225 0 0 4781 4782 4786 4787 4810 4811 ) (attributes - 0 0 0 0 1 19 19 19 19 19 19 19 19 - 1 1 1 1 1 1 1 1 1 19 19 1 1 + 0 0 0 0 0 19 19 19 19 19 19 19 19 + 1 1 1 1 1 1 1 1 1 1 1 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 19 19 19 19 1 1 19 19 - 1 1 1 1 0 0 0 0 0 19 19 0 0 - 0 0 0 0 0 0 0 0 0 19 19 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1 1 1 1 1 19 19 19 19 19 19 1 1 + 1 1 1 1 1 1 1 0 0 0 0 19 19 + 0 0 0 0 0 1 1 0 0 0 0 19 19 + 1 1 1 1 1 0 0 0 0 0 0 0 0 ) (datas - 0 0 0 0 0 18 34 32 16 66 48 2 0 - 0 0 0 0 0 0 0 0 0 50 64 0 0 + 0 0 0 0 0 18 34 32 16 2 0 66 48 + 0 0 0 0 0 0 0 0 0 0 0 50 64 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 33 17 19 35 0 0 1 3 - 0 0 0 0 0 0 0 0 0 49 67 0 0 - 0 0 0 0 0 0 0 0 0 65 51 0 0 + 0 0 0 0 0 33 17 19 35 1 3 0 0 + 0 0 0 0 0 0 0 0 0 0 0 49 67 + 0 0 0 0 0 0 0 0 0 0 0 65 51 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/crystalcave/crystal_1x1.png") + (images "tiles/crystalcave/crystal_1x1.png") ) + (tiles - (width 10)(height 8) + (width 4)(height 8) + (ids + 7226 7227 7228 7229 + 7230 7231 7232 7233 + 7234 7235 7236 7237 + 7238 7239 7240 7241 + 7242 7243 7244 0 + 7245 7246 7247 0 + 7248 7249 7250 0 + 7251 7252 0 0 + ) + (attributes + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 1 + 1 1 1 0 + 1 1 1 0 + 1 1 1 0 + 1 1 0 0 + ) + (images "tiles/crystalcave/crystal_1x1_extra.png") + ) + + (tiles + (width 6)(height 3) + (ids + 5023 5024 5029 5030 5033 5034 + 5025 5026 5031 5032 5035 5036 + 5027 5028 0 0 0 0 + ) + (attributes + 1 1 1 1 1 1 + 1 1 1 1 1 1 + 19 19 0 0 0 0 + ) + + (datas + 0 0 0 0 0 0 + 0 0 0 0 0 0 + 33 35 0 0 0 0 + ) + (images "tiles/crystalcave/crystal_variants.png") + ) + + (tiles + (width 5)(height 5) + (ids + 7277 7278 7279 7280 7281 + 7282 7283 7284 7285 7286 + 7287 7288 7289 7290 7291 + 7292 7293 7294 7295 7296 + 7297 7298 7299 7300 7301 + ) + (images "tiles/crystalcave/crystal_1x1_extra2.png") + ) + + (tiles + (width 6)(height 8) (ids - 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 - 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 - 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 - 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 - 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 - 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 - 4874 4875 4876 4877 4878 4879 0 0 4882 4883 - 4884 4885 4886 4887 4888 4889 0 0 4892 4893 + 4814 4815 4816 4817 4822 4823 + 4824 4825 4826 4827 4832 4833 + 4834 4835 4836 4837 4842 4843 + 4844 4845 4846 4847 4872 4873 + 4854 4855 4856 4857 4882 4883 + 4864 4865 4866 4867 4892 4893 + 4874 4875 4878 4879 0 0 + 4884 4885 4888 4889 0 0 + ) + (attributes + 0 0 0 0 0 0 + 1 1 1 1 1 1 + 1 1 1 1 1 1 + 1 1 1 1 1 1 + 1 1 1 1 1 1 + 0 0 0 0 0 0 + 1 1 1 1 0 0 + 1 1 1 1 0 0 + ) + (images "tiles/crystalcave/crystal_2x2.png") + ) + + (tiles + (width 10)(height 8) + (ids + 0 0 0 0 4818 4819 4820 4821 0 0 + 0 0 0 0 4828 4829 4830 4831 0 0 + 0 0 0 0 4838 4839 4840 4841 0 0 + 0 0 0 0 4848 4849 4850 4851 4852 4853 + 0 0 0 0 4858 4859 4860 4861 4862 4863 + 0 0 0 0 4868 4869 4870 4871 0 0 + 0 0 4876 4877 0 0 0 0 0 0 + 0 0 4886 4887 0 0 0 0 0 0 ) (attributes 0 0 0 0 1 1 1 1 0 0 - 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 + 0 0 0 0 1 1 1 1 0 0 + 0 0 0 0 1 1 1 1 0 0 + 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 - 1 1 1 1 1 1 0 0 1 1 - 1 1 1 1 1 1 0 0 0 0 + 0 0 0 0 1 1 1 1 0 0 + 0 0 1 1 0 0 0 0 0 0 + 0 0 1 1 0 0 0 0 0 0 ) - (image "tiles/crystalcave/crystal_2x2.png") + (images "tiles/crystalcave/deprecated/crystal_2x2.png") + (deprecated #t) ) + (tiles (width 6)(height 4) (ids @@ -6313,8 +6733,9 @@ 4906 4907 4908 4909 0 0 4912 4913 4914 4915 0 0 ) - (image "tiles/crystalcave/crystal_bg.png") + (images "tiles/crystalcave/crystal_bg.png") ) + (tiles (width 7)(height 4) (ids @@ -6323,8 +6744,9 @@ 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 ) - (image "tiles/crystalcave/crystals1.png") + (images "tiles/crystalcave/crystals1.png") ) + (tiles (width 5)(height 3) (ids @@ -6332,8 +6754,9 @@ 4951 4952 4953 4954 4955 4956 4957 0 0 4960 ) - (image "tiles/crystalcave/crystals2.png") + (images "tiles/crystalcave/crystals2.png") ) + (tiles (width 3)(height 2) (ids @@ -6342,10 +6765,11 @@ ) (attributes 3 3 3 - 3 3 3 + 3 3 3 ) - (image "tiles/forest/branches.png") + (images "tiles/forest/branches.png") ) + (tiles (width 4)(height 13) (ids @@ -6363,8 +6787,9 @@ 5015 5016 5017 5018 5019 0 0 0 ) - (image "tiles/halloween/halloween_extra.png") + (images "tiles/halloween/halloween_extra.png") ) + (tiles (width 6)(height 5) (ids @@ -6374,67 +6799,73 @@ 1348 1722 0 0 0 0 1347 0 0 0 0 0 ) - (image "tiles/pole/pole.png") + (images "tiles/pole/pole.png") ) + (tiles (width 8)(height 3) (ids 68 65 69 5123 3521 3279 3516 3522 5128 64 5130 5131 3517 3519 5134 5135 - 67 66 3518 5139 5140 5141 0 0 + 67 66 3518 5139 5140 5141 7273 7274 ) (attributes 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 0 0 + 1 1 1 1 1 1 1 1 ) - (image "tiles/retro/retro_castle.png") + (images "tiles/retro/retro_castle.png") ) + (tiles (width 3)(height 2) (ids 5144 3277 5146 3280 3278 5149 ) - (image "tiles/retro/retro_castlewall.png") + (images "tiles/retro/retro_castlewall.png") ) + (tiles - (width 7)(height 7) + (width 10)(height 7) (ids - 33 32 34 1741 5154 5155 5156 - 35 37 39 1740 5161 5162 5163 - 38 36 43 1739 5168 5169 5170 - 40 41 42 1815 5175 5176 5177 - 5178 5179 5180 5181 5182 5183 5184 - 5185 5186 5187 5188 5189 5190 5191 - 119 121 120 1816 5196 5197 5198 + 33 32 34 1741 5154 5155 5156 7253 7260 7267 + 35 37 39 1740 5161 5162 5163 7254 7261 7268 + 38 36 43 1739 5168 5169 5170 7255 7262 7269 + 40 41 42 1815 5175 5176 5177 7256 7263 7270 + 5178 5179 5180 5181 5182 5183 5184 7257 7264 7271 + 5185 5186 5187 5188 5189 5190 5191 7258 7265 7272 + 119 121 120 1816 5196 5197 5198 7259 7266 0 ) (attributes - 0 0 0 0 1 1 1 - 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 + 0 0 0 0 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 0 + 1 1 1 1 1 1 1 1 1 0 + 1 1 1 1 1 1 1 1 1 0 + 1 1 1 1 1 1 1 1 1 0 + 1 1 1 1 1 1 1 1 1 0 ) - (image "tiles/retro/retro_cave.png") + (images "tiles/retro/retro_cave.png") ) + (tiles (width 2)(height 2) (ids 5199 5200 5201 5202 ) - (image "tiles/signs/bombhold.png") + (images "tiles/signs/bombhold.png") ) + (tiles (width 2)(height 1) (ids 5203 5204 ) - (image "tiles/snow/grass1.png") + (images "tiles/snow/grass1.png") ) + (tiles (width 6)(height 5) (ids @@ -6449,7 +6880,7 @@ 1 1 0 1 17 17 1 1 0 1 0 0 0 0 0 0 17 17 - 17 17 17 17 17 17 + 17 17 17 17 17 17 ) (datas 0 0 0 0 0 0 @@ -6458,8 +6889,9 @@ 0 0 0 0 66 48 18 34 32 16 50 64 ) - (image "tiles/snow/ice-floor.png") + (images "tiles/snow/ice-floor.png") ) + (tiles (width 4)(height 1) (ids @@ -6473,6 +6905,7 @@ ) ) ) + (tiles (width 4)(height 12) (ids @@ -6489,7 +6922,7 @@ 5332 5333 5288 5289 5290 5291 5292 0 ) - (attributes + (attributes 0 0 0 0 0 1 0 0 0 0 0 0 @@ -6503,8 +6936,9 @@ 0 0 0 0 0 0 0 0 ) - (image "tiles/snow/snowfort_fg.png") + (images "tiles/snow/snowfort_fg.png") ) + (tiles (width 4)(height 4) (ids @@ -6513,14 +6947,15 @@ 5302 5303 5304 5305 5306 5307 5308 5309 ) - (attributes + (attributes 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ) - (image "tiles/snow/snowfort_fence.png") + (images "tiles/snow/snowfort_fence.png") ) + (tiles (width 4)(height 12) (ids @@ -6537,7 +6972,7 @@ 5350 5351 5352 5353 5354 5355 5356 0 ) - (attributes + (attributes 0 0 0 0 0 1 0 0 0 0 0 0 @@ -6551,8 +6986,9 @@ 0 0 0 0 0 0 0 0 ) - (image "tiles/snow/snowfort_bg.png") + (images "tiles/snow/snowfort_bg.png") ) + (tiles (width 4)(height 2) (ids @@ -6563,8 +6999,9 @@ 1024 0 1024 0 0 1024 0 1024 ) - (image "tiles/snow/spike.png") + (images "tiles/snow/spike.png") ) + (tiles (width 11)(height 5) (ids @@ -6581,8 +7018,9 @@ 0 0 0 0 0 0 0 3 3 3 3 0 0 3 3 3 3 3 3 3 3 0 ) - (image "tiles/snow/unisolid.png") + (images "tiles/snow/unisolid.png") ) + (tiles (width 7)(height 5) (ids @@ -6599,8 +7037,9 @@ 0 0 0 1 1 1 1 0 0 0 0 0 0 0 ) - (image "tiles/snow/snowmerge.png") + (images "tiles/snow/snowmerge.png") ) + (tile (id 2127) (images @@ -6608,6 +7047,7 @@ ) (deprecated #t) ) + (tile (id 2134) (images @@ -6615,6 +7055,7 @@ ) (deprecated #t) ) + (tile (id 2135) (images @@ -6622,6 +7063,7 @@ ) (deprecated #t) ) + (tiles (width 6)(height 3) (ids @@ -6629,8 +7071,9 @@ 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 0 ) - (image "tiles/snow/unisolid2.png") + (images "tiles/snow/unisolid2.png") ) + (tiles (width 5)(height 4) (ids @@ -6645,8 +7088,9 @@ 1 1 1 1 0 1 1 1 1 0 ) - (image "tiles/forest/foresttiles-earth.png") + (images "tiles/forest/foresttiles-earth.png") ) + (tiles (width 7)(height 5) (ids @@ -6663,8 +7107,9 @@ 0 0 0 1 1 0 0 0 0 0 0 0 0 0 ) - (image "tiles/forest/forestmerge.png") + (images "tiles/forest/forestmerge.png") ) + (tiles (width 11)(height 5) (ids @@ -6674,15 +7119,16 @@ 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 0 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 0 ) - (attributes + (attributes 0 0 0 0 0 0 3 3 0 0 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 3 3 3 3 0 ) - (image "tiles/forest/hole.png") + (images "tiles/forest/hole.png") ) + (tiles (width 9)(height 13) (ids @@ -6700,8 +7146,9 @@ 0 0 0 5798 5799 5800 0 0 0 0 0 0 5807 5808 5809 0 0 0 ) - (image "tiles/forest/tree1.png") + (images "tiles/forest/tree1.png") ) + (tiles (width 8)(height 13) (ids @@ -6719,8 +7166,9 @@ 0 0 0 5904 5905 0 0 0 0 0 0 5912 5913 0 0 0 ) - (image "tiles/forest/tree2.png") + (images "tiles/forest/tree2.png") ) + (tiles (width 6)(height 13) (ids @@ -6738,16 +7186,18 @@ 0 0 5985 5986 0 0 0 0 5991 5992 0 0 ) - (image "tiles/forest/tree3.png") + (images "tiles/forest/tree3.png") ) + (tiles (width 4)(height 2) (ids 5996 5997 5998 5999 6000 6001 6002 6003 ) - (image "tiles/forest/plant2.png") + (images "tiles/forest/plant2.png") ) + (tiles (width 4)(height 10) (ids @@ -6763,31 +7213,32 @@ 6040 6041 6042 6043 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 1 1 1 1 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 1 1 1 1 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 - 34 0 0 32 - 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 + 0 0 0 0 + 34 0 0 32 + 16 0 0 18 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/forest/slope_transitions.png") + (images "tiles/forest/slope_transitions.png") ) + (tiles (width 4)(height 6) (ids @@ -6814,8 +7265,9 @@ 18 16 2 0 50 64 0 0 ) - (image "tiles/forest/variants.png") + (images "tiles/forest/variants.png") ) + (tiles (width 7)(height 6) (ids @@ -6826,8 +7278,9 @@ 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 ) - (image "tiles/forest/tree_special.png") + (images "tiles/forest/tree_special.png") ) + (tiles (width 7)(height 4) (ids @@ -6842,8 +7295,9 @@ 1024 1024 1024 1024 0 1024 1024 1024 1024 1024 1024 0 0 1024 ) - (image "tiles/ghostwood/corruptvine.png") + (images "tiles/ghostwood/corruptvine.png") ) + (tiles (width 11)(height 5) (ids @@ -6853,15 +7307,16 @@ 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 0 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 0 ) - (attributes + (attributes 0 0 0 0 0 0 3 3 0 0 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 3 3 3 3 0 ) - (image "tiles/ghostwood/ghosthole.png") + (images "tiles/ghostwood/ghosthole.png") ) + (tiles (width 6)(height 5) (ids @@ -6885,8 +7340,9 @@ 0 0 0 0 66 48 18 34 32 16 50 64 ) - (image "tiles/ghostwood/ghostwood-10.png") + (images "tiles/ghostwood/ghostwood-10.png") ) + (tiles (width 6)(height 8) (ids @@ -6899,8 +7355,9 @@ 6259 6260 6261 6262 6263 6264 0 6266 6267 6268 6269 0 ) - (image "tiles/ghostwood/ghostwood-11.png") + (images "tiles/ghostwood/ghostwood-11.png") ) + (tiles (width 4)(height 10) (ids @@ -6910,48 +7367,50 @@ 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 - 0 6296 6297 0 + 0 6296 6297 0 6299 0 0 6302 6303 6304 6305 6306 6307 6308 6309 6310 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 0 1 1 0 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 0 1 1 0 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 - 34 0 0 32 - 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 + 0 0 0 0 + 34 0 0 32 + 16 0 0 18 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/ghostwood/ghostwood-12.png") + (images "tiles/ghostwood/ghostwood-12.png") ) + (tiles (width 4)(height 1) (deprecated #t) (ids - 6295 0 0 6298 + 6295 0 0 6298 ) (attributes - 1 0 0 1 + 1 0 0 1 ) - (image (region "tiles/ghostwood/ghostwood-12.png" 0 192 128 32)) + (images (region "tiles/ghostwood/ghostwood-12.png" 0 192 128 32)) ) + (tiles (width 7)(height 5) (ids @@ -6968,8 +7427,9 @@ 0 0 0 1 1 1 1 0 0 0 1 1 0 0 ) - (image "tiles/ghostwood/ghostwood-13.png") + (images "tiles/ghostwood/ghostwood-13.png") ) + (tiles (width 8)(height 8) (ids @@ -6982,8 +7442,9 @@ 0 0 0 0 6398 6399 6400 6401 0 0 0 0 6406 6407 6408 6409 ) - (image "tiles/ghostwood/ghostwood-14.png") + (images "tiles/ghostwood/ghostwood-14.png") ) + (tiles (width 6)(height 3) (ids @@ -6991,8 +7452,9 @@ 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 0 ) - (image "tiles/ghostwood/ghostwood-15.png") + (images "tiles/ghostwood/ghostwood-15.png") ) + (tiles (width 7)(height 9) (ids @@ -7006,8 +7468,9 @@ 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 ) - (image "tiles/ghostwood/ghostwood-16.png") + (images "tiles/ghostwood/ghostwood-16.png") ) + (tiles (width 6)(height 8) (ids @@ -7020,8 +7483,9 @@ 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 ) - (image "tiles/ghostwood/ghostwood-17.png") + (images "tiles/ghostwood/ghostwood-17.png") ) + (tiles (width 2)(height 5) (ids @@ -7038,8 +7502,9 @@ 1 1 1 1 ) - (image "tiles/ghostwood/ghostwood-8.png") + (images "tiles/ghostwood/ghostwood-8.png") ) + (tiles (width 4)(height 13) (ids @@ -7072,8 +7537,9 @@ 1 1 1 1 1 1 0 0 ) - (image "tiles/ghostwood/ghostwood-9.png") + (images "tiles/ghostwood/ghostwood-9.png") ) + (tiles (width 2)(height 4) (ids @@ -7082,30 +7548,34 @@ 6605 6606 6607 6608 ) - (image "tiles/ghostwood/liane_ghost.png") + (images "tiles/ghostwood/liane_ghost.png") ) + (tiles (width 1)(height 1) (ids 6609 ) - (image "tiles/ghostwood/mushrooms.png") + (images "tiles/ghostwood/mushrooms.png") ) + (tiles (width 1)(height 1) (ids 6610 ) - (image "tiles/ghostwood/plant1.png") + (images "tiles/ghostwood/plant1.png") ) + (tiles (width 4)(height 2) (ids 6611 0 0 6614 6615 6616 6617 6618 ) - (image "tiles/ghostwood/plant2.png") + (images "tiles/ghostwood/plant2.png") ) + (tiles (width 8)(height 10) (ids @@ -7144,8 +7614,9 @@ 0 0 0 0 0 0 0 0 33 17 19 35 0 0 0 0 ) - (image "tiles/ghostwood/roots.png") + (images "tiles/ghostwood/roots.png") ) + (tiles (width 2)(height 3) (ids @@ -7158,8 +7629,9 @@ 4096 4096 4096 4096 ) - (image "tiles/ghostwood/root-walljump.png") + (images "tiles/ghostwood/root-walljump.png") ) + (tiles (width 4)(height 6) (ids @@ -7186,8 +7658,9 @@ 18 16 2 0 50 64 0 0 ) - (image "tiles/ghostwood/variants_ghost.png") + (images "tiles/ghostwood/variants_ghost.png") ) + (tiles (width 4)(height 10) (ids @@ -7197,37 +7670,38 @@ 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 - 0 6754 6755 0 + 0 6754 6755 0 6757 0 0 6760 6761 6762 6763 6764 6765 6766 6767 6768 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 0 1 1 0 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 0 1 1 0 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 - 34 0 0 32 - 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 + 0 0 0 0 + 34 0 0 32 + 16 0 0 18 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/ghostwood/underground/ghostwood-12_under.png") + (images "tiles/ghostwood/underground/ghostwood-12_under.png") ) + (tiles (width 4)(height 1) (deprecated #t) @@ -7235,10 +7709,11 @@ 6753 0 0 6756 ) (attributes - 1 0 0 1 + 1 0 0 1 ) - (image (region "tiles/ghostwood/underground/ghostwood-12_under.png" 0 192 128 32)) + (images (region "tiles/ghostwood/underground/ghostwood-12_under.png" 0 192 128 32)) ) + (tiles (width 7)(height 5) (ids @@ -7255,8 +7730,9 @@ 0 0 0 1 1 1 1 0 0 0 0 0 0 0 ) - (image "tiles/ghostwood/underground/ghostwood-13_under.png") + (images "tiles/ghostwood/underground/ghostwood-13_under.png") ) + (tiles (width 4)(height 1) (ids @@ -7265,8 +7741,9 @@ (attributes 1 1 1 1 ) - (image "tiles/ghostwood/underground/ghostwood-1a_under.png") + (images "tiles/ghostwood/underground/ghostwood-1a_under.png") ) + (tiles (width 14)(height 5) (ids @@ -7283,15 +7760,16 @@ 1 1 1 1 17 17 17 17 17 17 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ) - (datas + (datas 0 0 0 0 0 0 0 0 0 0 0 0 49 67 0 0 0 0 18 34 32 16 2 0 66 48 65 51 0 0 0 0 0 0 0 0 0 0 50 64 0 0 0 0 0 0 33 17 19 35 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - (image "tiles/ghostwood/underground/ghostwood-1_under.png") + (images "tiles/ghostwood/underground/ghostwood-1_under.png") ) + (tiles (width 2)(height 3) (ids @@ -7304,8 +7782,9 @@ 1 1 1 1 ) - (image "tiles/ghostwood/underground/ghostwood-2_under.png") + (images "tiles/ghostwood/underground/ghostwood-2_under.png") ) + (tiles (width 2)(height 7) (ids @@ -7326,8 +7805,9 @@ 1 1 1 1 ) - (image "tiles/ghostwood/underground/ghostwood-3_under.png") + (images "tiles/ghostwood/underground/ghostwood-3_under.png") ) + (tiles (width 4)(height 9) (ids @@ -7352,8 +7832,9 @@ 1 1 1 1 1 1 0 0 ) - (image "tiles/ghostwood/underground/ghostwood-4_under.png") + (images "tiles/ghostwood/underground/ghostwood-4_under.png") ) + (tiles (width 4)(height 4) (ids @@ -7374,8 +7855,9 @@ 50 64 0 0 0 0 0 0 ) - (image "tiles/ghostwood/underground/variants2_ghost.png") + (images "tiles/ghostwood/underground/variants2_ghost.png") ) + (tiles (width 3)(height 4) (ids @@ -7390,8 +7872,9 @@ 1 1 1 1 1 0 ) - (image "tiles/ghostwood/underground/variants_ghost.png") + (images "tiles/ghostwood/underground/variants_ghost.png") ) + (tiles (width 4)(height 10) (ids @@ -7407,31 +7890,32 @@ 7014 7015 7016 7017 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 0 1 1 0 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 0 1 1 0 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 - 34 0 0 32 - 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 + 0 0 0 0 + 34 0 0 32 + 16 0 0 18 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/snow/underground/slope_transitions.png") + (images "tiles/snow/underground/slope_transitions.png") ) + (tiles (width 7)(height 5) (ids @@ -7448,8 +7932,9 @@ 0 0 0 1 1 1 1 0 0 0 0 0 0 0 ) - (image "tiles/snow/underground/snowmerge.png") + (images "tiles/snow/underground/snowmerge.png") ) + (tiles (width 4)(height 4) (ids @@ -7470,8 +7955,9 @@ 50 64 0 0 0 0 0 0 ) - (image "tiles/snow/underground/variants.png") + (images "tiles/snow/underground/variants.png") ) + (tiles (width 6)(height 3) (ids @@ -7479,8 +7965,9 @@ 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 0 ) - (image "tiles/forest/foresttiles-bush.png") + (images "tiles/forest/foresttiles-bush.png") ) + (tiles (width 2)(height 3) (ids @@ -7493,8 +7980,9 @@ 1024 1024 1024 1024 ) - (image "tiles/forest/pogonia.png") + (images "tiles/forest/pogonia.png") ) + (tiles (width 7)(height 5) (ids @@ -7511,8 +7999,9 @@ 0 0 0 1 1 1 1 0 0 0 0 0 0 0 ) - (image "tiles/forest/underground/groundmerge.png") + (images "tiles/forest/underground/groundmerge.png") ) + (tiles (width 4)(height 11) (ids @@ -7541,8 +8030,9 @@ 1 1 1 1 1 0 0 0 ) - (image "tiles/forest/underground/groundtiles-more.png") + (images "tiles/forest/underground/groundtiles-more.png") ) + (tiles (width 4)(height 10) (ids @@ -7558,31 +8048,32 @@ 7179 7180 7181 7182 ) (attributes - 0 0 0 0 - 17 1 1 17 - 17 0 0 17 - 1 1 1 1 - 17 0 0 17 - 1 17 17 1 - 0 1 1 0 - 0 0 0 0 - 17 0 0 17 - 1 17 17 1 + 0 0 0 0 + 17 1 1 17 + 17 0 0 17 + 1 1 1 1 + 17 0 0 17 + 1 17 17 1 + 0 1 1 0 + 0 0 0 0 + 17 0 0 17 + 1 17 17 1 ) (datas - 0 0 0 0 + 0 0 0 0 34 0 0 32 16 0 0 18 - 0 0 0 0 - 16 0 0 18 - 0 0 2 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 2 - 0 32 34 0 + 0 0 0 0 + 16 0 0 18 + 0 0 2 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 2 + 0 32 34 0 ) - (image "tiles/forest/underground/slope_transitions.png") + (images "tiles/forest/underground/slope_transitions.png") ) + (tiles (width 3)(height 4) (ids @@ -7597,8 +8088,9 @@ 1 1 1 1 1 0 ) - (image "tiles/forest/underground/variants.png") + (images "tiles/forest/underground/variants.png") ) + (tiles (width 4)(height 4) (ids @@ -7619,9 +8111,30 @@ 50 64 0 0 0 0 0 0 ) - (image "tiles/forest/underground/variants2.png") + (images "tiles/forest/underground/variants2.png") + ) + + (tiles + (width 3)(height 4) + (ids + 0 5117 0 + 5118 5119 5120 + 5121 5122 5124 + 5125 5126 5127 + ) + (images "tiles/background/seaweed-0.png") ) + (tiles + (width 3)(height 4) + (ids + 0 7302 0 + 7303 7304 7305 + 7306 7307 7308 + 7309 7310 7311 + ) + (images "tiles/background/corrupt_seaweed-0.png") + ) ;; Additional attributes (additional (thunderstorm @@ -7640,6 +8153,12 @@ 3424 3528 3425 3529 3426 3530 + + ;; Deprecated + 75 1421 + 200 1421 + 76 1422 + 201 1422 ) ) ) diff --git a/data/images/tiles/background/corrupt_seaweed-0.png b/data/images/tiles/background/corrupt_seaweed-0.png new file mode 100644 index 00000000000..b2917a61e1f Binary files /dev/null and b/data/images/tiles/background/corrupt_seaweed-0.png differ diff --git a/data/images/tiles/background/seaweed-0.png b/data/images/tiles/background/seaweed-0.png new file mode 100644 index 00000000000..1701e6cb969 Binary files /dev/null and b/data/images/tiles/background/seaweed-0.png differ diff --git a/data/images/tiles/blocks/block4.png b/data/images/tiles/blocks/block4.png deleted file mode 100644 index 7a720f8c87d..00000000000 Binary files a/data/images/tiles/blocks/block4.png and /dev/null differ diff --git a/data/images/tiles/blocks/block_horiz.png b/data/images/tiles/blocks/block_horiz.png deleted file mode 100644 index dc6214f690e..00000000000 Binary files a/data/images/tiles/blocks/block_horiz.png and /dev/null differ diff --git a/data/images/tiles/blocks/block_vert.png b/data/images/tiles/blocks/block_vert.png deleted file mode 100644 index 373f53220dc..00000000000 Binary files a/data/images/tiles/blocks/block_vert.png and /dev/null differ diff --git a/data/images/tiles/blocks/block_wood.png b/data/images/tiles/blocks/block_wood.png new file mode 100644 index 00000000000..fafe1bae7ce Binary files /dev/null and b/data/images/tiles/blocks/block_wood.png differ diff --git a/data/images/tiles/crystalcave/crystal_1x1.png b/data/images/tiles/crystalcave/crystal_1x1.png index 05e3a2a6d1e..4d7bd246302 100644 Binary files a/data/images/tiles/crystalcave/crystal_1x1.png and b/data/images/tiles/crystalcave/crystal_1x1.png differ diff --git a/data/images/tiles/crystalcave/crystal_1x1_extra.png b/data/images/tiles/crystalcave/crystal_1x1_extra.png new file mode 100644 index 00000000000..39d99268b9c Binary files /dev/null and b/data/images/tiles/crystalcave/crystal_1x1_extra.png differ diff --git a/data/images/tiles/crystalcave/crystal_1x1_extra2.png b/data/images/tiles/crystalcave/crystal_1x1_extra2.png new file mode 100644 index 00000000000..f63ed951f3e Binary files /dev/null and b/data/images/tiles/crystalcave/crystal_1x1_extra2.png differ diff --git a/data/images/tiles/crystalcave/crystal_2x2.png b/data/images/tiles/crystalcave/crystal_2x2.png index 7e84b4cfca4..31313a9d337 100644 Binary files a/data/images/tiles/crystalcave/crystal_2x2.png and b/data/images/tiles/crystalcave/crystal_2x2.png differ diff --git a/data/images/tiles/crystalcave/crystal_variants.png b/data/images/tiles/crystalcave/crystal_variants.png new file mode 100644 index 00000000000..ee2c2054c98 Binary files /dev/null and b/data/images/tiles/crystalcave/crystal_variants.png differ diff --git a/data/images/tiles/crystalcave/deprecated/crystal_2x2.png b/data/images/tiles/crystalcave/deprecated/crystal_2x2.png new file mode 100644 index 00000000000..7e84b4cfca4 Binary files /dev/null and b/data/images/tiles/crystalcave/deprecated/crystal_2x2.png differ diff --git a/data/images/tiles/forest/pogonia.png b/data/images/tiles/forest/pogonia.png index 6c47fc380f0..e6ef7bfbbaa 100644 Binary files a/data/images/tiles/forest/pogonia.png and b/data/images/tiles/forest/pogonia.png differ diff --git a/data/images/tiles/forest/spikevine.png b/data/images/tiles/forest/spikevine.png index 26d5c5b302e..b412f21ba01 100644 Binary files a/data/images/tiles/forest/spikevine.png and b/data/images/tiles/forest/spikevine.png differ diff --git a/data/images/tiles/goal/goal1-1.png b/data/images/tiles/goal/goal1-1.png index 6e092394664..ae8d4b116ea 100644 Binary files a/data/images/tiles/goal/goal1-1.png and b/data/images/tiles/goal/goal1-1.png differ diff --git a/data/images/tiles/goal/goal1-2.png b/data/images/tiles/goal/goal1-2.png index 4b164bb7b45..ac069c61c9a 100644 Binary files a/data/images/tiles/goal/goal1-2.png and b/data/images/tiles/goal/goal1-2.png differ diff --git a/data/images/tiles/goal/goal1-3.png b/data/images/tiles/goal/goal1-3.png index 52181d3862a..d10de5fab27 100644 Binary files a/data/images/tiles/goal/goal1-3.png and b/data/images/tiles/goal/goal1-3.png differ diff --git a/data/images/tiles/goal/goal1-4.png b/data/images/tiles/goal/goal1-4.png index 066232f8ce5..b698bc7266b 100644 Binary files a/data/images/tiles/goal/goal1-4.png and b/data/images/tiles/goal/goal1-4.png differ diff --git a/data/images/tiles/goal/goal1-5.png b/data/images/tiles/goal/goal1-5.png index b44059230ff..b1e3681c027 100644 Binary files a/data/images/tiles/goal/goal1-5.png and b/data/images/tiles/goal/goal1-5.png differ diff --git a/data/images/tiles/retro/retro_castle.png b/data/images/tiles/retro/retro_castle.png index 8631b49171b..604d9a8852e 100644 Binary files a/data/images/tiles/retro/retro_castle.png and b/data/images/tiles/retro/retro_castle.png differ diff --git a/data/images/tiles/retro/retro_cave.png b/data/images/tiles/retro/retro_cave.png index b070a4e35d8..4a36722d0e3 100644 Binary files a/data/images/tiles/retro/retro_cave.png and b/data/images/tiles/retro/retro_cave.png differ diff --git a/data/images/tiles/retro/retro_snow.png b/data/images/tiles/retro/retro_snow.png index 91d77c95aba..2df8579e7e4 100644 Binary files a/data/images/tiles/retro/retro_snow.png and b/data/images/tiles/retro/retro_snow.png differ diff --git a/data/images/tiles/snow/icechunk.png b/data/images/tiles/snow/icechunk.png index d2521658580..02dda77b168 100644 Binary files a/data/images/tiles/snow/icechunk.png and b/data/images/tiles/snow/icechunk.png differ diff --git a/data/images/tiles/snow/underground/background.png b/data/images/tiles/snow/underground/background.png index 505f15a558c..9250155eef3 100644 Binary files a/data/images/tiles/snow/underground/background.png and b/data/images/tiles/snow/underground/background.png differ diff --git a/data/levels/bonus1/ar.po b/data/levels/bonus1/ar.po index 2a37c11bd6c..f4a7ad8baab 100644 --- a/data/levels/bonus1/ar.po +++ b/data/levels/bonus1/ar.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Israa Zamzami, 2018 # Hasan Nahleh , 2019 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/az.po b/data/levels/bonus1/az.po index 1a12fb97c1a..07e67ea2289 100644 --- a/data/levels/bonus1/az.po +++ b/data/levels/bonus1/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/ca.po b/data/levels/bonus1/ca.po index c8813141678..cd597ce979e 100644 --- a/data/levels/bonus1/ca.po +++ b/data/levels/bonus1/ca.po @@ -5,7 +5,7 @@ # Translators: # Ariadna Pascual , 2016 # Catalanoic , 2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 76352799d6904fac47e3a0fa3ed5fd59_334826e , 2014 # Yael Codesal, 2016 msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (http://app.transifex.com/arctic-games/supertux/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/el.po b/data/levels/bonus1/el.po index 30e14872ce3..90147c52686 100644 --- a/data/levels/bonus1/el.po +++ b/data/levels/bonus1/el.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # I will not tell you that , 2015 # Vangelis Nomikos , 2013-2014 # Vangelis Skarmoutsos (SkarmoutsosV) , 2016 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (http://app.transifex.com/arctic-games/supertux/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/et.po b/data/levels/bonus1/et.po index 7eb5817d339..853e3dd3f0f 100644 --- a/data/levels/bonus1/et.po +++ b/data/levels/bonus1/et.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (http://app.transifex.com/arctic-games/supertux/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/eu.po b/data/levels/bonus1/eu.po index 18c74761d7b..12e00218a62 100644 --- a/data/levels/bonus1/eu.po +++ b/data/levels/bonus1/eu.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Mielanjel Iraeta , 2018 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Basque (http://app.transifex.com/arctic-games/supertux/language/eu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/fr_CA.po b/data/levels/bonus1/fr_CA.po index 5334c354a3a..9adecdbce35 100644 --- a/data/levels/bonus1/fr_CA.po +++ b/data/levels/bonus1/fr_CA.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Jean-Philippe L'Étoile , 2019 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/he.po b/data/levels/bonus1/he.po index 9c6a3379e1e..189546fa421 100644 --- a/data/levels/bonus1/he.po +++ b/data/levels/bonus1/he.po @@ -4,7 +4,7 @@ # # Translators: # Evgeny Satanovsky , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020-2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/hr.po b/data/levels/bonus1/hr.po index 7d56e464ad8..b2893a8e30d 100644 --- a/data/levels/bonus1/hr.po +++ b/data/levels/bonus1/hr.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/hy.po b/data/levels/bonus1/hy.po index cd2dad81ffb..467351e8de7 100644 --- a/data/levels/bonus1/hy.po +++ b/data/levels/bonus1/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/is.po b/data/levels/bonus1/is.po index 7c9a2f9c8f3..5bca0218218 100644 --- a/data/levels/bonus1/is.po +++ b/data/levels/bonus1/is.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Kristján Magnússon, 2022 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/ja.po b/data/levels/bonus1/ja.po index d7cbdbba2f8..305c2a8c784 100644 --- a/data/levels/bonus1/ja.po +++ b/data/levels/bonus1/ja.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # 515ce455fbf38ec9585626e8d26b6324_7a9a6ef, 2017 # Ryo Nakano, 2019,2021,2024 # Sanshiro sumita, 2015-2016 diff --git a/data/levels/bonus1/nb.po b/data/levels/bonus1/nb.po index 345a62cd9f0..3f8d459d871 100644 --- a/data/levels/bonus1/nb.po +++ b/data/levels/bonus1/nb.po @@ -4,7 +4,7 @@ # # Translators: # Allan Nordhøy , 2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2007,2015-2016 msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/arctic-games/supertux/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/nn.po b/data/levels/bonus1/nn.po index 5005ee9e993..4282ac67389 100644 --- a/data/levels/bonus1/nn.po +++ b/data/levels/bonus1/nn.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2006-2007,2015-2016,2019-2020 # Karl Ove Hufthammer , 2015 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Nynorsk (http://app.transifex.com/arctic-games/supertux/language/nn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/sk.po b/data/levels/bonus1/sk.po index 64a7bfc7712..5380e36b742 100644 --- a/data/levels/bonus1/sk.po +++ b/data/levels/bonus1/sk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # c79a840bffc1621596a73d9f7d995b66_5f97bea <821296eb068acbf38f8fe02d322f4248_155187>, 2014 # MiroslavR , 2015-2016 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (http://app.transifex.com/arctic-games/supertux/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/sq.po b/data/levels/bonus1/sq.po index 151c275081b..9dc718b52c5 100644 --- a/data/levels/bonus1/sq.po +++ b/data/levels/bonus1/sq.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Indrit Bashkimi , 2015 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/tr.po b/data/levels/bonus1/tr.po index db01f12f67c..15713eb6715 100644 --- a/data/levels/bonus1/tr.po +++ b/data/levels/bonus1/tr.po @@ -6,7 +6,7 @@ # Alkım Kaçmaz , 2013 # mahmut özcan , 2015 # Tan Siret Akıncı , 2020 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # mahmut özcan , 2020 # Yusuf Özsoy , 2013 msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Turkish (http://app.transifex.com/arctic-games/supertux/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/tt.po b/data/levels/bonus1/tt.po index f90b06dcdb4..3b3fa937264 100644 --- a/data/levels/bonus1/tt.po +++ b/data/levels/bonus1/tt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Булат Ибраһим , 2016 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (http://app.transifex.com/arctic-games/supertux/language/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus1/uk.po b/data/levels/bonus1/uk.po index d82d440fba0..df7ed42c818 100644 --- a/data/levels/bonus1/uk.po +++ b/data/levels/bonus1/uk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Asemif official, 2023 # Ievgen Tkach , 2018 # Max Lyashuk , 2015 diff --git a/data/levels/bonus1/uz.po b/data/levels/bonus1/uz.po index c06b347c550..be027da7ed8 100644 --- a/data/levels/bonus1/uz.po +++ b/data/levels/bonus1/uz.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:04+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/ar.po b/data/levels/bonus2/ar.po index 58182779d35..07837069ad3 100644 --- a/data/levels/bonus2/ar.po +++ b/data/levels/bonus2/ar.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/az.po b/data/levels/bonus2/az.po index 1b730353fc2..a39c7943163 100644 --- a/data/levels/bonus2/az.po +++ b/data/levels/bonus2/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/et.po b/data/levels/bonus2/et.po index c07c26109fe..bb823a674ed 100644 --- a/data/levels/bonus2/et.po +++ b/data/levels/bonus2/et.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (http://app.transifex.com/arctic-games/supertux/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/fr_CA.po b/data/levels/bonus2/fr_CA.po index 649f323ab15..7c2ab7846ec 100644 --- a/data/levels/bonus2/fr_CA.po +++ b/data/levels/bonus2/fr_CA.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/he.po b/data/levels/bonus2/he.po index ada2b26ce59..65aa28a1bc1 100644 --- a/data/levels/bonus2/he.po +++ b/data/levels/bonus2/he.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020-2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/hr.po b/data/levels/bonus2/hr.po index b7fbd430516..adcaa17fd11 100644 --- a/data/levels/bonus2/hr.po +++ b/data/levels/bonus2/hr.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/hy.po b/data/levels/bonus2/hy.po index 98839c2e1be..3902437e10b 100644 --- a/data/levels/bonus2/hy.po +++ b/data/levels/bonus2/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/id.po b/data/levels/bonus2/id.po index 312528a323d..c52dfd2b938 100644 --- a/data/levels/bonus2/id.po +++ b/data/levels/bonus2/id.po @@ -6,14 +6,14 @@ # Chris , 2017 # Chris , 2022 # Chris , 2017 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (http://app.transifex.com/arctic-games/supertux/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/is.po b/data/levels/bonus2/is.po index 3bb2eec8a18..4f50e901bf6 100644 --- a/data/levels/bonus2/is.po +++ b/data/levels/bonus2/is.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/sk.po b/data/levels/bonus2/sk.po index 947851b6f88..8625ca8b0b7 100644 --- a/data/levels/bonus2/sk.po +++ b/data/levels/bonus2/sk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # c79a840bffc1621596a73d9f7d995b66_5f97bea <821296eb068acbf38f8fe02d322f4248_155187>, 2014 # MiroslavR , 2016 # Roman 'Kaktuxista' Benji , 2014 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (http://app.transifex.com/arctic-games/supertux/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/sq.po b/data/levels/bonus2/sq.po index 5fa532e4613..f0ffa470a48 100644 --- a/data/levels/bonus2/sq.po +++ b/data/levels/bonus2/sq.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Indrit Bashkimi , 2015 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus2/uk.po b/data/levels/bonus2/uk.po index df68bf5ce2e..542ee25daeb 100644 --- a/data/levels/bonus2/uk.po +++ b/data/levels/bonus2/uk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Asemif official, 2023 # Max Lyashuk , 2015 msgid "" diff --git a/data/levels/bonus2/uz.po b/data/levels/bonus2/uz.po index e7fcc8a38f3..cef82b2f99c 100644 --- a/data/levels/bonus2/uz.po +++ b/data/levels/bonus2/uz.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:07+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/ar.po b/data/levels/bonus3/ar.po index a482f083f3c..5be232781c9 100644 --- a/data/levels/bonus3/ar.po +++ b/data/levels/bonus3/ar.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Israa Zamzami, 2018 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/az.po b/data/levels/bonus3/az.po index a40ff8802ea..3b02bd8527f 100644 --- a/data/levels/bonus3/az.po +++ b/data/levels/bonus3/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/ca.po b/data/levels/bonus3/ca.po index a40b779224f..b4252c2332e 100644 --- a/data/levels/bonus3/ca.po +++ b/data/levels/bonus3/ca.po @@ -5,7 +5,7 @@ # Translators: # Ariadna Pascual , 2016 # Catalanoic , 2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 76352799d6904fac47e3a0fa3ed5fd59_334826e , 2015 # Yael Codesal, 2016 msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (http://app.transifex.com/arctic-games/supertux/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/el.po b/data/levels/bonus3/el.po index 6544754ae7f..4835c63ecf6 100644 --- a/data/levels/bonus3/el.po +++ b/data/levels/bonus3/el.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # I will not tell you that , 2015 # Vangelis Nomikos , 2013-2014 # Vangelis Skarmoutsos (SkarmoutsosV) , 2016,2019 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (http://app.transifex.com/arctic-games/supertux/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/et.po b/data/levels/bonus3/et.po index 7a9de61f9d8..13b8f4403e8 100644 --- a/data/levels/bonus3/et.po +++ b/data/levels/bonus3/et.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (http://app.transifex.com/arctic-games/supertux/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/eu.po b/data/levels/bonus3/eu.po index 0d999ab40e8..e489a0a2e34 100644 --- a/data/levels/bonus3/eu.po +++ b/data/levels/bonus3/eu.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Mielanjel Iraeta , 2018-2019 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Basque (http://app.transifex.com/arctic-games/supertux/language/eu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/fr_CA.po b/data/levels/bonus3/fr_CA.po index 24457458d5a..79976dd7d39 100644 --- a/data/levels/bonus3/fr_CA.po +++ b/data/levels/bonus3/fr_CA.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022-2023 +# IAN RODRÍGUEZ Lorenzo, 2022-2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022-2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022-2023\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/he.po b/data/levels/bonus3/he.po index 77efeee6229..73ec1a1a1eb 100644 --- a/data/levels/bonus3/he.po +++ b/data/levels/bonus3/he.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020-2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/hr.po b/data/levels/bonus3/hr.po index 16f40adef6f..8bc5f7f868d 100644 --- a/data/levels/bonus3/hr.po +++ b/data/levels/bonus3/hr.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/hy.po b/data/levels/bonus3/hy.po index f675a251b57..ada538a29b8 100644 --- a/data/levels/bonus3/hy.po +++ b/data/levels/bonus3/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/id.po b/data/levels/bonus3/id.po index ba9077b7e50..10349160563 100644 --- a/data/levels/bonus3/id.po +++ b/data/levels/bonus3/id.po @@ -4,14 +4,14 @@ # # Translators: # Chris , 2017 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (http://app.transifex.com/arctic-games/supertux/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/is.po b/data/levels/bonus3/is.po index 97a2ee0dc98..4302db0c9a3 100644 --- a/data/levels/bonus3/is.po +++ b/data/levels/bonus3/is.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/ja.po b/data/levels/bonus3/ja.po index c91b8ad6799..a3d7c7cd697 100644 --- a/data/levels/bonus3/ja.po +++ b/data/levels/bonus3/ja.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Ryo Nakano, 2019,2021,2024 # b1e11c107ebf1f339ff7adfc86b9dbe0_2e3e89d, 2016 # Sanshiro sumita, 2015 diff --git a/data/levels/bonus3/nb.po b/data/levels/bonus3/nb.po index 3c45e9cb15c..ed8f099dbaa 100644 --- a/data/levels/bonus3/nb.po +++ b/data/levels/bonus3/nb.po @@ -4,7 +4,7 @@ # # Translators: # Allan Nordhøy , 2016,2018 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2015-2016 msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/arctic-games/supertux/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/nn.po b/data/levels/bonus3/nn.po index 6f96248296b..6410d76e9de 100644 --- a/data/levels/bonus3/nn.po +++ b/data/levels/bonus3/nn.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2015-2016,2018-2020 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Nynorsk (http://app.transifex.com/arctic-games/supertux/language/nn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/ro.po b/data/levels/bonus3/ro.po index 96ca7e89277..fcd4d25812f 100644 --- a/data/levels/bonus3/ro.po +++ b/data/levels/bonus3/ro.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Nicolae Crefelean, 2015-2016,2019 # drazvan, 2019 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Romanian (http://app.transifex.com/arctic-games/supertux/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/sk.po b/data/levels/bonus3/sk.po index 4ec1748e72b..3dea149cef5 100644 --- a/data/levels/bonus3/sk.po +++ b/data/levels/bonus3/sk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Jose Riha , 2021 # Roman 'Kaktuxista' Benji , 2014 # Roman 'Kaktuxista' Benji , 2014 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (http://app.transifex.com/arctic-games/supertux/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/sq.po b/data/levels/bonus3/sq.po index 42f6b9751cc..90ac37d0a54 100644 --- a/data/levels/bonus3/sq.po +++ b/data/levels/bonus3/sq.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Indrit Bashkimi , 2015 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/tr.po b/data/levels/bonus3/tr.po index c49e6518ec9..b43ec2b2ded 100644 --- a/data/levels/bonus3/tr.po +++ b/data/levels/bonus3/tr.po @@ -6,7 +6,7 @@ # Alkım Kaçmaz , 2013 # Erdoğan Şahin, 2016 # mahmut özcan , 2015-2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # mahmut özcan , 2020 # 9d4282795e87ad099e39d98812f1a822_ade2f01 , 2014 # Yusuf Özsoy , 2013 @@ -16,7 +16,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Turkish (http://app.transifex.com/arctic-games/supertux/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/tt.po b/data/levels/bonus3/tt.po index cb91761d1f4..9614fbc94e7 100644 --- a/data/levels/bonus3/tt.po +++ b/data/levels/bonus3/tt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Timur Seber , 2021 # Булат Ибраһим , 2016 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (http://app.transifex.com/arctic-games/supertux/language/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/uk.po b/data/levels/bonus3/uk.po index e8840ab9924..7650393fa88 100644 --- a/data/levels/bonus3/uk.po +++ b/data/levels/bonus3/uk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Max Lyashuk , 2015 # Olexandr Nesterenko , 2019 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Ukrainian (http://app.transifex.com/arctic-games/supertux/language/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus3/uz.po b/data/levels/bonus3/uz.po index 0f171d99e7b..fbde3d92449 100644 --- a/data/levels/bonus3/uz.po +++ b/data/levels/bonus3/uz.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:08+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/ar.po b/data/levels/bonus4/ar.po index 7c2b071bfb2..28c9a57ede7 100644 --- a/data/levels/bonus4/ar.po +++ b/data/levels/bonus4/ar.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (https://app.transifex.com/arctic-games/teams/95/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/az.po b/data/levels/bonus4/az.po index e6c0e5df6bb..c9400ef4104 100644 --- a/data/levels/bonus4/az.po +++ b/data/levels/bonus4/az.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (https://app.transifex.com/arctic-games/teams/95/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/ca.po b/data/levels/bonus4/ca.po index 2c2a05c9635..2329233f5bb 100644 --- a/data/levels/bonus4/ca.po +++ b/data/levels/bonus4/ca.po @@ -5,7 +5,7 @@ # # Translators: # Yael Codesal, 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (https://app.transifex.com/arctic-games/teams/95/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/el.po b/data/levels/bonus4/el.po index 36fe8d8d7b8..3ce69f6e117 100644 --- a/data/levels/bonus4/el.po +++ b/data/levels/bonus4/el.po @@ -7,7 +7,7 @@ # Vangelis Nomikos , 2019 # I will not tell you that , 2019 # Vangelis Skarmoutsos (SkarmoutsosV) , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -16,7 +16,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (https://app.transifex.com/arctic-games/teams/95/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/eo.po b/data/levels/bonus4/eo.po index d6516085e7b..1fff866ced1 100644 --- a/data/levels/bonus4/eo.po +++ b/data/levels/bonus4/eo.po @@ -5,7 +5,7 @@ # # Translators: # tellovishous , 2021 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Esperanto (https://app.transifex.com/arctic-games/teams/95/eo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/et.po b/data/levels/bonus4/et.po index 00ab61f91b4..54a3d4ea79b 100644 --- a/data/levels/bonus4/et.po +++ b/data/levels/bonus4/et.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (https://app.transifex.com/arctic-games/teams/95/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/fr_CA.po b/data/levels/bonus4/fr_CA.po index babd64941dd..275fb420411 100644 --- a/data/levels/bonus4/fr_CA.po +++ b/data/levels/bonus4/fr_CA.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: French (Canada) (https://app.transifex.com/arctic-games/teams/95/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/he.po b/data/levels/bonus4/he.po index bf0f8381af6..97a5cc96b61 100644 --- a/data/levels/bonus4/he.po +++ b/data/levels/bonus4/he.po @@ -5,7 +5,7 @@ # # Translators: # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (https://app.transifex.com/arctic-games/teams/95/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/hr.po b/data/levels/bonus4/hr.po index 17dae55b4d7..ff10d52c605 100644 --- a/data/levels/bonus4/hr.po +++ b/data/levels/bonus4/hr.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (https://app.transifex.com/arctic-games/teams/95/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/hy.po b/data/levels/bonus4/hy.po index 2ea3c752733..a8933189930 100644 --- a/data/levels/bonus4/hy.po +++ b/data/levels/bonus4/hy.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (https://app.transifex.com/arctic-games/teams/95/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/id.po b/data/levels/bonus4/id.po index 5a7ba33eb8c..dbb6140df62 100644 --- a/data/levels/bonus4/id.po +++ b/data/levels/bonus4/id.po @@ -5,7 +5,7 @@ # # Translators: # Chris , 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (https://app.transifex.com/arctic-games/teams/95/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/is.po b/data/levels/bonus4/is.po index ac374495cfc..0a4605c9ecb 100644 --- a/data/levels/bonus4/is.po +++ b/data/levels/bonus4/is.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (https://app.transifex.com/arctic-games/teams/95/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/nb.po b/data/levels/bonus4/nb.po index d6786ccf4fc..2fc7ee3b0d6 100644 --- a/data/levels/bonus4/nb.po +++ b/data/levels/bonus4/nb.po @@ -5,7 +5,7 @@ # # Translators: # Karl Ove Hufthammer , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (https://app.transifex.com/arctic-games/teams/95/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/sk.po b/data/levels/bonus4/sk.po index 57938ae26b9..117449ecc90 100644 --- a/data/levels/bonus4/sk.po +++ b/data/levels/bonus4/sk.po @@ -5,7 +5,7 @@ # # Translators: # Roman 'Kaktuxista' Benji , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (https://app.transifex.com/arctic-games/teams/95/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/sq.po b/data/levels/bonus4/sq.po index 167f88fed5e..6fe9b6a000b 100644 --- a/data/levels/bonus4/sq.po +++ b/data/levels/bonus4/sq.po @@ -5,7 +5,7 @@ # # Translators: # Indrit Bashkimi , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (https://app.transifex.com/arctic-games/teams/95/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/tt.po b/data/levels/bonus4/tt.po index 203e7c812b1..db3c61726f5 100644 --- a/data/levels/bonus4/tt.po +++ b/data/levels/bonus4/tt.po @@ -6,7 +6,7 @@ # Translators: # Булат Ибраһим , 2019 # Timur Seber , 2021 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (https://app.transifex.com/arctic-games/teams/95/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/uk.po b/data/levels/bonus4/uk.po index e15c02c74ea..ae59e051ef7 100644 --- a/data/levels/bonus4/uk.po +++ b/data/levels/bonus4/uk.po @@ -5,7 +5,7 @@ # # Translators: # Max Lyashuk , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Ukrainian (https://app.transifex.com/arctic-games/teams/95/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/bonus4/uz.po b/data/levels/bonus4/uz.po index 7717b95b60d..c6a6dbe7a27 100644 --- a/data/levels/bonus4/uz.po +++ b/data/levels/bonus4/uz.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (https://app.transifex.com/arctic-games/teams/95/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/ar.po b/data/levels/community2016/ar.po index 2d358c4d890..37d50b1e016 100644 --- a/data/levels/community2016/ar.po +++ b/data/levels/community2016/ar.po @@ -5,7 +5,7 @@ # # Translators: # Israa Zamzami, 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (https://app.transifex.com/arctic-games/teams/95/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/az.po b/data/levels/community2016/az.po index e4951f93632..e5a49964ddc 100644 --- a/data/levels/community2016/az.po +++ b/data/levels/community2016/az.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (https://app.transifex.com/arctic-games/teams/95/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/ca.po b/data/levels/community2016/ca.po index d61195626bd..1977ddfadc0 100644 --- a/data/levels/community2016/ca.po +++ b/data/levels/community2016/ca.po @@ -5,7 +5,7 @@ # # Translators: # Alícia Folgarona , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (https://app.transifex.com/arctic-games/teams/95/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/el.po b/data/levels/community2016/el.po index 08b55243860..1d59210883e 100644 --- a/data/levels/community2016/el.po +++ b/data/levels/community2016/el.po @@ -5,7 +5,7 @@ # # Translators: # Vangelis Nomikos , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (https://app.transifex.com/arctic-games/teams/95/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/eo.po b/data/levels/community2016/eo.po index b113dd75c30..4b8a6a555df 100644 --- a/data/levels/community2016/eo.po +++ b/data/levels/community2016/eo.po @@ -5,7 +5,7 @@ # # Translators: # vpzomtrrfrt , 2020 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Esperanto (https://app.transifex.com/arctic-games/teams/95/eo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/es.po b/data/levels/community2016/es.po index 1778c1472c5..07fe28b7277 100644 --- a/data/levels/community2016/es.po +++ b/data/levels/community2016/es.po @@ -4,8 +4,8 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Germana , 2019 -# Tam Ezquerra , 2019 +# Diego Enmanuel Rosales Santander, 2024 +# Unknown, 2024 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: Tam Ezquerra , 2019\n" +"Last-Translator: Unknown, 2024\n" "Language-Team: Spanish (https://app.transifex.com/arctic-games/teams/95/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -28,64 +28,64 @@ msgstr "Las Ruinas Antiguas del Bosque" #: data/levels/community2016/Double_Problems (herobrine).stl:3 msgid "Double Problems" -msgstr "Problemas dobles" +msgstr "Problemas Dobles" #: data/levels/community2016/Double_Problems (herobrine).stl:82 msgid "-Concentrate! Tux! It's not Mario!" -msgstr "¡Concéntrate, Tux! - ¡No es Mario!" +msgstr "-¡Concentráte! Tux! ¡No es Mario!" #: data/levels/community2016/Double_Problems (herobrine).stl:142 msgid "You found a secret area!" -msgstr "¡Hallaste un área secreta!" +msgstr "¡Has encontrado un área secreta!" #: data/levels/community2016/Entrance_To_Cave (gelada).stl:3 msgid "The Entrance To The Cave" -msgstr "La entrada a la Cueva" +msgstr "La Entrada A La Cueva" #: data/levels/community2016/Entrance_To_Lava_Castle (herobrine).stl:3 msgid "The Entrance To The Lava Castle" -msgstr "La Entrada al Castillo de Lava" +msgstr "La Entrada Al Castillo De Lava" #: data/levels/community2016/HMS_Snowballs_Ahoy (Vellidragon).stl:3 msgid "HMS Snowball Ahoy!" -msgstr "¡Bola de nieve HMS a la vista!" +msgstr "¡Bola de Nieve HMS a la Vista!" #: data/levels/community2016/Into_The_Palace (ThomyW).stl:3 msgid "Into The Palace" -msgstr "Dentro del Palacio" +msgstr "En el palacio" #: data/levels/community2016/Is_The_Biggest_Fish (cookie monster).stl:3 msgid "Is The Biggest Fish" -msgstr "Es el Pez más Grande" +msgstr "" #: data/levels/community2016/Problem_With_Green (herobrine).stl:3 msgid "The Problem With GREEN" -msgstr "El Problema con el VERDE" +msgstr "" #: data/levels/community2016/Sunny_Hills (Serano).stl:3 msgid "Sunny Hills" -msgstr "Colinas Soleadas" +msgstr "" #: data/levels/community2016/The_Mountains (gelada).stl:3 msgid "The Mountains" -msgstr "Las Montañas" +msgstr "" #: data/levels/community2016/The_Strange_Thing (herobrine).stl:3 msgid "The Strange Thing" -msgstr "La Cosa Extraña" +msgstr "" #: data/levels/community2016/Uncontrolled_Lift (gelada).stl:3 msgid "Uncontrolled Lift" -msgstr "Ascenso Incontrolable" +msgstr "" #: data/levels/community2016/Up_Or_Down (Serano).stl:3 msgid "Up, Or Down?" -msgstr "¿Arriba o Abajo?" +msgstr "" #: data/levels/community2016/Welcome_To_Icy_Island (gelada).stl:3 msgid "Welcome To The Icy Island" -msgstr "Bienvenido a la Isla Helada" +msgstr "" #: data/levels/community2016/worldmap.stwm:3 msgid "Community Island 2016" -msgstr "Isla de la Comunidad 2016" +msgstr "Isla de comunidad 2016" diff --git a/data/levels/community2016/et.po b/data/levels/community2016/et.po index 6a4454df97a..49123363130 100644 --- a/data/levels/community2016/et.po +++ b/data/levels/community2016/et.po @@ -5,7 +5,7 @@ # # Translators: # Günter Kits , 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (https://app.transifex.com/arctic-games/teams/95/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/fr_CA.po b/data/levels/community2016/fr_CA.po index b0e882722ef..66c63ebc1e0 100644 --- a/data/levels/community2016/fr_CA.po +++ b/data/levels/community2016/fr_CA.po @@ -5,7 +5,7 @@ # # Translators: # Jean-Philippe L'Étoile , 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: French (Canada) (https://app.transifex.com/arctic-games/teams/95/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/he.po b/data/levels/community2016/he.po index 8048600b5b5..a7c94554c09 100644 --- a/data/levels/community2016/he.po +++ b/data/levels/community2016/he.po @@ -6,7 +6,7 @@ # Translators: # gk , 2019 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2021 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (https://app.transifex.com/arctic-games/teams/95/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/hr.po b/data/levels/community2016/hr.po index 81558ba82cb..952061c7941 100644 --- a/data/levels/community2016/hr.po +++ b/data/levels/community2016/hr.po @@ -5,7 +5,7 @@ # # Translators: # Ilija Ćulap , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (https://app.transifex.com/arctic-games/teams/95/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/hy.po b/data/levels/community2016/hy.po index 6da42d46a92..3409ff614a1 100644 --- a/data/levels/community2016/hy.po +++ b/data/levels/community2016/hy.po @@ -5,7 +5,7 @@ # # Translators: # Grant Davtjan, 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (https://app.transifex.com/arctic-games/teams/95/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/id.po b/data/levels/community2016/id.po index ecd7c273f87..a16cabed6f0 100644 --- a/data/levels/community2016/id.po +++ b/data/levels/community2016/id.po @@ -5,7 +5,7 @@ # # Translators: # Chris , 2019 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (https://app.transifex.com/arctic-games/teams/95/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/is.po b/data/levels/community2016/is.po index 51418df81f4..b4bed63e5bc 100644 --- a/data/levels/community2016/is.po +++ b/data/levels/community2016/is.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (https://app.transifex.com/arctic-games/teams/95/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/it.po b/data/levels/community2016/it.po index 8efca2727af..bcbcdea1ce2 100644 --- a/data/levels/community2016/it.po +++ b/data/levels/community2016/it.po @@ -6,6 +6,7 @@ # Translators: # Benjamin Leduc , 2019 # Ioma Taani, 2019 +# PoketMarty, 2024 # #, fuzzy msgid "" @@ -14,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: Ioma Taani, 2019\n" +"Last-Translator: PoketMarty, 2024\n" "Language-Team: Italian (https://app.transifex.com/arctic-games/teams/95/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -48,7 +49,7 @@ msgstr "L'entrata del castello di lava" #: data/levels/community2016/HMS_Snowballs_Ahoy (Vellidragon).stl:3 msgid "HMS Snowball Ahoy!" -msgstr "HMS Ehi Palla di neve!" +msgstr " Ehilà HMS Palla di Neve!" #: data/levels/community2016/Into_The_Palace (ThomyW).stl:3 msgid "Into The Palace" diff --git a/data/levels/community2016/nb.po b/data/levels/community2016/nb.po index 3cab939275f..4dc7bf3d0af 100644 --- a/data/levels/community2016/nb.po +++ b/data/levels/community2016/nb.po @@ -5,7 +5,7 @@ # # Translators: # Benjamin Leduc , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (https://app.transifex.com/arctic-games/teams/95/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/ro.po b/data/levels/community2016/ro.po index ba03799a4cc..7a89121c48d 100644 --- a/data/levels/community2016/ro.po +++ b/data/levels/community2016/ro.po @@ -6,7 +6,7 @@ # Translators: # Nicolae Crefelean, 2019 # Laurențiu Matei, 2022 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Romanian (https://app.transifex.com/arctic-games/teams/95/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/sk.po b/data/levels/community2016/sk.po index 6f1ee117321..096ff3f305b 100644 --- a/data/levels/community2016/sk.po +++ b/data/levels/community2016/sk.po @@ -5,7 +5,7 @@ # # Translators: # Jose Riha , 2021 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (https://app.transifex.com/arctic-games/teams/95/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/sq.po b/data/levels/community2016/sq.po index b1fcff0c277..06466c2f864 100644 --- a/data/levels/community2016/sq.po +++ b/data/levels/community2016/sq.po @@ -5,7 +5,7 @@ # # Translators: # Indrit Bashkimi , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (https://app.transifex.com/arctic-games/teams/95/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/tt.po b/data/levels/community2016/tt.po index 1ed71c5d602..c85fa116525 100644 --- a/data/levels/community2016/tt.po +++ b/data/levels/community2016/tt.po @@ -5,7 +5,7 @@ # # Translators: # Булат Ибраһим , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (https://app.transifex.com/arctic-games/teams/95/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/uk.po b/data/levels/community2016/uk.po index 23ad7db18ec..889b483f1d2 100644 --- a/data/levels/community2016/uk.po +++ b/data/levels/community2016/uk.po @@ -5,7 +5,7 @@ # # Translators: # Max Lyashuk , 2019 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Ukrainian (https://app.transifex.com/arctic-games/teams/95/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/community2016/uz.po b/data/levels/community2016/uz.po index 3c78eecaaf8..b682a009089 100644 --- a/data/levels/community2016/uz.po +++ b/data/levels/community2016/uz.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2019-11-24 01:44+0100\n" "PO-Revision-Date: 2019-11-24 00:59+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (https://app.transifex.com/arctic-games/teams/95/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/ar.po b/data/levels/halloween2014/ar.po index 5bc42bae344..c8b15055ecc 100644 --- a/data/levels/halloween2014/ar.po +++ b/data/levels/halloween2014/ar.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/az.po b/data/levels/halloween2014/az.po index 1b62b407764..9ba5919de1a 100644 --- a/data/levels/halloween2014/az.po +++ b/data/levels/halloween2014/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/eo.po b/data/levels/halloween2014/eo.po index 5fe108a3c8a..3497f75e8f1 100644 --- a/data/levels/halloween2014/eo.po +++ b/data/levels/halloween2014/eo.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Robin van der Vliet , 2015 # Любомир Василев, 2016 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Esperanto (http://app.transifex.com/arctic-games/supertux/language/eo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/et.po b/data/levels/halloween2014/et.po index b0374b140dd..5ac278d2cbb 100644 --- a/data/levels/halloween2014/et.po +++ b/data/levels/halloween2014/et.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (http://app.transifex.com/arctic-games/supertux/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/fr_CA.po b/data/levels/halloween2014/fr_CA.po index 1f012ea1d3c..d57f3b0e9c3 100644 --- a/data/levels/halloween2014/fr_CA.po +++ b/data/levels/halloween2014/fr_CA.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/he.po b/data/levels/halloween2014/he.po index d96098a5fac..dcabe020b0e 100644 --- a/data/levels/halloween2014/he.po +++ b/data/levels/halloween2014/he.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/hr.po b/data/levels/halloween2014/hr.po index a5399886f6e..bda1ec9a930 100644 --- a/data/levels/halloween2014/hr.po +++ b/data/levels/halloween2014/hr.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/hy.po b/data/levels/halloween2014/hy.po index 366c68a1144..d77063fded9 100644 --- a/data/levels/halloween2014/hy.po +++ b/data/levels/halloween2014/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/id.po b/data/levels/halloween2014/id.po index 89e4eafbfac..afe5772d990 100644 --- a/data/levels/halloween2014/id.po +++ b/data/levels/halloween2014/id.po @@ -4,14 +4,14 @@ # # Translators: # Chris , 2017 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (http://app.transifex.com/arctic-games/supertux/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/is.po b/data/levels/halloween2014/is.po index 302a604745c..198942650ad 100644 --- a/data/levels/halloween2014/is.po +++ b/data/levels/halloween2014/is.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/ro.po b/data/levels/halloween2014/ro.po index aeb76a66c9d..c8d5b416472 100644 --- a/data/levels/halloween2014/ro.po +++ b/data/levels/halloween2014/ro.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Romanian (http://app.transifex.com/arctic-games/supertux/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/sq.po b/data/levels/halloween2014/sq.po index 702ee95aaed..da57e192cd6 100644 --- a/data/levels/halloween2014/sq.po +++ b/data/levels/halloween2014/sq.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/halloween2014/uz.po b/data/levels/halloween2014/uz.po index db9a7434382..94c6ad494b2 100644 --- a/data/levels/halloween2014/uz.po +++ b/data/levels/halloween2014/uz.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2015-10-19 18:02+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/misc/menu.stl b/data/levels/misc/menu.stl index f4cdd8048e5..6a54569573f 100644 --- a/data/levels/misc/menu.stl +++ b/data/levels/misc/menu.stl @@ -24,6 +24,9 @@ parallax2.set_color(0.125, 0.18, 0.35, 1); skybox.set_image(\"images/background/misc/skybox_night.png\"); + // change music + settings.set_music(\"music/misc/christmas_theme.music\"); + // change tilemaps christmas.set_alpha(1); } @@ -74,6 +77,9 @@ (x 18240) (y 1408) ) + (music + (file "/music/misc/theme.music") + ) (particles-snow (enabled #f) (name "snow_particles") diff --git a/data/levels/world1/ar.po b/data/levels/world1/ar.po index 50e819d31ab..3c67e18a0f2 100644 --- a/data/levels/world1/ar.po +++ b/data/levels/world1/ar.po @@ -4,7 +4,7 @@ # # Translators: # Fahad Al-Saidi , 2016 -# 111More1, 2022-2023 +# IAN RODRÍGUEZ Lorenzo, 2022-2023 # Israa Zamzami, 2018 # Hasan Nahleh , 2022 msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022-2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022-2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/az.po b/data/levels/world1/az.po index d3819137b48..5d62b0ee8e7 100644 --- a/data/levels/world1/az.po +++ b/data/levels/world1/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/ca.po b/data/levels/world1/ca.po index 4384e29f570..321179b4956 100644 --- a/data/levels/world1/ca.po +++ b/data/levels/world1/ca.po @@ -5,7 +5,7 @@ # Translators: # Ariadna Pascual , 2016 # Catalanoic , 2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 76352799d6904fac47e3a0fa3ed5fd59_334826e , 2014-2015 # Yael Codesal, 2016 msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (http://app.transifex.com/arctic-games/supertux/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/el.po b/data/levels/world1/el.po index f449986d612..5fd8436f3d3 100644 --- a/data/levels/world1/el.po +++ b/data/levels/world1/el.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # I will not tell you that , 2015 # Vangelis Nomikos , 2013-2014 # Vangelis Skarmoutsos (SkarmoutsosV) , 2016,2019 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (http://app.transifex.com/arctic-games/supertux/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/fr_CA.po b/data/levels/world1/fr_CA.po index bc5a3af4c3e..83655da374c 100644 --- a/data/levels/world1/fr_CA.po +++ b/data/levels/world1/fr_CA.po @@ -3,8 +3,8 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Jean-Philippe L'Étoile , 2018-2019 msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/he.po b/data/levels/world1/he.po index e710c685277..9481a85ddac 100644 --- a/data/levels/world1/he.po +++ b/data/levels/world1/he.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020-2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/hr.po b/data/levels/world1/hr.po index 478ee47e5c5..745ab8ebd52 100644 --- a/data/levels/world1/hr.po +++ b/data/levels/world1/hr.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Ilija Ćulap , 2013 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/hy.po b/data/levels/world1/hy.po index 458b7b1596b..b8738a06bc1 100644 --- a/data/levels/world1/hy.po +++ b/data/levels/world1/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/id.po b/data/levels/world1/id.po index 5db3c9c0604..1a2ab6bec4e 100644 --- a/data/levels/world1/id.po +++ b/data/levels/world1/id.po @@ -6,14 +6,14 @@ # Chris , 2022 # Chris , 2017 # Christian Elbrianno Yoga, 2017 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Indonesian (http://app.transifex.com/arctic-games/supertux/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/is.po b/data/levels/world1/is.po index 246d7a41d72..364155feff7 100644 --- a/data/levels/world1/is.po +++ b/data/levels/world1/is.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/nb.po b/data/levels/world1/nb.po index 48b2935a04d..80c546e0d39 100644 --- a/data/levels/world1/nb.po +++ b/data/levels/world1/nb.po @@ -4,7 +4,7 @@ # # Translators: # Allan Nordhøy , 2016,2018 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2007,2013,2015-2016 msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/arctic-games/supertux/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/ro.po b/data/levels/world1/ro.po index e7f0dc528ea..e60fdc81e1e 100644 --- a/data/levels/world1/ro.po +++ b/data/levels/world1/ro.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Ioan Moldovan , 2019,2023 # Nicolae Crefelean, 2015-2016 # Razvan , 2007 diff --git a/data/levels/world1/sk.po b/data/levels/world1/sk.po index 514cf644f97..a16c6bb40f6 100644 --- a/data/levels/world1/sk.po +++ b/data/levels/world1/sk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Jose Riha , 2021 # c79a840bffc1621596a73d9f7d995b66_5f97bea <821296eb068acbf38f8fe02d322f4248_155187>, 2014 # MiroslavR , 2015-2016 @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (http://app.transifex.com/arctic-games/supertux/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/sq.po b/data/levels/world1/sq.po index abb4c5c2a46..a7bc573aad4 100644 --- a/data/levels/world1/sq.po +++ b/data/levels/world1/sq.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Indrit Bashkimi , 2015-2016 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/tr.po b/data/levels/world1/tr.po index 5126b32d6ff..64a7f9a2dc6 100644 --- a/data/levels/world1/tr.po +++ b/data/levels/world1/tr.po @@ -5,7 +5,7 @@ # Translators: # Alkım Kaçmaz , 2013 # mahmut özcan , 2015-2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Tan Siret Akıncı , 2021 # 9d4282795e87ad099e39d98812f1a822_ade2f01 , 2013-2014 # Yusuf Özsoy , 2013 @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Turkish (http://app.transifex.com/arctic-games/supertux/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/tt.po b/data/levels/world1/tt.po index 4c217d4c49b..fbfae8e9a1c 100644 --- a/data/levels/world1/tt.po +++ b/data/levels/world1/tt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Булат Ибраһим , 2016 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (http://app.transifex.com/arctic-games/supertux/language/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world1/uk.po b/data/levels/world1/uk.po index e2d593b9287..917c8cb1668 100644 --- a/data/levels/world1/uk.po +++ b/data/levels/world1/uk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Asemif official, 2023 # Benjamin Leduc , 2015 # Max Lyashuk , 2015-2016 diff --git a/data/levels/world1/uz.po b/data/levels/world1/uz.po index 54d787064b6..05eac7a866f 100644 --- a/data/levels/world1/uz.po +++ b/data/levels/world1/uz.po @@ -3,15 +3,15 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022-2023 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022-2023 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 22:58+0000\n" -"Last-Translator: 111More1, 2022-2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022-2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/ar.po b/data/levels/world2/ar.po index 55e0fbe0a1f..ed0c26ca355 100644 --- a/data/levels/world2/ar.po +++ b/data/levels/world2/ar.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022-2023 +# IAN RODRÍGUEZ Lorenzo, 2022-2023 # Israa Zamzami, 2018 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022-2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022-2023\n" "Language-Team: Arabic (http://app.transifex.com/arctic-games/supertux/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/az.po b/data/levels/world2/az.po index 8804d4334ed..a0158d497bd 100644 --- a/data/levels/world2/az.po +++ b/data/levels/world2/az.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Azerbaijani (http://app.transifex.com/arctic-games/supertux/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/ca.po b/data/levels/world2/ca.po index ae3ed84068b..291c367713a 100644 --- a/data/levels/world2/ca.po +++ b/data/levels/world2/ca.po @@ -5,7 +5,7 @@ # Translators: # Ariadna Pascual , 2016 # Catalanoic , 2016 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 76352799d6904fac47e3a0fa3ed5fd59_334826e , 2014-2015 # Yael Codesal, 2016 msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Catalan (http://app.transifex.com/arctic-games/supertux/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/el.po b/data/levels/world2/el.po index 5aaaefd98bf..a037712a03c 100644 --- a/data/levels/world2/el.po +++ b/data/levels/world2/el.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Vangelis Nomikos , 2013-2014 # Vangelis Skarmoutsos (SkarmoutsosV) , 2016,2019 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Greek (http://app.transifex.com/arctic-games/supertux/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/et.po b/data/levels/world2/et.po index 94df704a29a..53e8b71921f 100644 --- a/data/levels/world2/et.po +++ b/data/levels/world2/et.po @@ -3,8 +3,8 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2022 +# IAN RODRÍGUEZ Lorenzo, 2023 # Urmas Kvell, 2020,2022 # Urmas Kvell, 2020 msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Estonian (http://app.transifex.com/arctic-games/supertux/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/eu.po b/data/levels/world2/eu.po index 12337abccb6..9dd2ddf599c 100644 --- a/data/levels/world2/eu.po +++ b/data/levels/world2/eu.po @@ -4,7 +4,7 @@ # # Translators: # Bingen Galartza Iparragirre , 2017 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Mielanjel Iraeta , 2018-2020 # Urtzi Odriozola , 2017 msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Basque (http://app.transifex.com/arctic-games/supertux/language/eu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/fr_CA.po b/data/levels/world2/fr_CA.po index bdf4e48ed6f..fa014627be0 100644 --- a/data/levels/world2/fr_CA.po +++ b/data/levels/world2/fr_CA.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: French (Canada) (http://app.transifex.com/arctic-games/supertux/language/fr_CA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/he.po b/data/levels/world2/he.po index eac7e77bf0c..51bf724b097 100644 --- a/data/levels/world2/he.po +++ b/data/levels/world2/he.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020-2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2021 # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2020 @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hebrew (http://app.transifex.com/arctic-games/supertux/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/hr.po b/data/levels/world2/hr.po index d55613af7a5..cb4aaa7456b 100644 --- a/data/levels/world2/hr.po +++ b/data/levels/world2/hr.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Croatian (http://app.transifex.com/arctic-games/supertux/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/hu.po b/data/levels/world2/hu.po index 7a964962fd9..9bc937ce554 100644 --- a/data/levels/world2/hu.po +++ b/data/levels/world2/hu.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Balázs Úr, 2018 # Levente Krisztián Büte , 2014 # D. J. S. , 2012 @@ -21,7 +21,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Hungarian (http://app.transifex.com/arctic-games/supertux/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/hy.po b/data/levels/world2/hy.po index 8ad005dbc76..65675cb8729 100644 --- a/data/levels/world2/hy.po +++ b/data/levels/world2/hy.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Armenian (http://app.transifex.com/arctic-games/supertux/language/hy/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/is.po b/data/levels/world2/is.po index 525eb7690c9..29fccc0ba23 100644 --- a/data/levels/world2/is.po +++ b/data/levels/world2/is.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Icelandic (http://app.transifex.com/arctic-games/supertux/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/ja.po b/data/levels/world2/ja.po index 917c959d5f1..ea9908d6a1e 100644 --- a/data/levels/world2/ja.po +++ b/data/levels/world2/ja.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # 515ce455fbf38ec9585626e8d26b6324_7a9a6ef, 2017 # Ryo Nakano, 2019-2021 # b1e11c107ebf1f339ff7adfc86b9dbe0_2e3e89d, 2016 @@ -16,7 +16,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Japanese (http://app.transifex.com/arctic-games/supertux/language/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/ko.po b/data/levels/world2/ko.po index 5fb5f15f063..92a90e3c7e4 100644 --- a/data/levels/world2/ko.po +++ b/data/levels/world2/ko.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Junghee Lee , 2022 # Junghee Lee , 2022 # Myeongjin , 2016-2017,2019,2021 @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Korean (http://app.transifex.com/arctic-games/supertux/language/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/nb.po b/data/levels/world2/nb.po index bf263144a7a..cf946157206 100644 --- a/data/levels/world2/nb.po +++ b/data/levels/world2/nb.po @@ -4,7 +4,7 @@ # # Translators: # Allan Nordhøy , 2016,2018 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2007,2013,2015-2016 msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/arctic-games/supertux/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/nn.po b/data/levels/world2/nn.po index 3e6c63712d1..b6658b8fae5 100644 --- a/data/levels/world2/nn.po +++ b/data/levels/world2/nn.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Karl Ove Hufthammer , 2006-2007,2013-2016,2018-2020 # Karl Ove Hufthammer , 2015 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Norwegian Nynorsk (http://app.transifex.com/arctic-games/supertux/language/nn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/ro.po b/data/levels/world2/ro.po index b037ff2f704..8f96b6a712e 100644 --- a/data/levels/world2/ro.po +++ b/data/levels/world2/ro.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Nicolae Crefelean, 2015-2016 # Razvan , 2007 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Romanian (http://app.transifex.com/arctic-games/supertux/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/sk.po b/data/levels/world2/sk.po index dcc9affdc2d..fe23836849e 100644 --- a/data/levels/world2/sk.po +++ b/data/levels/world2/sk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Jose Riha , 2021 # c79a840bffc1621596a73d9f7d995b66_5f97bea <821296eb068acbf38f8fe02d322f4248_155187>, 2014 # MiroslavR , 2016 @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Slovak (http://app.transifex.com/arctic-games/supertux/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/sq.po b/data/levels/world2/sq.po index 55c602c28e4..5b547c72ffc 100644 --- a/data/levels/world2/sq.po +++ b/data/levels/world2/sq.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Indrit Bashkimi , 2015 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Albanian (http://app.transifex.com/arctic-games/supertux/language/sq/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/tr.po b/data/levels/world2/tr.po index 85928abdb09..2dfea0422cc 100644 --- a/data/levels/world2/tr.po +++ b/data/levels/world2/tr.po @@ -4,7 +4,7 @@ # # Translators: # Alkım Kaçmaz , 2013 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # mahmut özcan , 2020 # 9d4282795e87ad099e39d98812f1a822_ade2f01 , 2013 # Yusuf Özsoy , 2013 @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Turkish (http://app.transifex.com/arctic-games/supertux/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/tt.po b/data/levels/world2/tt.po index 1be246124c0..d77c30b61c6 100644 --- a/data/levels/world2/tt.po +++ b/data/levels/world2/tt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Булат Ибраһим , 2016 msgid "" msgstr "" @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Tatar (http://app.transifex.com/arctic-games/supertux/language/tt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/uk.po b/data/levels/world2/uk.po index 191c87263ab..f45f1b4c847 100644 --- a/data/levels/world2/uk.po +++ b/data/levels/world2/uk.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # Max Lyashuk , 2015-2016 # Olexandr Nesterenko , 2019 msgid "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2022\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2022\n" "Language-Team: Ukrainian (http://app.transifex.com/arctic-games/supertux/language/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/levels/world2/uz.po b/data/levels/world2/uz.po index 5d340e0a9fd..a518d063542 100644 --- a/data/levels/world2/uz.po +++ b/data/levels/world2/uz.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-03-03 03:26+0100\n" "PO-Revision-Date: 2013-08-10 23:00+0000\n" -"Last-Translator: 111More1, 2023\n" +"Last-Translator: IAN RODRÍGUEZ Lorenzo, 2023\n" "Language-Team: Uzbek (http://app.transifex.com/arctic-games/supertux/language/uz/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/data/locale/bg.po b/data/locale/bg.po index 7e76e5548b6..d24358bcf01 100644 --- a/data/locale/bg.po +++ b/data/locale/bg.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # Любомир Василев, 2015-2016 # Tony Ivanov , 2014 # Любомир Василев, 2016,2018-2020 diff --git a/data/locale/de.po b/data/locale/de.po index 692c26d8c0d..6cfa8b3f9e1 100644 --- a/data/locale/de.po +++ b/data/locale/de.po @@ -15,6 +15,7 @@ # Larson März , 2016 # Marcel Haring , 2013-2014 # Matthias Braun , 2004 +# Moritz Hofmann , 2024 # mteufel, 2018 # mteufel, 2018 # Sless , 2014 @@ -29,7 +30,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-05-30 16:19+0200\n" "PO-Revision-Date: 2013-08-10 22:56+0000\n" -"Last-Translator: Iwan Gabovitch, 2024\n" +"Last-Translator: Moritz Hofmann , 2024\n" "Language-Team: German (http://app.transifex.com/arctic-games/supertux/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1666,7 +1667,7 @@ msgid "" "Do you wish to clone the path to edit it separately,\n" "or do you want to bind both paths together\n" "so that any edit on one edits the other?" -msgstr "" +msgstr "Möchtest du den Pfad klonen, um ihn separat zu bearbeiten,\noder möchtest du beide Pfade miteinander verbinden\nso dass jede Bearbeitung des einen Pfads auch den anderen Pfad bearbeitet?" #: src/gui/menu_paths.cpp:56 #, c++-format @@ -1781,7 +1782,7 @@ msgstr "Pflanze" #: src/badguy/tarantula.hpp:39 src/badguy/tarantula.cpp:353 msgid "Tarantula" -msgstr "" +msgstr "Vogelspinne" #: src/badguy/granito_giant.cpp:71 msgid "Awake" @@ -1863,7 +1864,7 @@ msgstr "" #: src/badguy/dive_mine.hpp:50 msgid "Dive Mine" -msgstr "" +msgstr "Tauchergrube" #: src/badguy/granito_big.hpp:33 msgid "Big Granito" @@ -1871,7 +1872,7 @@ msgstr "" #: src/badguy/mriceblock.hpp:49 msgid "Mr. Iceblock" -msgstr "" +msgstr "Mr. Eisblock" #: src/badguy/granito.hpp:39 src/badguy/darttrap.cpp:163 #: src/badguy/corrupted_granito.cpp:175 src/badguy/dispenser.cpp:438 @@ -2031,7 +2032,7 @@ msgstr "Korrupter Granito" #: src/badguy/mrbomb.cpp:48 msgid "Classic" -msgstr "" +msgstr "Klassisch" #: src/badguy/flyingsnowball.hpp:33 msgid "Flying Snowball" @@ -2067,7 +2068,7 @@ msgstr "Seitwärts" #: src/badguy/kamikazesnowball.hpp:34 msgid "Kamikaze Snowball" -msgstr "" +msgstr "Kamikaze Schneeball" #: src/badguy/kamikazesnowball.hpp:64 msgid "Leafshot" @@ -2123,7 +2124,7 @@ msgstr "Laufendes Blatt" #: src/badguy/root.hpp:39 msgid "Root" -msgstr "" +msgstr "Wurzel" #: src/badguy/owl.cpp:241 msgid "Carry" @@ -2143,7 +2144,7 @@ msgstr "Yeti" #: src/badguy/snowball.cpp:41 msgid "Bumpkin" -msgstr "" +msgstr "Tölpel" #: src/badguy/snowball.cpp:42 msgid "BSOD" @@ -2171,11 +2172,11 @@ msgstr "Wütender Stein" #: src/badguy/tarantula.cpp:354 msgid "Spidermite" -msgstr "" +msgstr "Spinne" #: src/badguy/tarantula.cpp:374 msgid "Static" -msgstr "" +msgstr "Statisch" #: src/badguy/ghoul.hpp:30 msgid "Ghoul" @@ -2183,7 +2184,7 @@ msgstr "Ghul" #: src/badguy/granito_giant.hpp:32 msgid "Giant Granito" -msgstr "" +msgstr "Riesiger Granito" #: src/badguy/snowman.hpp:29 msgid "Snowman" @@ -2191,7 +2192,7 @@ msgstr "Schneemann" #: src/badguy/viciousivy.hpp:33 msgid "Vicious Ivy" -msgstr "" +msgstr "Tückischer Efeu" #: src/badguy/stalactite.cpp:156 msgid "ice" @@ -2237,7 +2238,7 @@ msgstr "Maximale Anzahl gleichzeitiger Gegner" #: src/badguy/dispenser.cpp:435 msgid "Dropper" -msgstr "" +msgstr "Pipette" #: src/badguy/dispenser.cpp:436 msgid "Cannon" @@ -2265,11 +2266,11 @@ msgstr "Standard" #: src/badguy/granito_big.cpp:53 src/badguy/granito.cpp:264 msgid "Standing" -msgstr "" +msgstr "Stehend" #: src/badguy/granito_big.cpp:54 src/badguy/granito.cpp:265 msgid "Walking" -msgstr "" +msgstr "Laufend" #: src/badguy/mriceblock.cpp:63 msgid "Laptop" @@ -2281,7 +2282,7 @@ msgstr "Dart" #: src/badguy/granito.cpp:268 msgid "Sitting" -msgstr "" +msgstr "Sitzend" #: src/supertux/statistics.cpp:54 msgid "Max coins collected:" @@ -3291,7 +3292,7 @@ msgstr "Einige Informationen über dieses Add-on sind nicht verfügbar." #: src/supertux/menu/addon_preview_menu.cpp:88 msgid "Perform a \"Check Online\" to try retrieving it." -msgstr "" +msgstr "Führe eine \"Online-Prüfung\" durch, um zu versuchen, sie abzurufen." #: src/supertux/menu/addon_preview_menu.cpp:92 msgid "No author specified." @@ -4182,11 +4183,11 @@ msgstr "Kachel-Hilfsmodus aktivieren" #: src/supertux/menu/editor_menu.cpp:97 msgid "Enable Object Undo Tracking" -msgstr "" +msgstr "Objekt-Rückgängig-Verfolgung einschalten" #: src/supertux/menu/editor_menu.cpp:100 msgid "Undo Stack Size" -msgstr "" +msgstr "Stapelgröße rückgängig machen" #: src/supertux/menu/editor_menu.cpp:102 msgid "Autosave Frequency" @@ -4256,7 +4257,7 @@ msgid "" "Ctrl+D = Duplicate line\n" "Ctrl+Z = Undo\n" "Ctrl+Y = Redo" -msgstr "" +msgstr "Tastaturabkürzungen:\n---------------------\nEsc = Menü öffnen\nStrg+S = Speichern\nStrg+T = Testen\nStrg+Z = Rückgängig\nStrg+Y = Wiederholen\nF6 = Licht rendern\nF7 = Raster fangen\nF8 = Raster anzeigen\nStrg++ oder Strg+Scroll Up = Vergrößern\nStrg+- oder Strg+Scroll Down = Herauszoomen\nStrg+D = Zoom zurücksetzen\n\nSkripting-Kurzbefehle:\n------------- \nHome = Zum Anfang der Zeile gehen\nEnde = Zum Ende der Zeile gehen\nPfeil nach links = Im Text zurückgehen\nPfeil nach rechts = Im Text vorwärts gehen\nBackspace = Löschen vor dem Textcursor\nLöschen = Löschen hinter dem Textcursor\nStrg+X = Ganze Zeile ausschneiden\nStrg+C = Ganze Zeile kopieren\nStrg+V = Einfügen\nStrg+D = Zeile duplizieren\nStrg+Z = Rückgängig\nStrg+Y = Wiederholen" #: src/supertux/menu/editor_menu.cpp:232 msgid "Deprecated tiles are still present in the level." @@ -4280,11 +4281,11 @@ msgstr "Spieler entfernen" #: src/supertux/menu/multiplayer_player_menu.cpp:82 msgid "Respawn Player" -msgstr "" +msgstr "Spieler respawnen" #: src/supertux/menu/multiplayer_player_menu.cpp:108 msgid "Spawn Player" -msgstr "" +msgstr "Spieler spawnen" #: src/supertux/menu/multiplayer_player_menu.cpp:136 msgid "Controllers" @@ -4400,7 +4401,7 @@ msgstr "Bei Berührung verändern" #: src/worldmap/special_tile.hpp:36 msgid "Special Tile" -msgstr "" +msgstr "Spezielle Kacheln" #: src/worldmap/level_tile.hpp:36 src/worldmap/level_tile.cpp:161 msgid "Level" @@ -4446,7 +4447,7 @@ msgstr "Teleporter" msgid "" "This object's current functionality is deprecated.\n" "Updating to get its latest functionality is recommended." -msgstr "" +msgstr "Die aktuelle Funktionalität dieses Objekts ist veraltet.\nEs wird empfohlen, es zu aktualisieren, um seine neuesten Funktionen zu erhalten." #: src/editor/node_marker.cpp:122 msgid "Path Node" @@ -4507,19 +4508,19 @@ msgstr "ungültig" #: src/editor/object_option.cpp:665 msgid "Scale X" -msgstr "" +msgstr "X Skalierung" #: src/editor/object_option.cpp:666 msgid "Scale Y" -msgstr "" +msgstr "Y Versatz" #: src/editor/object_option.cpp:667 msgid "Offset X" -msgstr "" +msgstr "X Versatz" #: src/editor/object_option.cpp:668 msgid "Offset Y" -msgstr "" +msgstr "Y Versatz" #: src/editor/object_option.cpp:672 src/editor/object_menu.cpp:67 msgid "Remove" @@ -4619,7 +4620,7 @@ msgstr "Außerhalb-des-Bildschirm-Modus" #: src/editor/particle_editor.cpp:229 msgid "Clear" -msgstr "" +msgstr "Leeren" #: src/editor/particle_editor.cpp:245 msgid "<- General settings" @@ -4627,7 +4628,7 @@ msgstr "<- Allgemeine Einstellungen" #: src/editor/particle_editor.cpp:255 msgid "Likeliness" -msgstr "" +msgstr "Ähnlichkeit" #: src/editor/particle_editor.cpp:266 msgid "Color (RGBA)" @@ -4635,15 +4636,15 @@ msgstr "Farbe (RGBA)" #: src/editor/particle_editor.cpp:311 msgid "Scale (x, y)" -msgstr "" +msgstr "Skalierung (x, y)" #: src/editor/particle_editor.cpp:332 msgid "Hitbox scale (x, y)" -msgstr "" +msgstr "Hitbox Skalierung (x, y)" #: src/editor/particle_editor.cpp:353 msgid "Hitbox offset relative to scale" -msgstr "" +msgstr "Hitbox-Versatz relativ zur Skalierung" #: src/editor/particle_editor.cpp:372 msgid "Change texture..." @@ -4664,11 +4665,11 @@ msgid "" "This level contains deprecated tiles.\n" "It is strongly recommended to replace all deprecated tiles\n" "to avoid loss of compatibility in future versions." -msgstr "" +msgstr "Dieses Level enthält veraltete Kacheln.\nEs wird dringend empfohlen, alle veralteten Kacheln zu ersetzen, um Kompatibilitätsverluste in zukünftigen Versionen zu vermeiden." #: src/editor/editor.cpp:579 msgid "Tip: Turn on \"Show Deprecated Tiles\" from the level editor menu." -msgstr "" +msgstr "Tipp: Aktiviere die Option \"Veraltete Kacheln anzeigen\" im Menü des Leveleditors." #: src/editor/editor.cpp:626 msgid "" @@ -4684,7 +4685,7 @@ msgstr "Dieser Level enthält nicht gespeicherte Änderungen, möchtest du speic #: src/editor/editor.cpp:662 msgid "This level may contain unsaved changes, do you want to save?" -msgstr "" +msgstr "Dieses Level enthält möglicherweise ungespeicherte Änderungen. Möchtest du das Level speichern?" #: src/editor/editor.cpp:797 msgid "" @@ -4722,7 +4723,7 @@ msgstr "Konnte den »main«-Spawnpoint nicht finden.\nBitte ändere den Namen de #: src/editor/object_menu.cpp:60 msgid "Patch Notes" -msgstr "" +msgstr "Änderungsnotizen" #: src/editor/object_menu.cpp:84 msgid "" @@ -4731,7 +4732,7 @@ msgid "" "\n" "Keep in mind this is very likely to break the proper behaviour of the object.\n" "Make sure to re-check any behaviour, related to the object." -msgstr "" +msgstr "Dadurch wird das Objekt auf die neuesten Funktionen aktualisiert.\nIn den Änderungsnotizen finden Sie weitere Informationen.\n\nDenke daran, dass dies sehr wahrscheinlich das korrekte Verhalten des Objekts beeinträchtigt.\nStelle sicher, dass Sie das Verhalten des Objekts erneut überprüfen." #: src/editor/object_menu.cpp:98 #, c++-format @@ -5166,16 +5167,16 @@ msgstr "Dunklerer Wald" #: data//images/converters/data.stcd:3 msgid "Nightly Tiles" -msgstr "" +msgstr "Nächtliche Kacheln" #: data//images/converters/data.stcd:5 msgid "For levels, created in previous Nightly builds." -msgstr "" +msgstr "Für Level, die in früheren Nightly-Builds erstellt wurden." #: data//images/converters/data.stcd:8 msgid "Pre-0.6.3 Crystal Tiles" -msgstr "" +msgstr "Vor-0.6.3 Kristallkacheln" #: data//images/converters/data.stcd:10 msgid "For levels, created in pre-0.6.3 versions, which use crystal tiles." -msgstr "" +msgstr "Für Levels, die in Versionen vor pre-0.6.3 erstellt wurden, die Kristallkacheln verwenden." diff --git a/data/locale/es.po b/data/locale/es.po index 8875f8dea17..4388a4601de 100644 --- a/data/locale/es.po +++ b/data/locale/es.po @@ -20,6 +20,7 @@ # Swyter , 2018,2021-2022,2024 # Tam Ezquerra , 2019 # Tam Ezquerra , 2019 +# Unknown, 2024 # William Beltrán , 2016 # William Beltrán , 2015-2016 msgid "" @@ -28,7 +29,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-05-30 16:19+0200\n" "PO-Revision-Date: 2013-08-10 22:56+0000\n" -"Last-Translator: Swyter , 2018,2021-2022,2024\n" +"Last-Translator: Unknown, 2024\n" "Language-Team: Spanish (http://app.transifex.com/arctic-games/supertux/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -97,11 +98,11 @@ msgstr "Anclado" #: src/trigger/text_area.cpp:148 msgid "Anchor offset X" -msgstr "" +msgstr "Desplazarse de anclaje X" #: src/trigger/text_area.cpp:149 msgid "Anchor offset Y" -msgstr "" +msgstr "Desplazarse de anclaje Y" #: src/trigger/text_area.cpp:150 msgid "Texts" @@ -122,7 +123,7 @@ msgstr "¿Bloqueado?" #: src/trigger/door.cpp:83 msgid "Lock Color" -msgstr "" +msgstr "Bloquear Color" #: src/trigger/switch.cpp:62 src/object/ispy.cpp:54 src/object/bumper.cpp:53 #: src/object/spotlight.cpp:106 src/object/pushbutton.cpp:61 @@ -189,7 +190,7 @@ msgstr "Se puede escalar" #: src/trigger/text_area.hpp:47 msgid "Text Area" -msgstr "" +msgstr "Àrea de texto" #: src/trigger/door.hpp:31 msgid "Door" @@ -334,7 +335,7 @@ msgstr "Normal" #: src/object/brick.cpp:60 src/object/bonus_block.cpp:175 #: src/object/coin.cpp:70 src/object/invisible_block.cpp:38 msgid "Retro" -msgstr "" +msgstr "Retro" #: src/object/brick.cpp:166 msgid "Breakable" @@ -418,7 +419,7 @@ msgstr "" #: src/object/bonus_block.cpp:172 msgid "Blue" -msgstr "" +msgstr "Azul" #: src/object/bonus_block.cpp:173 msgid "Orange" @@ -792,23 +793,23 @@ msgstr "Huevo" #: src/object/powerup.cpp:62 msgid "Fire Flower" -msgstr "" +msgstr "Flor de Fuego" #: src/object/powerup.cpp:63 msgid "Ice Flower" -msgstr "" +msgstr "Flor de Hielo" #: src/object/powerup.cpp:64 msgid "Air Flower" -msgstr "" +msgstr "Flor de Aire" #: src/object/powerup.cpp:65 msgid "Earth Flower" -msgstr "" +msgstr "Flor de Tierra" #: src/object/powerup.cpp:67 msgid "Tux Doll" -msgstr "" +msgstr "Muñeco de Tux" #: src/object/powerup.cpp:68 msgid "Flip Potion" @@ -816,7 +817,7 @@ msgstr "" #: src/object/powerup.cpp:69 msgid "Mints" -msgstr "" +msgstr "Mentas" #: src/object/powerup.cpp:70 msgid "Coffee" @@ -1810,7 +1811,7 @@ msgstr "Cristalio" #: src/badguy/kamikazesnowball.cpp:118 src/badguy/walkingleaf.cpp:36 #: src/badguy/jumpy.cpp:46 src/badguy/igel.cpp:189 src/badguy/mrtree.cpp:51 msgid "Corrupted" -msgstr "" +msgstr "Corrupto" #: src/badguy/totem.hpp:37 msgid "Totem" @@ -1870,7 +1871,7 @@ msgstr "" #: src/badguy/mriceblock.hpp:49 msgid "Mr. Iceblock" -msgstr "" +msgstr "Sr. Cubo de Hielo" #: src/badguy/granito.hpp:39 src/badguy/darttrap.cpp:163 #: src/badguy/corrupted_granito.cpp:175 src/badguy/dispenser.cpp:438 @@ -1894,7 +1895,7 @@ msgstr "" #: src/badguy/flame.cpp:84 msgid "Fire" -msgstr "" +msgstr "Fuego" #: src/badguy/flame.cpp:85 msgid "Ghost" @@ -1902,7 +1903,7 @@ msgstr "" #: src/badguy/corrupted_granito_big.hpp:35 msgid "Corrupted Big Granito" -msgstr "" +msgstr "Corrupto Granito Grande" #: src/badguy/scrystallo.cpp:57 msgid "Walk Radius" @@ -2006,7 +2007,7 @@ msgstr "" #: src/badguy/snowball.hpp:30 msgid "Mr. Snowball" -msgstr "" +msgstr "Bola de Nieve" #: src/badguy/smartblock.hpp:30 msgid "Mrs. Iceblock" @@ -2030,7 +2031,7 @@ msgstr "" #: src/badguy/mrbomb.cpp:48 msgid "Classic" -msgstr "" +msgstr "Clasico" #: src/badguy/flyingsnowball.hpp:33 msgid "Flying Snowball" @@ -2038,23 +2039,23 @@ msgstr "Bola de nieve voladora" #: src/badguy/crusher.cpp:75 msgid "Ice (normal)" -msgstr "" +msgstr "Hielo (normal)" #: src/badguy/crusher.cpp:76 msgid "Ice (big)" -msgstr "" +msgstr "Hielo (grande)" #: src/badguy/crusher.cpp:77 msgid "Rock (normal)" -msgstr "" +msgstr "Roca (normal)" #: src/badguy/crusher.cpp:78 msgid "Rock (big)" -msgstr "" +msgstr "Roca (grande)" #: src/badguy/crusher.cpp:79 msgid "Corrupted (normal)" -msgstr "" +msgstr "Corrupto (normal)" #: src/badguy/crusher.cpp:80 msgid "Corrupted (big)" @@ -2066,7 +2067,7 @@ msgstr "De lado" #: src/badguy/kamikazesnowball.hpp:34 msgid "Kamikaze Snowball" -msgstr "" +msgstr "Bola de nieve kamikaze" #: src/badguy/kamikazesnowball.hpp:64 msgid "Leafshot" @@ -2194,7 +2195,7 @@ msgstr "" #: src/badguy/stalactite.cpp:156 msgid "ice" -msgstr "" +msgstr "hielo" #: src/badguy/stalactite.cpp:157 msgid "rock" @@ -2268,7 +2269,7 @@ msgstr "" #: src/badguy/granito_big.cpp:54 src/badguy/granito.cpp:265 msgid "Walking" -msgstr "" +msgstr "Caminando" #: src/badguy/mriceblock.cpp:63 msgid "Laptop" @@ -2598,17 +2599,17 @@ msgstr "Niveles aportados" #: src/supertux/menu/contrib_menu.cpp:98 #: src/supertux/menu/contrib_menu.cpp:112 msgid "Official Contrib Levels" -msgstr "" +msgstr "Niveles oficiales de contribución" #: src/supertux/menu/contrib_menu.cpp:99 #: src/supertux/menu/contrib_menu.cpp:118 msgid "Community Contrib Levels" -msgstr "" +msgstr "Niveles de contribución por la Comunidad" #: src/supertux/menu/contrib_menu.cpp:100 #: src/supertux/menu/contrib_menu.cpp:124 msgid "User Contrib Levels" -msgstr "" +msgstr "Niveles de contribución por Usuarios" #: src/supertux/menu/contrib_menu.cpp:113 msgid "How is this possible? There are no Official Contrib Levels!" @@ -3291,7 +3292,7 @@ msgstr "A este mod le falta información." #: src/supertux/menu/addon_preview_menu.cpp:88 msgid "Perform a \"Check Online\" to try retrieving it." -msgstr "" +msgstr "Realice una \"Verificar en línea\" para intentar recuperarlo." #: src/supertux/menu/addon_preview_menu.cpp:92 msgid "No author specified." @@ -4272,7 +4273,7 @@ msgstr "" #: src/supertux/menu/multiplayer_player_menu.cpp:40 msgid "Play with the keyboard" -msgstr "" +msgstr "Jugar con el teclado" #: src/supertux/menu/multiplayer_player_menu.cpp:58 msgid "Remove Player" diff --git a/data/locale/gl.po b/data/locale/gl.po index a0efd92a44d..72ec2e59114 100644 --- a/data/locale/gl.po +++ b/data/locale/gl.po @@ -3,163 +3,185 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# xanvieiro , 2019-2020 +# Xan Vieiro , 2019-2021 +# Martin, 2022 +# nin hum , 2024 # Pablo Rodriguez , 2018 +# Xan Vieiro , 2021-2022,2024 msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" -"POT-Creation-Date: 2020-04-13 17:25+0200\n" -"PO-Revision-Date: 2020-04-23 06:34+0000\n" -"Last-Translator: xanvieiro \n" -"Language-Team: Galician (http://www.transifex.com/arctic-games/supertux/language/gl/)\n" +"POT-Creation-Date: 2024-05-30 16:19+0200\n" +"PO-Revision-Date: 2013-08-10 22:56+0000\n" +"Last-Translator: nin hum , 2024\n" +"Language-Team: Galician (http://app.transifex.com/arctic-games/supertux/language/gl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: gl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/trigger/secretarea_trigger.cpp:53 src/trigger/secretarea_trigger.cpp:61 +#: src/trigger/secretarea_trigger.cpp:47 msgid "You found a secret area!" msgstr "Atopaches unha área secreta!" -#: src/trigger/secretarea_trigger.cpp:77 src/trigger/scripttrigger.cpp:75 -#: src/supertux/game_object.cpp:88 src/supertux/menu/editor_sector_menu.cpp:34 -#: src/supertux/menu/editor_levelset_menu.cpp:58 +#: src/trigger/secretarea_trigger.cpp:55 src/supertux/game_object.cpp:115 +#: src/supertux/menu/editor_sector_menu.cpp:36 +#: src/supertux/menu/editor_levelset_menu.cpp:52 #: src/supertux/menu/editor_new_levelset_menu.cpp:34 +#: src/supertux/menu/profile_name_menu.cpp:39 #: src/supertux/menu/editor_level_menu.cpp:33 msgid "Name" msgstr "Nome" -#: src/trigger/secretarea_trigger.cpp:78 +#: src/trigger/secretarea_trigger.cpp:56 msgid "Fade tilemap" msgstr "Esvaer mapa" -#: src/trigger/secretarea_trigger.cpp:79 src/trigger/climbable.cpp:81 -#: src/object/infoblock.cpp:57 src/editor/worldmap_objects.cpp:174 -#: src/editor/worldmap_objects.cpp:272 +#: src/trigger/secretarea_trigger.cpp:57 src/trigger/climbable.cpp:59 +#: src/object/infoblock.cpp:76 src/worldmap/teleporter.cpp:49 +#: src/worldmap/special_tile.cpp:74 msgid "Message" msgstr "Mensaxe" -#: src/trigger/secretarea_trigger.cpp:80 src/trigger/scripttrigger.cpp:80 -#: src/trigger/door.cpp:73 src/object/ispy.cpp:67 -#: src/object/bonus_block.cpp:203 src/object/bonus_block.cpp:207 -#: src/object/pushbutton.cpp:49 src/object/powerup.cpp:190 -#: src/editor/worldmap_objects.cpp:274 +#: src/trigger/secretarea_trigger.cpp:58 src/trigger/scripttrigger.cpp:51 +#: src/trigger/door.cpp:79 src/object/ispy.cpp:53 +#: src/object/bonus_block.cpp:264 src/object/bonus_block.cpp:268 +#: src/object/pushbutton.cpp:62 src/object/powerup.cpp:301 +#: src/worldmap/special_tile.cpp:76 msgid "Script" msgstr "Guión" -#: src/trigger/scripttrigger.cpp:73 -msgid "Script Trigger" -msgstr "Activador do Script" - -#: src/trigger/scripttrigger.cpp:76 src/object/tilemap.cpp:220 -#: src/supertux/menu/editor_sector_menu.cpp:39 -#: src/editor/object_option.cpp:148 -msgid "Width" -msgstr "Ancho" - -#: src/trigger/scripttrigger.cpp:77 src/object/tilemap.cpp:221 -#: src/supertux/menu/editor_sector_menu.cpp:40 -#: src/editor/object_option.cpp:149 -msgid "Height" -msgstr "Alto" - -#: src/trigger/scripttrigger.cpp:78 src/object/bicycle_platform.cpp:187 -#: src/object/background.cpp:160 src/object/pneumatic_platform.cpp:145 -#: src/supertux/menu/joystick_menu.cpp:170 src/supertux/moving_object.cpp:47 -#: src/editor/worldmap_objects.cpp:73 -msgid "X" -msgstr "X" - -#: src/trigger/scripttrigger.cpp:79 src/object/bicycle_platform.cpp:188 -#: src/object/background.cpp:161 src/object/pneumatic_platform.cpp:146 -#: src/supertux/menu/joystick_menu.cpp:172 src/supertux/moving_object.cpp:48 -#: src/editor/worldmap_objects.cpp:74 -msgid "Y" -msgstr "Y" - -#: src/trigger/scripttrigger.cpp:81 src/object/pushbutton.hpp:31 +#: src/trigger/scripttrigger.cpp:52 src/object/pushbutton.hpp:32 msgid "Button" msgstr "Botón" -#: src/trigger/scripttrigger.cpp:82 +#: src/trigger/scripttrigger.cpp:53 msgid "Oneshot" msgstr "UnTiro" -#: src/trigger/sequence_trigger.hpp:33 +#: src/trigger/sequence_trigger.hpp:31 msgid "Sequence Trigger" msgstr "Activador da Secuencia" -#: src/trigger/door.cpp:74 src/badguy/willowisp.cpp:280 -#: src/supertux/menu/editor_sector_menu.cpp:32 -#: src/editor/layers_widget.cpp:274 -#: data//images/engine/editor/objects.stoi:300 +#: src/trigger/text_area.cpp:141 +msgid "Once" +msgstr "Unha vez" + +#: src/trigger/text_area.cpp:142 +msgid "Text change time" +msgstr "Tempo de cambio de texto" + +#: src/trigger/text_area.cpp:143 +msgid "Fade time" +msgstr "Tempo de desvanecemento" + +#: src/trigger/text_area.cpp:144 src/object/textscroller.cpp:353 +msgid "Anchor" +msgstr "Ancorado" + +#: src/trigger/text_area.cpp:148 +msgid "Anchor offset X" +msgstr "desvío do ancoraxe en X" + +#: src/trigger/text_area.cpp:149 +msgid "Anchor offset Y" +msgstr "desvío do ancoraxe en Y" + +#: src/trigger/text_area.cpp:150 +msgid "Texts" +msgstr "Textos" + +#: src/trigger/door.cpp:80 src/badguy/willowisp.cpp:311 +#: src/worldmap/teleporter.cpp:47 data//images/engine/editor/objects.stoi:342 msgid "Sector" msgstr "Sector" -#: src/trigger/door.cpp:75 src/editor/worldmap_objects.hpp:101 +#: src/trigger/door.cpp:81 src/worldmap/spawn_point.hpp:58 msgid "Spawn point" msgstr "Punto de inicio" -#: src/trigger/switch.cpp:61 src/object/block.cpp:212 src/object/torch.cpp:91 -#: src/object/moving_sprite.cpp:156 src/object/pneumatic_platform.cpp:144 -msgid "Sprite" -msgstr "Fada" +#: src/trigger/door.cpp:82 +msgid "Locked?" +msgstr "Bloqueado?" + +#: src/trigger/door.cpp:83 +msgid "Lock Color" +msgstr "Cor de bloqueo" + +#: src/trigger/switch.cpp:62 src/object/ispy.cpp:54 src/object/bumper.cpp:53 +#: src/object/spotlight.cpp:106 src/object/pushbutton.cpp:61 +#: src/object/gradient.cpp:103 src/object/conveyor_belt.cpp:60 +#: src/badguy/badguy.cpp:1063 src/worldmap/spawn_point.cpp:79 +#: src/worldmap/special_tile.cpp:78 +msgid "Direction" +msgstr "Dirección" -#: src/trigger/switch.cpp:62 +#: src/trigger/switch.cpp:65 msgid "Turn on script" msgstr "Activar guión" -#: src/trigger/switch.cpp:63 +#: src/trigger/switch.cpp:66 msgid "Turn off script" msgstr "Desactivar guión" -#: src/trigger/sequence_trigger.cpp:75 +#: src/trigger/scripttrigger.hpp:29 +msgid "Script Trigger" +msgstr "Activador do Script" + +#: src/trigger/sequence_trigger.cpp:48 msgid "Sequence" msgstr "Secuencia" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "end sequence" msgstr "rematar secuencia" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "stop Tux" msgstr "para Tux" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "fireworks" msgstr "fogos de artificio" -#: src/trigger/sequence_trigger.cpp:80 +#: src/trigger/sequence_trigger.cpp:53 msgid "New worldmap spawnpoint" msgstr "Novo punto de inicio do mapa principal" -#: src/trigger/sequence_trigger.cpp:81 +#: src/trigger/sequence_trigger.cpp:54 msgid "Worldmap fade tilemap" msgstr "Esvaer mosaico do mapa principal" -#: src/trigger/sequence_trigger.cpp:82 +#: src/trigger/sequence_trigger.cpp:55 +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 msgid "Fade" msgstr "Esvaer" -#: src/trigger/sequence_trigger.cpp:83 +#: src/trigger/sequence_trigger.cpp:56 src/editor/particle_editor.cpp:161 msgid "Fade in" msgstr "Aparecer" -#: src/trigger/sequence_trigger.cpp:83 +#: src/trigger/sequence_trigger.cpp:56 src/editor/particle_editor.cpp:167 +#: src/editor/particle_editor.cpp:212 msgid "Fade out" msgstr "Desaparecer" -#: src/trigger/climbable.hpp:37 +#: src/trigger/climbable.hpp:46 msgid "Climbable" msgstr "Agatuñable" -#: src/trigger/door.hpp:34 +#: src/trigger/text_area.hpp:47 +msgid "Text Area" +msgstr "Área do Texto" + +#: src/trigger/door.hpp:31 msgid "Door" msgstr "Porta" -#: src/trigger/switch.hpp:33 +#: src/trigger/switch.hpp:30 msgid "Switch" msgstr "Interruptor" @@ -167,85 +189,194 @@ msgstr "Interruptor" msgid "Secret Area" msgstr "Área Secreta" -#: src/object/thunderstorm.hpp:40 +#: src/math/anchor_point.cpp:33 +msgid "Top Left" +msgstr "Arriba á Esquerda" + +#: src/math/anchor_point.cpp:34 +msgid "Top" +msgstr "Arriba" + +#: src/math/anchor_point.cpp:35 +msgid "Top Right" +msgstr "Arriba á Dereita" + +#: src/math/anchor_point.cpp:36 src/object/textscroller.cpp:354 +#: src/object/textscroller.cpp:358 src/supertux/menu/keyboard_menu.cpp:38 +#: src/supertux/menu/joystick_menu.cpp:73 +msgid "Left" +msgstr "Esquerda" + +#: src/math/anchor_point.cpp:37 +msgid "Middle" +msgstr "Medio" + +#: src/math/anchor_point.cpp:38 src/object/textscroller.cpp:354 +#: src/object/textscroller.cpp:358 src/supertux/menu/keyboard_menu.cpp:39 +#: src/supertux/menu/joystick_menu.cpp:74 +msgid "Right" +msgstr "Dereita" + +#: src/math/anchor_point.cpp:39 +msgid "Bottom Left" +msgstr "Abaixo á Esquerda" + +#: src/math/anchor_point.cpp:40 +msgid "Bottom" +msgstr "Abaixo" + +#: src/math/anchor_point.cpp:41 +msgid "Bottom Right" +msgstr "Abaixo á Dereita" + +#: src/object/thunderstorm.hpp:44 msgid "Thunderstorm" msgstr "Tronada" -#: src/object/ispy.cpp:66 -msgid "Facing Down" -msgstr "Boca Abaixo" +#: src/object/cloud_particle_system.cpp:77 +#: src/object/rain_particle_system.cpp:100 +msgid "Intensity" +msgstr "Intensidade" -#: src/object/ispy.cpp:68 src/object/gradient.cpp:124 -#: src/badguy/willowisp.cpp:279 src/badguy/badguy.cpp:840 -#: src/editor/worldmap_objects.cpp:209 src/editor/worldmap_objects.cpp:276 -msgid "Direction" -msgstr "Dirección" +#: src/object/custom_particle_system.hpp:46 +msgid "Custom Particles" +msgstr "Partículas Personalizadas" -#: src/object/path_gameobject.hpp:44 src/object/coin.cpp:262 -#: src/object/camera.cpp:212 src/object/platform.cpp:65 -#: src/object/path_gameobject.cpp:168 src/object/tilemap.cpp:234 -#: src/badguy/willowisp.cpp:286 +#: src/object/particle_zone.hpp:41 +msgid "Particle zone" +msgstr "Zona de partículas" + +#: src/object/path_gameobject.hpp:45 src/object/coin.cpp:324 +#: src/object/camera.cpp:168 src/object/platform.cpp:76 +#: src/object/path_gameobject.cpp:175 src/object/tilemap.cpp:284 +#: src/badguy/willowisp.cpp:317 msgid "Path" msgstr "Camiño" -#: src/object/decal.cpp:41 src/object/scripted_object.cpp:67 -#: src/object/particlesystem.cpp:62 src/object/background.cpp:164 -#: src/object/thunderstorm.cpp:68 src/object/tilemap.cpp:227 -#: src/object/gradient.cpp:122 -msgid "Z-pos" -msgstr "Posición-Z" - -#: src/object/decal.cpp:42 src/object/scripted_object.cpp:70 -#: src/object/tilemap.cpp:216 +#: src/object/decal.cpp:48 src/object/scripted_object.cpp:70 +#: src/object/tilemap.cpp:266 msgid "Solid" msgstr "Sólido" -#: src/object/decal.cpp:43 src/supertux/menu/keyboard_menu.cpp:37 -#: src/supertux/menu/joystick_menu.cpp:74 +#: src/object/decal.cpp:49 src/supertux/menu/keyboard_menu.cpp:41 +#: src/supertux/menu/joystick_menu.cpp:76 msgid "Action" msgstr "Acción" -#: src/object/weak_block.hpp:35 +#: src/object/weak_block.hpp:36 msgid "Weak Tile" msgstr "Tesela Fráxil" -#: src/object/gradient.hpp:42 +#: src/object/gradient.hpp:43 msgid "Gradient" msgstr "Gradiente" -#: src/object/tilemap.hpp:53 +#: src/object/tilemap.hpp:58 msgid "Tilemap" msgstr "Mosaico" -#: src/object/brick.cpp:133 +#: src/object/sound_object.cpp:69 src/object/ambient_sound.cpp:85 +#: src/object/sound_object.hpp:42 src/supertux/menu/options_menu.cpp:128 +#: data//credits.stxt:367 +msgid "Sound" +msgstr "Son" + +#: src/object/sound_object.cpp:70 src/object/ambient_sound.cpp:87 +msgid "Volume" +msgstr "Volume" + +#: src/object/conveyor_belt.hpp:39 +msgid "Conveyor Belt" +msgstr "Correa transportadora" + +#: src/object/unstable_tile.cpp:70 src/object/weak_block.cpp:97 +#: src/badguy/flame.cpp:86 +msgid "Ice" +msgstr "Xeo" + +#: src/object/unstable_tile.cpp:71 src/object/brick.hpp:34 +msgid "Brick" +msgstr "Ladrillo" + +#: src/object/unstable_tile.cpp:72 +msgid "Delayed" +msgstr "Atrasado" + +#: src/object/circleplatform.hpp:35 +msgid "Circular Platform" +msgstr "Plataforma Circular" + +#: src/object/brick.cpp:59 src/object/coin.cpp:69 +#: src/object/invisible_block.cpp:37 src/object/background.cpp:200 +#: src/object/tilemap.cpp:279 src/object/gradient.cpp:109 +#: src/badguy/viciousivy.cpp:44 src/badguy/snail.cpp:69 +#: src/badguy/smartball.cpp:34 src/badguy/bouncing_snowball.cpp:81 +#: src/badguy/kamikazesnowball.cpp:117 src/badguy/walkingleaf.cpp:35 +#: src/badguy/mrbomb.cpp:47 src/badguy/igel.cpp:188 src/badguy/snowball.cpp:40 +#: src/badguy/mrtree.cpp:50 src/badguy/mriceblock.cpp:62 +msgid "Normal" +msgstr "Normal" + +#: src/object/brick.cpp:60 src/object/bonus_block.cpp:175 +#: src/object/coin.cpp:70 src/object/invisible_block.cpp:38 +msgid "Retro" +msgstr "Retro" + +#: src/object/brick.cpp:166 msgid "Breakable" msgstr "Rompible " -#: src/object/trampoline.cpp:136 src/object/rusty_trampoline.cpp:66 +#: src/object/trampoline.cpp:66 src/object/rusty_trampoline.cpp:66 msgid "Portable" msgstr "Portátil" -#: src/object/spotlight.cpp:62 +#: src/object/trampoline.cpp:67 +msgid "Stationary" +msgstr "Estacionario" + +#: src/object/key.hpp:38 +msgid "Key" +msgstr "Chave" + +#: src/object/spotlight.cpp:102 src/object/particlesystem.cpp:64 +#: src/object/particle_zone.cpp:50 src/badguy/darttrap.cpp:149 +#: src/supertux/menu/addon_preview_menu.cpp:189 +msgid "Enabled" +msgstr "Activado" + +#: src/object/spotlight.cpp:103 src/object/rain_particle_system.cpp:101 msgid "Angle" msgstr "Ángulo" -#: src/object/spotlight.cpp:63 src/object/magicblock.cpp:94 -#: src/object/candle.cpp:77 src/object/lantern.cpp:62 -#: src/object/ambient_light.cpp:131 src/badguy/walking_candle.cpp:82 +#: src/object/spotlight.cpp:104 src/object/magicblock.cpp:95 +#: src/object/candle.cpp:75 src/object/torch.cpp:96 src/object/rublight.cpp:55 +#: src/object/lantern.cpp:62 src/object/ambient_light.cpp:122 +#: src/object/key.cpp:192 src/badguy/willowisp.cpp:319 +#: src/badguy/walking_candle.cpp:91 msgid "Color" msgstr "Cor" -#: src/object/spotlight.cpp:64 src/object/textscroller.cpp:279 -#: src/badguy/flame.cpp:59 +#: src/object/spotlight.cpp:105 src/object/textscroller.cpp:350 +#: src/object/rain_particle_system.cpp:102 src/object/conveyor_belt.cpp:61 +#: src/object/circleplatform.cpp:58 src/badguy/flame.cpp:110 +#: src/editor/node_marker.cpp:125 msgid "Speed" msgstr "Velocidade" -#: src/object/spotlight.cpp:65 +#: src/object/spotlight.cpp:107 +msgid "Clockwise" +msgstr "No sentido das agullas do reloxo" + +#: src/object/spotlight.cpp:107 msgid "Counter-clockwise" msgstr "Levóxiro" -#: src/object/spotlight.cpp:66 src/object/candle.cpp:78 -#: src/object/torch.cpp:92 +#: src/object/spotlight.cpp:107 +msgid "Stopped" +msgstr "Parado" + +#: src/object/spotlight.cpp:110 src/object/lit_object.cpp:69 +#: src/object/candle.cpp:76 src/object/torch.cpp:95 msgid "Layer" msgstr "Capa" @@ -257,113 +388,200 @@ msgstr "Física activada" msgid "Visible" msgstr "Visible" -#: src/object/scripted_object.cpp:73 src/badguy/willowisp.cpp:282 +#: src/object/scripted_object.cpp:73 src/badguy/willowisp.cpp:313 msgid "Hit script" msgstr "Script de golpe" -#: src/object/bonus_block.cpp:204 +#: src/object/custom_particle_system_file.cpp:53 +#: src/object/textscroller.cpp:348 src/object/music_object.cpp:109 +#: src/supertux/menu/particle_editor_open.cpp:38 +msgid "File" +msgstr "Ficheiro" + +#: src/object/bonus_block.cpp:154 +msgid "Only one custom object is allowed inside bonus blocks." +msgstr "Só se permite un obxecto personalizado dentro dos bloques extra." + +#: src/object/bonus_block.cpp:172 +msgid "Blue" +msgstr "Azul" + +#: src/object/bonus_block.cpp:173 +msgid "Orange" +msgstr "Laranxa" + +#: src/object/bonus_block.cpp:174 +msgid "Purple" +msgstr "Púrpura" + +#: src/object/bonus_block.cpp:265 src/supertux/menu/cheat_apply_menu.cpp:54 msgid "Count" msgstr "Conta" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:266 msgid "Content" msgstr "Contido" -#: src/object/bonus_block.cpp:206 src/object/coin.hpp:43 +#: src/object/bonus_block.cpp:267 src/object/coin.hpp:44 msgid "Coin" msgstr "Moeda" -#: src/object/bonus_block.cpp:206 +#: src/object/bonus_block.cpp:267 msgid "Growth (fire flower)" msgstr "Crecemento (flor de lume)" -#: src/object/bonus_block.cpp:206 +#: src/object/bonus_block.cpp:267 msgid "Growth (ice flower)" msgstr "Crecemento (flor de xeo)" -#: src/object/bonus_block.cpp:206 +#: src/object/bonus_block.cpp:267 msgid "Growth (air flower)" msgstr "Crecemento (flor de aire)" -#: src/object/bonus_block.cpp:207 +#: src/object/bonus_block.cpp:268 msgid "Growth (earth flower)" msgstr "Crecemento (flor de terra)" -#: src/object/bonus_block.cpp:207 +#: src/object/bonus_block.cpp:268 +msgid "Growth (retro)" +msgstr "Crecemento (retro)" + +#: src/object/bonus_block.cpp:268 src/object/powerup.cpp:66 msgid "Star" msgstr "Estrela" -#: src/object/bonus_block.cpp:207 +#: src/object/bonus_block.cpp:268 +msgid "Star (retro)" +msgstr "Estrela (retro)" + +#: src/object/bonus_block.cpp:268 msgid "Tux doll" msgstr "Boneca Tux" -#: src/object/bonus_block.cpp:207 +#: src/object/bonus_block.cpp:268 msgid "Custom" msgstr "Modificado" -#: src/object/bonus_block.cpp:207 +#: src/object/bonus_block.cpp:268 msgid "Light" msgstr "Luz" -#: src/object/bonus_block.cpp:208 src/object/trampoline.hpp:35 +#: src/object/bonus_block.cpp:268 +msgid "Light (On)" +msgstr "Luz (Acesa)" + +#: src/object/bonus_block.cpp:269 src/object/trampoline.hpp:37 msgid "Trampoline" msgstr "Trampolín" -#: src/object/bonus_block.cpp:208 +#: src/object/bonus_block.cpp:269 +msgid "Portable trampoline" +msgstr "Trampolín portátil" + +#: src/object/bonus_block.cpp:269 msgid "Coin rain" msgstr "Chuvia de moedas" -#: src/object/bonus_block.cpp:208 +#: src/object/bonus_block.cpp:269 msgid "Coin explosion" msgstr "Explosión de moedas" -#: src/object/bonus_block.cpp:212 +#: src/object/bonus_block.cpp:269 src/object/rock.hpp:43 +msgid "Rock" +msgstr "Pedra" + +#: src/object/bonus_block.cpp:269 +msgid "Potion" +msgstr "Bebedizo" + +#: src/object/bonus_block.cpp:275 msgid "Custom Content" msgstr "Contido Personalizado" -#: src/object/pneumatic_platform.hpp:62 +#: src/object/bonus_block.cpp:278 +msgid "Coin sprite" +msgstr "Gráfico animado da moeda" + +#: src/object/pneumatic_platform.hpp:65 msgid "Pneumatic Platform" msgstr "Plataforma Pneumática" -#: src/object/coin.cpp:264 src/object/tilemap.cpp:236 +#: src/object/coin.cpp:326 src/object/tilemap.cpp:287 msgid "Following path" msgstr "Seguir camiño" -#: src/object/coin.cpp:267 src/object/camera.cpp:215 -#: src/object/platform.cpp:66 src/object/tilemap.cpp:240 +#: src/object/coin.cpp:329 src/object/camera.cpp:171 +#: src/object/platform.cpp:77 src/object/tilemap.cpp:290 msgid "Path Mode" msgstr "Modo Camiño" -#: src/object/coin.cpp:270 src/object/coin.cpp:298 +#: src/object/coin.cpp:330 src/object/camera.cpp:172 +#: src/object/platform.cpp:78 src/object/tilemap.cpp:291 +#: src/badguy/willowisp.cpp:322 +msgid "Adapt Speed" +msgstr "Adaptar Velocidade" + +#: src/object/coin.cpp:331 src/object/platform.cpp:81 +#: src/object/tilemap.cpp:285 src/badguy/willowisp.cpp:318 +msgid "Starting Node" +msgstr "Nodo Inicial" + +#: src/object/coin.cpp:332 src/object/camera.cpp:173 +#: src/object/platform.cpp:82 src/object/tilemap.cpp:293 +#: src/badguy/willowisp.cpp:323 +msgid "Handle" +msgstr "Manexar" + +#: src/object/coin.cpp:335 src/object/coin.cpp:371 msgid "Collect script" msgstr "Script de recollida" -#: src/object/ghost_particle_system.hpp:36 +#: src/object/ghost_particle_system.hpp:37 msgid "Ghost Particles" msgstr "Partículas Pantasma" -#: src/object/camera.cpp:207 +#: src/object/camera.cpp:163 msgid "Mode" msgstr "Modo" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "normal" msgstr "normal" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "manual" msgstr "manual" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "autoscroll" msgstr "Desprazar automaticamente" -#: src/object/textscroller.cpp:280 src/object/music_object.cpp:109 -msgid "File" -msgstr "Ficheiro" +#: src/object/textscroller.cpp:349 +msgid "Finish Script" +msgstr "Script de Finalización" + +#: src/object/textscroller.cpp:351 +msgid "X-offset" +msgstr "Compensación en X" -#: src/object/spawnpoint.hpp:46 src/badguy/willowisp.cpp:281 -#: src/editor/worldmap_objects.cpp:173 +#: src/object/textscroller.cpp:352 +msgid "Controllable" +msgstr "Controlable" + +#: src/object/textscroller.cpp:354 src/object/textscroller.cpp:358 +msgid "Center" +msgstr "Centrado" + +#: src/object/textscroller.cpp:357 +msgid "Text Alignment" +msgstr "Aliñamento do Texto" + +#: src/object/lit_object.hpp:40 +msgid "Lit object" +msgstr "Obxecto iluminado" + +#: src/object/spawnpoint.hpp:48 src/badguy/willowisp.cpp:312 +#: src/worldmap/teleporter.cpp:48 msgid "Spawnpoint" msgstr "Punto de aparición" @@ -371,255 +589,396 @@ msgstr "Punto de aparición" msgid "Counter" msgstr "Contador" -#: src/object/candle.hpp:36 +#: src/object/candle.hpp:37 msgid "Candle" msgstr "Vela" -#: src/object/particlesystem.cpp:61 src/badguy/darttrap.cpp:127 -msgid "Enabled" -msgstr "Activado" +#: src/object/particlesystem.cpp:65 src/object/background.cpp:184 +#: src/object/thunderstorm.cpp:76 src/object/tilemap.cpp:277 +#: src/object/gradient.cpp:101 src/object/moving_sprite.cpp:193 +msgid "Z-pos" +msgstr "Posición-Z" -#: src/object/invisible_block.hpp:31 +#: src/object/invisible_block.hpp:30 msgid "Invisible Block" msgstr "Bloque Invisible" -#: src/object/snow_particle_system.hpp:35 +#: src/object/snow_particle_system.hpp:37 msgid "Snow Particles" msgstr "Partículas de Neve" -#: src/object/powerup.hpp:35 +#: src/object/powerup.hpp:40 msgid "Powerup" msgstr "Poderes Especiais" -#: src/object/level_time.hpp:55 -msgid "Time Limit" -msgstr "Límite de Tempo" +#: src/object/infoblock.cpp:78 +msgid "Front Color" +msgstr "Cor Dianteira" -#: src/object/ambient_sound.cpp:119 src/supertux/menu/options_menu.cpp:365 -#: data//credits.stxt:335 -msgid "Sound" -msgstr "Son" +#: src/object/infoblock.cpp:80 +msgid "Back Color" +msgstr "Cor do Fondo" -#: src/object/ambient_sound.cpp:120 -msgid "Distance factor" -msgstr "Factor de distancia" +#: src/object/infoblock.cpp:82 +msgid "Roundness" +msgstr "Redondez" -#: src/object/ambient_sound.cpp:121 -msgid "Distance bias" -msgstr "Marxe de distancia" +#: src/object/infoblock.cpp:84 +msgid "Fade Transition" +msgstr "Transición de fundido" -#: src/object/ambient_sound.cpp:122 -msgid "Volume" -msgstr "Volume" +#: src/object/fallblock.hpp:41 +msgid "Falling Platform" +msgstr "Plataforma que cae" + +#: src/object/level_time.hpp:56 +msgid "Time Limit" +msgstr "Límite de Tempo" + +#: src/object/ambient_sound.cpp:86 +msgid "Radius (in tiles)" +msgstr "Radio (en mosaicos)" #: src/object/torch.hpp:41 msgid "Torch" msgstr "Facho" -#: src/object/icecrusher.hpp:48 -msgid "Icecrusher" -msgstr "Rompexeos" +#: src/object/rublight.hpp:34 +msgid "Rublight" +msgstr "Luces de proximidade" -#: src/object/background.hpp:42 +#: src/object/background.hpp:45 msgid "Background" msgstr "Fondo" -#: src/object/firefly.hpp:36 +#: src/object/text_object.hpp:44 src/gui/menu_string_array.cpp:77 +msgid "Text" +msgstr "Texto" + +#: src/object/firefly.hpp:38 msgid "Checkpoint" msgstr "Punto de rescate" -#: src/object/ambient_light.hpp:36 +#: src/object/ambient_light.hpp:37 msgid "Ambient Light" msgstr "Luz Ambiental" -#: src/object/lantern.hpp:37 +#: src/object/lantern.hpp:38 msgid "Lantern" msgstr "Lanterna" -#: src/object/wind.hpp:40 +#: src/object/wind.hpp:43 msgid "Wind" msgstr "Vento" -#: src/object/bicycle_platform.cpp:190 +#: src/object/bicycle_platform.cpp:203 src/object/background.cpp:180 +#: src/object/pneumatic_platform.cpp:162 +#: src/supertux/menu/joystick_menu.cpp:172 src/supertux/moving_object.cpp:65 +#: src/worldmap/worldmap_object.cpp:77 +msgid "X" +msgstr "X" + +#: src/object/bicycle_platform.cpp:204 src/object/background.cpp:181 +#: src/object/pneumatic_platform.cpp:163 +#: src/supertux/menu/joystick_menu.cpp:174 src/supertux/moving_object.cpp:66 +#: src/worldmap/worldmap_object.cpp:78 +msgid "Y" +msgstr "Y" + +#: src/object/bicycle_platform.cpp:206 msgid "Platforms" msgstr "Plataformas" -#: src/object/bicycle_platform.cpp:191 src/badguy/flame.cpp:58 -#: src/badguy/crystallo.cpp:36 +#: src/object/bicycle_platform.cpp:207 src/object/circleplatform.cpp:57 +#: src/badguy/fish_swimming.cpp:76 src/badguy/flame.cpp:109 +#: src/badguy/rcrystallo.cpp:83 src/badguy/crystallo.cpp:50 msgid "Radius" msgstr "Raio" -#: src/object/bicycle_platform.cpp:192 +#: src/object/bicycle_platform.cpp:208 msgid "Momentum change rate" msgstr "Taxa de cambio do momento" -#: src/object/rain_particle_system.hpp:34 +#: src/object/rain_particle_system.hpp:41 msgid "Rain Particles" msgstr "Partículas de Choiva" -#: src/object/platform.hpp:45 +#: src/object/platform.hpp:46 msgid "Platform" msgstr "Plataforma" -#: src/object/rock.hpp:42 -msgid "Rock" -msgstr "Pedra" - -#: src/object/music_object.hpp:41 src/supertux/menu/options_menu.cpp:367 -#: data//credits.stxt:277 +#: src/object/music_object.hpp:42 src/supertux/menu/options_menu.cpp:130 +#: data//credits.stxt:309 msgid "Music" msgstr "Música" -#: src/object/rusty_trampoline.hpp:39 +#: src/object/lit_object.cpp:68 +msgid "Light sprite" +msgstr "Gráfico animado de luz" + +#: src/object/lit_object.cpp:71 +msgid "Sprite starting action" +msgstr "Acción inicial do gráfico animado" + +#: src/object/lit_object.cpp:72 +msgid "Light sprite starting action" +msgstr "Acción inicial do gráfico animado de luz" + +#: src/object/lit_object.cpp:74 +msgid "Light sprite offset X" +msgstr "Desprazamento do eixo X do gráfico animado de luz" + +#: src/object/lit_object.cpp:75 +msgid "Light sprite offset Y" +msgstr "Desprazamento do eixo Y do gráfico animado de luz" + +#: src/object/rusty_trampoline.hpp:40 msgid "Rusty Trampoline" msgstr "Trampolín Enferruxado" -#: src/object/particlesystem.hpp:57 +#: src/object/particlesystem.hpp:58 msgid "Particle system" msgstr "Sistema de Partículas" -#: src/object/candle.cpp:75 src/object/torch.cpp:90 +#: src/object/candle.cpp:73 src/object/torch.cpp:94 msgid "Burning" msgstr "Aceso" -#: src/object/candle.cpp:76 +#: src/object/candle.cpp:74 msgid "Flicker" msgstr "Intermitente" -#: src/object/text_array_object.hpp:50 +#: src/object/snow_particle_system.cpp:104 +msgid "Epsilon" +msgstr "Epsilon" + +#: src/object/snow_particle_system.cpp:105 +msgid "Spin Speed" +msgstr "Velocidade de Rotación" + +#: src/object/snow_particle_system.cpp:106 +msgid "State Length" +msgstr "Duración do Estado" + +#: src/object/snow_particle_system.cpp:107 +msgid "Wind Speed" +msgstr "Velocidade do Vento" + +#: src/object/text_array_object.hpp:47 msgid "Text array" msgstr "Cadea de texto" -#: src/object/infoblock.hpp:36 +#: src/object/infoblock.hpp:37 msgid "Info Block" msgstr "Bloque de Información" -#: src/object/powerup.cpp:191 +#: src/object/powerup.cpp:61 +msgid "Egg" +msgstr "Ovo" + +#: src/object/powerup.cpp:62 +msgid "Fire Flower" +msgstr "Flor de Lume" + +#: src/object/powerup.cpp:63 +msgid "Ice Flower" +msgstr "Flor de Xeo" + +#: src/object/powerup.cpp:64 +msgid "Air Flower" +msgstr "Flor de Aire" + +#: src/object/powerup.cpp:65 +msgid "Earth Flower" +msgstr "Flor de Terra" + +#: src/object/powerup.cpp:67 +msgid "Tux Doll" +msgstr "Boneco de Tux" + +#: src/object/powerup.cpp:68 +msgid "Flip Potion" +msgstr "Poción de viraxe" + +#: src/object/powerup.cpp:69 +msgid "Mints" +msgstr "Mentolados" + +#: src/object/powerup.cpp:70 +msgid "Coffee" +msgstr "Café" + +#: src/object/powerup.cpp:71 +msgid "Herring" +msgstr "Arenque" + +#: src/object/powerup.cpp:302 msgid "Disable gravity" msgstr "Desactivar gravidade" -#: src/object/ambient_sound.hpp:62 +#: src/object/powerup.cpp:312 src/object/weak_block.cpp:266 +msgid "" +"Sprites no longer define the behaviour of the object.\n" +"Object types are used instead." +msgstr "Os sprites xa non definen o comportamento do obxecto.\nEmpreganse tipos de obxecto en troques." + +#: src/object/ambient_sound.hpp:43 msgid "Ambient Sound" msgstr "Son Ambiental" -#: src/object/level_time.cpp:51 src/supertux/statistics.cpp:288 -#: src/editor/node_marker.cpp:80 +#: src/object/level_time.cpp:52 src/supertux/statistics.cpp:297 +#: src/editor/node_marker.cpp:124 msgid "Time" msgstr "Tempo" -#: src/object/hurting_platform.hpp:30 +#: src/object/hurting_platform.hpp:31 msgid "Hurting Platform" msgstr "Serra" -#: src/object/background.cpp:163 +#: src/object/background.cpp:183 msgid "Fill" msgstr "Encher" -#: src/object/background.cpp:165 +#: src/object/background.cpp:185 msgid "Alignment" msgstr "Aliñamento" -#: src/object/background.cpp:166 +#: src/object/background.cpp:186 src/supertux/direction.cpp:61 msgid "none" msgstr "ningún" -#: src/object/background.cpp:166 src/editor/object_settings.cpp:112 +#: src/object/background.cpp:186 src/supertux/direction.cpp:63 msgid "left" msgstr "esquerda" -#: src/object/background.cpp:166 src/editor/object_settings.cpp:112 +#: src/object/background.cpp:186 src/supertux/direction.cpp:65 msgid "right" msgstr "dereita" -#: src/object/background.cpp:166 +#: src/object/background.cpp:186 msgid "top" msgstr "arriba" -#: src/object/background.cpp:166 +#: src/object/background.cpp:186 msgid "bottom" msgstr "fondo" -#: src/object/background.cpp:169 +#: src/object/background.cpp:189 msgid "Scroll offset x" msgstr "Desprazar compensación x" -#: src/object/background.cpp:170 +#: src/object/background.cpp:190 msgid "Scroll offset y" msgstr "Desprazar compensación y" -#: src/object/background.cpp:171 +#: src/object/background.cpp:191 msgid "Scroll speed x" msgstr "Desprazar velocidade x" -#: src/object/background.cpp:172 +#: src/object/background.cpp:192 msgid "Scroll speed y" msgstr "Desprazar velocidade y" -#: src/object/background.cpp:173 +#: src/object/background.cpp:193 msgid "Parallax Speed x" msgstr "Velocidade da Paralaxe x" -#: src/object/background.cpp:174 +#: src/object/background.cpp:194 msgid "Parallax Speed y" msgstr "Velocidade da Paralaxe y" -#: src/object/background.cpp:175 +#: src/object/background.cpp:195 msgid "Top image" msgstr "Imaxe superior" -#: src/object/background.cpp:176 +#: src/object/background.cpp:196 msgid "Image" msgstr "Imaxe" -#: src/object/background.cpp:177 +#: src/object/background.cpp:197 msgid "Bottom image" msgstr "Imaxe do fondo" -#: src/object/background.cpp:178 src/object/tilemap.cpp:228 -#: src/object/gradient.cpp:129 +#: src/object/background.cpp:198 +msgid "Colour" +msgstr "Color" + +#: src/object/background.cpp:199 src/object/tilemap.cpp:278 +#: src/object/gradient.cpp:108 msgid "Draw target" msgstr "Debuxar obxectivo" -#: src/object/background.cpp:179 src/object/tilemap.cpp:229 -#: src/object/gradient.cpp:130 -msgid "Normal" -msgstr "Normal" - -#: src/object/background.cpp:179 src/object/tilemap.cpp:229 -#: src/object/gradient.cpp:130 +#: src/object/background.cpp:200 src/object/tilemap.cpp:279 +#: src/object/gradient.cpp:109 msgid "Lightmap" msgstr "Mapa de Luz" -#: src/object/wind.cpp:63 +#: src/object/shard.hpp:35 +msgid "Shard" +msgstr "Fragmento" + +#: src/object/rublight.cpp:56 +msgid "Fading Speed" +msgstr "Velocidade de Esvaemento" + +#: src/object/rublight.cpp:57 +msgid "Glowing Strength" +msgstr "Forza do Brillo" + +#: src/object/wind.cpp:78 src/object/custom_particle_system.cpp:499 msgid "Speed X" msgstr "Velocidade X" -#: src/object/wind.cpp:64 +#: src/object/wind.cpp:79 src/object/custom_particle_system.cpp:500 msgid "Speed Y" msgstr "Velocidade Y" -#: src/object/wind.cpp:65 +#: src/object/wind.cpp:80 msgid "Acceleration" msgstr "Aceleración" -#: src/object/wind.cpp:66 +#: src/object/wind.cpp:81 msgid "Blowing" msgstr "Soplar" -#: src/object/bicycle_platform.hpp:64 +#: src/object/wind.cpp:82 +msgid "Affects Badguys" +msgstr "Afecta ós Tipos Malos" + +#: src/object/wind.cpp:83 +msgid "Affects Objects" +msgstr "Afecta ós Obxectos" + +#: src/object/wind.cpp:84 +msgid "Affects Player" +msgstr "Afecta ó Xogador" + +#: src/object/wind.cpp:85 +msgid "Fancy Particles" +msgstr "Partículas Extravagantes" + +#: src/object/bicycle_platform.hpp:67 msgid "Bicycle Platform" msgstr "Plataforma Móbil" -#: src/object/platform.cpp:67 src/object/thunderstorm.cpp:69 -#: src/object/tilemap.cpp:241 +#: src/object/platform.cpp:80 src/object/thunderstorm.cpp:77 +#: src/object/tilemap.cpp:292 src/object/conveyor_belt.cpp:62 msgid "Running" msgstr "Correr" -#: src/object/rock.cpp:182 +#: src/object/rock.cpp:71 +msgid "Small" +msgstr "Pequeno" + +#: src/object/rock.cpp:72 +msgid "Large" +msgstr "Grande" + +#: src/object/rock.cpp:234 msgid "On-grab script" msgstr "Script de agarrar" -#: src/object/rock.cpp:183 +#: src/object/rock.cpp:235 msgid "On-ungrab script" msgstr "Script de soltar" @@ -627,803 +986,1713 @@ msgstr "Script de soltar" msgid "Interactive particle system" msgstr "Sistema interactivo de partículas" -#: src/object/thunderstorm.cpp:70 +#: src/object/thunderstorm.cpp:78 msgid "Interval" msgstr "Intervalo" -#: src/object/thunderstorm.cpp:71 +#: src/object/thunderstorm.cpp:79 msgid "Strike Script" msgstr "Script de Golpear" -#: src/object/cloud_particle_system.hpp:36 +#: src/object/cloud_particle_system.hpp:42 msgid "Cloud Particles" msgstr "Partículas de Nube" -#: src/object/ispy.hpp:33 +#: src/object/custom_particle_system.cpp:423 +msgid "Texture" +msgstr "Textura" + +#: src/object/custom_particle_system.cpp:425 +msgid "Amount" +msgstr "Cantidade" + +#: src/object/custom_particle_system.cpp:426 src/object/circleplatform.cpp:59 +#: src/editor/particle_editor.cpp:141 +msgid "Delay" +msgstr "Retardo" + +#: src/object/custom_particle_system.cpp:427 +msgid "Lifetime" +msgstr "Duración" + +#: src/object/custom_particle_system.cpp:428 +msgid "Lifetime variation" +msgstr "Variación da duración" + +#: src/object/custom_particle_system.cpp:429 +#: src/editor/particle_editor.cpp:164 +msgid "Birth mode" +msgstr "Modo de creación" + +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 src/object/gradient.cpp:115 +#: src/gui/menu_string_array.cpp:40 src/gui/menu_string_array.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:80 +#: src/supertux/menu/joystick_menu.cpp:108 +#: src/supertux/menu/joystick_menu.cpp:215 src/editor/object_settings.cpp:129 +#: src/editor/particle_editor.cpp:162 src/editor/particle_editor.cpp:168 +msgid "None" +msgstr "Ningún" + +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 +#: src/editor/particle_editor.cpp:166 +msgid "Shrink" +msgstr "Encoller" + +#: src/object/custom_particle_system.cpp:434 +#: src/editor/particle_editor.cpp:172 +msgid "Birth easing" +msgstr "Animación ao crearse" + +#: src/object/custom_particle_system.cpp:436 +#: src/object/custom_particle_system.cpp:471 src/editor/node_marker.cpp:129 +msgid "No easing" +msgstr "Sen transición" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad in" +msgstr "Principio cuádruplo" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad out" +msgstr "Final cuádruplo" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad in/out" +msgstr "Principio/Fin cuádruplo" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic in" +msgstr "Principio cúbico" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic out" +msgstr "Final cúbico" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic in/out" +msgstr "Principio/Fin cúbico" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart in" +msgstr "Principio dun cuarto" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart out" +msgstr "Final dun cuarto" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart in/out" +msgstr "Principio/Fin dun cuarto" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint in" +msgstr "Principio quíntuplo" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint out" +msgstr "Final quíntuplo" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint in/out" +msgstr "Principio/Fin quíntuplo" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine in" +msgstr "Principio sinusoidal" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine out" +msgstr "Final sinusoidal" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine in/out" +msgstr "Principio/Fin sinusoidal" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular in" +msgstr "Principio circular" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular out" +msgstr "Final Circular" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular in/out" +msgstr "Principio/Fin circular" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential in" +msgstr "Principio exponencial" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential out" +msgstr "Final exponencial" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential in/out" +msgstr "Principio/Fin exponencial" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic in" +msgstr "Principio elástico" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic out" +msgstr "Final elástico" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic in/out" +msgstr "Principio/Fin elástico" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back in" +msgstr "Principio de retorno" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back out" +msgstr "Final de retorno" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back in/out" +msgstr "Principio/Fin de retorno" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce in" +msgstr "Principio do rebote" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce out" +msgstr "Final do rebote" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce in/out" +msgstr "Principio/Fin do rebote" + +#: src/object/custom_particle_system.cpp:462 +msgid "Birth time" +msgstr "Tempo de creación" + +#: src/object/custom_particle_system.cpp:463 +msgid "Birth time variation" +msgstr "Variación do tempo da creación" + +#: src/object/custom_particle_system.cpp:464 +#: src/editor/particle_editor.cpp:170 +msgid "Death mode" +msgstr "Modo da morte" + +#: src/object/custom_particle_system.cpp:469 +#: src/editor/particle_editor.cpp:173 +msgid "Death easing" +msgstr "Animación ao eliminarse" + +#: src/object/custom_particle_system.cpp:497 +msgid "Death time" +msgstr "Tempo da morte" + +#: src/object/custom_particle_system.cpp:498 +msgid "Death time variation" +msgstr "Variación do tempo da morte" + +#: src/object/custom_particle_system.cpp:501 +msgid "Speed X (variation)" +msgstr "Velocidade en X (variación)" + +#: src/object/custom_particle_system.cpp:502 +msgid "Speed Y (variation)" +msgstr "Velocidade en Y (variación)" + +#: src/object/custom_particle_system.cpp:503 +msgid "Acceleration X" +msgstr "Aceleración X" + +#: src/object/custom_particle_system.cpp:504 +msgid "Acceleration Y" +msgstr "Aceleración Y" + +#: src/object/custom_particle_system.cpp:505 +msgid "Friction X" +msgstr "Fricción en X" + +#: src/object/custom_particle_system.cpp:506 +msgid "Friction Y" +msgstr "Fricción en Y" + +#: src/object/custom_particle_system.cpp:507 +#: src/editor/particle_editor.cpp:189 +msgid "Feather factor" +msgstr "Factor pluma" + +#: src/object/custom_particle_system.cpp:508 +msgid "Rotation" +msgstr "Rotación" + +#: src/object/custom_particle_system.cpp:509 +msgid "Rotation (variation)" +msgstr "Rotación (variación)" + +#: src/object/custom_particle_system.cpp:510 +#: src/editor/particle_editor.cpp:195 +msgid "Rotation speed" +msgstr "Velocidade da rotación" + +#: src/object/custom_particle_system.cpp:511 +msgid "Rotation speed (variation)" +msgstr "Velocidade da rotación (variación)" + +#: src/object/custom_particle_system.cpp:512 +#: src/editor/particle_editor.cpp:200 +msgid "Rotation acceleration" +msgstr "Aceleración da rotación" + +#: src/object/custom_particle_system.cpp:513 +msgid "Rotation friction" +msgstr "Fricción da rotación" + +#: src/object/custom_particle_system.cpp:514 +#: src/editor/particle_editor.cpp:208 +msgid "Rotation mode" +msgstr "Modo da rotación" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:206 +msgid "Fixed" +msgstr "Fixado" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:205 +msgid "Facing" +msgstr "Mirando para" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:204 +msgid "Wiggling" +msgstr "Menear" + +#: src/object/custom_particle_system.cpp:519 +#: src/editor/particle_editor.cpp:219 +msgid "Collision mode" +msgstr "Modo da colisión" + +#: src/object/custom_particle_system.cpp:520 +msgid "None (pass through)" +msgstr "Ningún (deixar estar)" + +#: src/object/custom_particle_system.cpp:520 +msgid "Stick" +msgstr "Plantarse" + +#: src/object/custom_particle_system.cpp:520 +msgid "Stick Forever" +msgstr "Plantarse para Sempre" + +#: src/object/custom_particle_system.cpp:520 +#: src/editor/particle_editor.cpp:214 +msgid "Bounce (heavy)" +msgstr "Rebote (grande)" + +#: src/object/custom_particle_system.cpp:520 +#: src/editor/particle_editor.cpp:213 +msgid "Bounce (light)" +msgstr "Rebote (pequeno)" + +#: src/object/custom_particle_system.cpp:520 +msgid "Kill particle" +msgstr "Matar partícula" + +#: src/object/custom_particle_system.cpp:520 +msgid "Fade out particle" +msgstr "Esvaer partícula" + +#: src/object/custom_particle_system.cpp:524 +msgid "Delete if off-screen" +msgstr "Eliminar ó saír da pantalla" + +#: src/object/custom_particle_system.cpp:525 +#: src/editor/particle_editor.cpp:224 +msgid "Never" +msgstr "Nunca" + +#: src/object/custom_particle_system.cpp:525 +#: src/editor/particle_editor.cpp:223 +msgid "Only on exit" +msgstr "Só ó saír" + +#: src/object/custom_particle_system.cpp:525 +msgid "Always" +msgstr "Sempre" + +#: src/object/custom_particle_system.cpp:529 +msgid "Cover screen" +msgstr "Cubrir pantalla" + +#: src/object/ispy.hpp:35 msgid "Ispy" msgstr "Semáforo" -#: src/object/skull_tile.hpp:31 -msgid "Skull Tile" -msgstr "Tesela de Caveira" +#: src/object/particle_zone.cpp:51 +msgid "Particle Name" +msgstr "Nome da Partícula" + +#: src/object/particle_zone.cpp:62 +msgid "Spawn" +msgstr "Aparecer" + +#: src/object/particle_zone.cpp:63 +msgid "Life zone" +msgstr "Zona de vida" -#: src/object/weak_block.cpp:211 -msgid "Linked" -msgstr "Ligado" +#: src/object/particle_zone.cpp:64 +msgid "Life zone (clear)" +msgstr "Zona de vida (limpar)" -#: src/object/decal.hpp:34 +#: src/object/particle_zone.cpp:65 +msgid "Kill particles" +msgstr "Matar partículas" + +#: src/object/particle_zone.cpp:66 +msgid "Clear particles" +msgstr "Limpar partículas" + +#: src/object/weak_block.cpp:98 +msgid "Hay" +msgstr "Feo" + +#: src/object/decal.hpp:41 msgid "Decal" msgstr "Taboleiro" -#: src/object/tilemap.cpp:217 +#: src/object/tilemap.cpp:267 msgid "Resize offset x" msgstr "Cambiar tamaño da compensación x" -#: src/object/tilemap.cpp:218 +#: src/object/tilemap.cpp:268 msgid "Resize offset y" msgstr "Cambiar tamaño da compensación y" -#: src/object/tilemap.cpp:223 +#: src/object/tilemap.cpp:270 src/supertux/menu/editor_sector_menu.cpp:41 +#: src/editor/object_option.cpp:178 +msgid "Width" +msgstr "Ancho" + +#: src/object/tilemap.cpp:271 src/supertux/menu/editor_sector_menu.cpp:42 +#: src/editor/object_option.cpp:179 +msgid "Height" +msgstr "Alto" + +#: src/object/tilemap.cpp:273 msgid "Alpha" msgstr "Alfa" -#: src/object/tilemap.cpp:224 +#: src/object/tilemap.cpp:274 msgid "Speed x" msgstr "Velocidade x" -#: src/object/tilemap.cpp:225 +#: src/object/tilemap.cpp:275 msgid "Speed y" msgstr "Velocidade y" -#: src/object/tilemap.cpp:226 +#: src/object/tilemap.cpp:276 msgid "Tint" msgstr "Tonalidade" -#: src/object/tilemap.cpp:244 src/supertux/menu/editor_tilegroup_menu.cpp:26 -#: src/editor/toolbox_widget.cpp:90 +#: src/object/tilemap.cpp:296 src/supertux/menu/editor_tilegroup_menu.cpp:26 +#: src/editor/toolbox_widget.cpp:98 msgid "Tiles" msgstr "Tesela" -#: src/object/gradient.cpp:115 -msgid "Left Colour" -msgstr "Cor Esquerda" - -#: src/object/gradient.cpp:116 -msgid "Right Colour" -msgstr "Cor Dereita" - -#: src/object/gradient.cpp:118 -msgid "Top Colour" -msgstr "Cor de Arriba" +#: src/object/gradient.cpp:98 +msgid "Primary Colour" +msgstr "Cor Primaria" -#: src/object/gradient.cpp:119 -msgid "Bottom Colour" -msgstr "Cor do Fondo" +#: src/object/gradient.cpp:99 +msgid "Secondary Colour" +msgstr "Cor Secundaria" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Vertical" msgstr "Vertical" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Horizontal" msgstr "Horizontal" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Vertical (whole sector)" msgstr "Vertical (sector completo)" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Horizontal (whole sector)" msgstr "Horizontal (sector completo)" -#: src/object/gradient.cpp:135 +#: src/object/gradient.cpp:114 msgid "Blend mode" msgstr "Modo de fusión" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Blend" msgstr "Fusión" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Additive" msgstr "Aditivo" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Modulate" msgstr "Modulado" -#: src/object/gradient.cpp:136 src/supertux/menu/keyboard_menu.cpp:60 -#: src/supertux/menu/joystick_menu.cpp:106 -#: src/supertux/menu/joystick_menu.cpp:213 src/editor/object_settings.cpp:124 -msgid "None" -msgstr "Ningún" +#: src/object/bumper.hpp:38 +msgid "Bumper" +msgstr "Parachoques" + +#: src/object/conveyor_belt.cpp:63 +msgid "Length" +msgstr "Lonxitude" + +#: src/object/moving_sprite.cpp:192 src/object/pneumatic_platform.cpp:161 +msgid "Sprite" +msgstr "Gráfico animado \"sprite\"" -#: src/object/unstable_tile.hpp:34 +#: src/object/unstable_tile.hpp:42 msgid "Unstable Tile" msgstr "Tesela Inestable" -#: src/object/brick.hpp:31 -msgid "Brick" -msgstr "Ladrillo" +#: src/object/brick.hpp:70 +msgid "Heavy Brick" +msgstr "Ladrillo Pesado" -#: src/object/invisible_wall.hpp:34 +#: src/object/invisible_wall.hpp:37 msgid "Invisible Wall" msgstr "Muro Invisible" -#: src/object/spotlight.hpp:38 +#: src/object/spotlight.hpp:52 msgid "Spotlight" msgstr "Punto de Luz" -#: src/object/scripted_object.hpp:39 +#: src/object/scripted_object.hpp:40 msgid "Scripted Object" msgstr "Obxecto de Script" -#: src/object/coin.hpp:75 +#: src/object/custom_particle_system_file.hpp:40 +msgid "Custom Particles from file" +msgstr "Partículas Personalizados dende ficheiro" + +#: src/object/coin.hpp:97 msgid "Heavy Coin" msgstr "Moeda Pesada" -#: src/object/bonus_block.hpp:55 +#: src/object/explosion.hpp:35 +msgid "Explosion" +msgstr "Explosión" + +#: src/object/bonus_block.hpp:62 msgid "Bonus Block" msgstr "Bloque de Bono" -#: src/object/magicblock.hpp:41 +#: src/object/magicblock.hpp:42 msgid "Magic Tile" msgstr "Tesela Máxica" -#: src/object/camera.hpp:67 +#: src/object/camera.hpp:61 msgid "Camera" msgstr "Cámara" -#: src/object/textscroller.hpp:44 -msgid "TextScroller" -msgstr "Desprazamento do Texto" +#: src/object/textscroller.hpp:45 +msgid "Text Scroller" +msgstr "Texto Móbil" + +#: src/gui/notification.cpp:57 +msgid "Click for more details." +msgstr "Fai clic para máis detalles." + +#: src/gui/notification.cpp:150 +msgid "Do not show again" +msgstr "Non volver a amosar" + +#: src/gui/notification.cpp:157 src/supertux/menu/download_dialog.cpp:124 +msgid "Close" +msgstr "Pechar" -#: src/gui/menu_badguy_select.cpp:93 -msgid "List of enemies" -msgstr "Lista de inimigos" +#: src/gui/menu_string_array.cpp:40 src/gui/menu_string_array.cpp:78 +#, c++-format +msgid "Selected item: {}" +msgstr "Elemento escollido: {}" -#: src/gui/menu_badguy_select.cpp:95 -msgid "Enemy" -msgstr "Inimigo" +#: src/gui/menu_string_array.cpp:70 +msgid "Edit string array" +msgstr "Editar matriz de cadeas" -#: src/gui/menu_badguy_select.cpp:96 +#: src/gui/menu_string_array.cpp:79 src/gui/menu_object_select.cpp:50 +#: src/supertux/menu/profile_menu.cpp:88 msgid "Add" msgstr "Engadir" -#: src/gui/menu_badguy_select.cpp:106 src/gui/menu_color.cpp:34 -#: src/gui/dialog.hpp:80 src/gui/menu_script.cpp:47 -#: src/supertux/menu/editor_sector_menu.cpp:46 -#: src/supertux/menu/editor_levelset_menu.cpp:62 -#: src/supertux/menu/addon_menu.cpp:349 +#: src/gui/menu_string_array.cpp:80 +msgid "Insert" +msgstr "Inserir" + +#: src/gui/menu_string_array.cpp:81 +#: src/supertux/menu/addon_preview_menu.cpp:177 src/editor/object_menu.cpp:61 +msgid "Update" +msgstr "Actualizar" + +#: src/gui/menu_string_array.cpp:82 src/supertux/menu/profile_menu.cpp:108 +#: src/supertux/menu/profile_menu.cpp:110 +msgid "Delete" +msgstr "Eliminar" + +#: src/gui/menu_string_array.cpp:84 src/gui/menu_object_select.cpp:61 +#: src/gui/menu_color.cpp:37 src/gui/dialog.hpp:87 src/gui/menu_script.cpp:46 +#: src/supertux/menu/editor_sector_menu.cpp:48 +#: src/supertux/menu/editor_levelset_menu.cpp:58 #: src/supertux/menu/editor_new_levelset_menu.cpp:37 -#: src/supertux/menu/editor_level_menu.cpp:44 src/editor/object_menu.cpp:43 +#: src/supertux/menu/editor_level_menu.cpp:45 src/editor/object_menu.cpp:71 msgid "OK" msgstr "OK" -#: src/gui/menu_badguy_select.cpp:135 -msgid "Do you want to delete this badguy from the list?" -msgstr "Queres eliminar a este tipo malo da lista?" +#: src/gui/menu_object_select.cpp:46 +msgid "List of objects" +msgstr "Lista de Obxectos" -#: src/gui/menu_badguy_select.cpp:136 src/gui/dialog.hpp:89 -#: src/supertux/menu/editor_menu.cpp:123 src/editor/editor.cpp:478 -msgid "Yes" -msgstr "Si" +#: src/gui/menu_object_select.cpp:48 +#, c++-format +msgid "Select object ({})" +msgstr "Escoller obxecto ({})" -#: src/gui/menu_badguy_select.cpp:139 src/gui/dialog.hpp:90 -#: src/supertux/menu/editor_menu.cpp:126 src/editor/editor.cpp:485 -msgid "No" -msgstr "Non" +#: src/gui/menu_object_select.cpp:114 +msgid "Are you sure you want to remove this object from the list?" +msgstr "Estás certo de que queres eliminar este obxecto da lista?" #: src/gui/menu_color.cpp:24 msgid "Mix the colour" msgstr "Mesturar a cor" -#: src/gui/menu_filesystem.cpp:111 +#: src/gui/dialog.hpp:96 src/supertux/menu/editor_level_select_menu.cpp:181 +#: src/editor/editor.cpp:663 +msgid "Yes" +msgstr "Si" + +#: src/gui/dialog.hpp:97 src/supertux/menu/editor_level_select_menu.cpp:185 +#: src/editor/particle_editor.cpp:781 src/editor/editor.cpp:670 +msgid "No" +msgstr "Non" + +#: src/gui/menu_list.cpp:38 src/gui/menu_filesystem.cpp:120 +#: src/gui/menu_paths.cpp:48 src/supertux/menu/particle_editor_save_as.cpp:42 #: src/supertux/menu/editor_sectors_menu.cpp:45 -#: src/supertux/menu/editor_sectors_menu.cpp:95 -#: src/supertux/menu/editor_sectors_menu.cpp:100 +#: src/supertux/menu/editor_sectors_menu.cpp:94 +#: src/supertux/menu/editor_sectors_menu.cpp:99 #: src/supertux/menu/editor_objectgroup_menu.cpp:42 -#: src/supertux/menu/editor_tilegroup_menu.cpp:36 src/editor/editor.cpp:489 +#: src/supertux/menu/editor_tilegroup_menu.cpp:36 +#: src/supertux/menu/editor_level_select_menu.cpp:190 +#: src/supertux/menu/editor_save_as.cpp:42 +#: src/supertux/menu/particle_editor_open.cpp:43 +#: src/editor/particle_editor.cpp:785 src/editor/editor.cpp:674 msgid "Cancel" msgstr "Cancelar" +#: src/gui/menu_filesystem.cpp:118 +msgid "Open Directory" +msgstr "Abrir Cartafol" + #: src/gui/menu_script.cpp:28 msgid "Edit script" msgstr "Editar script" -#: src/badguy/toad.hpp:37 -msgid "Toad" -msgstr "Sapo" +#: src/gui/menu_paths.cpp:32 +msgid "Clone" +msgstr "Clonar" -#: src/badguy/mrtree.hpp:29 -msgid "Walking Tree" -msgstr "Árbore Andante" +#: src/gui/menu_paths.cpp:41 +msgid "" +"An error occurred and the game could\n" +"not clone the path. Please contact\n" +"the developers for support." +msgstr "Produciuse un erro e o xogo non puido clonar a ruta. Por favor, contacta cos desenroladores para obter soporte." -#: src/badguy/plant.hpp:33 -msgid "Plant" -msgstr "Planta" +#: src/gui/menu_paths.cpp:44 +msgid "Bind" +msgstr "Enlazar" -#: src/badguy/crystallo.hpp:30 -msgid "Crystallo" -msgstr "Cristaliño" +#: src/gui/menu_paths.cpp:49 +msgid "" +"Do you wish to clone the path to edit it separately,\n" +"or do you want to bind both paths together\n" +"so that any edit on one edits the other?" +msgstr "Queres clonar a ruta para editala por separado,\nou prefires ligar ambas as rutas\nde maneira que calquera edición nunha se reflicta na outra?" + +#: src/gui/menu_paths.cpp:56 +#, c++-format +msgid "Path {}" +msgstr "Ruta {}" + +#: src/gui/menu_paths.cpp:67 src/supertux/menu/integrations_menu.cpp:60 +#: src/supertux/menu/editor_converters_menu.cpp:79 +#: src/supertux/menu/video_system_menu.cpp:45 +#: src/supertux/menu/contrib_menu.cpp:102 src/supertux/menu/debug_menu.cpp:77 +#: src/supertux/menu/multiplayer_menu.cpp:39 +#: src/supertux/menu/custom_menu_menu.cpp:65 +#: src/supertux/menu/editor_level_select_menu.cpp:98 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:63 +#: src/supertux/menu/worldmap_cheat_menu.cpp:57 +#: src/supertux/menu/worldmap_cheat_menu.cpp:196 +#: src/supertux/menu/editor_levelset_select_menu.cpp:114 +#: src/supertux/menu/options_menu.cpp:223 +#: src/supertux/menu/editor_delete_levelset_menu.cpp:69 +#: src/supertux/menu/addon_preview_menu.cpp:193 +#: src/supertux/menu/profile_menu.cpp:118 +#: src/supertux/menu/multiplayer_players_menu.cpp:91 +#: src/supertux/menu/addon_menu.cpp:153 +#: src/supertux/menu/editor_new_levelset_menu.cpp:40 +#: src/supertux/menu/options_select_menu.cpp:44 +#: src/supertux/menu/world_set_menu.cpp:33 +#: src/supertux/menu/addon_browse_menu.cpp:162 +#: src/supertux/menu/web_asset_menu.cpp:48 +#: src/supertux/menu/profile_name_menu.cpp:45 +#: src/supertux/menu/keyboard_menu.cpp:71 +#: src/supertux/menu/sorted_contrib_menu.cpp:51 +#: src/supertux/menu/language_menu.cpp:63 +#: src/supertux/menu/joystick_menu.cpp:99 +#: src/supertux/menu/contrib_levelset_menu.cpp:67 +#: src/supertux/menu/cheat_menu.cpp:58 +#: src/supertux/menu/addon_file_install_menu.cpp:36 +#: src/supertux/menu/cheat_apply_menu.cpp:43 +#: src/supertux/menu/cheat_apply_menu.cpp:63 +#: src/supertux/menu/multiplayer_player_menu.cpp:205 +#: src/supertux/menu/editor_delete_level_menu.cpp:68 +msgid "Back" +msgstr "Atrás" -#: src/badguy/totem.hpp:36 -msgid "Totem" -msgstr "Totem" +#: src/addon/addon_manager.cpp:562 +msgid "Only one resource pack is allowed to be enabled at a time." +msgstr "Só se permite activar un paquete de recursos á vez." -#: src/badguy/stalactite.hpp:38 -msgid "Stalactite" -msgstr "Estalactita" +#: src/addon/addon_manager.cpp:837 +#, c++-format +msgid "Add-on {} by {} is already installed." +msgstr "O complemento {} de {} xa está instalado." -#: src/badguy/haywire.hpp:42 -msgid "Haywire" -msgstr "Bule bule" +#: src/addon/addon_manager.cpp:857 +#, c++-format +msgid "Add-on {} by {} successfully installed." +msgstr "O complemento {} de {} instalouse correctamente." -#: src/badguy/dispenser.hpp:48 -msgid "Dispenser" -msgstr "Dispensador" +#: src/addon/addon.cpp:71 src/supertux/menu/editor_levelset_menu.cpp:54 +msgid "Levelset" +msgstr "Conxunto de niveis" -#: src/badguy/short_fuse.hpp:29 -msgid "Short Fuse" -msgstr "Mecha Curta" +#: src/addon/addon.cpp:74 src/supertux/menu/editor_levelset_menu.cpp:54 +#: data//images/engine/editor/objects.stoi:389 +msgid "Worldmap" +msgstr "Mapa Principal" -#: src/badguy/zeekling.hpp:36 -msgid "Zeekling" -msgstr "Dragón" +#: src/addon/addon.cpp:77 +msgid "World" +msgstr "Mundo" + +#: src/addon/addon.cpp:80 +msgid "Add-on" +msgstr "Complemento" + +#: src/addon/addon.cpp:83 +msgid "Language Pack" +msgstr "Paquete de Idiomas" + +#: src/addon/addon.cpp:86 +msgid "Resource Pack" +msgstr "Paquete de Recursos" + +#: src/addon/addon.cpp:89 +msgid "Unknown" +msgstr "Descoñecido" + +#: src/addon/addon.cpp:100 +#, c++-format +msgid "{} \"{}\" by \"{}\"" +msgstr "{} \"{}\" por \"{}\"" + +#: src/addon/addon.cpp:114 +msgid "add-on" +msgstr "complemento" + +#: src/addon/addon.cpp:114 +msgid "add-ons" +msgstr "complementos" + +#: src/badguy/toad.hpp:38 +msgid "Toad" +msgstr "Sapo" + +#: src/badguy/mrtree.hpp:32 +msgid "Mr. Tree" +msgstr "Sr. árbore" + +#: src/badguy/plant.hpp:34 +msgid "Plant" +msgstr "Planta" + +#: src/badguy/tarantula.hpp:39 src/badguy/tarantula.cpp:353 +msgid "Tarantula" +msgstr "tarántula" + +#: src/badguy/granito_giant.cpp:71 +msgid "Awake" +msgstr "Esperto" + +#: src/badguy/granito_giant.cpp:72 +msgid "Sleeping" +msgstr "Durmindo" + +#: src/badguy/granito_giant.cpp:73 +msgid "Corrupted A" +msgstr "Corrompido A" + +#: src/badguy/granito_giant.cpp:74 +msgid "Corrupted B" +msgstr "Corrompido B" + +#: src/badguy/granito_giant.cpp:75 +msgid "Corrupted C" +msgstr "Corrompido C" + +#: src/badguy/crystallo.hpp:33 +msgid "Crystallo" +msgstr "Cristaliño" + +#: src/badguy/viciousivy.cpp:45 src/badguy/snail.cpp:70 +#: src/badguy/kamikazesnowball.cpp:118 src/badguy/walkingleaf.cpp:36 +#: src/badguy/jumpy.cpp:46 src/badguy/igel.cpp:189 src/badguy/mrtree.cpp:51 +msgid "Corrupted" +msgstr "Corrompido" + +#: src/badguy/totem.hpp:37 +msgid "Totem" +msgstr "Totem" + +#: src/badguy/stalactite.hpp:42 +msgid "Stalactite" +msgstr "Estalactita" + +#: src/badguy/fish_chasing.cpp:198 +msgid "Tracking Distance" +msgstr "Distancia de Seguimento" + +#: src/badguy/fish_chasing.cpp:199 +msgid "Losing Distance" +msgstr "Distancia de Perda" + +#: src/badguy/fish_chasing.cpp:200 +msgid "Chase Speed" +msgstr "Velocidade de Persecución" + +#: src/badguy/root_sapling.hpp:41 +msgid "Root Sapling" +msgstr "Gromo de Ráiz" + +#: src/badguy/haywire.hpp:46 +msgid "Haywire" +msgstr "Bule bule" + +#: src/badguy/dispenser.hpp:52 +msgid "Dispenser" +msgstr "Dispensador" + +#: src/badguy/short_fuse.hpp:30 +msgid "Short Fuse" +msgstr "Mecha Curta" + +#: src/badguy/zeekling.hpp:39 +msgid "Zeekling" +msgstr "Dragón" + +#: src/badguy/smartball.cpp:35 +msgid "Pumpkin" +msgstr "Cabaza" + +#: src/badguy/bouncing_snowball.cpp:82 +msgid "Fatbat" +msgstr "Morcego Gordo" + +#: src/badguy/dive_mine.hpp:50 +msgid "Dive Mine" +msgstr "Mina de mergullo" + +#: src/badguy/granito_big.hpp:33 +msgid "Big Granito" +msgstr "Granito Grande" + +#: src/badguy/mriceblock.hpp:49 +msgid "Mr. Iceblock" +msgstr "Mr. Bloque de Xeo" + +#: src/badguy/granito.hpp:39 src/badguy/darttrap.cpp:163 +#: src/badguy/corrupted_granito.cpp:175 src/badguy/dispenser.cpp:438 +msgid "Granito" +msgstr "Granito" + +#: src/badguy/fish_swimming.cpp:54 src/badguy/jumpy.cpp:44 +#: data//images/ice_world.strf:10 data//images/tiles.strf:28 +#: data//images/worldmap.strf:41 +msgid "Snow" +msgstr "Neve" + +#: src/badguy/fish_swimming.cpp:55 data//images/ice_world.strf:211 +#: data//images/tiles.strf:366 data//images/worldmap.strf:67 +msgid "Forest" +msgstr "Bosque" + +#: src/badguy/crusher.hpp:71 +msgid "Crusher" +msgstr "Trituradora" + +#: src/badguy/flame.cpp:84 +msgid "Fire" +msgstr "Lume" + +#: src/badguy/flame.cpp:85 +msgid "Ghost" +msgstr "Pantasma" + +#: src/badguy/corrupted_granito_big.hpp:35 +msgid "Corrupted Big Granito" +msgstr "Granito Grande Corrompido" + +#: src/badguy/scrystallo.cpp:57 +msgid "Walk Radius" +msgstr "Raio do Paseo" + +#: src/badguy/scrystallo.cpp:58 +msgid "Awakening Radius" +msgstr "Raio ó Espertar" -#: src/badguy/mriceblock.hpp:46 -msgid "Iceblock" -msgstr "Cubiño de xeo" +#: src/badguy/scrystallo.cpp:59 +msgid "Roof-attached" +msgstr "Fixado ao tellado" -#: src/badguy/jumpy.hpp:36 +#: src/badguy/jumpy.hpp:40 msgid "Jumpy" msgstr "Chouteira" -#: src/badguy/captainsnowball.hpp:31 +#: src/badguy/captainsnowball.hpp:32 msgid "Captain Snowball" msgstr "Capitán Bóla de Neve" -#: src/badguy/ghosttree.hpp:42 +#: src/badguy/ghosttree.hpp:43 msgid "Ghost Tree" msgstr "Árbore Pantasma" -#: src/badguy/willowisp.cpp:283 +#: src/badguy/willowisp.cpp:314 msgid "Track range" msgstr "Intervalo de seguimento" -#: src/badguy/willowisp.cpp:284 +#: src/badguy/willowisp.cpp:315 msgid "Vanish range" msgstr "Intervalo de desaparición" -#: src/badguy/willowisp.cpp:285 +#: src/badguy/willowisp.cpp:316 msgid "Fly speed" msgstr "Velocidade de voo" -#: src/badguy/kugelblitz.hpp:39 +#: src/badguy/kugelblitz.hpp:40 msgid "Kugelblitz" msgstr "Chispún" -#: src/badguy/mole_rock.hpp:42 +#: src/badguy/mole_rock.hpp:44 msgid "Mole's rock" msgstr "Pedras da toupeira" -#: src/badguy/badguy.cpp:841 +#: src/badguy/badguy.cpp:1064 msgid "Death script" msgstr "Script de morte" -#: src/badguy/sspiky.hpp:36 +#: src/badguy/sspiky.hpp:37 msgid "Sleeping Spiky" msgstr "Chouteira Durminte" -#: src/badguy/yeti_stalactite.hpp:33 +#: src/badguy/yeti_stalactite.hpp:34 msgid "Yeti's Stalactite" msgstr "Estalactita do Yeti" -#: src/badguy/livefire.hpp:37 +#: src/badguy/fish_harmless.hpp:30 +msgid "Harmless Fish" +msgstr "Peixe inofensivo" + +#: src/badguy/livefire.hpp:38 msgid "Walking Flame" msgstr "Lapa Camiñante" -#: src/badguy/livefire.hpp:67 +#: src/badguy/livefire.hpp:71 msgid "Sleeping Flame" msgstr "Lapa Durminte" -#: src/badguy/livefire.hpp:83 +#: src/badguy/livefire.hpp:89 msgid "Dormant Flame" msgstr "Lapa Latente" -#: src/badguy/owl.hpp:39 +#: src/badguy/owl.hpp:45 msgid "Owl" msgstr "Moucho" -#: src/badguy/igel.hpp:34 +#: src/badguy/igel.hpp:38 msgid "Igel" msgstr "Ourizo" -#: src/badguy/darttrap.cpp:126 +#: src/badguy/darttrap.cpp:148 msgid "Initial delay" msgstr "Tardanza inicial" -#: src/badguy/darttrap.cpp:128 +#: src/badguy/darttrap.cpp:150 msgid "Fire delay" msgstr "Tardanza do lume" -#: src/badguy/darttrap.cpp:129 +#: src/badguy/darttrap.cpp:151 msgid "Ammo" msgstr "Munición" -#: src/badguy/snowball.hpp:29 -msgid "Snowball" -msgstr "Bóla de neve" +#: src/badguy/darttrap.cpp:152 +msgid "Dart sprite" +msgstr "Gráfico animado escuro" + +#: src/badguy/darttrap.cpp:164 +msgid "Skull" +msgstr "Cranio" -#: src/badguy/smartblock.hpp:29 -msgid "Smartblock" -msgstr "Bloque intelixente" +#: src/badguy/snowball.hpp:30 +msgid "Mr. Snowball" +msgstr "Sr. Bola de Neve" -#: src/badguy/yeti.cpp:369 +#: src/badguy/smartblock.hpp:30 +msgid "Mrs. Iceblock" +msgstr "Sra. Bloque de Xeo" + +#: src/badguy/yeti.cpp:370 msgid "Fixed position" msgstr "Posición fixa" -#: src/badguy/yeti.cpp:370 +#: src/badguy/yeti.cpp:371 msgid "Lives" msgstr "Vidas" -#: src/badguy/goldbomb.hpp:49 +#: src/badguy/goldbomb.hpp:50 msgid "Gold Bomb" msgstr "Bomba Dourada" -#: src/badguy/flyingsnowball.hpp:32 +#: src/badguy/corrupted_granito.hpp:44 +msgid "Corrupted Granito" +msgstr "Granito Corrompido" + +#: src/badguy/mrbomb.cpp:48 +msgid "Classic" +msgstr "Clásico" + +#: src/badguy/flyingsnowball.hpp:33 msgid "Flying Snowball" msgstr "A Mosca" -#: src/badguy/skullyhop.hpp:37 -msgid "Skullyhop" -msgstr "Caveira Choutadora" +#: src/badguy/crusher.cpp:75 +msgid "Ice (normal)" +msgstr "Xeo (normal)" + +#: src/badguy/crusher.cpp:76 +msgid "Ice (big)" +msgstr "Xeo (grande)" + +#: src/badguy/crusher.cpp:77 +msgid "Rock (normal)" +msgstr "Rocha (normal)" + +#: src/badguy/crusher.cpp:78 +msgid "Rock (big)" +msgstr "Rocha (grande)" -#: src/badguy/kamikazesnowball.hpp:32 -msgid "Snowshot" -msgstr "Bala de neve" +#: src/badguy/crusher.cpp:79 +msgid "Corrupted (normal)" +msgstr "Corrompido (normal)" -#: src/badguy/kamikazesnowball.hpp:52 +#: src/badguy/crusher.cpp:80 +msgid "Corrupted (big)" +msgstr "Corrompido (grande)" + +#: src/badguy/crusher.cpp:492 +msgid "Sideways" +msgstr "Beirarrúas" + +#: src/badguy/kamikazesnowball.hpp:34 +msgid "Kamikaze Snowball" +msgstr "Bola de neve kamikaze" + +#: src/badguy/kamikazesnowball.hpp:64 msgid "Leafshot" msgstr "Bala de folla" -#: src/badguy/flame.hpp:41 +#: src/badguy/fish_swimming.hpp:40 +msgid "Swimming Fish" +msgstr "Peixe Nadador" + +#: src/badguy/flame.hpp:47 msgid "Flame" msgstr "Lapa" -#: src/badguy/poisonivy.hpp:30 -msgid "Spring Leaf" -msgstr "Folla de Primavera" +#: src/badguy/scrystallo.hpp:31 +msgid "Sleeping Crystallo" +msgstr "Cristaliño Durminte" -#: src/badguy/willowisp.hpp:55 +#: src/badguy/jumpy.cpp:45 +msgid "Wooden" +msgstr "Madeira" + +#: src/badguy/jumpy.cpp:47 +msgid "Metal" +msgstr "Metal" + +#: src/badguy/jumpy.cpp:48 +msgid "Bag" +msgstr "Saco" + +#: src/badguy/willowisp.hpp:57 msgid "Will o' Wisp" msgstr "Asubía-Bólas" -#: src/badguy/badguy.hpp:53 +#: src/badguy/fish_jumping.hpp:41 +msgid "Jumping Fish" +msgstr "Peixe Brincador" + +#: src/badguy/badguy.hpp:61 msgid "Badguy" msgstr "Tipo malo" -#: src/badguy/ghostflame.hpp:30 -msgid "Ghost Flame" -msgstr "Lapa Pantasma" +#: src/badguy/rcrystallo.hpp:33 +msgid "Roof Crystallo" +msgstr "Cristaliño no Tellado" -#: src/badguy/spiky.hpp:30 +#: src/badguy/spiky.hpp:31 msgid "Spiky" msgstr "Pinchudo" -#: src/badguy/walkingleaf.hpp:30 -msgid "Autumn Leaf" -msgstr "Folla do Outono" +#: src/badguy/walkingleaf.hpp:33 +msgid "Walking Leaf" +msgstr "Folla Andante" -#: src/badguy/owl.cpp:227 +#: src/badguy/root.hpp:39 +msgid "Root" +msgstr "Ráiz" + +#: src/badguy/owl.cpp:241 msgid "Carry" msgstr "Levar" -#: src/badguy/darttrap.hpp:33 +#: src/badguy/darttrap.hpp:35 msgid "Dart Trap" msgstr "Trampa de Dardos" -#: src/badguy/skydive.hpp:38 +#: src/badguy/skydive.hpp:43 msgid "Skydive" msgstr "Chouta-Ceos" -#: src/badguy/yeti.hpp:37 +#: src/badguy/yeti.hpp:38 msgid "Yeti" msgstr "Yeti" -#: src/badguy/mole.hpp:39 +#: src/badguy/snowball.cpp:41 +msgid "Bumpkin" +msgstr "Pailán" + +#: src/badguy/snowball.cpp:42 +msgid "BSOD" +msgstr "BSOD" + +#: src/badguy/mole.hpp:38 msgid "Mole" msgstr "Toupa" -#: src/badguy/mrbomb.hpp:42 -msgid "Bomb" -msgstr "Bomba" +#: src/badguy/corrupted_granito.cpp:176 +msgid "Skullyhop" +msgstr "Caveira Choutadora" + +#: src/badguy/mrbomb.hpp:40 +msgid "Mr. Bomb" +msgstr "Sr. Bomba" -#: src/badguy/walking_candle.hpp:40 +#: src/badguy/walking_candle.hpp:41 msgid "Walking Candle" msgstr "Vela Camiñante" -#: src/badguy/angrystone.hpp:34 +#: src/badguy/angrystone.hpp:39 msgid "Angry Stone" msgstr "Pedra Furiosa" -#: src/badguy/spidermite.hpp:35 -msgid "Spider" -msgstr "Araña" +#: src/badguy/tarantula.cpp:354 +msgid "Spidermite" +msgstr "Ácaro araña" -#: src/badguy/ghoul.hpp:28 +#: src/badguy/tarantula.cpp:374 +msgid "Static" +msgstr "Estático" + +#: src/badguy/ghoul.hpp:30 msgid "Ghoul" msgstr "Demo" -#: src/badguy/snowman.hpp:28 +#: src/badguy/granito_giant.hpp:32 +msgid "Giant Granito" +msgstr "Granito Xigante" + +#: src/badguy/snowman.hpp:29 msgid "Snowman" msgstr "Boneco de Neve" -#: src/badguy/stumpy.hpp:35 -msgid "Walking Stump" -msgstr "Cañota Camiñante" +#: src/badguy/viciousivy.hpp:33 +msgid "Vicious Ivy" +msgstr "Hedra Viciosa" -#: src/badguy/fish.hpp:40 -msgid "Fish" -msgstr "Peixe" +#: src/badguy/stalactite.cpp:156 +msgid "ice" +msgstr "xeo" -#: src/badguy/dispenser.cpp:439 +#: src/badguy/stalactite.cpp:157 +msgid "rock" +msgstr "rocha" + +#: src/badguy/fish_chasing.hpp:33 +msgid "Chasing Fish" +msgstr "Perseguindo Peixes" + +#: src/badguy/stumpy.hpp:38 +msgid "Stumpy" +msgstr "Tronco" + +#: src/badguy/dispenser.cpp:412 msgid "Interval (seconds)" msgstr "Intervalo (segundos)" -#: src/badguy/dispenser.cpp:440 +#: src/badguy/dispenser.cpp:413 msgid "Random" msgstr "Aleatorio" -#: src/badguy/dispenser.cpp:441 data//images/engine/editor/objects.stoi:4 -msgid "Enemies" -msgstr "Inimigos" +#: src/badguy/dispenser.cpp:416 +#: src/supertux/menu/editor_objectgroup_menu.cpp:30 +#: src/editor/toolbox_widget.cpp:101 +msgid "Objects" +msgstr "Obxectos" -#: src/badguy/dispenser.cpp:442 +#: src/badguy/dispenser.cpp:419 msgid "Limit dispensed badguys" msgstr "Limitar a cantidade de tipos malos" -#: src/badguy/dispenser.cpp:444 +#: src/badguy/dispenser.cpp:421 +msgid "Obey Gravity" +msgstr "Seguir a Gravidade" + +#: src/badguy/dispenser.cpp:423 msgid "Max concurrent badguys" msgstr "Cantidade máxima de tipos malos á vez" -#: src/badguy/dispenser.cpp:446 src/supertux/menu/editor_levelset_menu.cpp:60 -msgid "Type" -msgstr "Tipo" - -#: src/badguy/dispenser.cpp:447 -msgid "dropper" -msgstr "pingueira" +#: src/badguy/dispenser.cpp:435 +msgid "Dropper" +msgstr "Contagotas" -#: src/badguy/dispenser.cpp:447 -msgid "rocket launcher" -msgstr "lanzadeira de mísil" - -#: src/badguy/dispenser.cpp:447 -msgid "cannon" +#: src/badguy/dispenser.cpp:436 +msgid "Cannon" msgstr "canón" -#: src/badguy/dispenser.cpp:447 -msgid "invisible" -msgstr "invisible" +#: src/badguy/dispenser.cpp:437 src/worldmap/special_tile.cpp:77 +msgid "Invisible" +msgstr "Invisible" -#: src/badguy/snail.hpp:42 +#: src/badguy/snail.hpp:43 msgid "Snail" msgstr "Caracol" -#: src/badguy/smartball.hpp:31 -msgid "Smartball" -msgstr "Bóla Intelixente" +#: src/badguy/smartball.hpp:32 +msgid "Mrs. Snowball" +msgstr "Sra. Bola de neve" -#: src/badguy/bouncing_snowball.hpp:31 +#: src/badguy/bouncing_snowball.hpp:39 msgid "Bouncing Snowball" msgstr "Bóla de Neve Saltadora" -#: src/badguy/iceflame.hpp:33 -msgid "Ice Flame" -msgstr "Lapa de Xeo" +#: src/badguy/granito_big.cpp:52 src/badguy/granito.cpp:263 +msgid "Default" +msgstr "Predeterminado" + +#: src/badguy/granito_big.cpp:53 src/badguy/granito.cpp:264 +msgid "Standing" +msgstr "De pé" -#: src/badguy/dart.hpp:43 +#: src/badguy/granito_big.cpp:54 src/badguy/granito.cpp:265 +msgid "Walking" +msgstr "Camiñando" + +#: src/badguy/mriceblock.cpp:63 +msgid "Laptop" +msgstr "Portátil" + +#: src/badguy/dart.hpp:44 msgid "Dart" msgstr "Dardo" -#: src/supertux/statistics.cpp:47 +#: src/badguy/granito.cpp:268 +msgid "Sitting" +msgstr "Sentado" + +#: src/supertux/statistics.cpp:54 msgid "Max coins collected:" msgstr "Máximas moedas recollidas:" -#: src/supertux/statistics.cpp:48 +#: src/supertux/statistics.cpp:55 msgid "Max fragging:" msgstr "Máximos inimigos vencidos:" -#: src/supertux/statistics.cpp:49 +#: src/supertux/statistics.cpp:56 msgid "Max secrets found:" msgstr "Máximos segredos atopados:" -#: src/supertux/statistics.cpp:50 +#: src/supertux/statistics.cpp:57 msgid "Best time completed:" msgstr "Completado no mellor tempo:" -#: src/supertux/statistics.cpp:51 +#: src/supertux/statistics.cpp:58 msgid "Level target time:" msgstr "Tempo para acadar o obxectivo do nivel:" -#: src/supertux/statistics.cpp:139 src/supertux/levelintro.cpp:160 +#: src/supertux/statistics.cpp:149 src/supertux/levelintro.cpp:175 msgid "Best Level Statistics" msgstr "Mellores Estadísticas do Nivel" -#: src/supertux/statistics.cpp:228 +#: src/supertux/statistics.cpp:238 msgid "You" msgstr "Ti" -#: src/supertux/statistics.cpp:230 +#: src/supertux/statistics.cpp:240 msgid "Best" msgstr "Mellor" -#: src/supertux/statistics.cpp:232 src/supertux/levelintro.cpp:166 +#: src/supertux/statistics.cpp:242 src/supertux/levelintro.cpp:181 msgid "Coins" msgstr "Moedas" -#: src/supertux/statistics.cpp:255 +#: src/supertux/statistics.cpp:265 msgid "Badguys" msgstr "Tipos malos" -#: src/supertux/statistics.cpp:271 src/supertux/levelintro.cpp:172 +#: src/supertux/statistics.cpp:281 src/supertux/levelintro.cpp:187 msgid "Secrets" msgstr "Segredos" -#: src/supertux/game_object.hpp:77 +#: src/supertux/game_object.hpp:88 msgid "Unknown object" msgstr "Obxecto descoñecido" -#: src/supertux/command_line_arguments.cpp:74 -#, c-format +#: src/supertux/sector.cpp:507 +msgid "Press escape to skip" +msgstr "Pulsar a tecla escape para saltar" + +#: src/supertux/command_line_arguments.cpp:92 +#, c++-format msgid "Usage: {} [OPTIONS] [LEVELFILE]" -msgstr "Utilización: {} [OPTIONS] [LEVELFILE]" +msgstr "Uso: {} [OPCIÓNS] [ARQUIVO NÍVEL]" -#: src/supertux/command_line_arguments.cpp:75 +#: src/supertux/command_line_arguments.cpp:93 msgid "General Options:" msgstr "Opcións Xerais:" -#: src/supertux/command_line_arguments.cpp:76 +#: src/supertux/command_line_arguments.cpp:94 msgid " -h, --help Show this help message and quit" msgstr " -h, --help Amosa esta mensaxe de axuda e sae" -#: src/supertux/command_line_arguments.cpp:77 +#: src/supertux/command_line_arguments.cpp:95 msgid " -v, --version Show SuperTux version and quit" msgstr " -v, --version Amosa a versión de SuperTux e sae" -#: src/supertux/command_line_arguments.cpp:78 +#: src/supertux/command_line_arguments.cpp:96 msgid " --verbose Print verbose messages" msgstr " --verbose Publica mensaxes pormenorizadas" -#: src/supertux/command_line_arguments.cpp:79 +#: src/supertux/command_line_arguments.cpp:97 msgid " --debug Print extra verbose messages" msgstr " --verbose Publica mensaxes pormenorizadas extra" -#: src/supertux/command_line_arguments.cpp:80 +#: src/supertux/command_line_arguments.cpp:98 msgid "" " --print-datadir Print SuperTux's primary data directory." msgstr " --print-datadir Publica o directorio de datos primario de SuperTux." -#: src/supertux/command_line_arguments.cpp:82 +#: src/supertux/command_line_arguments.cpp:99 +msgid "" +" --acknowledgements Print the licenses of libraries used by " +"SuperTux." +msgstr " --agradecementos Amosa as licenzas das librerías utilizadas por SuperTux." + +#: src/supertux/command_line_arguments.cpp:101 msgid "Video Options:" msgstr "Opcións de Vídeo:" -#: src/supertux/command_line_arguments.cpp:83 +#: src/supertux/command_line_arguments.cpp:102 msgid " -f, --fullscreen Run in fullscreen mode" msgstr " -f, --fullscreen Funciona en modo pantalla completa" -#: src/supertux/command_line_arguments.cpp:84 +#: src/supertux/command_line_arguments.cpp:103 msgid " -w, --window Run in window mode" msgstr " -w, --window Funciona en modo xanela" -#: src/supertux/command_line_arguments.cpp:85 +#: src/supertux/command_line_arguments.cpp:104 msgid " -g, --geometry WIDTHxHEIGHT Run SuperTux in given resolution" msgstr " -g, --geometry ANCHOxALTO Executa SuperTux na resolución indicada" -#: src/supertux/command_line_arguments.cpp:86 +#: src/supertux/command_line_arguments.cpp:105 msgid " -a, --aspect WIDTH:HEIGHT Run SuperTux with given aspect ratio" msgstr " -a, --aspect ANCHO:ALTO Executa SuperTux coa resolución de aspecto indicada" -#: src/supertux/command_line_arguments.cpp:87 +#: src/supertux/command_line_arguments.cpp:106 msgid " -d, --default Reset video settings to default values" msgstr " -d, --default Restablece a configuración de vídeo ós valores predeterminados" -#: src/supertux/command_line_arguments.cpp:88 +#: src/supertux/command_line_arguments.cpp:107 msgid " --renderer RENDERER Use sdl, opengl, or auto to render" msgstr " --renderer REPRESENTAR Utiliza sdl, opengl, ou auto para representar" -#: src/supertux/command_line_arguments.cpp:90 +#: src/supertux/command_line_arguments.cpp:109 msgid "Audio Options:" msgstr "Opcións de Audio:" -#: src/supertux/command_line_arguments.cpp:91 +#: src/supertux/command_line_arguments.cpp:110 msgid " --disable-sound Disable sound effects" msgstr " --disable-sound Desactiva os efectos de son" -#: src/supertux/command_line_arguments.cpp:92 +#: src/supertux/command_line_arguments.cpp:111 msgid " --disable-music Disable music" msgstr " --disable-music Desactiva a músicaDisable music" -#: src/supertux/command_line_arguments.cpp:94 +#: src/supertux/command_line_arguments.cpp:113 msgid "Game Options:" msgstr "Opcións do Xogo:" -#: src/supertux/command_line_arguments.cpp:95 +#: src/supertux/command_line_arguments.cpp:114 msgid " --edit-level Open given level in editor" msgstr " --edit-level Abrir o nivel indicado no editor" -#: src/supertux/command_line_arguments.cpp:96 +#: src/supertux/command_line_arguments.cpp:115 msgid " --resave Loads given level and saves it" msgstr " --resave Carga o nivel indicado e gárdao" -#: src/supertux/command_line_arguments.cpp:97 +#: src/supertux/command_line_arguments.cpp:116 msgid " --show-fps Display framerate in levels" msgstr " --show-fps Amosa os fotogramas por segundo nos niveis" -#: src/supertux/command_line_arguments.cpp:98 +#: src/supertux/command_line_arguments.cpp:117 msgid " --no-show-fps Do not display framerate in levels" msgstr " --no-show-fps Non amosa os fotogramas por segundo nos niveis" -#: src/supertux/command_line_arguments.cpp:99 +#: src/supertux/command_line_arguments.cpp:118 msgid " --show-pos Display player's current position" msgstr " --show-pos Amosar a posición actual do xogador" -#: src/supertux/command_line_arguments.cpp:100 +#: src/supertux/command_line_arguments.cpp:119 msgid " --no-show-pos Do not display player's position" msgstr " --no-show-pos Non amosar a posición do xogador" -#: src/supertux/command_line_arguments.cpp:101 +#: src/supertux/command_line_arguments.cpp:120 msgid " --developer Switch on developer feature" msgstr " --developer Acende a función programador" -#: src/supertux/command_line_arguments.cpp:102 +#: src/supertux/command_line_arguments.cpp:121 msgid " -s, --debug-scripts Enable script debugger." msgstr " -s, --debug-scripts Activa o depurador de scripts." -#: src/supertux/command_line_arguments.cpp:103 +#: src/supertux/command_line_arguments.cpp:122 msgid "" " --spawn-pos X,Y Where in the level to spawn Tux. Only used if" " level is specified." msgstr " --spawn-pos X,Y Onde soltar a Tux no nivel. Só se utiliza de especificarse o nivel." -#: src/supertux/command_line_arguments.cpp:104 +#: src/supertux/command_line_arguments.cpp:123 msgid " --sector SECTOR Spawn Tux in SECTOR\n" msgstr " --sector SECTOR Soltar a Tux no SECTOR\n" -#: src/supertux/command_line_arguments.cpp:105 +#: src/supertux/command_line_arguments.cpp:124 msgid " --spawnpoint SPAWNPOINT Spawn Tux at SPAWNPOINT\n" msgstr " --spawnpoint PUNTO DE INICIO Soltar a Tux no PUNTO DE INICIO\n" -#: src/supertux/command_line_arguments.cpp:107 -msgid "Demo Recording Options:" -msgstr "Opcións de Gravación da Demostración:" - -#: src/supertux/command_line_arguments.cpp:108 -msgid " --record-demo FILE LEVEL Record a demo to FILE" -msgstr " --record-demo NIVEL DO FICHEIRO Gravar unha demostración a FICHEIRO" - -#: src/supertux/command_line_arguments.cpp:109 -msgid " --play-demo FILE LEVEL Play a recorded demo" -msgstr " --play-demo FICHEIRO NIVEL Reproducir unha demostración gravada" - -#: src/supertux/command_line_arguments.cpp:111 +#: src/supertux/command_line_arguments.cpp:126 msgid "Directory Options:" msgstr "Opcións do Directorio:" -#: src/supertux/command_line_arguments.cpp:112 +#: src/supertux/command_line_arguments.cpp:127 msgid "" " --datadir DIR Set the directory for the games datafiles" msgstr " --datadir DIRECTORIO Establecer o directorio para os ficheiros de datos dos xogos" -#: src/supertux/command_line_arguments.cpp:113 +#: src/supertux/command_line_arguments.cpp:128 msgid "" " --userdir DIR Set the directory for user data (savegames, " "etc.)" msgstr " --userdir DIRECTORIO Establecer o directorio para os datos de usuario (xogos gardados, etc.)" -#: src/supertux/command_line_arguments.cpp:115 +#: src/supertux/command_line_arguments.cpp:130 msgid "Add-On Options:" msgstr "Opcións dos Complementos:" -#: src/supertux/command_line_arguments.cpp:116 +#: src/supertux/command_line_arguments.cpp:131 msgid " --repository-url URL Set the URL to the Add-On repository" msgstr " --repository-url URL Establecer o URL para o repositorio de Complementos" -#: src/supertux/command_line_arguments.cpp:118 +#: src/supertux/command_line_arguments.cpp:133 msgid "Environment variables:" msgstr "Variables de entorno:" -#: src/supertux/command_line_arguments.cpp:119 +#: src/supertux/command_line_arguments.cpp:134 msgid "" " SUPERTUX2_USER_DIR Directory for user data (savegames, etc.)" msgstr " SUPERTUX2_USER_DIR Directorio para os datos do usuario (xogos gardados, etc.)" -#: src/supertux/command_line_arguments.cpp:120 +#: src/supertux/command_line_arguments.cpp:135 msgid " SUPERTUX2_DATA_DIR Directory for the games datafiles" msgstr " SUPERTUX2_DATA_DIR Directorio para os ficheiros de datos dos xogos" -#: src/supertux/title_screen.cpp:43 +#: src/supertux/title_screen.cpp:272 msgid "Copyright" msgstr "Copyright" -#: src/supertux/title_screen.cpp:44 +#: src/supertux/title_screen.cpp:273 msgid "" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n" "redistribute it under certain conditions; see the license file for details.\n" msgstr "Este xogo vén SEN ABSOLUTAMENTE NINGUNHA GARANTÍA. É software libre e es libre de\nredistribuílo baixo certas condicións; mira o ficheiro de licenza para os detalles.\n" -#: src/supertux/menu/contrib_menu.cpp:79 +#: src/supertux/game_object.cpp:114 +msgid "Version" +msgstr "Versión" + +#: src/supertux/game_object.cpp:129 +#: src/supertux/menu/editor_levelset_menu.cpp:54 +msgid "Type" +msgstr "Tipo" + +#: src/supertux/menu/integrations_menu.cpp:49 +msgid "Integrations" +msgstr "Integracións" + +#: src/supertux/menu/integrations_menu.cpp:51 +msgid "Do not share level names when editing" +msgstr "Non compartir os nomes dos niveis ó editar" + +#: src/supertux/menu/integrations_menu.cpp:52 +msgid "" +"Enable this if you want to work on secret levels and don't want the names to" +" be spoiled" +msgstr "Activa isto se queres traballar en niveis secretos e non queres que se desvelen os nomes." + +#: src/supertux/menu/integrations_menu.cpp:54 +msgid "Enable Discord integration" +msgstr "Activar a integración con Discord" + +#: src/supertux/menu/integrations_menu.cpp:55 +msgid "" +"Sends information to your Discord application about what you're doing in the" +" game." +msgstr "Envía información á túa aplicación de Discord sobre o que estás a facer no xogo." + +#: src/supertux/menu/integrations_menu.cpp:57 +msgid "Discord (disabled; not compiled)" +msgstr "Discord (desactivado; non compilado)" + +#: src/supertux/menu/editor_converters_menu.cpp:61 +#: src/supertux/menu/editor_menu.cpp:85 +msgid "Convert Tiles" +msgstr "Converter Bloques" + +#: src/supertux/menu/editor_converters_menu.cpp:64 +msgid "Select Tile Conversion File" +msgstr "Seleccione Ficheiro de conversión de Bloques" + +#: src/supertux/menu/editor_converters_menu.cpp:72 +#, c++-format +msgid "By: {}" +msgstr "Por: {}" + +#: src/supertux/menu/editor_converters_menu.cpp:75 +msgid "Convert Tiles By File" +msgstr "Converter Bloques por ficheiro" + +#: src/supertux/menu/editor_converters_menu.cpp:76 +msgid "Convert all tiles in the current level by a file, specified above." +msgstr "Converte todos os bloques do nivel actual mediante un ficheiro, especificado anteriormente." + +#: src/supertux/menu/editor_converters_menu.cpp:89 +msgid "No tile conversion file selected." +msgstr "Non se seleccionou ningún ficheiro de conversión de bloque." + +#: src/supertux/menu/editor_converters_menu.cpp:93 +msgid "" +"This will convert all tiles in the level. Proceed?\n" +"\n" +"Note: This should not be ran more than once on a level.\n" +"Creating a separate copy of the level is highly recommended." +msgstr "Isto converterá tódolos bloques do nivel. Queres continuar?\n\nNota: Non se debe executar máis dunha vez nun nivel.\nRecoméndase crear unha copia separada do nivel." + +#: src/supertux/menu/video_system_menu.cpp:36 +msgid "Select Video System" +msgstr "Escolle Sistema de vídeo" + +#: src/supertux/menu/video_system_menu.cpp:37 +#, c++-format +msgid "Used video system: {}" +msgstr "Sistema de vídeo usado: {}" + +#: src/supertux/menu/video_system_menu.cpp:54 +msgid "Restart game for the changes to take effect" +msgstr "Reinicia o xogo para que os cambios teñan efecto" + +#: src/supertux/menu/contrib_menu.cpp:68 #: src/supertux/menu/world_set_menu.cpp:31 msgid "Contrib Levels" msgstr "Niveis dos Colaboradores" +#: src/supertux/menu/contrib_menu.cpp:98 +#: src/supertux/menu/contrib_menu.cpp:112 +msgid "Official Contrib Levels" +msgstr "Niveis oficiais dos colaboradores" + +#: src/supertux/menu/contrib_menu.cpp:99 +#: src/supertux/menu/contrib_menu.cpp:118 +msgid "Community Contrib Levels" +msgstr "Niveis de colaboración comunitaria" + +#: src/supertux/menu/contrib_menu.cpp:100 +#: src/supertux/menu/contrib_menu.cpp:124 +msgid "User Contrib Levels" +msgstr "Niveis de colaboración do usuario" + +#: src/supertux/menu/contrib_menu.cpp:113 +msgid "How is this possible? There are no Official Contrib Levels!" +msgstr "Como é posible? Non hai niveis Oficiais de Contribución!" + #: src/supertux/menu/contrib_menu.cpp:119 -#: src/supertux/menu/contrib_menu.cpp:150 -msgid "*NEW*" -msgstr "*NOVO*" +msgid "No Community Contrib Levels yet. Download them from the Add-ons Menu." +msgstr "Aínda non hai niveis da Comunidade. Descárgaos dende o menú de Complementos." -#: src/supertux/menu/contrib_menu.cpp:172 src/supertux/menu/debug_menu.cpp:75 -#: src/supertux/menu/editor_level_select_menu.cpp:84 -#: src/supertux/menu/worldmap_cheat_menu.cpp:55 -#: src/supertux/menu/worldmap_cheat_menu.cpp:153 -#: src/supertux/menu/editor_levelset_select_menu.cpp:96 -#: src/supertux/menu/options_menu.cpp:405 -#: src/supertux/menu/profile_menu.cpp:47 src/supertux/menu/addon_menu.cpp:213 -#: src/supertux/menu/editor_new_levelset_menu.cpp:40 -#: src/supertux/menu/world_set_menu.cpp:33 -#: src/supertux/menu/keyboard_menu.cpp:51 -#: src/supertux/menu/language_menu.cpp:56 -#: src/supertux/menu/joystick_menu.cpp:97 -#: src/supertux/menu/contrib_levelset_menu.cpp:67 -#: src/supertux/menu/cheat_menu.cpp:44 -msgid "Back" -msgstr "Atrás" +#: src/supertux/menu/contrib_menu.cpp:125 +msgid "No User Contrib Levels yet. Create some with the Level Editor." +msgstr "Aínda non hai niveis de Usuarios. Crea algúns co Editor de Niveis." -#: src/supertux/menu/debug_menu.cpp:32 +#: src/supertux/menu/debug_menu.cpp:34 msgid "Debug" msgstr "Depurar" -#: src/supertux/menu/debug_menu.cpp:56 +#: src/supertux/menu/debug_menu.cpp:58 msgid "Game Speed" msgstr "Velocidade do Xogo" -#: src/supertux/menu/debug_menu.cpp:57 +#: src/supertux/menu/debug_menu.cpp:59 msgid "Adjust Game Speed" msgstr "Axustar a Velocidade do Xogo" -#: src/supertux/menu/debug_menu.cpp:63 +#: src/supertux/menu/debug_menu.cpp:65 msgid "Show Collision Rects" msgstr "Amosar Rectángulos de Colisión" -#: src/supertux/menu/debug_menu.cpp:64 +#: src/supertux/menu/debug_menu.cpp:66 msgid "Show Worldmap Path" msgstr "Amosar Camiño do Mapa Principal" -#: src/supertux/menu/debug_menu.cpp:65 +#: src/supertux/menu/debug_menu.cpp:67 msgid "Show Controller" msgstr "Amosar Controlador" -#: src/supertux/menu/debug_menu.cpp:66 +#: src/supertux/menu/debug_menu.cpp:68 msgid "Show Framerate" msgstr "Amosar Fotogramas por segundo" -#: src/supertux/menu/debug_menu.cpp:67 +#: src/supertux/menu/debug_menu.cpp:69 msgid "Draw Redundant Frames" msgstr "Representar Cadros Redundantes" -#: src/supertux/menu/debug_menu.cpp:68 +#: src/supertux/menu/debug_menu.cpp:70 msgid "Show Player Position" msgstr "Amosar a Posición do Xogador" -#: src/supertux/menu/debug_menu.cpp:69 +#: src/supertux/menu/debug_menu.cpp:71 msgid "Use Bitmap Fonts" msgstr "Utilizar Fontes Bitmap" -#: src/supertux/menu/debug_menu.cpp:72 +#: src/supertux/menu/debug_menu.cpp:74 msgid "Dump Texture Cache" msgstr "Baleirar a Caché da Textura" +#: src/supertux/menu/particle_editor_save_as.cpp:33 +msgid "Save particle as" +msgstr "Gardar partícula coma" + +#: src/supertux/menu/particle_editor_save_as.cpp:37 +#: src/supertux/menu/editor_save_as.cpp:37 +msgid "File name" +msgstr "Nome do ficheiro" + +#: src/supertux/menu/particle_editor_save_as.cpp:38 +#: src/supertux/menu/editor_save_as.cpp:38 src/editor/particle_editor.cpp:767 +msgid "Save" +msgstr "Gardar" + +#: src/supertux/menu/multiplayer_menu.cpp:27 +#: src/supertux/menu/multiplayer_players_menu.cpp:34 +msgid "Multiplayer" +msgstr "Multixogador" + +#: src/supertux/menu/multiplayer_menu.cpp:30 +msgid "Auto-manage Players" +msgstr "Xestionar Automaticamente os Xogadores" + +#: src/supertux/menu/multiplayer_menu.cpp:31 +msgid "" +"Automatically add and remove players when controllers are plugged or " +"unplugged" +msgstr "Engade e elimina xogadores automaticamente cando se conecten ou desconecten os mandos." + +#: src/supertux/menu/multiplayer_menu.cpp:33 +msgid "Allow Multibind" +msgstr "Permitir Multivinculación" + +#: src/supertux/menu/multiplayer_menu.cpp:34 +msgid "Allow binding multiple joysticks to a single player" +msgstr "Permite vincular varios joysticks a un único xogador." + +#: src/supertux/menu/multiplayer_menu.cpp:36 +msgid "Manage Players" +msgstr "Xestionar Xogadores" + #: src/supertux/menu/editor_sectors_menu.cpp:31 msgid "Choose Sector" msgstr "Escoller Sector" @@ -1440,45 +2709,98 @@ msgstr "Crear Sector" msgid "Delete Sector" msgstr "Eliminar Sector" -#: src/supertux/menu/editor_sectors_menu.cpp:93 +#: src/supertux/menu/editor_sectors_menu.cpp:92 msgid "Each level must have at least one sector." msgstr "Cada nivel debe ter polo menos un sector." -#: src/supertux/menu/editor_sectors_menu.cpp:98 +#: src/supertux/menu/editor_sectors_menu.cpp:97 msgid "Do you really want to delete this sector?" msgstr "Realmente queres eliminar este sector?" -#: src/supertux/menu/editor_sectors_menu.cpp:101 +#: src/supertux/menu/editor_sectors_menu.cpp:100 msgid "Delete sector" msgstr "Eliminar sector" -#: src/supertux/menu/editor_objectgroup_menu.cpp:30 -#: src/editor/toolbox_widget.cpp:93 -msgid "Objects" -msgstr "Obxectos" +#: src/supertux/menu/custom_menu_menu.cpp:49 +#: src/supertux/menu/options_menu.cpp:191 +msgid "Menu Customization" +msgstr "Personalización do menú" + +#: src/supertux/menu/custom_menu_menu.cpp:51 +msgid "Menu Back Color" +msgstr "Cor de fondo do menú" -#: src/supertux/menu/editor_level_select_menu.cpp:58 +#: src/supertux/menu/custom_menu_menu.cpp:52 +msgid "Menu Front Color" +msgstr "Cor frontal do Menú" + +#: src/supertux/menu/custom_menu_menu.cpp:53 +msgid "Menu Help Back Color" +msgstr "Cor de Fondo do Menú de Axuda " + +#: src/supertux/menu/custom_menu_menu.cpp:54 +msgid "Menu Help Front Color" +msgstr "Cor frontal do Menú de Axuda" + +#: src/supertux/menu/custom_menu_menu.cpp:55 +msgid "Label Text Color" +msgstr "Cor do texto da etiqueta" + +#: src/supertux/menu/custom_menu_menu.cpp:56 +msgid "Active Text Color" +msgstr "Cor activa do texto" + +#: src/supertux/menu/custom_menu_menu.cpp:57 +msgid "Divider Line Color" +msgstr "Cor da liña divisoria" + +#: src/supertux/menu/custom_menu_menu.cpp:58 +msgid "Menu Roundness" +msgstr "Redondez do menú" + +#: src/supertux/menu/custom_menu_menu.cpp:60 +msgid "Editor Interface Color" +msgstr "Cor da interface do editor" + +#: src/supertux/menu/custom_menu_menu.cpp:61 +msgid "Editor Hover Color" +msgstr "Editor de cor do cursor" + +#: src/supertux/menu/custom_menu_menu.cpp:62 +msgid "Editor Grab Color" +msgstr "Cor de Capturar no editor" + +#: src/supertux/menu/custom_menu_menu.cpp:64 +msgid "Reset to defaults" +msgstr "Restablecer os valores predeterminados" + +#: src/supertux/menu/editor_level_select_menu.cpp:72 msgid "Empty World" msgstr "Mundo Baleiro" -#: src/supertux/menu/editor_level_select_menu.cpp:73 +#: src/supertux/menu/editor_level_select_menu.cpp:87 msgid "Create Level" msgstr "Crear Nivel" -#: src/supertux/menu/editor_level_select_menu.cpp:77 +#: src/supertux/menu/editor_level_select_menu.cpp:91 msgid "Edit Worldmap" msgstr "Editar Mapa Principal" -#: src/supertux/menu/editor_level_select_menu.cpp:79 +#: src/supertux/menu/editor_level_select_menu.cpp:93 msgid "Create Worldmap" msgstr "Crear Mapa Principal" -#: src/supertux/menu/editor_level_select_menu.cpp:83 -#: src/supertux/menu/editor_levelset_menu.cpp:56 +#: src/supertux/menu/editor_level_select_menu.cpp:95 +#: src/supertux/menu/editor_delete_level_menu.cpp:55 +msgid "Delete level" +msgstr "Eliminar nivel" + +#: src/supertux/menu/editor_level_select_menu.cpp:97 +#: src/supertux/menu/editor_levelset_menu.cpp:50 msgid "World Settings" msgstr "Configuración do Mundo" -#: src/supertux/menu/editor_level_select_menu.cpp:123 +#: src/supertux/menu/editor_level_select_menu.cpp:141 msgid "" "Share this worldmap under license CC-BY-SA 4.0 International (advised).\n" "It allows modifications and redistribution by third-parties.\n" @@ -1486,7 +2808,7 @@ msgid "" "DISCLAIMER: The SuperTux authors take no responsibility for your choice of license." msgstr "Compartir este mapa principal baixo a licenza CC-BY-SA 4.0 Internacional (aconsellado).\nPermite modificacións e a súa redistribución por terceiras partes.\nSe non estás de acordo con esta licenza, cámbiaa nas propiedades do mapa principal.\nADVERTENCIA: Os autores de SuperTux non adquires ningunha responsabilidade pola túa escolla de licenza." -#: src/supertux/menu/editor_level_select_menu.cpp:130 +#: src/supertux/menu/editor_level_select_menu.cpp:148 msgid "" "Share this level under license CC-BY-SA 4.0 International (advised).\n" "It allows modifications and redistribution by third-parties.\n" @@ -1494,402 +2816,815 @@ msgid "" "DISCLAIMER: The SuperTux authors take no responsibility for your choice of license." msgstr "Compartir este nivel baixo a licenza CC-BY-SA 4.0 Internacional (aconsellado).\nPermite modificacións e a súa redistribución por terceiras partes.\nSe non estás de acordo con esta licenza, cámbiaa nas propiedades do nivel.\nADVERTENCIA: Os autores de SuperTux non adquires ningunha responsabilidade pola túa escolla de licenza." -#: src/supertux/menu/worldmap_cheat_menu.cpp:34 -#: src/supertux/menu/cheat_menu.cpp:30 +#: src/supertux/menu/editor_level_select_menu.cpp:179 +msgid "" +"An auto-save recovery file was found. Would you like to restore the recovery\n" +"file and resume where you were before the editor crashed?" +msgstr "Atopouse un ficheiro de recuperación creado automaticamente. Queres restablecer o ficheiro\nde recuperación e continuar onde estabas antes de que o editor se estragase?" + +#: src/supertux/menu/editor_level_select_menu.cpp:186 +msgid "This will delete the auto-save file. Are you sure?" +msgstr "Isto eliminará o ficheiro gardado automaticamente. Continuar?" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:35 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:52 +#: src/supertux/menu/cheat_apply_menu.cpp:33 +#: src/supertux/menu/cheat_apply_menu.cpp:51 +msgid "Apply cheat to player" +msgstr "Aplicar trucos ao xogador" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:39 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:60 +#: src/supertux/menu/multiplayer_players_menu.cpp:39 +#: src/supertux/menu/keyboard_menu.cpp:63 +#: src/supertux/menu/cheat_apply_menu.cpp:39 +#: src/supertux/menu/cheat_apply_menu.cpp:59 +#: src/supertux/menu/multiplayer_player_menu.cpp:37 +#, c++-format +msgid "Player {}" +msgstr "Xogador {}" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:57 +#: src/supertux/menu/cheat_apply_menu.cpp:36 +#: src/supertux/menu/cheat_apply_menu.cpp:56 +msgid "All Players" +msgstr "Tódolos xogadores" + +#: src/supertux/menu/worldmap_cheat_menu.cpp:36 +#: src/supertux/menu/cheat_menu.cpp:31 msgid "Cheats" msgstr "Trampas" -#: src/supertux/menu/worldmap_cheat_menu.cpp:36 -#: src/supertux/menu/cheat_menu.cpp:32 +#: src/supertux/menu/worldmap_cheat_menu.cpp:38 +#: src/supertux/menu/cheat_menu.cpp:33 msgid "Bonus: Grow" msgstr "Bono: Medrar" -#: src/supertux/menu/worldmap_cheat_menu.cpp:37 -#: src/supertux/menu/cheat_menu.cpp:33 +#: src/supertux/menu/worldmap_cheat_menu.cpp:39 +#: src/supertux/menu/cheat_menu.cpp:34 msgid "Bonus: Fire" msgstr "Bono: Lume" -#: src/supertux/menu/worldmap_cheat_menu.cpp:38 -#: src/supertux/menu/cheat_menu.cpp:34 +#: src/supertux/menu/worldmap_cheat_menu.cpp:40 +#: src/supertux/menu/cheat_menu.cpp:35 msgid "Bonus: Ice" msgstr "Bono: Xeo" -#: src/supertux/menu/worldmap_cheat_menu.cpp:39 -#: src/supertux/menu/cheat_menu.cpp:35 +#: src/supertux/menu/worldmap_cheat_menu.cpp:41 +#: src/supertux/menu/cheat_menu.cpp:36 msgid "Bonus: Air" msgstr "Bono: Aire" -#: src/supertux/menu/worldmap_cheat_menu.cpp:40 -#: src/supertux/menu/cheat_menu.cpp:36 +#: src/supertux/menu/worldmap_cheat_menu.cpp:42 +#: src/supertux/menu/cheat_menu.cpp:37 msgid "Bonus: Earth" msgstr "Bono: Terra" -#: src/supertux/menu/worldmap_cheat_menu.cpp:41 +#: src/supertux/menu/worldmap_cheat_menu.cpp:43 msgid "Bonus: None" msgstr "Bono: Ningún" -#: src/supertux/menu/worldmap_cheat_menu.cpp:44 -#: src/supertux/menu/cheat_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_menu.cpp:46 +#: src/supertux/menu/cheat_menu.cpp:45 src/supertux/menu/cheat_menu.cpp:51 msgid "Leave Ghost Mode" msgstr "Deixar o Modo Pantasma" -#: src/supertux/menu/worldmap_cheat_menu.cpp:44 -#: src/supertux/menu/cheat_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_menu.cpp:46 +#: src/supertux/menu/cheat_menu.cpp:45 src/supertux/menu/cheat_menu.cpp:50 msgid "Activate Ghost Mode" msgstr "Activar o Modo Pantasma" -#: src/supertux/menu/worldmap_cheat_menu.cpp:46 -#: src/supertux/menu/cheat_menu.cpp:40 +#: src/supertux/menu/worldmap_cheat_menu.cpp:48 +#: src/supertux/menu/cheat_menu.cpp:41 msgid "Finish Level" msgstr "Rematar Nivel" -#: src/supertux/menu/worldmap_cheat_menu.cpp:47 +#: src/supertux/menu/worldmap_cheat_menu.cpp:49 msgid "Reset Level" msgstr "Restablecer Nivel" -#: src/supertux/menu/worldmap_cheat_menu.cpp:49 +#: src/supertux/menu/worldmap_cheat_menu.cpp:51 msgid "Finish Worldmap" msgstr "Rematar Mapa Principal" -#: src/supertux/menu/worldmap_cheat_menu.cpp:50 +#: src/supertux/menu/worldmap_cheat_menu.cpp:52 msgid "Reset Worldmap" msgstr "Restablecer Mapa Principal" -#: src/supertux/menu/worldmap_cheat_menu.cpp:52 +#: src/supertux/menu/worldmap_cheat_menu.cpp:54 msgid "Go to level" msgstr "Ir ó nivel" -#: src/supertux/menu/worldmap_cheat_menu.cpp:53 +#: src/supertux/menu/worldmap_cheat_menu.cpp:55 msgid "Go to main spawnpoint" msgstr "Ir ó punto de inicio principal" -#: src/supertux/menu/worldmap_cheat_menu.cpp:145 +#: src/supertux/menu/worldmap_cheat_menu.cpp:188 msgid "Select level" msgstr "Seleccionar nivel" -#: src/supertux/menu/editor_levelset_select_menu.cpp:54 +#: src/supertux/menu/editor_save_as.cpp:33 +#: src/supertux/menu/editor_menu.cpp:63 +msgid "Save Level as" +msgstr "Gardar Nivel como" + +#: src/supertux/menu/editor_save_as.cpp:33 +#: src/supertux/menu/editor_menu.cpp:64 +msgid "Save Copy" +msgstr "Gardar Copia" + +#: src/supertux/menu/editor_levelset_select_menu.cpp:71 msgid "Choose World" msgstr "Escoller Mundo" -#: src/supertux/menu/editor_levelset_select_menu.cpp:82 -#, c-format -msgid "%d level" -msgid_plural "%d levels" -msgstr[0] "%d nivel" -msgstr[1] "%d niveis" +#: src/supertux/menu/editor_levelset_select_menu.cpp:99 +#, c++-format +msgid "{} level" +msgid_plural "{} levels" +msgstr[0] "{} nivel" +msgstr[1] "{} niveis" -#: src/supertux/menu/editor_levelset_select_menu.cpp:95 +#: src/supertux/menu/editor_levelset_select_menu.cpp:112 msgid "Create World" msgstr "Crear Mundo" -#: src/supertux/menu/options_menu.cpp:85 src/supertux/menu/main_menu.cpp:53 -#: src/supertux/menu/game_menu.cpp:61 src/supertux/menu/worldmap_menu.cpp:31 -msgid "Options" -msgstr "Opcións" +#: src/supertux/menu/editor_levelset_select_menu.cpp:113 +#: src/supertux/menu/editor_delete_levelset_menu.cpp:41 +msgid "Delete World" +msgstr "Eliminar Mundo" -#: src/supertux/menu/options_menu.cpp:91 -#: src/supertux/menu/options_menu.cpp:127 -#: src/supertux/menu/options_menu.cpp:418 -#: src/supertux/menu/options_menu.cpp:439 src/editor/object_settings.cpp:112 -msgid "auto" -msgstr "auto" +#: src/supertux/menu/options_menu.cpp:72 +#: src/supertux/menu/options_select_menu.cpp:35 +msgid "Locale" +msgstr "Locale" -#: src/supertux/menu/options_menu.cpp:206 -msgid "Desktop" -msgstr "Escritorio" - -#: src/supertux/menu/options_menu.cpp:332 +#: src/supertux/menu/options_menu.cpp:76 msgid "Select Language" msgstr "Seleccionar Idioma" -#: src/supertux/menu/options_menu.cpp:333 +#: src/supertux/menu/options_menu.cpp:77 msgid "Select a different language to display text in" msgstr "Selecciona un idioma diferente no que amosar o texto" -#: src/supertux/menu/options_menu.cpp:335 +#: src/supertux/menu/options_menu.cpp:79 msgid "Language Packs" msgstr "Paquetes de Idioma" -#: src/supertux/menu/options_menu.cpp:336 +#: src/supertux/menu/options_menu.cpp:80 msgid "Language packs contain up-to-date translations" msgstr "Os paquetes de idioma conteñen traducións actualizadas" -#: src/supertux/menu/options_menu.cpp:338 -#: src/supertux/menu/profile_menu.cpp:30 -msgid "Select Profile" -msgstr "Seleccionar Perfil" - -#: src/supertux/menu/options_menu.cpp:339 -msgid "Select a profile to play with" -msgstr "Selecciona un perfil co que xogar" +#: src/supertux/menu/options_menu.cpp:88 +#: src/supertux/menu/options_select_menu.cpp:37 +msgid "Video" +msgstr "Vídeo" -#: src/supertux/menu/options_menu.cpp:342 +#: src/supertux/menu/options_menu.cpp:91 msgid "Window Resizable" msgstr "Xanela de tamaño axustable" -#: src/supertux/menu/options_menu.cpp:343 +#: src/supertux/menu/options_menu.cpp:92 msgid "Allow window resizing, might require a restart to take effect" msgstr "Permitir o cambio de tamaño da xanela, pode precisar un reinicio para que tome efecto" -#: src/supertux/menu/options_menu.cpp:345 -msgid "Window Resolution" -msgstr "Resolución da Xanela" - -#: src/supertux/menu/options_menu.cpp:346 -msgid "Resize the window to the given size" -msgstr "Cambiar o tamaño da xanela ó tamaño indicado" - -#: src/supertux/menu/options_menu.cpp:348 +#: src/supertux/menu/options_menu.cpp:96 msgid "Fullscreen" msgstr "Pantalla completa" -#: src/supertux/menu/options_menu.cpp:349 +#: src/supertux/menu/options_menu.cpp:97 msgid "Fill the entire screen" msgstr "Enche a pantalla completa" -#: src/supertux/menu/options_menu.cpp:351 -msgid "Fullscreen Resolution" -msgstr "Resolución de Pantalla Completa" - -#: src/supertux/menu/options_menu.cpp:352 -msgid "" -"Determine the resolution used in fullscreen mode (you must toggle fullscreen" -" to complete the change)" -msgstr "Determina a resolución utilizada no modo pantalla completa (debes activar a pantalla completa para completar o cambio)" - -#: src/supertux/menu/options_menu.cpp:354 -msgid "Magnification" -msgstr "Aumento" +#: src/supertux/menu/options_menu.cpp:104 +msgid "Fit to browser" +msgstr "Axustar ó navegador" -#: src/supertux/menu/options_menu.cpp:355 -msgid "Change the magnification of the game area" -msgstr "Cambiar o aumento da área do xogo" +#: src/supertux/menu/options_menu.cpp:105 +msgid "Fit the resolution to the size of your browser" +msgstr "Axustar a resolución ó tamaño do navegador" -#: src/supertux/menu/options_menu.cpp:357 -msgid "VSync" -msgstr "VSync" +#: src/supertux/menu/options_menu.cpp:116 +msgid "Change Video System" +msgstr "Cambiar o Sistema de Vídeo" -#: src/supertux/menu/options_menu.cpp:358 -msgid "Set the VSync mode" -msgstr "Establecer o modo VSync " - -#: src/supertux/menu/options_menu.cpp:360 -msgid "Aspect Ratio" -msgstr "Relación de Aspecto" +#: src/supertux/menu/options_menu.cpp:117 +msgid "Change video system used to render graphics" +msgstr "Cambiar o sistema de vídeo empregado para renderizar gráficos." -#: src/supertux/menu/options_menu.cpp:361 -msgid "Adjust the aspect ratio" -msgstr "Axustar a relación de aspecto" +#: src/supertux/menu/options_menu.cpp:124 +#: src/supertux/menu/options_select_menu.cpp:38 +msgid "Audio" +msgstr "Audio" -#: src/supertux/menu/options_menu.cpp:366 +#: src/supertux/menu/options_menu.cpp:129 msgid "Disable all sound effects" msgstr "Desactivar tódolos efectos de sonido" -#: src/supertux/menu/options_menu.cpp:368 +#: src/supertux/menu/options_menu.cpp:131 msgid "Disable all music" msgstr "Desactivar toda a música" -#: src/supertux/menu/options_menu.cpp:370 -msgid "Sound Volume" -msgstr "Volume do Son" - -#: src/supertux/menu/options_menu.cpp:371 -msgid "Adjust sound volume" -msgstr "Axustar o volume do son" - -#: src/supertux/menu/options_menu.cpp:373 -msgid "Music Volume" -msgstr "Volume da Música" - -#: src/supertux/menu/options_menu.cpp:374 -msgid "Adjust music volume" -msgstr "Axustar o volume da música" - -#: src/supertux/menu/options_menu.cpp:378 +#: src/supertux/menu/options_menu.cpp:138 msgid "Sound (disabled)" msgstr "Son (desactivado)" -#: src/supertux/menu/options_menu.cpp:379 +#: src/supertux/menu/options_menu.cpp:139 msgid "Music (disabled)" msgstr "Música (desactivada)" -#: src/supertux/menu/options_menu.cpp:382 -#: src/supertux/menu/keyboard_menu.cpp:30 +#: src/supertux/menu/options_menu.cpp:147 +#: src/supertux/menu/options_select_menu.cpp:39 +msgid "Controls" +msgstr "Controis" + +#: src/supertux/menu/options_menu.cpp:151 +msgid "Enable Rumbling Controllers" +msgstr "Activar mandos con vibración" + +#: src/supertux/menu/options_menu.cpp:152 +msgid "Enable vibrating the game controllers." +msgstr "Activa a vibración dos mandos do xogo." + +#: src/supertux/menu/options_menu.cpp:152 +msgid "This feature is currently only used in the multiplayer options menu." +msgstr "Esta característica só se utiliza actualmente no menú de opcións multixogador." + +#: src/supertux/menu/options_menu.cpp:154 +#: src/supertux/menu/keyboard_menu.cpp:34 msgid "Setup Keyboard" msgstr "Configurar Teclado" -#: src/supertux/menu/options_menu.cpp:383 +#: src/supertux/menu/options_menu.cpp:155 msgid "Configure key-action mappings" msgstr "Configurar a asignación de teclas de acción" -#: src/supertux/menu/options_menu.cpp:385 -#: src/supertux/menu/joystick_menu.cpp:52 +#: src/supertux/menu/options_menu.cpp:158 +#: src/supertux/menu/joystick_menu.cpp:54 msgid "Setup Joystick" msgstr "Configurar Joystick" -#: src/supertux/menu/options_menu.cpp:386 +#: src/supertux/menu/options_menu.cpp:159 msgid "Configure joystick control-action mappings" msgstr "Configurar a asignación do control de acción do joystick" -#: src/supertux/menu/options_menu.cpp:388 +#: src/supertux/menu/options_menu.cpp:167 +#: src/supertux/menu/options_select_menu.cpp:40 +msgid "Extras" +msgstr "Extras" + +#: src/supertux/menu/options_menu.cpp:170 +#: src/supertux/menu/profile_menu.cpp:56 +msgid "Select Profile" +msgstr "Seleccionar Perfil" + +#: src/supertux/menu/options_menu.cpp:171 +msgid "Select a profile to play with" +msgstr "Selecciona un perfil co que xogar" + +#: src/supertux/menu/options_menu.cpp:174 +msgid "Multiplayer settings" +msgstr "Configuración multixogador" + +#: src/supertux/menu/options_menu.cpp:175 +msgid "Configure settings specific to multiplayer" +msgstr "Configura axustes específicos para o multixogador" + +#: src/supertux/menu/options_menu.cpp:178 msgid "Enable transitions" msgstr "Activar transicións" -#: src/supertux/menu/options_menu.cpp:389 +#: src/supertux/menu/options_menu.cpp:179 msgid "Enable screen transitions and smooth menu animation" msgstr "Permitir transicións de pantalla e animación suave do menú" -#: src/supertux/menu/options_menu.cpp:393 -msgid "Developer Mode" -msgstr "Modo Programador" +#: src/supertux/menu/options_menu.cpp:181 +msgid "Custom title screen levels" +msgstr "Niveis de pantalla de título personalizados" + +#: src/supertux/menu/options_menu.cpp:182 +msgid "Allow overriding the title screen level, when loading certain worlds" +msgstr "Permitir substituír o nivel da pantalla de título ao cargar certos mundos." -#: src/supertux/menu/options_menu.cpp:398 +#: src/supertux/menu/options_menu.cpp:185 msgid "Christmas Mode" msgstr "Modo Nadal" -#: src/supertux/menu/options_menu.cpp:401 +#: src/supertux/menu/options_menu.cpp:187 +msgid "Integrations and presence" +msgstr "Integracións e presencia" + +#: src/supertux/menu/options_menu.cpp:188 +msgid "" +"Manage whether SuperTux should display the levels you play on your social " +"media profiles (Discord)" +msgstr "Xestiona se SuperTux debe amosar os niveis ós que xogas nos perfís das redes sociais (Discord)" + +#: src/supertux/menu/options_menu.cpp:192 +msgid "Customize the appearance of the menus" +msgstr "Personaliza a aparencia dos menús" + +#: src/supertux/menu/options_menu.cpp:199 +#: src/supertux/menu/options_select_menu.cpp:41 +msgid "Advanced" +msgstr "Avanzado" + +#: src/supertux/menu/options_menu.cpp:204 +msgid "Developer Mode" +msgstr "Modo Programador" + +#: src/supertux/menu/options_menu.cpp:206 msgid "Confirmation Dialog" msgstr "Diálogo de Confirmación" -#: src/supertux/menu/options_menu.cpp:401 +#: src/supertux/menu/options_menu.cpp:206 msgid "Confirm aborting level" msgstr "Confirma se queres cancelar o nivel" -#: src/supertux/menu/options_menu.cpp:402 +#: src/supertux/menu/options_menu.cpp:208 msgid "Pause on focus loss" msgstr "Pausa ó perder o foco" +#: src/supertux/menu/options_menu.cpp:209 +msgid "Automatically pause the game when the window loses focus" +msgstr "Poñer en pausa o xogo automaticamente cando cambie a xanela " + +#: src/supertux/menu/options_menu.cpp:211 +msgid "Use custom mouse cursor" +msgstr "Utilizar un cursor do rato personalizado" + +#: src/supertux/menu/options_menu.cpp:211 +msgid "Whether the game renders its own cursor or uses the system's cursor" +msgstr "Se o xogo representa o seu propio cursor ou utiliza o cursor do sistema" + +#: src/supertux/menu/options_menu.cpp:214 +msgid "Check for new releases" +msgstr "Consulta novas versións" + +#: src/supertux/menu/options_menu.cpp:215 +msgid "" +"Allows the game to perform checks for new SuperTux releases on startup and " +"notify if any found." +msgstr "Permite ao xogo realizar comprobacións de novas versións de SuperTux ao iniciarse e notificar se se atopan algunhas." + +#: src/supertux/menu/options_menu.cpp:245 +#: src/supertux/menu/options_menu.cpp:288 src/supertux/direction.cpp:76 +msgid "auto" +msgstr "auto" + +#: src/supertux/menu/options_menu.cpp:281 +msgid "Magnification" +msgstr "Aumento" + +#: src/supertux/menu/options_menu.cpp:282 +msgid "Change the magnification of the game area" +msgstr "Cambiar o aumento da área do xogo" + +#: src/supertux/menu/options_menu.cpp:318 +msgid "Aspect Ratio" +msgstr "Relación de Aspecto" + +#: src/supertux/menu/options_menu.cpp:319 +msgid "Adjust the aspect ratio" +msgstr "Axustar a relación de aspecto" + +#: src/supertux/menu/options_menu.cpp:346 +msgid "Window Resolution" +msgstr "Resolución da Xanela" + +#: src/supertux/menu/options_menu.cpp:347 +msgid "Resize the window to the given size" +msgstr "Cambiar o tamaño da xanela ó tamaño indicado" + +#: src/supertux/menu/options_menu.cpp:377 +msgid "Desktop" +msgstr "Escritorio" + +#: src/supertux/menu/options_menu.cpp:404 +msgid "Fullscreen Resolution" +msgstr "Resolución de Pantalla Completa" + +#: src/supertux/menu/options_menu.cpp:405 +msgid "" +"Determine the resolution used in fullscreen mode (you must toggle fullscreen" +" to complete the change)" +msgstr "Determina a resolución utilizada no modo pantalla completa (debes activar a pantalla completa para completar o cambio)" + +#: src/supertux/menu/options_menu.cpp:411 +msgid "on" +msgstr "aceso" + +#: src/supertux/menu/options_menu.cpp:412 +msgid "off" +msgstr "apagado" + +#: src/supertux/menu/options_menu.cpp:413 +msgid "adaptive" +msgstr "adaptativo" + +#: src/supertux/menu/options_menu.cpp:431 +msgid "VSync" +msgstr "VSync" + +#: src/supertux/menu/options_menu.cpp:432 +msgid "Set the VSync mode" +msgstr "Establecer o modo VSync " + +#: src/supertux/menu/options_menu.cpp:467 +msgid "Sound Volume" +msgstr "Volume do Son" + +#: src/supertux/menu/options_menu.cpp:468 +msgid "Adjust sound volume" +msgstr "Axustar o volume do son" + +#: src/supertux/menu/options_menu.cpp:503 +msgid "Music Volume" +msgstr "Volume da Música" + +#: src/supertux/menu/options_menu.cpp:504 +msgid "Adjust music volume" +msgstr "Axustar o volume da música" + +#: src/supertux/menu/options_menu.cpp:517 +msgid "On-screen controls scale" +msgstr "Escala de controis en pantalla" + +#: src/supertux/menu/options_menu.cpp:638 +msgid "" +"The game couldn't detect your browser resolution.\n" +"This most likely happens because it is not embedded\n" +"in the SuperTux custom HTML template.\n" +msgstr "O xogo non puido detectar a resolución do teu navegador.\nIsto acontece frecuentemente porque non está integrado\nno modelo HTML personalizado de SuperTux.\n" + +#: src/supertux/menu/editor_delete_levelset_menu.cpp:80 +msgid "You cannot delete the world that you are editing" +msgstr "Non podes eliminar o mundo que estás editando" + +#: src/supertux/menu/editor_delete_levelset_menu.cpp:83 +#, c++-format +msgid "You are about to delete world \"{}\". Are you sure?" +msgstr "Estás a piques de eliminar o mundo \"{}\". Estás certo?" + +#: src/supertux/menu/addon_preview_menu.cpp:82 +#, c++-format +msgid "{} \"{}\"" +msgstr "{} \"{}\"" + +#: src/supertux/menu/addon_preview_menu.cpp:87 +msgid "Some information about this add-on is not available." +msgstr "Algunha información sobre este complemento non está dispoñible." + +#: src/supertux/menu/addon_preview_menu.cpp:88 +msgid "Perform a \"Check Online\" to try retrieving it." +msgstr "Realiza un \"Comprobar en liña\" para tentar recuperalo." + +#: src/supertux/menu/addon_preview_menu.cpp:92 +msgid "No author specified." +msgstr "Non se especifica ningún autor." + +#: src/supertux/menu/addon_preview_menu.cpp:92 +#, c++-format +msgid "Author: {}" +msgstr "Autor: {}" + +#: src/supertux/menu/addon_preview_menu.cpp:93 +#, c++-format +msgid "Type: {}" +msgstr "Tipo: {}" + +#: src/supertux/menu/addon_preview_menu.cpp:94 +msgid "No license specified." +msgstr "Non se especifica ningunha licenza." + +#: src/supertux/menu/addon_preview_menu.cpp:94 +#, c++-format +msgid "License: {}" +msgstr "Licenza: {}" + +#: src/supertux/menu/addon_preview_menu.cpp:99 +msgid "Dependencies:" +msgstr "Dependencias:" + +#: src/supertux/menu/addon_preview_menu.cpp:108 +msgid "Installed" +msgstr "Instalado" + +#: src/supertux/menu/addon_preview_menu.cpp:108 +msgid "Not installed" +msgstr "Non instalado" + +#: src/supertux/menu/addon_preview_menu.cpp:113 +msgid "Not available!" +msgstr "Non dispoñible!" + +#: src/supertux/menu/addon_preview_menu.cpp:120 +msgid "Description:" +msgstr "Descrición:" + +#: src/supertux/menu/addon_preview_menu.cpp:123 +msgid "No description available." +msgstr "Non hai descrición dispoñible." + +#: src/supertux/menu/addon_preview_menu.cpp:147 +msgid "Failed to load all available screenshot previews." +msgstr "Produciuse un erro ao cargar todas as vistas previas das capturas de pantalla dispoñibles." + +#: src/supertux/menu/addon_preview_menu.cpp:152 +msgid "Show screenshots" +msgstr "Mostrar capturas de pantalla" + +#: src/supertux/menu/addon_preview_menu.cpp:165 +msgid "Screenshot previews are disabled for automatic installs." +msgstr "As vistas previas das capturas de pantalla están desactivadas para as instalacións automáticas." + +#: src/supertux/menu/addon_preview_menu.cpp:169 +msgid "No screenshot previews available." +msgstr "Non hai vistas previas de capturas de pantalla dispoñibles." + +#: src/supertux/menu/addon_preview_menu.cpp:177 +msgid "Install" +msgstr "Instalar" + +#: src/supertux/menu/addon_preview_menu.cpp:190 +msgid "Uninstall" +msgstr "Desinstalar" + +#: src/supertux/menu/addon_preview_menu.cpp:214 +#, c++-format +msgid "Are you sure you want to uninstall \"{}\"?" +msgstr "Estás seguro de que queres desinstalar \"{}\"?" + +#: src/supertux/menu/addon_preview_menu.cpp:215 +msgid "" +"\n" +"Your progress won't be lost." +msgstr "\nO teu progreso non se perderá." + +#: src/supertux/menu/addon_preview_menu.cpp:227 +#, c++-format +msgid "" +"NOTE: The add-on \"{}\" is a dependency of {} other installed {}.\n" +"Are you sure you wish to uninstall?" +msgstr "NOTA: O complemento \"{}\" é unha dependencia de {} outros complementos instalados{}.\nEstás certo de que desexas desinstalar?" + +#: src/supertux/menu/addon_preview_menu.cpp:246 +#, c++-format +msgid "" +"Cannot toggle add-on \"{}\":\n" +"{}" +msgstr "Non se pode alternar o complemento \"{}\":\n{}" + +#: src/supertux/menu/addon_preview_menu.cpp:279 +msgid "Fetching screenshot previews..." +msgstr "Obtendo vistas previas das capturas de pantalla..." + +#: src/supertux/menu/addon_preview_menu.cpp:300 +msgid "Updating" +msgstr "Actualizando" + +#: src/supertux/menu/addon_preview_menu.cpp:300 +msgid "Downloading" +msgstr "Descargando" + +#: src/supertux/menu/addon_preview_menu.cpp:328 +msgid "Add-on uninstalled successfully." +msgstr "O complemento desinstalouse correctamente." + +#: src/supertux/menu/addon_preview_menu.cpp:333 +#, c++-format +msgid "" +"Error uninstalling add-on:\n" +"{}" +msgstr "Produciuse un erro ao desinstalar o complemento:\n{}" + +#: src/supertux/menu/addon_preview_menu.cpp:361 +msgid "" +"Please restart SuperTux\n" +"for these changes to take effect." +msgstr "Reinicie SuperTux\npara que estes cambios teñan efecto." + #: src/supertux/menu/main_menu.cpp:51 src/supertux/menu/world_set_menu.cpp:28 msgid "Start Game" msgstr "Comezar Xogo" -#: src/supertux/menu/main_menu.cpp:52 src/supertux/menu/addon_menu.cpp:122 +#: src/supertux/menu/main_menu.cpp:55 msgid "Add-ons" msgstr "Complementos" -#: src/supertux/menu/main_menu.cpp:54 src/supertux/menu/editor_menu.cpp:39 +#: src/supertux/menu/main_menu.cpp:57 src/supertux/menu/web_asset_menu.cpp:38 +msgid "Manage Assets" +msgstr "Xestionar Datos" + +#: src/supertux/menu/main_menu.cpp:59 +#: src/supertux/menu/options_select_menu.cpp:29 +#: src/supertux/menu/game_menu.cpp:58 src/supertux/menu/worldmap_menu.cpp:31 +#: src/supertux/menu/editor_menu.cpp:70 +msgid "Options" +msgstr "Opcións" + +#: src/supertux/menu/main_menu.cpp:60 src/supertux/menu/editor_menu.cpp:58 msgid "Level Editor" msgstr "Editor de Niveis" -#: src/supertux/menu/main_menu.cpp:55 +#: src/supertux/menu/main_menu.cpp:61 msgid "Credits" msgstr "Créditos" -#: src/supertux/menu/main_menu.cpp:56 +#: src/supertux/menu/main_menu.cpp:64 msgid "Donate" msgstr "Doar" -#: src/supertux/menu/main_menu.cpp:57 +#: src/supertux/menu/main_menu.cpp:67 msgid "Quit" msgstr "Saír" -#: src/supertux/menu/editor_sector_menu.cpp:35 +#: src/supertux/menu/main_menu.cpp:106 +msgid "" +"This will take you to the SuperTux donation page. Are you sure you want to " +"continue?" +msgstr "Isto levaráche á páxina de doazóns de SuperTux. Estás seguro de que queres continuar?" + +#: src/supertux/menu/editor_sector_menu.cpp:34 +#, c++-format +msgid "Sector {}" +msgstr "Sector {}" + +#: src/supertux/menu/editor_sector_menu.cpp:37 msgid "Initialization script" msgstr "Script de iniciación" -#: src/supertux/menu/editor_sector_menu.cpp:36 +#: src/supertux/menu/editor_sector_menu.cpp:38 msgid "Gravity" msgstr "Gravidade" -#: src/supertux/menu/editor_sector_menu.cpp:41 +#: src/supertux/menu/editor_sector_menu.cpp:43 msgid "Resize offset X" msgstr "Cambiar tamaño da compensación X" -#: src/supertux/menu/editor_sector_menu.cpp:42 +#: src/supertux/menu/editor_sector_menu.cpp:44 msgid "Resize offset Y" msgstr "Cambiar tamaño da compensación Y" -#: src/supertux/menu/editor_sector_menu.cpp:43 +#: src/supertux/menu/editor_sector_menu.cpp:45 msgid "Resize" msgstr "Cambiar o tamaño" -#: src/supertux/menu/profile_menu.cpp:37 -#, c-format -msgid "[Profile {}]" -msgstr "[Perfil {}]" +#: src/supertux/menu/profile_menu.cpp:60 +msgid "No profiles found." +msgstr "Non se atoparon perfís." -#: src/supertux/menu/profile_menu.cpp:41 -#, c-format +#: src/supertux/menu/profile_menu.cpp:68 +#: src/supertux/menu/profile_menu.cpp:149 +#: src/supertux/menu/profile_menu.cpp:168 +#, c++-format msgid "Profile {}" msgstr "Perfil {}" -#: src/supertux/menu/editor_levelset_menu.cpp:59 +#: src/supertux/menu/profile_menu.cpp:69 +#, c++-format +msgid "{} (Profile {})" +msgstr "{} (Perfil {})" + +#: src/supertux/menu/profile_menu.cpp:84 +msgid "No profile selected." +msgstr "Non se seleccionou ningún perfil." + +#: src/supertux/menu/profile_menu.cpp:91 src/supertux/menu/profile_menu.cpp:93 +#: src/supertux/menu/profile_name_menu.cpp:42 +msgid "Rename" +msgstr "Renomear" + +#: src/supertux/menu/profile_menu.cpp:98 +#: src/supertux/menu/profile_menu.cpp:100 +msgid "Reset" +msgstr "Restablecer" + +#: src/supertux/menu/profile_menu.cpp:103 +#: src/supertux/menu/profile_menu.cpp:105 +msgid "Reset all" +msgstr "Restablecer todo" + +#: src/supertux/menu/profile_menu.cpp:113 +#: src/supertux/menu/profile_menu.cpp:115 +msgid "Delete all" +msgstr "Eliminar todo" + +#: src/supertux/menu/profile_menu.cpp:148 +#, c++-format +msgid "" +"This will reset all game progress on the profile \"{}\".\n" +"Are you sure?" +msgstr "Isto reseteará todo o progreso do xogo no perfil \"{}\".\nEstás seguro/a?" + +#: src/supertux/menu/profile_menu.cpp:157 +msgid "This will reset your game progress on all profiles. Are you sure?" +msgstr "Isto restablecerá o progreso no xogo en tódolos perfís. Estás seguro?" + +#: src/supertux/menu/profile_menu.cpp:167 +#, c++-format +msgid "" +"This will delete the profile \"{}\",\n" +"including all game progress on it. Are you sure?" +msgstr "Isto eliminará o perfil \"{}\", incluíndo todo o progreso do xogo nel. Estás seguro/a?" + +#: src/supertux/menu/profile_menu.cpp:178 +msgid "" +"This will delete all profiles, including all game progress on them.\n" +"Are you sure?" +msgstr "Isto eliminará todos os perfís, incluíndo todo o progreso do xogo neles.\nEstás seguro/a?" + +#: src/supertux/menu/editor_levelset_menu.cpp:53 #: src/supertux/menu/editor_new_levelset_menu.cpp:35 msgid "Description" msgstr "Descrición" -#: src/supertux/menu/editor_levelset_menu.cpp:60 -#: src/supertux/menu/addon_menu.cpp:48 -#: data//images/engine/editor/objects.stoi:332 -msgid "Worldmap" -msgstr "Mapa Principal" +#: src/supertux/menu/editor_levelset_menu.cpp:55 +msgid "Title Screen Level" +msgstr "Nivel de pantalla de título" -#: src/supertux/menu/editor_levelset_menu.cpp:60 -#: src/supertux/menu/addon_menu.cpp:45 -msgid "Levelset" -msgstr "Conxunto de niveis" +#: src/supertux/menu/editor_levelset_menu.cpp:56 +msgid "A level to be used for the title screen, after exiting the world." +msgstr "Un nivel para ser usado para a pantalla de título, despois de saír do mundo." -#: src/supertux/menu/addon_menu.cpp:51 -msgid "World" -msgstr "Mundo" +#: src/supertux/menu/multiplayer_players_menu.cpp:46 +msgid "Add Player" +msgstr "Engadir xogador" -#: src/supertux/menu/addon_menu.cpp:54 -msgid "Add-on" -msgstr "Complemento" +#: src/supertux/menu/multiplayer_players_menu.cpp:59 +msgid "Remove Last Player" +msgstr "Eliminar o último xogador" -#: src/supertux/menu/addon_menu.cpp:60 -msgid "Unknown" -msgstr "Descoñecido" +#: src/supertux/menu/multiplayer_players_menu.cpp:62 +msgid "" +"Warning: The player you are trying to\n" +"remove is currently in-game.\n" +"\n" +"Do you wish to remove them anyways?" +msgstr "Aviso: O xogador que estás a intentar \neliminar está actualmente no xogo.\n\nQueres eliminá-lo de todos xeitos?" -#: src/supertux/menu/addon_menu.cpp:71 -#, c-format -msgid "{} \"{}\" by \"{}\"" -msgstr "{} \"{}\" por \"{}\"" +#: src/supertux/menu/addon_menu.cpp:68 +msgid "Installed Language Packs" +msgstr "Paquetes de idioma instalados" -#: src/supertux/menu/addon_menu.cpp:129 +#: src/supertux/menu/addon_menu.cpp:68 +msgid "Installed Add-ons" +msgstr "Complementos instalados" + +#: src/supertux/menu/addon_menu.cpp:76 src/supertux/menu/addon_menu.cpp:117 +msgid "No language packs installed" +msgstr "Non hai paquetes de idioma instalados" + +#: src/supertux/menu/addon_menu.cpp:76 msgid "No Add-ons installed" msgstr "Non hai Complementos instalados" -#: src/supertux/menu/addon_menu.cpp:133 -msgid "No Add-ons found" -msgstr "Non se atoparon Complementos" +#: src/supertux/menu/addon_menu.cpp:124 +#, c++-format +msgid "{} {}*UPDATE*" +msgstr "{} {}*ACTUALIZACIÓN*" -#: src/supertux/menu/addon_menu.cpp:179 -#, c-format -msgid "Install {} *NEW*" -msgstr "Instalar {} *NOVO*" +#: src/supertux/menu/addon_menu.cpp:130 +#, c++-format +msgid "{}{}" +msgstr "{}{}" -#: src/supertux/menu/addon_menu.cpp:190 -#, c-format -msgid "Install {}" -msgstr "Instalar {}" +#: src/supertux/menu/addon_menu.cpp:140 +msgid "No updates available." +msgstr "Non hai actualizacións dispoñibles." -#: src/supertux/menu/addon_menu.cpp:199 -msgid "No new Add-ons found" -msgstr "Non se atoparon Complementos novos" +#: src/supertux/menu/addon_menu.cpp:144 +#, c++-format +msgid "{} {} available" +msgstr "{} {} dispoñibles" -#: src/supertux/menu/addon_menu.cpp:205 -msgid "Check Online (disabled)" -msgstr "Verificar En Liña (desactivado)" +#: src/supertux/menu/addon_menu.cpp:144 +msgid "update" +msgstr "actualizar" -#: src/supertux/menu/addon_menu.cpp:209 -msgid "Check Online" -msgstr "Verificar En Liña" +#: src/supertux/menu/addon_menu.cpp:144 +msgid "updates" +msgstr "actualizacións" -#: src/supertux/menu/addon_menu.cpp:286 -msgid "Downloading Add-On Repository Index" -msgstr "Descargar o Índice do Repositorio de Complementos" +#: src/supertux/menu/addon_menu.cpp:146 +msgid "Check for updates" +msgstr "Comproba se hai actualizacións" -#: src/supertux/menu/addon_menu.cpp:301 -#, c-format -msgid "Downloading {}" -msgstr "Descargando {}" +#: src/supertux/menu/addon_menu.cpp:150 +msgid "Browse language packs" +msgstr "Explorar paquetes de idiomas" -#: src/supertux/menu/addon_menu.cpp:348 -msgid "" -"Please restart SuperTux\n" -"for these changes to take effect." -msgstr "Reinicie SuperTux\npara que estes cambios teñan efecto." +#: src/supertux/menu/addon_menu.cpp:150 +#: src/supertux/menu/addon_browse_menu.cpp:70 +msgid "Browse Add-ons" +msgstr "Explorar complementos" + +#: src/supertux/menu/addon_menu.cpp:151 +msgid "Install from file" +msgstr "Instalar dende o ficheiro" + +#: src/supertux/menu/addon_menu.cpp:208 +msgid "Checking for updates..." +msgstr "Buscando actualizacións..." #: src/supertux/menu/editor_new_levelset_menu.cpp:31 msgid "New World" @@ -1903,217 +3638,302 @@ msgstr "Introduza un nome para este subconxunto de niveis" msgid "Story Mode" msgstr "Modo Historia" -#: src/supertux/menu/game_menu.cpp:31 -msgid "Are you sure?" -msgstr "Estás seguro?" +#: src/supertux/menu/addon_browse_menu.cpp:70 +msgid "Browse Language Packs" +msgstr "Explorar paquetes de idiomas" -#: src/supertux/menu/game_menu.cpp:54 src/supertux/menu/worldmap_menu.cpp:30 +#: src/supertux/menu/addon_browse_menu.cpp:112 +#, c++-format +msgid "Page {}/{}" +msgstr "Páxina {}/{}" + +#: src/supertux/menu/addon_browse_menu.cpp:124 +msgid "No new language packs available" +msgstr "Non hai novos paquetes de idiomas dispoñibles" + +#: src/supertux/menu/addon_browse_menu.cpp:124 +msgid "No new Add-ons available" +msgstr "Non hai novos complementos dispoñibles" + +#: src/supertux/menu/addon_browse_menu.cpp:127 +msgid "No language packs available" +msgstr "Non hai paquetes de idiomas dispoñibles" + +#: src/supertux/menu/addon_browse_menu.cpp:127 +msgid "No Add-ons available" +msgstr "Non hai complementos dispoñibles" + +#: src/supertux/menu/addon_browse_menu.cpp:135 +#: src/supertux/menu/addon_browse_menu.cpp:139 +msgid "Previous page" +msgstr "Páxina previa" + +#: src/supertux/menu/addon_browse_menu.cpp:143 +#: src/supertux/menu/addon_browse_menu.cpp:147 +msgid "Next page" +msgstr "Seguinte páxina" + +#: src/supertux/menu/addon_browse_menu.cpp:154 +msgid "Check Online (disabled)" +msgstr "Verificar En Liña (desactivado)" + +#: src/supertux/menu/addon_browse_menu.cpp:158 +msgid "Check Online" +msgstr "Verificar En Liña" + +#: src/supertux/menu/addon_browse_menu.cpp:195 +msgid "Downloading Add-On Repository Index" +msgstr "Descargar o Índice do Repositorio de Complementos" + +#: src/supertux/menu/web_asset_menu.cpp:42 +msgid "New files location" +msgstr "Localización dos novos ficheiros" + +#: src/supertux/menu/web_asset_menu.cpp:43 +msgid "Add Files" +msgstr "Engadir Ficheiros" + +#: src/supertux/menu/web_asset_menu.cpp:44 +msgid "Download Files" +msgstr "Descargar Ficheiros" + +#: src/supertux/menu/particle_editor_open.cpp:32 +msgid "Load particle file" +msgstr "Cargar ficheiro de partícula" + +#: src/supertux/menu/particle_editor_open.cpp:39 +msgid "Open" +msgstr "Abrir" + +#: src/supertux/menu/game_menu.cpp:51 src/supertux/menu/worldmap_menu.cpp:30 msgid "Continue" msgstr "Continuar" -#: src/supertux/menu/game_menu.cpp:55 +#: src/supertux/menu/game_menu.cpp:52 msgid "Restart Level" msgstr "Reiniciar Nivel" -#: src/supertux/menu/game_menu.cpp:58 +#: src/supertux/menu/game_menu.cpp:55 msgid "Restart from Checkpoint" msgstr "Reiniciar dende o Punto de Rescate" -#: src/supertux/menu/game_menu.cpp:63 +#: src/supertux/menu/game_menu.cpp:60 msgid "Abort Level" msgstr "Cancelar Nivel" -#: src/supertux/menu/keyboard_menu.cpp:32 -#: src/supertux/menu/joystick_menu.cpp:69 -msgid "Up" -msgstr "Arriba" +#: src/supertux/menu/game_menu.cpp:76 src/supertux/menu/game_menu.cpp:87 +#: src/supertux/menu/game_menu.cpp:99 +msgid "Are you sure?" +msgstr "Estás seguro?" -#: src/supertux/menu/keyboard_menu.cpp:33 -#: src/supertux/menu/joystick_menu.cpp:70 -msgid "Down" -msgstr "Abaixo" +#: src/supertux/menu/profile_name_menu.cpp:36 +#, c++-format +msgid "Rename \"{}\"" +msgstr "Renomear \"{}\"" -#: src/supertux/menu/keyboard_menu.cpp:34 +#: src/supertux/menu/profile_name_menu.cpp:36 +msgid "Add profile" +msgstr "Engadir perfil" + +#: src/supertux/menu/profile_name_menu.cpp:40 +msgid "Profile names must have a maximum of 20 characters." +msgstr "Os nomes do perfil deben ter un máximo de 20 caracteres." + +#: src/supertux/menu/profile_name_menu.cpp:42 +msgid "Create" +msgstr "Crear" + +#: src/supertux/menu/profile_name_menu.cpp:56 +msgid "" +"Profile names must have a maximum of 20 characters.\n" +"Please choose a different name." +msgstr "Os nomes do perfil deben ter un máximo de 20 caracteres.\nPor favor, elixe un nome diferente." + +#: src/supertux/menu/profile_name_menu.cpp:77 +msgid "An error occurred while creating the profile." +msgstr "Produciuse un erro ó crear o perfil." + +#: src/supertux/menu/keyboard_menu.cpp:36 #: src/supertux/menu/joystick_menu.cpp:71 -msgid "Left" -msgstr "Esquerda" +msgid "Up" +msgstr "Arriba" -#: src/supertux/menu/keyboard_menu.cpp:35 +#: src/supertux/menu/keyboard_menu.cpp:37 #: src/supertux/menu/joystick_menu.cpp:72 -msgid "Right" -msgstr "Dereita" +msgid "Down" +msgstr "Abaixo" -#: src/supertux/menu/keyboard_menu.cpp:36 -#: src/supertux/menu/joystick_menu.cpp:73 +#: src/supertux/menu/keyboard_menu.cpp:40 +#: src/supertux/menu/joystick_menu.cpp:75 msgid "Jump" msgstr "Saltar" -#: src/supertux/menu/keyboard_menu.cpp:38 -#: src/supertux/menu/joystick_menu.cpp:76 +#: src/supertux/menu/keyboard_menu.cpp:43 +#: src/supertux/menu/joystick_menu.cpp:78 msgid "Peek Left" msgstr "Ollar á Esquerda" -#: src/supertux/menu/keyboard_menu.cpp:39 -#: src/supertux/menu/joystick_menu.cpp:77 +#: src/supertux/menu/keyboard_menu.cpp:44 +#: src/supertux/menu/joystick_menu.cpp:79 msgid "Peek Right" msgstr "Ollar á Dereita" -#: src/supertux/menu/keyboard_menu.cpp:40 -#: src/supertux/menu/joystick_menu.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:45 +#: src/supertux/menu/joystick_menu.cpp:80 msgid "Peek Up" msgstr "Ollar Arriba" -#: src/supertux/menu/keyboard_menu.cpp:41 -#: src/supertux/menu/joystick_menu.cpp:79 +#: src/supertux/menu/keyboard_menu.cpp:46 +#: src/supertux/menu/joystick_menu.cpp:81 msgid "Peek Down" msgstr "Ollar Embaixo" -#: src/supertux/menu/keyboard_menu.cpp:43 -#: src/supertux/menu/joystick_menu.cpp:81 +#: src/supertux/menu/keyboard_menu.cpp:51 +#: src/supertux/menu/joystick_menu.cpp:83 msgid "Console" msgstr "Consola" -#: src/supertux/menu/keyboard_menu.cpp:46 -#: src/supertux/menu/joystick_menu.cpp:82 +#: src/supertux/menu/keyboard_menu.cpp:52 +#: src/supertux/menu/joystick_menu.cpp:84 msgid "Cheat Menu" msgstr "Menú das Trampas" -#: src/supertux/menu/keyboard_menu.cpp:47 -#: src/supertux/menu/joystick_menu.cpp:83 +#: src/supertux/menu/keyboard_menu.cpp:53 +#: src/supertux/menu/joystick_menu.cpp:85 msgid "Debug Menu" msgstr "Menú da Depuración" -#: src/supertux/menu/keyboard_menu.cpp:49 -#: src/supertux/menu/joystick_menu.cpp:85 +#: src/supertux/menu/keyboard_menu.cpp:56 +#: src/supertux/menu/joystick_menu.cpp:87 msgid "Jump with Up" msgstr "Saltar coa frecha Arriba" -#: src/supertux/menu/keyboard_menu.cpp:62 +#: src/supertux/menu/keyboard_menu.cpp:82 msgid "Up cursor" msgstr "Cursor arriba" -#: src/supertux/menu/keyboard_menu.cpp:64 +#: src/supertux/menu/keyboard_menu.cpp:84 msgid "Down cursor" msgstr "Cursor abaixo" -#: src/supertux/menu/keyboard_menu.cpp:66 +#: src/supertux/menu/keyboard_menu.cpp:86 msgid "Left cursor" msgstr "Cursor esquerdo" -#: src/supertux/menu/keyboard_menu.cpp:68 +#: src/supertux/menu/keyboard_menu.cpp:88 msgid "Right cursor" msgstr "Cursor dereito" -#: src/supertux/menu/keyboard_menu.cpp:70 +#: src/supertux/menu/keyboard_menu.cpp:90 msgid "Return" msgstr "Retroceso" -#: src/supertux/menu/keyboard_menu.cpp:72 +#: src/supertux/menu/keyboard_menu.cpp:92 msgid "Space" msgstr "Espazo" -#: src/supertux/menu/keyboard_menu.cpp:74 +#: src/supertux/menu/keyboard_menu.cpp:94 msgid "Right Shift" msgstr "Maiúscula Dereita" -#: src/supertux/menu/keyboard_menu.cpp:76 +#: src/supertux/menu/keyboard_menu.cpp:96 msgid "Left Shift" msgstr "Maiúscula Esquerda" -#: src/supertux/menu/keyboard_menu.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:98 msgid "Right Control" msgstr "Control Dereita" -#: src/supertux/menu/keyboard_menu.cpp:80 +#: src/supertux/menu/keyboard_menu.cpp:100 msgid "Left Control" msgstr "Control Esquerda" -#: src/supertux/menu/keyboard_menu.cpp:82 +#: src/supertux/menu/keyboard_menu.cpp:102 msgid "Right Alt" msgstr "Alt Dereita" -#: src/supertux/menu/keyboard_menu.cpp:84 +#: src/supertux/menu/keyboard_menu.cpp:104 msgid "Left Alt" msgstr "Alt Esquerda" -#: src/supertux/menu/keyboard_menu.cpp:86 +#: src/supertux/menu/keyboard_menu.cpp:106 msgid "Right Command" msgstr "Tecla Orde Dereita" -#: src/supertux/menu/keyboard_menu.cpp:88 +#: src/supertux/menu/keyboard_menu.cpp:108 msgid "Left Command" msgstr "Tecla Orde Esquerda" -#: src/supertux/menu/keyboard_menu.cpp:102 +#: src/supertux/menu/keyboard_menu.cpp:122 msgid "Press Key" msgstr "Preme Tecla" -#: src/supertux/menu/language_menu.cpp:40 +#: src/supertux/menu/language_menu.cpp:43 msgid "Language" msgstr "Idioma" -#: src/supertux/menu/language_menu.cpp:42 +#: src/supertux/menu/language_menu.cpp:45 msgid "" msgstr "" -#: src/supertux/menu/joystick_menu.cpp:55 +#: src/supertux/menu/joystick_menu.cpp:57 msgid "Manual Configuration" msgstr "Configuración Manual" -#: src/supertux/menu/joystick_menu.cpp:57 +#: src/supertux/menu/joystick_menu.cpp:59 msgid "" "Use manual configuration instead of SDL2's automatic GameController support" msgstr "Utiliza a configuración manual en vez da asistencia automática GameController SDL2" -#: src/supertux/menu/joystick_menu.cpp:75 +#: src/supertux/menu/joystick_menu.cpp:77 msgid "Pause/Menu" msgstr "Pausa/Menú" -#: src/supertux/menu/joystick_menu.cpp:91 +#: src/supertux/menu/joystick_menu.cpp:93 msgid "No Joysticks found" msgstr "Non se atoparon Joysticks" -#: src/supertux/menu/joystick_menu.cpp:92 +#: src/supertux/menu/joystick_menu.cpp:94 msgid "Scan for Joysticks" msgstr "Buscar Joysticks" -#: src/supertux/menu/joystick_menu.cpp:125 +#: src/supertux/menu/joystick_menu.cpp:127 msgid "Press Button" msgstr "Premer Botón" -#: src/supertux/menu/joystick_menu.cpp:162 +#: src/supertux/menu/joystick_menu.cpp:164 msgid "Axis " msgstr "Eixo" -#: src/supertux/menu/joystick_menu.cpp:165 +#: src/supertux/menu/joystick_menu.cpp:167 msgid "-" msgstr "-" -#: src/supertux/menu/joystick_menu.cpp:167 +#: src/supertux/menu/joystick_menu.cpp:169 msgid "+" msgstr "+" -#: src/supertux/menu/joystick_menu.cpp:174 +#: src/supertux/menu/joystick_menu.cpp:176 msgid "X2" msgstr "X2" -#: src/supertux/menu/joystick_menu.cpp:176 +#: src/supertux/menu/joystick_menu.cpp:178 msgid "Y2" msgstr "Y2" -#: src/supertux/menu/joystick_menu.cpp:189 +#: src/supertux/menu/joystick_menu.cpp:191 msgid "Hat Up" msgstr "Inclinar Arriba" -#: src/supertux/menu/joystick_menu.cpp:193 +#: src/supertux/menu/joystick_menu.cpp:195 msgid "Hat Down" msgstr "Inclinar Abaixo" -#: src/supertux/menu/joystick_menu.cpp:197 +#: src/supertux/menu/joystick_menu.cpp:199 msgid "Hat Left" msgstr "Inclinar Esquerda" -#: src/supertux/menu/joystick_menu.cpp:201 +#: src/supertux/menu/joystick_menu.cpp:203 msgid "Hat Right" msgstr "Inclinar Dereito" @@ -2121,41 +3941,107 @@ msgstr "Inclinar Dereito" msgid "Pause" msgstr "Pausa" -#: src/supertux/menu/worldmap_menu.cpp:33 -msgid "Leave World" -msgstr "Deixar o Mundo" +#: src/supertux/menu/worldmap_menu.cpp:33 +msgid "Leave World" +msgstr "Deixar o Mundo" + +#: src/supertux/menu/download_dialog.cpp:42 +msgid "Abort Download" +msgstr "Cancelar a Descarga" + +#: src/supertux/menu/download_dialog.cpp:59 +#, c++-format +msgid "" +"Error:\n" +"{}" +msgstr "Erro:\n{}" + +#: src/supertux/menu/cheat_menu.cpp:38 +msgid "Bonus: Star" +msgstr "Bono: Estrela" + +#: src/supertux/menu/cheat_menu.cpp:39 +msgid "Shrink Tux" +msgstr "Encoller a Tux" + +#: src/supertux/menu/cheat_menu.cpp:40 +msgid "Kill Tux" +msgstr "Destruír a Tux" + +#: src/supertux/menu/cheat_menu.cpp:55 +msgid "Prevent Death" +msgstr "Previr a Morte" + +#: src/supertux/menu/addon_file_install_menu.cpp:32 +msgid "Install Add-on from file" +msgstr "Instala o complemento desde o ficheiro" + +#: src/supertux/menu/addon_file_install_menu.cpp:34 +msgid "Drag and drop add-on ZIP archive" +msgstr "Arrastra e solta o arquivo ZIP do complemento" + +#: src/supertux/menu/particle_editor_menu.cpp:32 +msgid "Particle Editor" +msgstr "Editor de Partículas" + +#: src/supertux/menu/particle_editor_menu.cpp:36 +#: src/supertux/menu/editor_menu.cpp:60 +msgid "Return to Editor" +msgstr "Volver ó Editor" + +#: src/supertux/menu/particle_editor_menu.cpp:37 +msgid "New Particle Config" +msgstr "Nova Configuración da Partícula" + +#: src/supertux/menu/particle_editor_menu.cpp:38 +msgid "Save Particle Config" +msgstr "Gardar Configuración da Partícula" + +#: src/supertux/menu/particle_editor_menu.cpp:39 +msgid "Save Particle Config as..." +msgstr "Gardar Configuración da Partícula como..." -#: src/supertux/menu/download_dialog.cpp:27 -msgid "Abort Download" -msgstr "Cancelar a Descarga" +#: src/supertux/menu/particle_editor_menu.cpp:40 +msgid "Load Another Particle Config" +msgstr "Cargar Outra Configuración da Partícula" -#: src/supertux/menu/download_dialog.cpp:42 -msgid "Error:\n" -msgstr "Erro:\n" +#: src/supertux/menu/particle_editor_menu.cpp:44 +msgid "Open Particle Directory" +msgstr "Abrir Directorio da Partícula" -#: src/supertux/menu/download_dialog.cpp:96 -msgid "Close" -msgstr "Pechar" +#: src/supertux/menu/particle_editor_menu.cpp:45 +#: src/supertux/menu/editor_menu.cpp:118 +msgid "Keyboard Shortcuts" +msgstr "Atallos do Teclado" -#: src/supertux/menu/cheat_menu.cpp:37 -msgid "Bonus: Star" -msgstr "Bono: Estrela" +#: src/supertux/menu/particle_editor_menu.cpp:49 +msgid "Exit Particle Editor" +msgstr "Saír do Editor da Partícula" -#: src/supertux/menu/cheat_menu.cpp:38 -msgid "Shrink Tux" -msgstr "Afundir Tux" +#: src/supertux/menu/particle_editor_menu.cpp:121 +msgid "" +"Keyboard Shortcuts:\n" +"---------------------\n" +"Esc = Open Menu\n" +"Ctrl+S = Save\n" +"Ctrl+Shift+S = Save as\n" +"Ctrl+O = Open\n" +"Ctrl+Z = Undo\n" +"Ctrl+Y = Redo" +msgstr "Atallos de Teclado:\n---------------------\nEsc = Abrir Menú\nCtrl+S = Gardar\nCtrl+Shift+S = Gardar coma\nCtrl+O = Abrir\nCtrl+Z = Desfacer\nCtrl+Y = Refacer" -#: src/supertux/menu/cheat_menu.cpp:39 -msgid "Kill Tux" -msgstr "Destruír a Tux" +#: src/supertux/menu/particle_editor_menu.cpp:122 +#: src/supertux/menu/editor_menu.cpp:206 +msgid "Got it!" +msgstr "Conseguido!" #: src/supertux/menu/editor_level_menu.cpp:31 -#: src/supertux/menu/editor_menu.cpp:70 +#: src/supertux/menu/editor_menu.cpp:116 msgid "Worldmap Settings" msgstr "Configuración do Mapa Principal" #: src/supertux/menu/editor_level_menu.cpp:31 -#: src/supertux/menu/editor_menu.cpp:70 +#: src/supertux/menu/editor_menu.cpp:116 msgid "Level Settings" msgstr "Configuración do Nivel" @@ -2163,7 +4049,7 @@ msgstr "Configuración do Nivel" msgid "Author" msgstr "Autor" -#: src/supertux/menu/editor_level_menu.cpp:35 data//credits.stxt:1129 +#: src/supertux/menu/editor_level_menu.cpp:35 data//credits.stxt:1253 msgid "Contact" msgstr "Contacto" @@ -2172,106 +4058,152 @@ msgid "License" msgstr "Licenza" #: src/supertux/menu/editor_level_menu.cpp:37 +msgid "Level Note" +msgstr "Nota do Nivel" + +#: src/supertux/menu/editor_level_menu.cpp:38 msgid "Tileset" msgstr "Conxunto de Teselas" -#: src/supertux/menu/editor_level_menu.cpp:40 +#: src/supertux/menu/editor_level_menu.cpp:41 msgid "Target Time" msgstr "Tempo para acadar o Obxectivo" -#: src/supertux/menu/editor_level_menu.cpp:82 +#: src/supertux/menu/editor_level_menu.cpp:83 msgid "Please enter a name for this level." msgstr "Introduce un nome para este nivel." -#: src/supertux/menu/editor_level_menu.cpp:86 +#: src/supertux/menu/editor_level_menu.cpp:87 msgid "Please enter a level author for this level." msgstr "Introduce un autor do nivel para este nivel." -#: src/supertux/menu/editor_level_menu.cpp:90 +#: src/supertux/menu/editor_level_menu.cpp:91 msgid "Please enter a license for this level." msgstr "Introduce unha licenza para este nivel." -#: src/supertux/menu/editor_menu.cpp:34 -msgid "1/8 tile (4px)" -msgstr "1/8 tesela (4px)" - -#: src/supertux/menu/editor_menu.cpp:35 -msgid "1/4 tile (8px)" -msgstr "1/4 tesela (8px)" +#: src/supertux/menu/editor_menu.cpp:53 +msgid "tiny tile (4px)" +msgstr "tesela minúscula (4px)" -#: src/supertux/menu/editor_menu.cpp:36 -msgid "1/2 tile (16px)" -msgstr "1/2 tesela (16px)" +#: src/supertux/menu/editor_menu.cpp:54 +msgid "small tile (8px)" +msgstr "tesela pequena (8px)" -#: src/supertux/menu/editor_menu.cpp:37 -msgid "1 tile (32px)" -msgstr "1 tesela (32px)" +#: src/supertux/menu/editor_menu.cpp:55 +msgid "medium tile (16px)" +msgstr "tesela media (16px)" -#: src/supertux/menu/editor_menu.cpp:41 -msgid "Return to Editor" -msgstr "Volver ó Editor" +#: src/supertux/menu/editor_menu.cpp:56 +msgid "big tile (32px)" +msgstr "tesela grande (32px)" -#: src/supertux/menu/editor_menu.cpp:42 +#: src/supertux/menu/editor_menu.cpp:61 msgid "Save Worldmap" msgstr "Gardar Mapa Principal" -#: src/supertux/menu/editor_menu.cpp:42 +#: src/supertux/menu/editor_menu.cpp:61 msgid "Save Level" msgstr "Gardar Nivel" -#: src/supertux/menu/editor_menu.cpp:45 +#: src/supertux/menu/editor_menu.cpp:65 msgid "Test Level" msgstr "Probar Nivel" -#: src/supertux/menu/editor_menu.cpp:49 +#: src/supertux/menu/editor_menu.cpp:67 msgid "Test Worldmap" msgstr "Probar Mapa Principal" -#: src/supertux/menu/editor_menu.cpp:52 +#: src/supertux/menu/editor_menu.cpp:72 msgid "Share Level" msgstr "Compartir Nivel" -#: src/supertux/menu/editor_menu.cpp:54 +#: src/supertux/menu/editor_menu.cpp:74 +msgid "Package Add-On" +msgstr "Empaquetar como extensión" + +#: src/supertux/menu/editor_menu.cpp:76 msgid "Open Level Directory" msgstr "Abrir o Directorio do Nivel" -#: src/supertux/menu/editor_menu.cpp:57 +#: src/supertux/menu/editor_menu.cpp:79 msgid "Edit Another Level" msgstr "Editar Outro Nivel" -#: src/supertux/menu/editor_menu.cpp:60 +#: src/supertux/menu/editor_menu.cpp:81 msgid "Edit Another World" msgstr "Editar Outro Mundo" -#: src/supertux/menu/editor_menu.cpp:64 +#: src/supertux/menu/editor_menu.cpp:86 +msgid "Convert all tiles in the level using converters." +msgstr "Converte todos os bloques do nivel usando conversores." + +#: src/supertux/menu/editor_menu.cpp:90 msgid "Grid Size" msgstr "Tamaño da Grade" -#: src/supertux/menu/editor_menu.cpp:65 +#: src/supertux/menu/editor_menu.cpp:91 msgid "Show Grid" msgstr "Amosar Grade" -#: src/supertux/menu/editor_menu.cpp:66 +#: src/supertux/menu/editor_menu.cpp:92 msgid "Grid Snapping" msgstr "Axuste da Grade" -#: src/supertux/menu/editor_menu.cpp:67 +#: src/supertux/menu/editor_menu.cpp:93 msgid "Render Background" msgstr "Representar Fondo" -#: src/supertux/menu/editor_menu.cpp:68 +#: src/supertux/menu/editor_menu.cpp:94 msgid "Render Light" msgstr "Representar Luz" -#: src/supertux/menu/editor_menu.cpp:72 -msgid "Keyboard Shortcuts" -msgstr "Atallos do Teclado" +#: src/supertux/menu/editor_menu.cpp:95 +msgid "Autotile Mode" +msgstr "Modo de Tesela Automática" + +#: src/supertux/menu/editor_menu.cpp:96 +msgid "Enable Autotile Help" +msgstr "Activar axuda de autoteselado" + +#: src/supertux/menu/editor_menu.cpp:97 +msgid "Enable Object Undo Tracking" +msgstr "Activar o seguimento de desfacer de obxectos" -#: src/supertux/menu/editor_menu.cpp:75 +#: src/supertux/menu/editor_menu.cpp:100 +msgid "Undo Stack Size" +msgstr "Desfacer o tamaño da pila" + +#: src/supertux/menu/editor_menu.cpp:102 +msgid "Autosave Frequency" +msgstr "Frecuencia de Auto-gardado" + +#: src/supertux/menu/editor_menu.cpp:108 +msgid "Check for Deprecated Tiles" +msgstr "Verificar bloques obsoletos" + +#: src/supertux/menu/editor_menu.cpp:109 +msgid "Check if any deprecated tiles are currently present in the level." +msgstr "Comproba se hai algún bloque obsoleto presente actualmente no nivel." + +#: src/supertux/menu/editor_menu.cpp:110 +msgid "Show Deprecated Tiles" +msgstr "Mostrar Bloques Obsoletos" + +#: src/supertux/menu/editor_menu.cpp:111 +msgid "" +"Indicate all deprecated tiles on the active tilemap, without the need of " +"hovering over." +msgstr "Indica todos os bloques obsoletos no mapa de bloques activo, sen necesidade de pasar o rato." + +#: src/supertux/menu/editor_menu.cpp:121 msgid "Exit Level Editor" msgstr "Saír do Editor do Niveis" -#: src/supertux/menu/editor_menu.cpp:122 +#: src/supertux/menu/editor_menu.cpp:170 +msgid "Do you want to package this world as an add-on?" +msgstr "Queres empaquetar este mundo como unha expansión extra?" + +#: src/supertux/menu/editor_menu.cpp:196 msgid "" "We encourage you to share your levels in the SuperTux forum.\n" "To find your level, click the\n" @@ -2279,7 +4211,7 @@ msgid "" "Do you want to go to the forum now?" msgstr "Animámoste a que compartas os teus niveis no foro de SuperTux.\nPara atopar o teu nivel, preme o\nelemento do menú \"Abrir Directorio de Niveis\".\nQueres ir xa ó foro?" -#: src/supertux/menu/editor_menu.cpp:134 +#: src/supertux/menu/editor_menu.cpp:205 msgid "" "Keyboard Shortcuts:\n" "---------------------\n" @@ -2290,127 +4222,456 @@ msgid "" "Ctrl+Y = Redo\n" "F6 = Render Light\n" "F7 = Grid Snapping\n" -"F8 = Show Grid" -msgstr "Atallos do Teclado:\n---------------------\nEsc = Abrir Menú\nCtrl+S = Gardar\nCtrl+T = Probar\nCtrl+Z = Desfacer\nCtrl+Y = Refacer\nF6 = Representar a Luz\nF7 = Axuste á Grade\nF8 = Amosar Grade" +"F8 = Show Grid\n" +"Ctrl++ or Ctrl+Scroll Up = Zoom In\n" +"Ctrl+- or Ctrl+Scroll Down = Zoom Out\n" +"Ctrl+D = Reset Zoom\n" +"\n" +"Scripting Shortcuts:\n" +" ------------- \n" +"Home = Go to beginning of line\n" +"End = Go to end of line\n" +"Left arrow = Go back in text\n" +"Right arrow = Go forward in text\n" +"Backspace = Delete in front of text cursor\n" +"Delete = Delete behind text cursor\n" +"Ctrl+X = Cut whole line\n" +"Ctrl+C = Copy whole line\n" +"Ctrl+V = Paste\n" +"Ctrl+D = Duplicate line\n" +"Ctrl+Z = Undo\n" +"Ctrl+Y = Redo" +msgstr "Atallos de teclado:\n---------------------\nEsc = Abrir menú\nCtrl+S = Gardar\nCtrl+T = Probar\nCtrl+Z = Desfacer\nCtrl+Y = Refacer\nF6 = Renderizar luz\nF7 = Axuste á grella\nF8 = Mostrar grella\nCtrl++ ou Ctrl+Rodar arriba = Zoom dentro\nCtrl+- ou Ctrl+Rodar abaixo = Zoom fóra\nCtrl+D = Restablecer zoom\n\nAtallos de escritura:\n---------------------\nInicio = Ir ao comezo da liña\nFin = Ir ao final da liña\nFrecha esquerda = Retroceder no texto\nFrecha dereita = Avanzar no texto\nRetroceso = Eliminar diante do cursor\nSuprimir = Eliminar detrás do cursor\nCtrl+X = Cortar toda a liña\nCtrl+C = Copiar toda a liña\nCtrl+V = Pegar\nCtrl+D = Duplicar liña\nCtrl+Z = Desfacer\nCtrl+Y = Refacer" -#: src/supertux/menu/editor_menu.cpp:135 -msgid "Got it!" -msgstr "Conseguido!" +#: src/supertux/menu/editor_menu.cpp:232 +msgid "Deprecated tiles are still present in the level." +msgstr "Os bloques obsoletos aínda están presentes no nivel." + +#: src/supertux/menu/editor_menu.cpp:239 +msgid "Do you want to show all deprecated tiles on active tilemaps?" +msgstr "Queres mostrar todos os bloques obsoletos nos mapas de bloques ativos?" + +#: src/supertux/menu/editor_menu.cpp:246 +msgid "There are no more deprecated tiles in the level!" +msgstr "Non hai máis bloques obsoletos no nivel!" + +#: src/supertux/menu/multiplayer_player_menu.cpp:40 +msgid "Play with the keyboard" +msgstr "Xogar co teclado" + +#: src/supertux/menu/multiplayer_player_menu.cpp:58 +msgid "Remove Player" +msgstr "Eliminar Xogador" + +#: src/supertux/menu/multiplayer_player_menu.cpp:82 +msgid "Respawn Player" +msgstr "Reiniciar Xogador" -#: src/supertux/levelintro.cpp:136 -#, c-format +#: src/supertux/menu/multiplayer_player_menu.cpp:108 +msgid "Spawn Player" +msgstr "Crear Xogador" + +#: src/supertux/menu/multiplayer_player_menu.cpp:136 +msgid "Controllers" +msgstr "Mandos" + +#: src/supertux/menu/multiplayer_player_menu.cpp:152 +msgid "" +"This controller does not support rumbling;\n" +"please check the controllers manually." +msgstr "Este mando non admite vibracións; \ncomproba os mandos manualmente, por favor." + +#: src/supertux/menu/multiplayer_player_menu.cpp:157 +msgid "" +"This SuperTux build does not support rumbling\n" +"controllers; please check the controllers manually." +msgstr "Esta compilación de SuperTux non admite mandos con vibración; \ncomproba os mandos manualmente, por favor." + +#: src/supertux/menu/multiplayer_player_menu.cpp:184 +msgid "" +"This joystick does not support rumbling;\n" +"please check the joysticks manually." +msgstr "Este joystick non admite vibracións; \ncomproba os joysticks manualmente, por favor." + +#: src/supertux/menu/multiplayer_player_menu.cpp:189 +msgid "" +"This SuperTux build does not support rumbling\n" +"joysticks; please check the joysticks manually." +msgstr "Esta compilación de SuperTux non admite joysticks con vibración; \ncomproba os joysticks manualmente, por favor." + +#: src/supertux/menu/editor_delete_level_menu.cpp:59 +msgid "No levels available" +msgstr "Non hai niveis dispoñibles" + +#: src/supertux/menu/editor_delete_level_menu.cpp:79 +msgid "You cannot delete the level that you are editing!" +msgstr "Non podes eliminar o nivel que estas editando!" + +#: src/supertux/menu/editor_delete_level_menu.cpp:82 +#, c++-format +msgid "You are about to delete level \"{}\". Are you sure?" +msgstr "Estás a piques de eliminar o nivel \"{}\". Estás certo?" + +#: src/supertux/levelintro.cpp:137 +#, c++-format msgid "contributed by {}" msgstr "aportado por {}" -#: src/supertux/levelintro.cpp:169 +#: src/supertux/levelintro.cpp:184 msgid "Badguys killed" msgstr "Tipos malos destruídos" -#: src/supertux/levelintro.cpp:177 +#: src/supertux/levelintro.cpp:192 msgid "Best time" msgstr "Mellor tempo" -#: src/supertux/levelintro.cpp:181 +#: src/supertux/levelintro.cpp:196 msgid "Level target time" msgstr "Tempo para acadar o obxectivo do nivel" -#: src/supertux/tile_set.cpp:92 +#: src/supertux/tile_set.cpp:113 msgid "Others" msgstr "Outros" -#: src/supertux/moving_object.cpp:44 +#: src/supertux/direction.cpp:67 +msgid "up" +msgstr "arriba" + +#: src/supertux/direction.cpp:69 +msgid "down" +msgstr "abaixo" + +#: src/supertux/moving_object.cpp:63 msgid "Region" msgstr "Rexión" +#: src/supertux/main.cpp:801 +#, c++-format +msgid "New release: SuperTux v{}!" +msgstr "Nova versión: SuperTux v{}!" + +#: src/supertux/main.cpp:804 +#, c++-format +msgid "" +"A new release of SuperTux (v{}) is available!\n" +"For more information, you can visit the SuperTux website.\n" +"\n" +"Do you want to visit the website now?" +msgstr "Hai unha nova versión de SuperTux (v{}) dispoñible!\nPara máis información, podes visitar o sitio web de SuperTux.\n\nQueres visitar o sitio web agora?" + +#: src/supertux/main.cpp:815 +msgid "Checking for new releases..." +msgstr "Buscando novos lanzamentos..." + #: src/control/joystick_config.cpp:85 msgid "Joystick Mappings" msgstr "Asignación do Joystick" -#: src/worldmap/worldmap_parser.cpp:167 +#: src/worldmap/sprite_change.cpp:91 +msgid "Stay action" +msgstr "Posición estática" + +#: src/worldmap/sprite_change.cpp:92 +msgid "Initial stay action" +msgstr "Posición estática inicial" + +#: src/worldmap/sprite_change.cpp:93 +msgid "Stay group" +msgstr "Grupo estático" + +#: src/worldmap/sprite_change.cpp:94 +msgid "Change on touch" +msgstr "Cambiar ó tocar" + +#: src/worldmap/special_tile.hpp:36 +msgid "Special Tile" +msgstr "Bloque especial" + +#: src/worldmap/level_tile.hpp:36 src/worldmap/level_tile.cpp:161 +msgid "Level" +msgstr "Nivel" + +#: src/worldmap/teleporter.cpp:50 +msgid "Automatic" +msgstr "Automático" + +#: src/worldmap/teleporter.cpp:51 +msgid "Target worldmap" +msgstr "Mapa principal obxectivo" + +#: src/worldmap/sprite_change.hpp:35 +msgid "Sprite Change" +msgstr "Cambio de gráfico animado \"sprite\"" + +#: src/worldmap/special_tile.cpp:75 +msgid "Show message" +msgstr "Amosar mensaxe" + +#: src/worldmap/level_tile.cpp:84 msgid "" msgstr "" -#: src/editor/node_marker.cpp:79 +#: src/worldmap/level_tile.cpp:162 +msgid "Outro script" +msgstr "Script de saída" + +#: src/worldmap/level_tile.cpp:163 +msgid "Auto play" +msgstr "Reprodución automática" + +#: src/worldmap/level_tile.cpp:164 +msgid "Title colour" +msgstr "Cor do título" + +#: src/worldmap/teleporter.hpp:34 +msgid "Teleporter" +msgstr "Teletransporte" + +#: src/editor/tip.cpp:80 +msgid "" +"This object's current functionality is deprecated.\n" +"Updating to get its latest functionality is recommended." +msgstr "A funcionalidade actual deste obxecto está obsoleta.\nRecoméndase actualizar para obter a súa última funcionalidade." + +#: src/editor/node_marker.cpp:122 msgid "Path Node" msgstr "Nodo do Camiño" -#: src/editor/object_settings.cpp:112 -msgid "up" -msgstr "arriba" +#: src/editor/node_marker.cpp:123 +msgid "Press CTRL to move Bezier handles" +msgstr "Pulsa CTRL para mover os puntos de control Bézier" -#: src/editor/object_settings.cpp:112 -msgid "down" -msgstr "abaixo" +#: src/editor/node_marker.cpp:127 +msgid "Easing" +msgstr "Transición animada" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "West" msgstr "Oeste" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "East" msgstr "Leste" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "North" msgstr "Norte" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "South" msgstr "Sur" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "One shot" msgstr "Un tiro" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "Ping-pong" msgstr "Ping-pong" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "Circular" msgstr "Circular" -#: src/editor/object_settings.cpp:137 -msgid "Unordered" -msgstr "Desordenado" +#: src/editor/layers_widget.cpp:331 +#, c++-format +msgid "Sector: {}" +msgstr "Sector: {}" -#: src/editor/object_option.cpp:83 +#: src/editor/object_option.cpp:92 msgid "true" msgstr "certo" -#: src/editor/object_option.cpp:83 +#: src/editor/object_option.cpp:92 msgid "false" msgstr "falso" -#: src/editor/object_option.cpp:246 src/editor/object_option.cpp:295 +#: src/editor/object_option.cpp:308 src/editor/object_option.cpp:356 msgid "invalid" msgstr "non válido" -#: src/editor/object_option.cpp:553 +#: src/editor/object_option.cpp:665 +msgid "Scale X" +msgstr "Escala X" + +#: src/editor/object_option.cpp:666 +msgid "Scale Y" +msgstr "Escala Y" + +#: src/editor/object_option.cpp:667 +msgid "Offset X" +msgstr "Desprazamento X" + +#: src/editor/object_option.cpp:668 +msgid "Offset Y" +msgstr "Desprazamento Y" + +#: src/editor/object_option.cpp:672 src/editor/object_menu.cpp:67 msgid "Remove" msgstr "Eliminar" -#: src/editor/worldmap_objects.hpp:56 src/editor/worldmap_objects.cpp:129 -msgid "Level" -msgstr "Nivel" +#: src/editor/object_option.cpp:689 +msgid "Test from here" +msgstr "Probar dende aquí" -#: src/editor/worldmap_objects.hpp:79 -msgid "Teleporter" -msgstr "Teletransporte" +#: src/editor/object_option.cpp:706 +msgid "Open Particle Editor" +msgstr "Abrir o Editor de Partículas" -#: src/editor/worldmap_objects.hpp:119 -msgid "Sprite Change" -msgstr "Cambio de Fada" +#: src/editor/particle_editor.cpp:114 +msgid "Change texture... ->" +msgstr "Cambiar textura... ->" + +#: src/editor/particle_editor.cpp:126 +msgid "Max amount" +msgstr "Cantidade máxima" + +#: src/editor/particle_editor.cpp:142 +msgid "Spawn anywhere" +msgstr "Aparecer en calquera lugar" + +#: src/editor/particle_editor.cpp:143 +msgid "Life duration" +msgstr "Duración de vida" + +#: src/editor/particle_editor.cpp:148 +msgid "Birth duration" +msgstr "Tempo de creación" + +#: src/editor/particle_editor.cpp:153 +msgid "Death duration" +msgstr "Tempo de destrucción" + +#: src/editor/particle_editor.cpp:160 +msgid "Grow" +msgstr "Crecer" + +#: src/editor/particle_editor.cpp:175 +msgid "Horizontal speed" +msgstr "Velocidade horizontal" + +#: src/editor/particle_editor.cpp:180 +msgid "Vertical speed" +msgstr "Velocidade vertical" + +#: src/editor/particle_editor.cpp:185 +msgid "Horizontal acceleration" +msgstr "Aceleración horizontal" + +#: src/editor/particle_editor.cpp:186 +msgid "Vertical acceleration" +msgstr "Aceleración vertical" + +#: src/editor/particle_editor.cpp:187 +msgid "Horizontal friction" +msgstr "Fricción horizontal" + +#: src/editor/particle_editor.cpp:188 +msgid "Vertical friction" +msgstr "Fricción vertical" + +#: src/editor/particle_editor.cpp:190 +msgid "Initial rotation" +msgstr "Rotación inicial" + +#: src/editor/particle_editor.cpp:201 +msgid "Rotation friction/decceleration" +msgstr "Fricción de giro/desaceleración" + +#: src/editor/particle_editor.cpp:211 +msgid "Destroy" +msgstr "Destruír" + +#: src/editor/particle_editor.cpp:215 +msgid "Stick to surface" +msgstr "Pegarse á superficie" + +#: src/editor/particle_editor.cpp:216 +msgid "Stick and stay" +msgstr "Pegarse e quedarse" + +#: src/editor/particle_editor.cpp:217 +msgid "No collision" +msgstr "Sen colisión" + +#: src/editor/particle_editor.cpp:222 +msgid "Always destroy" +msgstr "Destruír sempre" -#: src/editor/worldmap_objects.hpp:140 -msgid "Special tile" -msgstr "Tesela especial" +#: src/editor/particle_editor.cpp:226 +msgid "Offscreen mode" +msgstr "Modo fora da pantalla" -#: src/editor/editor.cpp:477 +#: src/editor/particle_editor.cpp:229 +msgid "Clear" +msgstr "Limpar" + +#: src/editor/particle_editor.cpp:245 +msgid "<- General settings" +msgstr "<- Configuración xeral" + +#: src/editor/particle_editor.cpp:255 +msgid "Likeliness" +msgstr "Probabilidade" + +#: src/editor/particle_editor.cpp:266 +msgid "Color (RGBA)" +msgstr "Color (RGBA)" + +#: src/editor/particle_editor.cpp:311 +msgid "Scale (x, y)" +msgstr "Escala (x, y)" + +#: src/editor/particle_editor.cpp:332 +msgid "Hitbox scale (x, y)" +msgstr "Escala da caixa de colisión (x, y)" + +#: src/editor/particle_editor.cpp:353 +msgid "Hitbox offset relative to scale" +msgstr "Desprazamento da caixa de colisión relativo á escala" + +#: src/editor/particle_editor.cpp:372 +msgid "Change texture..." +msgstr "Cambiar textura..." + +#: src/editor/particle_editor.cpp:766 +msgid "" +"This particle configuration contains unsaved changes,\n" +"do you want to save?" +msgstr "Estos axustes de partícula teñen cambios sen gardar, \nqueres gardar?" + +#: src/editor/particle_editor.cpp:774 +msgid "Save as" +msgstr "Gardar coma" + +#: src/editor/editor.cpp:577 +msgid "" +"This level contains deprecated tiles.\n" +"It is strongly recommended to replace all deprecated tiles\n" +"to avoid loss of compatibility in future versions." +msgstr "Este nivel contén bloques obsoletos.\nRecoméndase encarecidamente substituír todos os bloques obsoletos para evitar a perda de compatibilidade en versións futuras." + +#: src/editor/editor.cpp:579 +msgid "Tip: Turn on \"Show Deprecated Tiles\" from the level editor menu." +msgstr "Consello: Activa \"Mostrar bloques obsoletos\" dende o menú do editor de niveis." + +#: src/editor/editor.cpp:626 +msgid "" +"Don't forget that your levels and assets\n" +"aren't saved between sessions!\n" +"If you want to keep your levels, download them\n" +"from the \"Manage Assets\" menu." +msgstr "Non esquezas que os teus niveles e datos\ngárdanse entre sesións!\nSe queres gardar os niveis, descárgaos\ndende o menú de “Xestionar Datos”." + +#: src/editor/editor.cpp:661 msgid "This level contains unsaved changes, do you want to save?" msgstr "Este nivel contén cambios non gardados, queres gardalos?" -#: src/editor/editor.cpp:517 +#: src/editor/editor.cpp:662 +msgid "This level may contain unsaved changes, do you want to save?" +msgstr "Este nivel pode conter cambios sen gardar, queres gardar?" + +#: src/editor/editor.cpp:797 msgid "" "Some obsolete add-ons are still active\n" "and might cause collisions with default Super Tux structure.\n" @@ -2418,432 +4679,463 @@ msgid "" "Disabling these add-ons will not delete your game progress." msgstr "Algúns complementos obsoletos aínda están activos\ne poden crear colisións coa estrutura predeterminada de Super Tux.\nAínda podes activar estes complementos no menú.\nDesactivar estes complementos non eliminará o teu progreso no xogo." -#: src/editor/editor.cpp:520 +#: src/editor/editor.cpp:800 msgid "Disable add-ons" msgstr "Desactivar complementos" -#: src/editor/editor.cpp:525 +#: src/editor/editor.cpp:805 msgid "Ignore (not advised)" msgstr "Ignorar (non aconsellado)" -#: src/editor/editor.cpp:529 +#: src/editor/editor.cpp:809 msgid "Leave editor" msgstr "Deixar o editor" -#: src/editor/editor.cpp:740 +#: src/editor/editor.cpp:1023 msgid "" "Couldn't find a \"main\" sector.\n" "Please change the name of the sector where\n" "you'd like the player to start to \"main\"" msgstr "Non se puido atopar un sector \"principal\".\nCambia o nome do sector onde\nqueiras que o xogador inicie como \"principal\"" -#: src/editor/editor.cpp:744 +#: src/editor/editor.cpp:1027 msgid "" "Couldn't find a \"main\" spawnpoint.\n" " Please change the name of the spawnpoint where\n" "you'd like the player to start to \"main\"" msgstr "Non se puido atopar un punto de inicio \"principal\".\nCambia o nome do punto de inicio onde\nqueiras que o xogador inicie como \"principal\"" -#: src/editor/worldmap_objects.cpp:130 -msgid "Outro script" -msgstr "Script de saída" - -#: src/editor/worldmap_objects.cpp:131 -msgid "Auto play" -msgstr "Reprodución automática" - -#: src/editor/worldmap_objects.cpp:133 -msgid "Title colour" -msgstr "Cor do título" - -#: src/editor/worldmap_objects.cpp:175 -msgid "Automatic" -msgstr "Automático" - -#: src/editor/worldmap_objects.cpp:177 -msgid "Target worldmap" -msgstr "Mapa principal obxectivo" - -#: src/editor/worldmap_objects.cpp:240 -msgid "Stay action" -msgstr "Posición estática" - -#: src/editor/worldmap_objects.cpp:241 -msgid "Initial stay action" -msgstr "Posición estática inicial" - -#: src/editor/worldmap_objects.cpp:242 -msgid "Stay group" -msgstr "Grupo estático" +#: src/editor/object_menu.cpp:60 +msgid "Patch Notes" +msgstr "Notas do parche" -#: src/editor/worldmap_objects.cpp:243 -msgid "Change on touch" -msgstr "Cambiar ó tocar" - -#: src/editor/worldmap_objects.cpp:273 -msgid "Show message" -msgstr "Amosar mensaxe" - -#: src/editor/worldmap_objects.cpp:275 -msgid "Invisible" -msgstr "Invisible" +#: src/editor/object_menu.cpp:84 +msgid "" +"This will update the object to its latest functionality.\n" +"Check the \"Patch Notes\" for more information.\n" +"\n" +"Keep in mind this is very likely to break the proper behaviour of the object.\n" +"Make sure to re-check any behaviour, related to the object." +msgstr "Isto actualizará o obxecto á súa última funcionalidade.\nConsulta as \"Notas do parche\" para máis información.\n\nTen en conta que isto probablemente afectará o comportamento correcto do obxecto.\nAsegúrate de volver comprobar calquera comportamento relacionado co obxecto." + +#: src/editor/object_menu.cpp:98 +#, c++-format +msgid "Patch notes for v{}:" +msgstr "Notas do parche para v{}:" + +#: src/editor/overlay_widget.cpp:1062 +msgid "Cannot select deprecated tiles" +msgstr "Non se poden seleccionar bloques obsoletos" + +#: src/editor/overlay_widget.cpp:1567 +msgid "Autotile mode is on" +msgstr "O modo de Tesela Automática está activado" + +#: src/editor/overlay_widget.cpp:1571 +msgid "Hold Ctrl to enable autotile" +msgstr "Pulsar a tecla Ctrl para activar a tesela automática" + +#: src/editor/overlay_widget.cpp:1578 +msgid "Autotile erasing mode is on" +msgstr "O modo de borrado de tesela automática está activado" + +#: src/editor/overlay_widget.cpp:1582 +msgid "Selected tile isn't autotileable" +msgstr "A tesela seleccionada non é autoteselable" + +#: src/editor/overlay_widget.cpp:1587 +msgid "Hold Ctrl to enable autotile erasing" +msgstr "Pulsar a tecla Ctrl para activar o borrado da tesela automática" #: data//credits.stxt:25 msgid "Current SuperTux Team" msgstr "Equipo Actual de SuperTux" #: data//credits.stxt:30 -msgid "Programming, project lead ad interim" -msgstr "Programación, líder do proxecto como interino" +msgid "Maintainer, Programming" +msgstr "Mantedor, Programación" #: data//credits.stxt:35 msgid "Graphics, Level Design, Story" msgstr "Gráficos, Deseño de Niveis, Historia" #: data//credits.stxt:40 -msgid "Graphics, Story, Optimisation" -msgstr "Gráficos, Historia, Optimización" +msgid "Level Design, Story, Optimisation, Coordination" +msgstr "Deseño de Niveis, Historia, Optimización, Coordinación" -#: data//credits.stxt:45 data//credits.stxt:100 data//credits.stxt:186 -#: data//credits.stxt:498 +#: data//credits.stxt:45 data//credits.stxt:120 data//credits.stxt:206 +#: data//credits.stxt:538 msgid "Graphics" msgstr "Gráficos" -#: data//credits.stxt:50 data//credits.stxt:60 data//credits.stxt:82 -#: data//credits.stxt:88 +#: data//credits.stxt:50 data//credits.stxt:102 data//credits.stxt:108 msgid "Graphics, Programming, Level Design" msgstr "Gráficos, Programación, Deseño de Niveis" #: data//credits.stxt:55 +msgid "Features and Programming" +msgstr "Funcións e Programación" + +#: data//credits.stxt:60 +msgid "Minor features and programming" +msgstr "Pequenas melloras e programación" + +#: data//credits.stxt:65 +msgid "Programming, Level Updates" +msgstr "Programación, Actualización de Niveis" + +#: data//credits.stxt:70 msgid "Graphics, Programming" msgstr "Gráficos, Programación" -#: data//credits.stxt:65 data//credits.stxt:130 data//credits.stxt:135 -#: data//credits.stxt:140 data//credits.stxt:145 data//credits.stxt:160 -#: data//credits.stxt:165 data//credits.stxt:494 data//credits.stxt:506 +#: data//credits.stxt:75 data//credits.stxt:85 data//credits.stxt:150 +#: data//credits.stxt:155 data//credits.stxt:160 data//credits.stxt:165 +#: data//credits.stxt:180 data//credits.stxt:185 data//credits.stxt:534 +#: data//credits.stxt:546 msgid "Programming" msgstr "Programación" -#: data//credits.stxt:71 +#: data//credits.stxt:80 data//credits.stxt:266 +msgid "Level Design" +msgstr "Deseño de Niveis" + +#: data//credits.stxt:91 msgid "Original Developers" msgstr "Programadores Orixinais" -#: data//credits.stxt:76 +#: data//credits.stxt:96 msgid "Original Developer" msgstr "Programador Orixinal" -#: data//credits.stxt:94 +#: data//credits.stxt:114 msgid "Music, Level Design" msgstr "Música, Deseño de Niveis" -#: data//credits.stxt:106 +#: data//credits.stxt:126 msgid "Programming, Graphics, Level Design" msgstr "Programación, Gráficos, Deseño de Niveis" -#: data//credits.stxt:112 +#: data//credits.stxt:132 msgid "Programming, Level Design" msgstr "Programación, Deseño de Niveis" -#: data//credits.stxt:118 +#: data//credits.stxt:138 msgid "Graphics, Story" msgstr "Gráficos, Historia" -#: data//credits.stxt:124 +#: data//credits.stxt:144 msgid "Programming, Documentation" msgstr "Programación, Documentación" -#: data//credits.stxt:150 +#: data//credits.stxt:170 msgid "Coordination" msgstr "Coordinación" -#: data//credits.stxt:155 +#: data//credits.stxt:175 msgid "Programming, \"Flexlay\" Level editor" msgstr "Programación, Editor de Niveis \"Flexlay\"" -#: data//credits.stxt:170 +#: data//credits.stxt:190 msgid "Windows build fixes" msgstr "Arranxos das compilacións de Windows" -#: data//credits.stxt:175 +#: data//credits.stxt:195 msgid "Packaging, Nightly builds" msgstr "Empaquetado, Compilacións automáticas" -#: data//credits.stxt:180 +#: data//credits.stxt:200 msgid "Translation Guru (and many details anyone else could have done)" msgstr "Gurú da Tradución (e moitos máis detalles que ninguén máis ten feito)" -#: data//credits.stxt:240 -msgid "Level Design" -msgstr "Deseño de Niveis" - -#: data//credits.stxt:414 +#: data//credits.stxt:450 msgid "Additional contributors" msgstr "Colaboradores adicionais" -#: data//credits.stxt:419 +#: data//credits.stxt:455 msgid "Bug fixes" msgstr "Arranxos de erros" -#: data//credits.stxt:423 +#: data//credits.stxt:459 msgid "Scripting functions, Level fixes" msgstr "Funcións de script, Arranxos de niveis" -#: data//credits.stxt:427 +#: data//credits.stxt:463 msgid "Code quality fixes" msgstr "Arranxos da calidade do código" -#: data//credits.stxt:431 data//credits.stxt:435 data//credits.stxt:439 -#: data//credits.stxt:466 +#: data//credits.stxt:467 data//credits.stxt:471 data//credits.stxt:475 +#: data//credits.stxt:502 msgid "Various contributions" msgstr "Contribucións varias" -#: data//credits.stxt:443 +#: data//credits.stxt:479 msgid "Build issue fix" msgstr "Arranxo de incidencia da compilación" -#: data//credits.stxt:447 data//credits.stxt:451 +#: data//credits.stxt:483 data//credits.stxt:487 msgid "Code contributions" msgstr "Contribucións de código" -#: data//credits.stxt:454 +#: data//credits.stxt:490 msgid "Code contribution, AppData file" msgstr "Contribución de código, Ficheiro AppData" -#: data//credits.stxt:458 +#: data//credits.stxt:494 msgid "Bug fix" msgstr "Amaño de erros" -#: data//credits.stxt:462 +#: data//credits.stxt:498 msgid "Menu reorganization" msgstr "Reorganización do Menú" -#: data//credits.stxt:470 +#: data//credits.stxt:506 msgid "Fixing tile bugs" msgstr "Amañar erros das teselas" -#: data//credits.stxt:474 +#: data//credits.stxt:510 msgid "Build error fix" msgstr "Arranxo de erro da compilación" -#: data//credits.stxt:478 +#: data//credits.stxt:514 msgid "Scripting function fix" msgstr "Arranxo da función de script" -#: data//credits.stxt:482 +#: data//credits.stxt:518 +msgid "New features and notable updates" +msgstr "Novas funcións e actualizacións importantes" + +#: data//credits.stxt:522 msgid "Support for \"glbinding\" as optional OpenGL binding" msgstr "Asistencia para \"glbinding\" como vínculo opcional a OpenGL" -#: data//credits.stxt:486 +#: data//credits.stxt:526 msgid "New menu code" msgstr "Código do novo menú" -#: data//credits.stxt:490 +#: data//credits.stxt:530 msgid "Big Tux Walking Sprites improvements" -msgstr "Grandes melloras das Fadas Camiñantes de Tux" +msgstr "Grandes melloras nos Gráficos animados do camiñar de Tux" -#: data//credits.stxt:502 data//credits.stxt:510 +#: data//credits.stxt:542 data//credits.stxt:550 msgid "Contrib Programming" msgstr "Programación de Colaboradores" -#: data//credits.stxt:514 +#: data//credits.stxt:554 msgid "Programming, Previous Maintainer" msgstr "Programación, Encargado de Mantemento Anterior" -#: data//credits.stxt:518 +#: data//credits.stxt:558 msgid "Various Contributions" msgstr "Contribucións Varias" -#: data//credits.stxt:522 data//credits.stxt:526 data//credits.stxt:530 -#: data//credits.stxt:534 data//credits.stxt:538 data//credits.stxt:542 -#: data//credits.stxt:546 data//credits.stxt:550 data//credits.stxt:554 +#: data//credits.stxt:562 data//credits.stxt:566 data//credits.stxt:570 +#: data//credits.stxt:574 data//credits.stxt:578 data//credits.stxt:582 +#: data//credits.stxt:586 data//credits.stxt:590 data//credits.stxt:594 +#: data//credits.stxt:598 data//credits.stxt:602 data//credits.stxt:606 +#: data//credits.stxt:610 data//credits.stxt:614 data//credits.stxt:618 +#: data//credits.stxt:622 data//credits.stxt:626 data//credits.stxt:630 +#: data//credits.stxt:634 data//credits.stxt:638 data//credits.stxt:642 +#: data//credits.stxt:646 data//credits.stxt:650 data//credits.stxt:654 +#: data//credits.stxt:658 data//credits.stxt:662 msgid "Contributions" msgstr "Colaboracións" -#: data//credits.stxt:560 +#: data//credits.stxt:668 msgid "Localization" msgstr "Localización" -#: data//credits.stxt:1107 +#: data//credits.stxt:1231 msgid " Special Thanks to" msgstr "Agradecemento Especial a" -#: data//credits.stxt:1112 +#: data//credits.stxt:1236 msgid "Creator of Tux, the Linux penguin" msgstr "Creador de Tux, o pingüín de Linux" -#: data//credits.stxt:1116 +#: data//credits.stxt:1240 msgid "SDL, OpenAL and OpenGL" msgstr "SDL, OpenAL e OpenGL" -#: data//credits.stxt:1117 +#: data//credits.stxt:1241 msgid "" "For making such a great gaming experience\n" " possible on Linux" msgstr "Por facer posible esta gran experiencia de xogo\nen Linux" -#: data//credits.stxt:1122 +#: data//credits.stxt:1246 msgid "and you, the player" msgstr "e a ti, o xogador" -#: data//credits.stxt:1123 +#: data//credits.stxt:1247 msgid "for giving this game a chance and playing it" msgstr "por darlle unha oportunidade e xogar con el" -#: data//credits.stxt:1134 +#: data//credits.stxt:1258 msgid "Visit our webpage at" msgstr "Visita a nosa páxina web en" -#: data//credits.stxt:1143 +#: data//credits.stxt:1267 msgid "Or visit us directly at IRC:" msgstr "Ou visítanos directamente no IRC:" -#: data//credits.stxt:1147 -msgid "#supertux at webchat.freenode.net" -msgstr "#supertux en webchat.freenode.net" +#: data//credits.stxt:1271 +msgid "#supertux at web.libera.chat" +msgstr "#supertux en web.libera.chat" -#: data//credits.stxt:1152 +#: data//credits.stxt:1276 msgid "Or at our Forum:" msgstr "Ou no Foro:" -#: data//credits.stxt:1161 +#: data//credits.stxt:1285 msgid "Comments, ideas and suggestions" msgstr "Comentarios, ideas e suxerencias" -#: data//credits.stxt:1165 +#: data//credits.stxt:1289 msgid "go to our mailing list" msgstr "vai á nosa lista de correo" #. l10n: typo contact -#: data//credits.stxt:1175 +#: data//credits.stxt:1299 msgid "Typographical errors can be" msgstr "Os erros tipográficos poden" #. l10n: typo contact -#: data//credits.stxt:1180 +#: data//credits.stxt:1304 msgid "reported to" msgstr "informarse en" #. l10n: typo contact, see -#: data//credits.stxt:1185 +#: data//credits.stxt:1309 msgid "supertux-devel@lists.lethargik.org" msgstr "supertux-devel@lists.lethargik.org" -#: data//credits.stxt:1192 +#: data//credits.stxt:1316 msgid "Want to help…" msgstr "Queres axudar..." -#: data//credits.stxt:1197 +#: data//credits.stxt:1321 msgid "…with localization?" msgstr "...coa localización?" -#: data//credits.stxt:1207 +#: data//credits.stxt:1331 msgid "…with something else?" msgstr "...con algo máis?" -#: data//credits.stxt:1218 +#: data//credits.stxt:1342 msgid "Thank you for" msgstr "Grazas por" -#: data//credits.stxt:1222 +#: data//credits.stxt:1346 msgid "playing" msgstr "xogar" -#: data//credits.stxt:1232 +#: data//credits.stxt:1356 msgid "Penny awaits you in warmer temperatures!" msgstr "Penny agárdate en temperaturas máis cálidas!" -#: data//images/engine/editor/objects.stoi:156 +#: data//images/engine/editor/objects.stoi:4 +msgid "Enemies" +msgstr "Inimigos" + +#: data//images/engine/editor/objects.stoi:162 msgid "Bosses" msgstr "Xefes" -#: data//images/engine/editor/objects.stoi:167 +#: data//images/engine/editor/objects.stoi:173 msgid "Projectiles" msgstr "Proxectís" -#: data//images/engine/editor/objects.stoi:181 +#: data//images/engine/editor/objects.stoi:184 msgid "Environment" msgstr "Ambiente" -#: data//images/ice_world.strf:6 data//images/tiles.strf:327 -#: data//images/worldmap.strf:67 -msgid "Forest" -msgstr "Bosque" - -#: data//images/ice_world.strf:106 +#: data//images/ice_world.strf:80 msgid "Ice Cave & Crystal" msgstr "Cova de Xeo & Cristal" -#: data//images/ice_world.strf:153 +#: data//images/ice_world.strf:127 msgid "Embellishments" msgstr "Adornos" -#: data//images/ice_world.strf:237 -msgid "Ice" -msgstr "Xeo" +#: data//images/ice_world.strf:320 +msgid "Underground Forest" +msgstr "Bosque Subterráneo" -#: data//images/ice_world.strf:282 data//images/tiles.strf:693 -msgid "Castle" -msgstr "Castelo" +#: data//images/ice_world.strf:375 +msgid "Trees & Bushes" +msgstr "Árbores & Arbustos" + +#: data//images/ice_world.strf:406 +msgid "Seasonal" +msgstr "Estacional" -#: data//images/ice_world.strf:328 +#: data//images/ice_world.strf:496 +msgid "Structure" +msgstr "Estrutura" + +#: data//images/ice_world.strf:557 msgid "Pathing" msgstr "Camiñar" -#: data//images/ice_world.strf:424 +#: data//images/ice_world.strf:718 msgid "Water" msgstr "Auga" -#: data//images/tiles.strf:19 data//images/worldmap.strf:41 -msgid "Snow" -msgstr "Neve" - -#: data//images/tiles.strf:124 +#: data//images/tiles.strf:252 msgid "Snow Background" msgstr "Fondo de Neve" -#: data//images/tiles.strf:162 -msgid "Snow Mountain" -msgstr "Montaña Nevada" - -#: data//images/tiles.strf:236 +#: data//images/tiles.strf:300 msgid "Crystal" msgstr "Cristal" -#: data//images/tiles.strf:457 +#: data//images/tiles.strf:539 msgid "Forest Background" msgstr "Fondo de Bosque" -#: data//images/tiles.strf:572 +#: data//images/tiles.strf:690 +msgid "Corrupted Forest" +msgstr "Bosque corrupto" + +#: data//images/tiles.strf:868 +msgid "Corrupted Background" +msgstr "Fondo corrompido" + +#: data//images/tiles.strf:991 msgid "Block + Bonus" msgstr "Bloque + Bono" -#: data//images/tiles.strf:618 +#: data//images/tiles.strf:1069 msgid "Pole + Signs" msgstr "Signos de Polo +" -#: data//images/tiles.strf:661 +#: data//images/tiles.strf:1113 msgid "Liquid" msgstr "Líquido" -#: data//images/tiles.strf:833 data//images/worldmap.strf:199 +#: data//images/tiles.strf:1131 +msgid "Castle" +msgstr "Castelo" + +#: data//images/tiles.strf:1231 data//images/worldmap.strf:199 msgid "Halloween" msgstr "Halloween" -#: data//images/tiles.strf:861 +#: data//images/tiles.strf:1272 msgid "Industrial" msgstr "Industrial" -#: data//images/tiles.strf:876 +#: data//images/tiles.strf:1287 msgid "Unisolid + Lightmap" msgstr "Unisolid + Mapa de Luz" -#: data//images/tiles.strf:893 +#: data//images/tiles.strf:1314 msgid "Miscellaneous" msgstr "Miscelánea" -#: data//images/tiles.strf:927 -msgid "Old/Unused" -msgstr "Antigo/Non utilizado" +#: data//images/tiles.strf:1342 +msgid "Retro Tiles" +msgstr "Bloques retro" #: data//images/worldmap.strf:24 msgid "Water paths" @@ -2856,3 +5148,19 @@ msgstr "Camiños do castelo" #: data//images/worldmap.strf:135 msgid "Darker Forest" msgstr "O Bosque Máis Escuro" + +#: data//images/converters/data.stcd:3 +msgid "Nightly Tiles" +msgstr "bloques nocturnos (nightly)" + +#: data//images/converters/data.stcd:5 +msgid "For levels, created in previous Nightly builds." +msgstr "Para niveis, creados en compilacións nocturnas (nightly) anteriores." + +#: data//images/converters/data.stcd:8 +msgid "Pre-0.6.3 Crystal Tiles" +msgstr "Bloques de cristal anteriores á versión -0.6.3" + +#: data//images/converters/data.stcd:10 +msgid "For levels, created in pre-0.6.3 versions, which use crystal tiles." +msgstr "Para niveis creados en versións anteriores á -0.6.3, que usan bloques de cristal." diff --git a/data/locale/it.po b/data/locale/it.po index 76610b9fa30..08620800806 100644 --- a/data/locale/it.po +++ b/data/locale/it.po @@ -4,15 +4,19 @@ # # Translators: # Angela , 2014-2015 +# A-TNT DC, 2021 # Benjamin Leduc , 2015 +# A-TNT DC, 2021 # Gianfranco Del Borrello , 2016 # Iknos , 2004 +# Ioma Taani, 2019-2020 # Ioma Taani, 2015 # Irene Di Rosa, 2014 -# Marcello Bolognesi, 2013-2015 +# 17c2573a89e395c6dd973e5d003db498_36e4c1e, 2013-2015 +# PoketMarty, 2024 # Ioma Taani, 2018 # Ioma Taani, 2018 -# Seb47TV , 2016 +# Seb47 , 2016 # Simone Centonze , 2018 # William Beltrán , 2016 # William Beltrán , 2016 @@ -20,612 +24,973 @@ msgid "" msgstr "" "Project-Id-Version: SuperTux\n" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" -"POT-Creation-Date: 2019-11-24 01:44+0100\n" -"PO-Revision-Date: 2019-12-09 16:23+0000\n" -"Last-Translator: ginoingras \n" -"Language-Team: Italian (http://www.transifex.com/arctic-games/supertux/language/it/)\n" +"POT-Creation-Date: 2024-05-30 16:19+0200\n" +"PO-Revision-Date: 2013-08-10 22:56+0000\n" +"Last-Translator: PoketMarty, 2024\n" +"Language-Team: Italian (http://app.transifex.com/arctic-games/supertux/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: src/trigger/secretarea_trigger.cpp:53 src/trigger/secretarea_trigger.cpp:61 +#: src/trigger/secretarea_trigger.cpp:47 msgid "You found a secret area!" msgstr "Hai trovato un'area segreta!" -#: src/trigger/secretarea_trigger.cpp:77 src/trigger/scripttrigger.cpp:75 -#: src/supertux/game_object.cpp:88 src/supertux/menu/editor_sector_menu.cpp:34 -#: src/supertux/menu/editor_levelset_menu.cpp:58 +#: src/trigger/secretarea_trigger.cpp:55 src/supertux/game_object.cpp:115 +#: src/supertux/menu/editor_sector_menu.cpp:36 +#: src/supertux/menu/editor_levelset_menu.cpp:52 #: src/supertux/menu/editor_new_levelset_menu.cpp:34 +#: src/supertux/menu/profile_name_menu.cpp:39 #: src/supertux/menu/editor_level_menu.cpp:33 msgid "Name" msgstr "Nome" -#: src/trigger/secretarea_trigger.cpp:78 +#: src/trigger/secretarea_trigger.cpp:56 msgid "Fade tilemap" -msgstr "Sbiadisci tilemap" +msgstr "Sbiadisci mappa caselle" -#: src/trigger/secretarea_trigger.cpp:79 src/trigger/climbable.cpp:81 -#: src/object/infoblock.cpp:57 src/editor/worldmap_objects.cpp:174 -#: src/editor/worldmap_objects.cpp:272 +#: src/trigger/secretarea_trigger.cpp:57 src/trigger/climbable.cpp:59 +#: src/object/infoblock.cpp:76 src/worldmap/teleporter.cpp:49 +#: src/worldmap/special_tile.cpp:74 msgid "Message" msgstr "Messaggio" -#: src/trigger/secretarea_trigger.cpp:80 src/trigger/scripttrigger.cpp:80 -#: src/trigger/door.cpp:73 src/object/ispy.cpp:67 -#: src/object/bonus_block.cpp:201 src/object/bonus_block.cpp:205 -#: src/object/pushbutton.cpp:49 src/object/powerup.cpp:188 -#: src/editor/worldmap_objects.cpp:274 +#: src/trigger/secretarea_trigger.cpp:58 src/trigger/scripttrigger.cpp:51 +#: src/trigger/door.cpp:79 src/object/ispy.cpp:53 +#: src/object/bonus_block.cpp:264 src/object/bonus_block.cpp:268 +#: src/object/pushbutton.cpp:62 src/object/powerup.cpp:301 +#: src/worldmap/special_tile.cpp:76 msgid "Script" msgstr "Script" -#: src/trigger/scripttrigger.cpp:73 -msgid "Script Trigger" -msgstr "" - -#: src/trigger/scripttrigger.cpp:76 src/object/tilemap.cpp:219 -#: src/supertux/menu/editor_sector_menu.cpp:39 -#: src/editor/object_option.cpp:148 -msgid "Width" -msgstr "Larghezza" - -#: src/trigger/scripttrigger.cpp:77 src/object/tilemap.cpp:220 -#: src/supertux/menu/editor_sector_menu.cpp:40 -#: src/editor/object_option.cpp:149 -msgid "Height" -msgstr "Altezza" - -#: src/trigger/scripttrigger.cpp:78 src/object/bicycle_platform.cpp:187 -#: src/object/background.cpp:158 src/object/pneumatic_platform.cpp:145 -#: src/supertux/menu/joystick_menu.cpp:172 src/supertux/moving_object.cpp:47 -#: src/editor/worldmap_objects.cpp:73 -msgid "X" -msgstr "X" - -#: src/trigger/scripttrigger.cpp:79 src/object/bicycle_platform.cpp:188 -#: src/object/background.cpp:159 src/object/pneumatic_platform.cpp:146 -#: src/supertux/menu/joystick_menu.cpp:174 src/supertux/moving_object.cpp:48 -#: src/editor/worldmap_objects.cpp:74 -msgid "Y" -msgstr "S" - -#: src/trigger/scripttrigger.cpp:81 src/object/pushbutton.hpp:31 +#: src/trigger/scripttrigger.cpp:52 src/object/pushbutton.hpp:32 msgid "Button" msgstr "Tasto" -#: src/trigger/scripttrigger.cpp:82 +#: src/trigger/scripttrigger.cpp:53 msgid "Oneshot" msgstr "Oneshot" -#: src/trigger/sequence_trigger.hpp:33 +#: src/trigger/sequence_trigger.hpp:31 msgid "Sequence Trigger" +msgstr "Sequenza di innesco" + +#: src/trigger/text_area.cpp:141 +msgid "Once" +msgstr "" + +#: src/trigger/text_area.cpp:142 +msgid "Text change time" +msgstr "" + +#: src/trigger/text_area.cpp:143 +msgid "Fade time" +msgstr "" + +#: src/trigger/text_area.cpp:144 src/object/textscroller.cpp:353 +msgid "Anchor" +msgstr "Ancora" + +#: src/trigger/text_area.cpp:148 +msgid "Anchor offset X" msgstr "" -#: src/trigger/door.cpp:74 src/badguy/willowisp.cpp:280 -#: src/supertux/menu/editor_sector_menu.cpp:32 -#: src/editor/layers_widget.cpp:275 -#: data//images/engine/editor/objects.stoi:297 +#: src/trigger/text_area.cpp:149 +msgid "Anchor offset Y" +msgstr "" + +#: src/trigger/text_area.cpp:150 +msgid "Texts" +msgstr "" + +#: src/trigger/door.cpp:80 src/badguy/willowisp.cpp:311 +#: src/worldmap/teleporter.cpp:47 data//images/engine/editor/objects.stoi:342 msgid "Sector" msgstr "Settore" -#: src/trigger/door.cpp:75 src/editor/worldmap_objects.hpp:101 +#: src/trigger/door.cpp:81 src/worldmap/spawn_point.hpp:58 msgid "Spawn point" -msgstr "Punto di apparizione" +msgstr "Punto di rientro" -#: src/trigger/switch.cpp:61 src/object/block.cpp:212 src/object/torch.cpp:89 -#: src/object/moving_sprite.cpp:156 src/object/pneumatic_platform.cpp:144 -msgid "Sprite" -msgstr "Sprite" +#: src/trigger/door.cpp:82 +msgid "Locked?" +msgstr "" + +#: src/trigger/door.cpp:83 +msgid "Lock Color" +msgstr "" + +#: src/trigger/switch.cpp:62 src/object/ispy.cpp:54 src/object/bumper.cpp:53 +#: src/object/spotlight.cpp:106 src/object/pushbutton.cpp:61 +#: src/object/gradient.cpp:103 src/object/conveyor_belt.cpp:60 +#: src/badguy/badguy.cpp:1063 src/worldmap/spawn_point.cpp:79 +#: src/worldmap/special_tile.cpp:78 +msgid "Direction" +msgstr "Direzione" -#: src/trigger/switch.cpp:62 +#: src/trigger/switch.cpp:65 msgid "Turn on script" msgstr "Attiva script" -#: src/trigger/switch.cpp:63 +#: src/trigger/switch.cpp:66 msgid "Turn off script" msgstr "Disattiva script" -#: src/trigger/sequence_trigger.cpp:75 +#: src/trigger/scripttrigger.hpp:29 +msgid "Script Trigger" +msgstr "Script d'attivazione" + +#: src/trigger/sequence_trigger.cpp:48 msgid "Sequence" msgstr "Sequenza" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "end sequence" msgstr "fine sequenza" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "stop Tux" msgstr "ferma Tux" -#: src/trigger/sequence_trigger.cpp:76 +#: src/trigger/sequence_trigger.cpp:49 msgid "fireworks" msgstr "fuochi artificiali" -#: src/trigger/sequence_trigger.cpp:80 +#: src/trigger/sequence_trigger.cpp:53 msgid "New worldmap spawnpoint" msgstr "Nuovo punto di rinascita nella mappa del mondo" -#: src/trigger/sequence_trigger.cpp:81 +#: src/trigger/sequence_trigger.cpp:54 msgid "Worldmap fade tilemap" -msgstr "Sbiadisci tilemap nella mappa del mondo" +msgstr "Sbiadisci mappa caselle nella mappa del mondo" -#: src/trigger/sequence_trigger.cpp:82 +#: src/trigger/sequence_trigger.cpp:55 +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 msgid "Fade" msgstr "Sbiadisci" -#: src/trigger/sequence_trigger.cpp:83 +#: src/trigger/sequence_trigger.cpp:56 src/editor/particle_editor.cpp:161 msgid "Fade in" msgstr "Dissolvenza in apertura" -#: src/trigger/sequence_trigger.cpp:83 +#: src/trigger/sequence_trigger.cpp:56 src/editor/particle_editor.cpp:167 +#: src/editor/particle_editor.cpp:212 msgid "Fade out" msgstr "Dissolvenza in chiusura" -#: src/trigger/climbable.hpp:37 +#: src/trigger/climbable.hpp:46 msgid "Climbable" msgstr "Arrampicabile" -#: src/trigger/door.hpp:34 +#: src/trigger/text_area.hpp:47 +msgid "Text Area" +msgstr "Area di Testo" + +#: src/trigger/door.hpp:31 msgid "Door" msgstr "Porta" -#: src/trigger/switch.hpp:33 +#: src/trigger/switch.hpp:30 msgid "Switch" msgstr "Interruttore" #: src/trigger/secretarea_trigger.hpp:36 msgid "Secret Area" -msgstr "" +msgstr "Area Segreta" + +#: src/math/anchor_point.cpp:33 +msgid "Top Left" +msgstr "Cima a Sinistra" + +#: src/math/anchor_point.cpp:34 +msgid "Top" +msgstr "Cima" + +#: src/math/anchor_point.cpp:35 +msgid "Top Right" +msgstr "Cima a Destra" + +#: src/math/anchor_point.cpp:36 src/object/textscroller.cpp:354 +#: src/object/textscroller.cpp:358 src/supertux/menu/keyboard_menu.cpp:38 +#: src/supertux/menu/joystick_menu.cpp:73 +msgid "Left" +msgstr "Sinistra" + +#: src/math/anchor_point.cpp:37 +msgid "Middle" +msgstr "Centro" -#: src/object/thunderstorm.hpp:40 +#: src/math/anchor_point.cpp:38 src/object/textscroller.cpp:354 +#: src/object/textscroller.cpp:358 src/supertux/menu/keyboard_menu.cpp:39 +#: src/supertux/menu/joystick_menu.cpp:74 +msgid "Right" +msgstr "Destra" + +#: src/math/anchor_point.cpp:39 +msgid "Bottom Left" +msgstr "Fondo a Sinistra" + +#: src/math/anchor_point.cpp:40 +msgid "Bottom" +msgstr "Fondo" + +#: src/math/anchor_point.cpp:41 +msgid "Bottom Right" +msgstr "Fondo a Destra" + +#: src/object/thunderstorm.hpp:44 msgid "Thunderstorm" msgstr "Tempesta di fulmini" -#: src/object/ispy.cpp:66 -msgid "Facing Down" -msgstr "" +#: src/object/cloud_particle_system.cpp:77 +#: src/object/rain_particle_system.cpp:100 +msgid "Intensity" +msgstr "Intensità" -#: src/object/ispy.cpp:68 src/object/gradient.cpp:124 -#: src/badguy/willowisp.cpp:279 src/badguy/badguy.cpp:833 -#: src/editor/worldmap_objects.cpp:209 src/editor/worldmap_objects.cpp:276 -msgid "Direction" -msgstr "Direzione" +#: src/object/custom_particle_system.hpp:46 +msgid "Custom Particles" +msgstr "Particelle Personalizzate" -#: src/object/path_gameobject.hpp:44 src/object/coin.cpp:262 -#: src/object/camera.cpp:212 src/object/platform.cpp:65 -#: src/object/path_gameobject.cpp:168 src/object/tilemap.cpp:233 -#: src/badguy/willowisp.cpp:286 +#: src/object/particle_zone.hpp:41 +msgid "Particle zone" +msgstr "Zona Particellare" + +#: src/object/path_gameobject.hpp:45 src/object/coin.cpp:324 +#: src/object/camera.cpp:168 src/object/platform.cpp:76 +#: src/object/path_gameobject.cpp:175 src/object/tilemap.cpp:284 +#: src/badguy/willowisp.cpp:317 msgid "Path" msgstr "Percorso" -#: src/object/decal.cpp:41 src/object/scripted_object.cpp:67 -#: src/object/particlesystem.cpp:62 src/object/background.cpp:162 -#: src/object/thunderstorm.cpp:68 src/object/tilemap.cpp:226 -#: src/object/gradient.cpp:122 -msgid "Z-pos" -msgstr "Z-pos" - -#: src/object/decal.cpp:42 src/object/scripted_object.cpp:70 -#: src/object/tilemap.cpp:215 +#: src/object/decal.cpp:48 src/object/scripted_object.cpp:70 +#: src/object/tilemap.cpp:266 msgid "Solid" msgstr "Solido" -#: src/object/decal.cpp:43 src/supertux/menu/keyboard_menu.cpp:37 -#: src/supertux/menu/joystick_menu.cpp:74 +#: src/object/decal.cpp:49 src/supertux/menu/keyboard_menu.cpp:41 +#: src/supertux/menu/joystick_menu.cpp:76 msgid "Action" msgstr "Azione" -#: src/object/weak_block.hpp:35 +#: src/object/weak_block.hpp:36 msgid "Weak Tile" -msgstr "" +msgstr "Casella Debole" -#: src/object/gradient.hpp:42 +#: src/object/gradient.hpp:43 msgid "Gradient" msgstr "Gradiente" -#: src/object/tilemap.hpp:53 +#: src/object/tilemap.hpp:58 msgid "Tilemap" -msgstr "Tilemap" +msgstr "Mappa Caselle" + +#: src/object/sound_object.cpp:69 src/object/ambient_sound.cpp:85 +#: src/object/sound_object.hpp:42 src/supertux/menu/options_menu.cpp:128 +#: data//credits.stxt:367 +msgid "Sound" +msgstr "Suono" + +#: src/object/sound_object.cpp:70 src/object/ambient_sound.cpp:87 +msgid "Volume" +msgstr "Volume" + +#: src/object/conveyor_belt.hpp:39 +msgid "Conveyor Belt" +msgstr "Nastro Trasportatore" + +#: src/object/unstable_tile.cpp:70 src/object/weak_block.cpp:97 +#: src/badguy/flame.cpp:86 +msgid "Ice" +msgstr "Ghiaccio" + +#: src/object/unstable_tile.cpp:71 src/object/brick.hpp:34 +msgid "Brick" +msgstr "Mattone" + +#: src/object/unstable_tile.cpp:72 +msgid "Delayed" +msgstr "Posticipato" + +#: src/object/circleplatform.hpp:35 +msgid "Circular Platform" +msgstr "Piattaforma circolare" + +#: src/object/brick.cpp:59 src/object/coin.cpp:69 +#: src/object/invisible_block.cpp:37 src/object/background.cpp:200 +#: src/object/tilemap.cpp:279 src/object/gradient.cpp:109 +#: src/badguy/viciousivy.cpp:44 src/badguy/snail.cpp:69 +#: src/badguy/smartball.cpp:34 src/badguy/bouncing_snowball.cpp:81 +#: src/badguy/kamikazesnowball.cpp:117 src/badguy/walkingleaf.cpp:35 +#: src/badguy/mrbomb.cpp:47 src/badguy/igel.cpp:188 src/badguy/snowball.cpp:40 +#: src/badguy/mrtree.cpp:50 src/badguy/mriceblock.cpp:62 +msgid "Normal" +msgstr "Normale" + +#: src/object/brick.cpp:60 src/object/bonus_block.cpp:175 +#: src/object/coin.cpp:70 src/object/invisible_block.cpp:38 +msgid "Retro" +msgstr "Retro" -#: src/object/brick.cpp:133 +#: src/object/brick.cpp:166 msgid "Breakable" msgstr "Rompibile" -#: src/object/trampoline.cpp:136 src/object/rusty_trampoline.cpp:66 +#: src/object/trampoline.cpp:66 src/object/rusty_trampoline.cpp:66 msgid "Portable" msgstr "Portatile" -#: src/object/spotlight.cpp:59 +#: src/object/trampoline.cpp:67 +msgid "Stationary" +msgstr "Stazionario" + +#: src/object/key.hpp:38 +msgid "Key" +msgstr "Chiave" + +#: src/object/spotlight.cpp:102 src/object/particlesystem.cpp:64 +#: src/object/particle_zone.cpp:50 src/badguy/darttrap.cpp:149 +#: src/supertux/menu/addon_preview_menu.cpp:189 +msgid "Enabled" +msgstr "Abilitato" + +#: src/object/spotlight.cpp:103 src/object/rain_particle_system.cpp:101 msgid "Angle" msgstr "Angolo" -#: src/object/spotlight.cpp:60 src/object/magicblock.cpp:94 -#: src/object/candle.cpp:76 src/object/lantern.cpp:62 -#: src/object/ambient_light.cpp:131 src/badguy/walking_candle.cpp:82 +#: src/object/spotlight.cpp:104 src/object/magicblock.cpp:95 +#: src/object/candle.cpp:75 src/object/torch.cpp:96 src/object/rublight.cpp:55 +#: src/object/lantern.cpp:62 src/object/ambient_light.cpp:122 +#: src/object/key.cpp:192 src/badguy/willowisp.cpp:319 +#: src/badguy/walking_candle.cpp:91 msgid "Color" msgstr "Colore" -#: src/object/spotlight.cpp:61 src/object/textscroller.cpp:279 -#: src/badguy/flame.cpp:59 +#: src/object/spotlight.cpp:105 src/object/textscroller.cpp:350 +#: src/object/rain_particle_system.cpp:102 src/object/conveyor_belt.cpp:61 +#: src/object/circleplatform.cpp:58 src/badguy/flame.cpp:110 +#: src/editor/node_marker.cpp:125 msgid "Speed" msgstr "Velocità" -#: src/object/spotlight.cpp:62 +#: src/object/spotlight.cpp:107 +msgid "Clockwise" +msgstr "Orario" + +#: src/object/spotlight.cpp:107 msgid "Counter-clockwise" msgstr "Anti-orario" +#: src/object/spotlight.cpp:107 +msgid "Stopped" +msgstr "Arrestato" + +#: src/object/spotlight.cpp:110 src/object/lit_object.cpp:69 +#: src/object/candle.cpp:76 src/object/torch.cpp:95 +msgid "Layer" +msgstr "Livello" + #: src/object/scripted_object.cpp:71 msgid "Physics enabled" -msgstr "Fisica attivata" +msgstr "Fisica abilitata" #: src/object/scripted_object.cpp:72 msgid "Visible" msgstr "Visibile" -#: src/object/scripted_object.cpp:73 src/badguy/willowisp.cpp:282 +#: src/object/scripted_object.cpp:73 src/badguy/willowisp.cpp:313 msgid "Hit script" msgstr "Script di collisione" -#: src/object/bonus_block.cpp:202 +#: src/object/custom_particle_system_file.cpp:53 +#: src/object/textscroller.cpp:348 src/object/music_object.cpp:109 +#: src/supertux/menu/particle_editor_open.cpp:38 +msgid "File" +msgstr "File" + +#: src/object/bonus_block.cpp:154 +msgid "Only one custom object is allowed inside bonus blocks." +msgstr "È permesso un solo oggetto personalizzato all'interno del blocco bonus" + +#: src/object/bonus_block.cpp:172 +msgid "Blue" +msgstr "Blu" + +#: src/object/bonus_block.cpp:173 +msgid "Orange" +msgstr "Arancione" + +#: src/object/bonus_block.cpp:174 +msgid "Purple" +msgstr "Viola" + +#: src/object/bonus_block.cpp:265 src/supertux/menu/cheat_apply_menu.cpp:54 msgid "Count" msgstr "Conteggio" -#: src/object/bonus_block.cpp:203 +#: src/object/bonus_block.cpp:266 msgid "Content" msgstr "Contenuto" -#: src/object/bonus_block.cpp:204 src/object/coin.hpp:43 +#: src/object/bonus_block.cpp:267 src/object/coin.hpp:44 msgid "Coin" msgstr "Moneta" -#: src/object/bonus_block.cpp:204 +#: src/object/bonus_block.cpp:267 msgid "Growth (fire flower)" msgstr "Crescita (fiore di fuoco)" -#: src/object/bonus_block.cpp:204 +#: src/object/bonus_block.cpp:267 msgid "Growth (ice flower)" msgstr "Crescita (fiore di ghiaccio)" -#: src/object/bonus_block.cpp:204 +#: src/object/bonus_block.cpp:267 msgid "Growth (air flower)" msgstr "Crescita (fiore d'aria)" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:268 msgid "Growth (earth flower)" msgstr "Crescita (fiore di terra)" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:268 +msgid "Growth (retro)" +msgstr "Crescita (retro)" + +#: src/object/bonus_block.cpp:268 src/object/powerup.cpp:66 msgid "Star" msgstr "Stella" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:268 +msgid "Star (retro)" +msgstr "Stella (retro)" + +#: src/object/bonus_block.cpp:268 msgid "Tux doll" -msgstr "Bambola Tux" +msgstr "Pupa Tux" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:268 msgid "Custom" msgstr "Personalizzato" -#: src/object/bonus_block.cpp:205 +#: src/object/bonus_block.cpp:268 msgid "Light" msgstr "Luce" -#: src/object/bonus_block.cpp:206 src/object/trampoline.hpp:35 +#: src/object/bonus_block.cpp:268 +msgid "Light (On)" +msgstr "Luce (accesa)" + +#: src/object/bonus_block.cpp:269 src/object/trampoline.hpp:37 msgid "Trampoline" msgstr "Trampolino" -#: src/object/bonus_block.cpp:206 +#: src/object/bonus_block.cpp:269 +msgid "Portable trampoline" +msgstr "Trampolino Portatile" + +#: src/object/bonus_block.cpp:269 msgid "Coin rain" msgstr "Pioggia di monete" -#: src/object/bonus_block.cpp:206 +#: src/object/bonus_block.cpp:269 msgid "Coin explosion" msgstr "Esplosione di monete" -#: src/object/bonus_block.cpp:210 +#: src/object/bonus_block.cpp:269 src/object/rock.hpp:43 +msgid "Rock" +msgstr "Roccia" + +#: src/object/bonus_block.cpp:269 +msgid "Potion" +msgstr "Pozione" + +#: src/object/bonus_block.cpp:275 msgid "Custom Content" -msgstr "" +msgstr "Contenuto personalizzato" + +#: src/object/bonus_block.cpp:278 +msgid "Coin sprite" +msgstr "Sprite moneta" -#: src/object/pneumatic_platform.hpp:62 +#: src/object/pneumatic_platform.hpp:65 msgid "Pneumatic Platform" -msgstr "" +msgstr "Piattaforma pneumatica" -#: src/object/coin.cpp:264 src/object/tilemap.cpp:235 +#: src/object/coin.cpp:326 src/object/tilemap.cpp:287 msgid "Following path" msgstr "Segue sentiero" -#: src/object/coin.cpp:267 src/object/camera.cpp:215 -#: src/object/platform.cpp:66 src/object/tilemap.cpp:239 +#: src/object/coin.cpp:329 src/object/camera.cpp:171 +#: src/object/platform.cpp:77 src/object/tilemap.cpp:290 msgid "Path Mode" msgstr "Modalità sentiero" -#: src/object/coin.cpp:270 src/object/coin.cpp:298 +#: src/object/coin.cpp:330 src/object/camera.cpp:172 +#: src/object/platform.cpp:78 src/object/tilemap.cpp:291 +#: src/badguy/willowisp.cpp:322 +msgid "Adapt Speed" +msgstr "Adatta la velocità" + +#: src/object/coin.cpp:331 src/object/platform.cpp:81 +#: src/object/tilemap.cpp:285 src/badguy/willowisp.cpp:318 +msgid "Starting Node" +msgstr "Nodo d'inizio" + +#: src/object/coin.cpp:332 src/object/camera.cpp:173 +#: src/object/platform.cpp:82 src/object/tilemap.cpp:293 +#: src/badguy/willowisp.cpp:323 +msgid "Handle" +msgstr "" + +#: src/object/coin.cpp:335 src/object/coin.cpp:371 msgid "Collect script" msgstr "Raccogli script" -#: src/object/ghost_particle_system.hpp:36 +#: src/object/ghost_particle_system.hpp:37 msgid "Ghost Particles" -msgstr "" +msgstr "Particelle fantasma" -#: src/object/camera.cpp:207 +#: src/object/camera.cpp:163 msgid "Mode" msgstr "Modalità" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "normal" msgstr "normale" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "manual" msgstr "manuale" -#: src/object/camera.cpp:208 +#: src/object/camera.cpp:164 msgid "autoscroll" -msgstr "" +msgstr "scorrimento automatico" -#: src/object/textscroller.cpp:280 src/object/music_object.cpp:109 -msgid "File" -msgstr "File" +#: src/object/textscroller.cpp:349 +msgid "Finish Script" +msgstr "Finisci Script" + +#: src/object/textscroller.cpp:351 +msgid "X-offset" +msgstr "sfasamento-X" + +#: src/object/textscroller.cpp:352 +msgid "Controllable" +msgstr "Controllabile" + +#: src/object/textscroller.cpp:354 src/object/textscroller.cpp:358 +msgid "Center" +msgstr "Centro" -#: src/object/spawnpoint.hpp:46 src/badguy/willowisp.cpp:281 -#: src/editor/worldmap_objects.cpp:173 +#: src/object/textscroller.cpp:357 +msgid "Text Alignment" +msgstr "Allineamento del testo" + +#: src/object/lit_object.hpp:40 +msgid "Lit object" +msgstr "" + +#: src/object/spawnpoint.hpp:48 src/badguy/willowisp.cpp:312 +#: src/worldmap/teleporter.cpp:48 msgid "Spawnpoint" -msgstr "Punto di apparizione" +msgstr "Punto di rientro" #: src/object/rusty_trampoline.cpp:65 msgid "Counter" -msgstr "" +msgstr "Contatore" -#: src/object/candle.hpp:36 +#: src/object/candle.hpp:37 msgid "Candle" msgstr "Candela" -#: src/object/particlesystem.cpp:61 src/badguy/darttrap.cpp:127 -msgid "Enabled" -msgstr "Abilitato" +#: src/object/particlesystem.cpp:65 src/object/background.cpp:184 +#: src/object/thunderstorm.cpp:76 src/object/tilemap.cpp:277 +#: src/object/gradient.cpp:101 src/object/moving_sprite.cpp:193 +msgid "Z-pos" +msgstr "Z-pos" -#: src/object/invisible_block.hpp:31 +#: src/object/invisible_block.hpp:30 msgid "Invisible Block" -msgstr "" +msgstr "Blocco invisibile" -#: src/object/snow_particle_system.hpp:35 +#: src/object/snow_particle_system.hpp:37 msgid "Snow Particles" -msgstr "" +msgstr "Particelle neve" -#: src/object/powerup.hpp:35 +#: src/object/powerup.hpp:40 msgid "Powerup" -msgstr "" +msgstr "Potenziamento" -#: src/object/level_time.hpp:55 -msgid "Time Limit" -msgstr "" +#: src/object/infoblock.cpp:78 +msgid "Front Color" +msgstr "Colore Fronte" -#: src/object/ambient_sound.cpp:119 src/supertux/menu/options_menu.cpp:365 -#: data//credits.stxt:335 -msgid "Sound" -msgstr "Suono" +#: src/object/infoblock.cpp:80 +msgid "Back Color" +msgstr "Colore Dietro" -#: src/object/ambient_sound.cpp:120 -msgid "Distance factor" -msgstr "Fattore distanza" +#: src/object/infoblock.cpp:82 +msgid "Roundness" +msgstr "Arrotondamento" -#: src/object/ambient_sound.cpp:121 -msgid "Distance bias" -msgstr "Influenza della distanza" +#: src/object/infoblock.cpp:84 +msgid "Fade Transition" +msgstr "Transizione Dissolvenza" -#: src/object/ambient_sound.cpp:122 -msgid "Volume" -msgstr "Volume" +#: src/object/fallblock.hpp:41 +msgid "Falling Platform" +msgstr "Piattaforma cadente" + +#: src/object/level_time.hpp:56 +msgid "Time Limit" +msgstr "Tempo limite" + +#: src/object/ambient_sound.cpp:86 +msgid "Radius (in tiles)" +msgstr "Raggio (in caselle)" #: src/object/torch.hpp:41 msgid "Torch" msgstr "Torcia" -#: src/object/icecrusher.hpp:48 -msgid "Icecrusher" -msgstr "" +#: src/object/rublight.hpp:34 +msgid "Rublight" +msgstr "Luce a contatto" -#: src/object/background.hpp:42 +#: src/object/background.hpp:45 msgid "Background" msgstr "Sfondo" -#: src/object/firefly.hpp:36 +#: src/object/text_object.hpp:44 src/gui/menu_string_array.cpp:77 +msgid "Text" +msgstr "Testo" + +#: src/object/firefly.hpp:38 msgid "Checkpoint" -msgstr "" +msgstr "Checkpoint" -#: src/object/ambient_light.hpp:36 +#: src/object/ambient_light.hpp:37 msgid "Ambient Light" -msgstr "" +msgstr "Luce ambientale" -#: src/object/lantern.hpp:37 +#: src/object/lantern.hpp:38 msgid "Lantern" msgstr "Lanterna" -#: src/object/wind.hpp:40 +#: src/object/wind.hpp:43 msgid "Wind" msgstr "Vento" -#: src/object/bicycle_platform.cpp:190 +#: src/object/bicycle_platform.cpp:203 src/object/background.cpp:180 +#: src/object/pneumatic_platform.cpp:162 +#: src/supertux/menu/joystick_menu.cpp:172 src/supertux/moving_object.cpp:65 +#: src/worldmap/worldmap_object.cpp:77 +msgid "X" +msgstr "X" + +#: src/object/bicycle_platform.cpp:204 src/object/background.cpp:181 +#: src/object/pneumatic_platform.cpp:163 +#: src/supertux/menu/joystick_menu.cpp:174 src/supertux/moving_object.cpp:66 +#: src/worldmap/worldmap_object.cpp:78 +msgid "Y" +msgstr "Y" + +#: src/object/bicycle_platform.cpp:206 msgid "Platforms" -msgstr "" +msgstr "Piattaforme" -#: src/object/bicycle_platform.cpp:191 src/badguy/flame.cpp:58 -#: src/badguy/crystallo.cpp:36 +#: src/object/bicycle_platform.cpp:207 src/object/circleplatform.cpp:57 +#: src/badguy/fish_swimming.cpp:76 src/badguy/flame.cpp:109 +#: src/badguy/rcrystallo.cpp:83 src/badguy/crystallo.cpp:50 msgid "Radius" msgstr "Raggio" -#: src/object/bicycle_platform.cpp:192 +#: src/object/bicycle_platform.cpp:208 msgid "Momentum change rate" msgstr "Cambia il tasso di moto" -#: src/object/rain_particle_system.hpp:34 +#: src/object/rain_particle_system.hpp:41 msgid "Rain Particles" -msgstr "" +msgstr "Particelle pioggia" -#: src/object/platform.hpp:45 +#: src/object/platform.hpp:46 msgid "Platform" msgstr "Piattaforma" -#: src/object/rock.hpp:42 -msgid "Rock" -msgstr "Roccia" - -#: src/object/music_object.hpp:41 src/supertux/menu/options_menu.cpp:367 -#: data//credits.stxt:277 +#: src/object/music_object.hpp:42 src/supertux/menu/options_menu.cpp:130 +#: data//credits.stxt:309 msgid "Music" msgstr "Musica" -#: src/object/rusty_trampoline.hpp:39 -msgid "Rusty Trampoline" +#: src/object/lit_object.cpp:68 +msgid "Light sprite" +msgstr "" + +#: src/object/lit_object.cpp:71 +msgid "Sprite starting action" +msgstr "" + +#: src/object/lit_object.cpp:72 +msgid "Light sprite starting action" +msgstr "" + +#: src/object/lit_object.cpp:74 +msgid "Light sprite offset X" +msgstr "" + +#: src/object/lit_object.cpp:75 +msgid "Light sprite offset Y" msgstr "" -#: src/object/particlesystem.hpp:57 +#: src/object/rusty_trampoline.hpp:40 +msgid "Rusty Trampoline" +msgstr "Trampolino aggiugginito" + +#: src/object/particlesystem.hpp:58 msgid "Particle system" msgstr "Sistema di particelle" -#: src/object/candle.cpp:74 src/object/torch.cpp:88 +#: src/object/candle.cpp:73 src/object/torch.cpp:94 msgid "Burning" msgstr "Bruciante" -#: src/object/candle.cpp:75 +#: src/object/candle.cpp:74 msgid "Flicker" msgstr "Tremolio" -#: src/object/text_array_object.hpp:50 +#: src/object/snow_particle_system.cpp:104 +msgid "Epsilon" +msgstr "" + +#: src/object/snow_particle_system.cpp:105 +msgid "Spin Speed" +msgstr "" + +#: src/object/snow_particle_system.cpp:106 +msgid "State Length" +msgstr "" + +#: src/object/snow_particle_system.cpp:107 +msgid "Wind Speed" +msgstr "Velocità Vento" + +#: src/object/text_array_object.hpp:47 msgid "Text array" msgstr "Array di testo" -#: src/object/infoblock.hpp:36 +#: src/object/infoblock.hpp:37 msgid "Info Block" +msgstr "Blocco informazioni" + +#: src/object/powerup.cpp:61 +msgid "Egg" +msgstr "" + +#: src/object/powerup.cpp:62 +msgid "Fire Flower" +msgstr "" + +#: src/object/powerup.cpp:63 +msgid "Ice Flower" +msgstr "" + +#: src/object/powerup.cpp:64 +msgid "Air Flower" +msgstr "" + +#: src/object/powerup.cpp:65 +msgid "Earth Flower" +msgstr "" + +#: src/object/powerup.cpp:67 +msgid "Tux Doll" +msgstr "" + +#: src/object/powerup.cpp:68 +msgid "Flip Potion" +msgstr "" + +#: src/object/powerup.cpp:69 +msgid "Mints" +msgstr "" + +#: src/object/powerup.cpp:70 +msgid "Coffee" msgstr "" -#: src/object/powerup.cpp:189 +#: src/object/powerup.cpp:71 +msgid "Herring" +msgstr "Aringa" + +#: src/object/powerup.cpp:302 msgid "Disable gravity" msgstr "Disabilita gravità" -#: src/object/ambient_sound.hpp:62 +#: src/object/powerup.cpp:312 src/object/weak_block.cpp:266 +msgid "" +"Sprites no longer define the behaviour of the object.\n" +"Object types are used instead." +msgstr "gli Sprites non definiscono più il comportamento dell'oggetto. tipi Oggetto sono usati al loro posto" + +#: src/object/ambient_sound.hpp:43 msgid "Ambient Sound" -msgstr "" +msgstr "Suono ambientale" -#: src/object/level_time.cpp:51 src/supertux/statistics.cpp:245 -#: src/editor/node_marker.cpp:80 +#: src/object/level_time.cpp:52 src/supertux/statistics.cpp:297 +#: src/editor/node_marker.cpp:124 msgid "Time" msgstr "Tempo" -#: src/object/hurting_platform.hpp:30 +#: src/object/hurting_platform.hpp:31 msgid "Hurting Platform" -msgstr "" +msgstr "Piattaforma danno" -#: src/object/background.cpp:161 +#: src/object/background.cpp:183 msgid "Fill" -msgstr "" +msgstr "Riempi" -#: src/object/background.cpp:163 +#: src/object/background.cpp:185 msgid "Alignment" msgstr "Allineamento" -#: src/object/background.cpp:164 +#: src/object/background.cpp:186 src/supertux/direction.cpp:61 msgid "none" msgstr "nessuno" -#: src/object/background.cpp:164 src/editor/object_settings.cpp:112 +#: src/object/background.cpp:186 src/supertux/direction.cpp:63 msgid "left" msgstr "sinistra" -#: src/object/background.cpp:164 src/editor/object_settings.cpp:112 +#: src/object/background.cpp:186 src/supertux/direction.cpp:65 msgid "right" msgstr "destra" -#: src/object/background.cpp:164 +#: src/object/background.cpp:186 msgid "top" msgstr "cima" -#: src/object/background.cpp:164 +#: src/object/background.cpp:186 msgid "bottom" msgstr "fondo" -#: src/object/background.cpp:167 +#: src/object/background.cpp:189 msgid "Scroll offset x" msgstr "Compensazione di scorrimento x" -#: src/object/background.cpp:168 +#: src/object/background.cpp:190 msgid "Scroll offset y" msgstr "Compensazione di scorrimento y" -#: src/object/background.cpp:169 +#: src/object/background.cpp:191 msgid "Scroll speed x" msgstr "Velocità di scorrimento x" -#: src/object/background.cpp:170 +#: src/object/background.cpp:192 msgid "Scroll speed y" msgstr "Velocità di scorrimento y" -#: src/object/background.cpp:171 +#: src/object/background.cpp:193 msgid "Parallax Speed x" -msgstr "" +msgstr "Velocità parallasse X" -#: src/object/background.cpp:172 +#: src/object/background.cpp:194 msgid "Parallax Speed y" -msgstr "" +msgstr "Velocità parallasse Y" -#: src/object/background.cpp:173 +#: src/object/background.cpp:195 msgid "Top image" msgstr "Immagine superiore" -#: src/object/background.cpp:174 +#: src/object/background.cpp:196 msgid "Image" msgstr "Immagine" -#: src/object/background.cpp:175 +#: src/object/background.cpp:197 msgid "Bottom image" msgstr "Immagine inferiore" -#: src/object/background.cpp:176 src/object/tilemap.cpp:227 -#: src/object/gradient.cpp:129 +#: src/object/background.cpp:198 +msgid "Colour" +msgstr "Colore" + +#: src/object/background.cpp:199 src/object/tilemap.cpp:278 +#: src/object/gradient.cpp:108 msgid "Draw target" msgstr "Disegna obiettivo" -#: src/object/background.cpp:177 src/object/tilemap.cpp:228 -#: src/object/gradient.cpp:130 -msgid "Normal" -msgstr "Normale" - -#: src/object/background.cpp:177 src/object/tilemap.cpp:228 -#: src/object/gradient.cpp:130 +#: src/object/background.cpp:200 src/object/tilemap.cpp:279 +#: src/object/gradient.cpp:109 msgid "Lightmap" msgstr "Mappa luci" -#: src/object/wind.cpp:63 +#: src/object/shard.hpp:35 +msgid "Shard" +msgstr "Scheggia" + +#: src/object/rublight.cpp:56 +msgid "Fading Speed" +msgstr "Velocità di dissolvenza" + +#: src/object/rublight.cpp:57 +msgid "Glowing Strength" +msgstr "Intensità luminosa" + +#: src/object/wind.cpp:78 src/object/custom_particle_system.cpp:499 msgid "Speed X" msgstr "Velocità X" -#: src/object/wind.cpp:64 +#: src/object/wind.cpp:79 src/object/custom_particle_system.cpp:500 msgid "Speed Y" msgstr "Velocità Y" -#: src/object/wind.cpp:65 +#: src/object/wind.cpp:80 msgid "Acceleration" msgstr "Accelerazione" -#: src/object/wind.cpp:66 +#: src/object/wind.cpp:81 msgid "Blowing" msgstr "Soffio" -#: src/object/bicycle_platform.hpp:64 +#: src/object/wind.cpp:82 +msgid "Affects Badguys" +msgstr "Affligge i nemici" + +#: src/object/wind.cpp:83 +msgid "Affects Objects" +msgstr "Affligge gli oggetti" + +#: src/object/wind.cpp:84 +msgid "Affects Player" +msgstr "Affligge il giocatore" + +#: src/object/wind.cpp:85 +msgid "Fancy Particles" +msgstr "Particolari sofisticati" + +#: src/object/bicycle_platform.hpp:67 msgid "Bicycle Platform" -msgstr "" +msgstr "Piattaforma Bici" -#: src/object/platform.cpp:67 src/object/thunderstorm.cpp:69 -#: src/object/tilemap.cpp:240 +#: src/object/platform.cpp:80 src/object/thunderstorm.cpp:77 +#: src/object/tilemap.cpp:292 src/object/conveyor_belt.cpp:62 msgid "Running" msgstr "Correre" -#: src/object/rock.cpp:173 +#: src/object/rock.cpp:71 +msgid "Small" +msgstr "Piccolo" + +#: src/object/rock.cpp:72 +msgid "Large" +msgstr "Grande" + +#: src/object/rock.cpp:234 msgid "On-grab script" msgstr "Script di presa" -#: src/object/rock.cpp:174 +#: src/object/rock.cpp:235 msgid "On-ungrab script" msgstr "Script di rilascio" @@ -633,854 +998,1821 @@ msgstr "Script di rilascio" msgid "Interactive particle system" msgstr "Sistema di particelle interattivo" -#: src/object/thunderstorm.cpp:70 +#: src/object/thunderstorm.cpp:78 msgid "Interval" msgstr "Intervallo" -#: src/object/thunderstorm.cpp:71 +#: src/object/thunderstorm.cpp:79 msgid "Strike Script" -msgstr "" +msgstr "Script dei colpi" -#: src/object/cloud_particle_system.hpp:36 +#: src/object/cloud_particle_system.hpp:42 msgid "Cloud Particles" -msgstr "" +msgstr "Particelle nuvola" + +#: src/object/custom_particle_system.cpp:423 +msgid "Texture" +msgstr "Trama" + +#: src/object/custom_particle_system.cpp:425 +msgid "Amount" +msgstr "Quantità" + +#: src/object/custom_particle_system.cpp:426 src/object/circleplatform.cpp:59 +#: src/editor/particle_editor.cpp:141 +msgid "Delay" +msgstr "Attesa" + +#: src/object/custom_particle_system.cpp:427 +msgid "Lifetime" +msgstr "Tempo vitale" + +#: src/object/custom_particle_system.cpp:428 +msgid "Lifetime variation" +msgstr "Variazione del tempo vitale" + +#: src/object/custom_particle_system.cpp:429 +#: src/editor/particle_editor.cpp:164 +msgid "Birth mode" +msgstr "Modalità di nascita" + +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 src/object/gradient.cpp:115 +#: src/gui/menu_string_array.cpp:40 src/gui/menu_string_array.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:80 +#: src/supertux/menu/joystick_menu.cpp:108 +#: src/supertux/menu/joystick_menu.cpp:215 src/editor/object_settings.cpp:129 +#: src/editor/particle_editor.cpp:162 src/editor/particle_editor.cpp:168 +msgid "None" +msgstr "Nessuno" -#: src/object/ispy.hpp:33 +#: src/object/custom_particle_system.cpp:430 +#: src/object/custom_particle_system.cpp:465 +#: src/editor/particle_editor.cpp:166 +msgid "Shrink" +msgstr "Rimpicciolisci" + +#: src/object/custom_particle_system.cpp:434 +#: src/editor/particle_editor.cpp:172 +msgid "Birth easing" +msgstr "Allentamento della nascita" + +#: src/object/custom_particle_system.cpp:436 +#: src/object/custom_particle_system.cpp:471 src/editor/node_marker.cpp:129 +msgid "No easing" +msgstr "Nessun allentamento" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad in" +msgstr "Quad dentro" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad out" +msgstr "Quad fuori" + +#: src/object/custom_particle_system.cpp:437 +#: src/object/custom_particle_system.cpp:472 src/editor/node_marker.cpp:130 +msgid "Quad in/out" +msgstr "Quad dentro/fuori" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic in" +msgstr "Cubico dentro" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic out" +msgstr "Cubico fuori" + +#: src/object/custom_particle_system.cpp:438 +#: src/object/custom_particle_system.cpp:473 src/editor/node_marker.cpp:131 +msgid "Cubic in/out" +msgstr "Cubico dentro/fuori" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart in" +msgstr "Quarto dentro" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart out" +msgstr "Quarto fuori" + +#: src/object/custom_particle_system.cpp:439 +#: src/object/custom_particle_system.cpp:474 src/editor/node_marker.cpp:132 +msgid "Quart in/out" +msgstr "Quarto dentro/fuori" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint in" +msgstr "Quint dentro" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint out" +msgstr "Quint fuori" + +#: src/object/custom_particle_system.cpp:440 +#: src/object/custom_particle_system.cpp:475 src/editor/node_marker.cpp:133 +msgid "Quint in/out" +msgstr "Quint dentro/fuori" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine in" +msgstr "Sine dentro" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine out" +msgstr "Sine fuori" + +#: src/object/custom_particle_system.cpp:441 +#: src/object/custom_particle_system.cpp:476 src/editor/node_marker.cpp:134 +msgid "Sine in/out" +msgstr "Sine dentro/fuori" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular in" +msgstr "Circolare dentro" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular out" +msgstr "Circolare fuori" + +#: src/object/custom_particle_system.cpp:442 +#: src/object/custom_particle_system.cpp:477 src/editor/node_marker.cpp:135 +msgid "Circular in/out" +msgstr "Circolare dentro/fuori" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential in" +msgstr "Esponenziale dentro" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential out" +msgstr "Esponenziale fuori" + +#: src/object/custom_particle_system.cpp:443 +#: src/object/custom_particle_system.cpp:478 src/editor/node_marker.cpp:136 +msgid "Exponential in/out" +msgstr "Esponenziale dentro/fuori" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic in" +msgstr "Elastico dentro" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic out" +msgstr "Elastico fuori" + +#: src/object/custom_particle_system.cpp:444 +#: src/object/custom_particle_system.cpp:479 src/editor/node_marker.cpp:137 +msgid "Elastic in/out" +msgstr "Elastico dentro/fuori" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back in" +msgstr "Indietro dentro" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back out" +msgstr "Indietro fuori" + +#: src/object/custom_particle_system.cpp:445 +#: src/object/custom_particle_system.cpp:480 src/editor/node_marker.cpp:138 +msgid "Back in/out" +msgstr "Indietro dentro/fuori" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce in" +msgstr "Rimbalzo dentro" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce out" +msgstr "Rimbalzo fuori" + +#: src/object/custom_particle_system.cpp:446 +#: src/object/custom_particle_system.cpp:481 src/editor/node_marker.cpp:139 +msgid "Bounce in/out" +msgstr "Rimbalzo dentro/fuori" + +#: src/object/custom_particle_system.cpp:462 +msgid "Birth time" +msgstr "Tempo di nascita" + +#: src/object/custom_particle_system.cpp:463 +msgid "Birth time variation" +msgstr "Variazione del tempo di nascita" + +#: src/object/custom_particle_system.cpp:464 +#: src/editor/particle_editor.cpp:170 +msgid "Death mode" +msgstr "Modalità di morte" + +#: src/object/custom_particle_system.cpp:469 +#: src/editor/particle_editor.cpp:173 +msgid "Death easing" +msgstr "Allentamento di morte" + +#: src/object/custom_particle_system.cpp:497 +msgid "Death time" +msgstr "Tempo di morte" + +#: src/object/custom_particle_system.cpp:498 +msgid "Death time variation" +msgstr "Variazione del tempo di morte" + +#: src/object/custom_particle_system.cpp:501 +msgid "Speed X (variation)" +msgstr "Velocità X (variazione)" + +#: src/object/custom_particle_system.cpp:502 +msgid "Speed Y (variation)" +msgstr "Velocità Y (variazione)" + +#: src/object/custom_particle_system.cpp:503 +msgid "Acceleration X" +msgstr "Accelerazione X" + +#: src/object/custom_particle_system.cpp:504 +msgid "Acceleration Y" +msgstr "Accelerazione Y" + +#: src/object/custom_particle_system.cpp:505 +msgid "Friction X" +msgstr "Attrito X" + +#: src/object/custom_particle_system.cpp:506 +msgid "Friction Y" +msgstr "Attrito Y" + +#: src/object/custom_particle_system.cpp:507 +#: src/editor/particle_editor.cpp:189 +msgid "Feather factor" +msgstr "Fattore piuma" + +#: src/object/custom_particle_system.cpp:508 +msgid "Rotation" +msgstr "Rotazione" + +#: src/object/custom_particle_system.cpp:509 +msgid "Rotation (variation)" +msgstr "Rotazione (variazione)" + +#: src/object/custom_particle_system.cpp:510 +#: src/editor/particle_editor.cpp:195 +msgid "Rotation speed" +msgstr "Velocità di rotazione" + +#: src/object/custom_particle_system.cpp:511 +msgid "Rotation speed (variation)" +msgstr "Velocità di rotazione (variazione)" + +#: src/object/custom_particle_system.cpp:512 +#: src/editor/particle_editor.cpp:200 +msgid "Rotation acceleration" +msgstr "Accelerazione di rotazione" + +#: src/object/custom_particle_system.cpp:513 +msgid "Rotation friction" +msgstr "Rotazione attrito" + +#: src/object/custom_particle_system.cpp:514 +#: src/editor/particle_editor.cpp:208 +msgid "Rotation mode" +msgstr "Modalità di rotazione" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:206 +msgid "Fixed" +msgstr "Fisso" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:205 +msgid "Facing" +msgstr "Puntato" + +#: src/object/custom_particle_system.cpp:515 +#: src/editor/particle_editor.cpp:204 +msgid "Wiggling" +msgstr "Dimenato" + +#: src/object/custom_particle_system.cpp:519 +#: src/editor/particle_editor.cpp:219 +msgid "Collision mode" +msgstr "Modalità di collisione" + +#: src/object/custom_particle_system.cpp:520 +msgid "None (pass through)" +msgstr "Nessuno (passa attraverso)" + +#: src/object/custom_particle_system.cpp:520 +msgid "Stick" +msgstr "Attacca" + +#: src/object/custom_particle_system.cpp:520 +msgid "Stick Forever" +msgstr "Attacca per sempre" + +#: src/object/custom_particle_system.cpp:520 +#: src/editor/particle_editor.cpp:214 +msgid "Bounce (heavy)" +msgstr "Rimbalzo (pesante)" + +#: src/object/custom_particle_system.cpp:520 +#: src/editor/particle_editor.cpp:213 +msgid "Bounce (light)" +msgstr "Rimbalzo (leggero)" + +#: src/object/custom_particle_system.cpp:520 +msgid "Kill particle" +msgstr "Uccidi particella" + +#: src/object/custom_particle_system.cpp:520 +msgid "Fade out particle" +msgstr "Dissolvi particella" + +#: src/object/custom_particle_system.cpp:524 +msgid "Delete if off-screen" +msgstr "Elimina se fuori schermata" + +#: src/object/custom_particle_system.cpp:525 +#: src/editor/particle_editor.cpp:224 +msgid "Never" +msgstr "Mai" + +#: src/object/custom_particle_system.cpp:525 +#: src/editor/particle_editor.cpp:223 +msgid "Only on exit" +msgstr "Solo in uscita" + +#: src/object/custom_particle_system.cpp:525 +msgid "Always" +msgstr "Sempre" + +#: src/object/custom_particle_system.cpp:529 +msgid "Cover screen" +msgstr "Copri schermo" + +#: src/object/ispy.hpp:35 msgid "Ispy" msgstr "Spione" -#: src/object/weak_block.cpp:211 -msgid "Linked" -msgstr "Collegato" +#: src/object/particle_zone.cpp:51 +msgid "Particle Name" +msgstr "Nome Particella" + +#: src/object/particle_zone.cpp:62 +msgid "Spawn" +msgstr "Generazione" + +#: src/object/particle_zone.cpp:63 +msgid "Life zone" +msgstr "Zona di vita" + +#: src/object/particle_zone.cpp:64 +msgid "Life zone (clear)" +msgstr "Zona di vita (pulita)" -#: src/object/decal.hpp:34 +#: src/object/particle_zone.cpp:65 +msgid "Kill particles" +msgstr "Uccidi particelle" + +#: src/object/particle_zone.cpp:66 +msgid "Clear particles" +msgstr "Pulisci particelle" + +#: src/object/weak_block.cpp:98 +msgid "Hay" +msgstr "Fieno" + +#: src/object/decal.hpp:41 msgid "Decal" -msgstr "Ricalca" +msgstr "Decalcomania" -#: src/object/tilemap.cpp:216 +#: src/object/tilemap.cpp:267 msgid "Resize offset x" -msgstr "Ridimensiona offset X" +msgstr "Ridimensiona sfasamento X" -#: src/object/tilemap.cpp:217 +#: src/object/tilemap.cpp:268 msgid "Resize offset y" -msgstr "Ridimensiona offset Y" +msgstr "Ridimensiona sfasamento Y" + +#: src/object/tilemap.cpp:270 src/supertux/menu/editor_sector_menu.cpp:41 +#: src/editor/object_option.cpp:178 +msgid "Width" +msgstr "Larghezza" -#: src/object/tilemap.cpp:222 +#: src/object/tilemap.cpp:271 src/supertux/menu/editor_sector_menu.cpp:42 +#: src/editor/object_option.cpp:179 +msgid "Height" +msgstr "Altezza" + +#: src/object/tilemap.cpp:273 msgid "Alpha" msgstr "Alfa" -#: src/object/tilemap.cpp:223 +#: src/object/tilemap.cpp:274 msgid "Speed x" msgstr "Velocità x" -#: src/object/tilemap.cpp:224 +#: src/object/tilemap.cpp:275 msgid "Speed y" msgstr "Velocità y" -#: src/object/tilemap.cpp:225 +#: src/object/tilemap.cpp:276 msgid "Tint" msgstr "Tinta" -#: src/object/tilemap.cpp:243 src/supertux/menu/editor_tilegroup_menu.cpp:26 -#: src/editor/toolbox_widget.cpp:89 +#: src/object/tilemap.cpp:296 src/supertux/menu/editor_tilegroup_menu.cpp:26 +#: src/editor/toolbox_widget.cpp:98 msgid "Tiles" -msgstr "" +msgstr "Caselle" -#: src/object/gradient.cpp:115 -msgid "Left Colour" -msgstr "Colore sinistro" - -#: src/object/gradient.cpp:116 -msgid "Right Colour" -msgstr "Colore destro" +#: src/object/gradient.cpp:98 +msgid "Primary Colour" +msgstr "Colore Primario" -#: src/object/gradient.cpp:118 -msgid "Top Colour" -msgstr "Colore superiore" +#: src/object/gradient.cpp:99 +msgid "Secondary Colour" +msgstr "Colore Secondario" -#: src/object/gradient.cpp:119 -msgid "Bottom Colour" -msgstr "Colore inferiore" - -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Vertical" msgstr "Verticale" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Horizontal" msgstr "Orizzontale" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Vertical (whole sector)" msgstr "Verticale (intero settore)" -#: src/object/gradient.cpp:125 +#: src/object/gradient.cpp:104 msgid "Horizontal (whole sector)" msgstr "Orizzontale (intero settore)" -#: src/object/gradient.cpp:135 +#: src/object/gradient.cpp:114 msgid "Blend mode" -msgstr "" +msgstr "Modalità di fusione" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Blend" -msgstr "" +msgstr "Fusione" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Additive" -msgstr "" +msgstr "Aggiungi" -#: src/object/gradient.cpp:136 +#: src/object/gradient.cpp:115 msgid "Modulate" -msgstr "" +msgstr "Modulo" -#: src/object/gradient.cpp:136 src/supertux/menu/keyboard_menu.cpp:60 -#: src/supertux/menu/joystick_menu.cpp:108 -#: src/supertux/menu/joystick_menu.cpp:215 src/editor/object_settings.cpp:124 -msgid "None" -msgstr "Nessuno" +#: src/object/bumper.hpp:38 +msgid "Bumper" +msgstr "Paraurti" -#: src/object/unstable_tile.hpp:34 -msgid "Unstable Tile" -msgstr "" +#: src/object/conveyor_belt.cpp:63 +msgid "Length" +msgstr "Lunghezza" -#: src/object/brick.hpp:31 -msgid "Brick" -msgstr "Mattone" +#: src/object/moving_sprite.cpp:192 src/object/pneumatic_platform.cpp:161 +msgid "Sprite" +msgstr "Sprite" -#: src/object/invisible_wall.hpp:34 +#: src/object/unstable_tile.hpp:42 +msgid "Unstable Tile" +msgstr "Casella instabile" + +#: src/object/brick.hpp:70 +msgid "Heavy Brick" +msgstr "Mattone Pesante" + +#: src/object/invisible_wall.hpp:37 msgid "Invisible Wall" -msgstr "" +msgstr "Muro invisibile" -#: src/object/spotlight.hpp:38 +#: src/object/spotlight.hpp:52 msgid "Spotlight" msgstr "Riflettore" -#: src/object/scripted_object.hpp:39 +#: src/object/scripted_object.hpp:40 msgid "Scripted Object" -msgstr "" +msgstr "Oggetto scriptato" + +#: src/object/custom_particle_system_file.hpp:40 +msgid "Custom Particles from file" +msgstr "Particelle Personalizzate da file" -#: src/object/coin.hpp:75 +#: src/object/coin.hpp:97 msgid "Heavy Coin" -msgstr "" +msgstr "Gettone pesante" + +#: src/object/explosion.hpp:35 +msgid "Explosion" +msgstr "Esplosione" -#: src/object/bonus_block.hpp:55 +#: src/object/bonus_block.hpp:62 msgid "Bonus Block" -msgstr "" +msgstr "Blocco Bonus" -#: src/object/magicblock.hpp:41 +#: src/object/magicblock.hpp:42 msgid "Magic Tile" -msgstr "" +msgstr "Casella Magica" -#: src/object/camera.hpp:67 +#: src/object/camera.hpp:61 msgid "Camera" msgstr "Camera" -#: src/object/textscroller.hpp:44 -msgid "TextScroller" -msgstr "" +#: src/object/textscroller.hpp:45 +msgid "Text Scroller" +msgstr "Scorrimento del testo" + +#: src/gui/notification.cpp:57 +msgid "Click for more details." +msgstr "Clicca per dettagli" -#: src/gui/menu_badguy_select.cpp:93 -msgid "List of enemies" -msgstr "Lista dei nemici" +#: src/gui/notification.cpp:150 +msgid "Do not show again" +msgstr "Non mostrare di nuovo" -#: src/gui/menu_badguy_select.cpp:95 -msgid "Enemy" -msgstr "Nemico" +#: src/gui/notification.cpp:157 src/supertux/menu/download_dialog.cpp:124 +msgid "Close" +msgstr "Chiudi" + +#: src/gui/menu_string_array.cpp:40 src/gui/menu_string_array.cpp:78 +#, c++-format +msgid "Selected item: {}" +msgstr "Oggetto selezionato: {}" + +#: src/gui/menu_string_array.cpp:70 +msgid "Edit string array" +msgstr "Modifica string array" -#: src/gui/menu_badguy_select.cpp:96 +#: src/gui/menu_string_array.cpp:79 src/gui/menu_object_select.cpp:50 +#: src/supertux/menu/profile_menu.cpp:88 msgid "Add" msgstr "Aggiungi" -#: src/gui/menu_badguy_select.cpp:106 src/gui/menu_color.cpp:34 -#: src/gui/dialog.hpp:80 src/gui/menu_script.cpp:47 -#: src/supertux/menu/editor_sector_menu.cpp:46 -#: src/supertux/menu/editor_levelset_menu.cpp:62 -#: src/supertux/menu/addon_menu.cpp:346 +#: src/gui/menu_string_array.cpp:80 +msgid "Insert" +msgstr "Inserisci" + +#: src/gui/menu_string_array.cpp:81 +#: src/supertux/menu/addon_preview_menu.cpp:177 src/editor/object_menu.cpp:61 +msgid "Update" +msgstr "Aggiorna" + +#: src/gui/menu_string_array.cpp:82 src/supertux/menu/profile_menu.cpp:108 +#: src/supertux/menu/profile_menu.cpp:110 +msgid "Delete" +msgstr "Cancella" + +#: src/gui/menu_string_array.cpp:84 src/gui/menu_object_select.cpp:61 +#: src/gui/menu_color.cpp:37 src/gui/dialog.hpp:87 src/gui/menu_script.cpp:46 +#: src/supertux/menu/editor_sector_menu.cpp:48 +#: src/supertux/menu/editor_levelset_menu.cpp:58 #: src/supertux/menu/editor_new_levelset_menu.cpp:37 -#: src/supertux/menu/editor_level_menu.cpp:44 src/editor/object_menu.cpp:43 +#: src/supertux/menu/editor_level_menu.cpp:45 src/editor/object_menu.cpp:71 msgid "OK" msgstr "OK" -#: src/gui/menu_badguy_select.cpp:135 -msgid "Do you want to delete this badguy from the list?" -msgstr "Vuoi togliere questo cattivo dalla lista?" +#: src/gui/menu_object_select.cpp:46 +msgid "List of objects" +msgstr "Lista oggetti" -#: src/gui/menu_badguy_select.cpp:136 src/gui/dialog.hpp:89 -#: src/supertux/menu/editor_menu.cpp:123 src/editor/editor.cpp:482 -msgid "Yes" -msgstr "Si" +#: src/gui/menu_object_select.cpp:48 +#, c++-format +msgid "Select object ({})" +msgstr "Seleziona oggetti ({})" -#: src/gui/menu_badguy_select.cpp:139 src/gui/dialog.hpp:90 -#: src/supertux/menu/editor_menu.cpp:126 src/editor/editor.cpp:489 -msgid "No" -msgstr "No" +#: src/gui/menu_object_select.cpp:114 +msgid "Are you sure you want to remove this object from the list?" +msgstr "Sei sicuro di voler rimuovere quest'oggetto dalla lista?" #: src/gui/menu_color.cpp:24 msgid "Mix the colour" msgstr "Mescola il colore" -#: src/gui/menu_filesystem.cpp:111 +#: src/gui/dialog.hpp:96 src/supertux/menu/editor_level_select_menu.cpp:181 +#: src/editor/editor.cpp:663 +msgid "Yes" +msgstr "Si" + +#: src/gui/dialog.hpp:97 src/supertux/menu/editor_level_select_menu.cpp:185 +#: src/editor/particle_editor.cpp:781 src/editor/editor.cpp:670 +msgid "No" +msgstr "No" + +#: src/gui/menu_list.cpp:38 src/gui/menu_filesystem.cpp:120 +#: src/gui/menu_paths.cpp:48 src/supertux/menu/particle_editor_save_as.cpp:42 #: src/supertux/menu/editor_sectors_menu.cpp:45 -#: src/supertux/menu/editor_sectors_menu.cpp:95 -#: src/supertux/menu/editor_sectors_menu.cpp:100 +#: src/supertux/menu/editor_sectors_menu.cpp:94 +#: src/supertux/menu/editor_sectors_menu.cpp:99 #: src/supertux/menu/editor_objectgroup_menu.cpp:42 -#: src/supertux/menu/editor_tilegroup_menu.cpp:36 src/editor/editor.cpp:493 +#: src/supertux/menu/editor_tilegroup_menu.cpp:36 +#: src/supertux/menu/editor_level_select_menu.cpp:190 +#: src/supertux/menu/editor_save_as.cpp:42 +#: src/supertux/menu/particle_editor_open.cpp:43 +#: src/editor/particle_editor.cpp:785 src/editor/editor.cpp:674 msgid "Cancel" msgstr "Cancella" +#: src/gui/menu_filesystem.cpp:118 +msgid "Open Directory" +msgstr "Apri Directory" + #: src/gui/menu_script.cpp:28 msgid "Edit script" msgstr "Modifica script" -#: src/badguy/toad.hpp:37 +#: src/gui/menu_paths.cpp:32 +msgid "Clone" +msgstr "Clona" + +#: src/gui/menu_paths.cpp:41 +msgid "" +"An error occurred and the game could\n" +"not clone the path. Please contact\n" +"the developers for support." +msgstr "" + +#: src/gui/menu_paths.cpp:44 +msgid "Bind" +msgstr "Associa" + +#: src/gui/menu_paths.cpp:49 +msgid "" +"Do you wish to clone the path to edit it separately,\n" +"or do you want to bind both paths together\n" +"so that any edit on one edits the other?" +msgstr "" + +#: src/gui/menu_paths.cpp:56 +#, c++-format +msgid "Path {}" +msgstr "" + +#: src/gui/menu_paths.cpp:67 src/supertux/menu/integrations_menu.cpp:60 +#: src/supertux/menu/editor_converters_menu.cpp:79 +#: src/supertux/menu/video_system_menu.cpp:45 +#: src/supertux/menu/contrib_menu.cpp:102 src/supertux/menu/debug_menu.cpp:77 +#: src/supertux/menu/multiplayer_menu.cpp:39 +#: src/supertux/menu/custom_menu_menu.cpp:65 +#: src/supertux/menu/editor_level_select_menu.cpp:98 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:63 +#: src/supertux/menu/worldmap_cheat_menu.cpp:57 +#: src/supertux/menu/worldmap_cheat_menu.cpp:196 +#: src/supertux/menu/editor_levelset_select_menu.cpp:114 +#: src/supertux/menu/options_menu.cpp:223 +#: src/supertux/menu/editor_delete_levelset_menu.cpp:69 +#: src/supertux/menu/addon_preview_menu.cpp:193 +#: src/supertux/menu/profile_menu.cpp:118 +#: src/supertux/menu/multiplayer_players_menu.cpp:91 +#: src/supertux/menu/addon_menu.cpp:153 +#: src/supertux/menu/editor_new_levelset_menu.cpp:40 +#: src/supertux/menu/options_select_menu.cpp:44 +#: src/supertux/menu/world_set_menu.cpp:33 +#: src/supertux/menu/addon_browse_menu.cpp:162 +#: src/supertux/menu/web_asset_menu.cpp:48 +#: src/supertux/menu/profile_name_menu.cpp:45 +#: src/supertux/menu/keyboard_menu.cpp:71 +#: src/supertux/menu/sorted_contrib_menu.cpp:51 +#: src/supertux/menu/language_menu.cpp:63 +#: src/supertux/menu/joystick_menu.cpp:99 +#: src/supertux/menu/contrib_levelset_menu.cpp:67 +#: src/supertux/menu/cheat_menu.cpp:58 +#: src/supertux/menu/addon_file_install_menu.cpp:36 +#: src/supertux/menu/cheat_apply_menu.cpp:43 +#: src/supertux/menu/cheat_apply_menu.cpp:63 +#: src/supertux/menu/multiplayer_player_menu.cpp:205 +#: src/supertux/menu/editor_delete_level_menu.cpp:68 +msgid "Back" +msgstr "Indietro" + +#: src/addon/addon_manager.cpp:562 +msgid "Only one resource pack is allowed to be enabled at a time." +msgstr "È possibile abilitare un solo pacchetto risorse alla volta" + +#: src/addon/addon_manager.cpp:837 +#, c++-format +msgid "Add-on {} by {} is already installed." +msgstr "Add-on {} da {} è già installato." + +#: src/addon/addon_manager.cpp:857 +#, c++-format +msgid "Add-on {} by {} successfully installed." +msgstr "Add-on {} da {} è stato installato con successo." + +#: src/addon/addon.cpp:71 src/supertux/menu/editor_levelset_menu.cpp:54 +msgid "Levelset" +msgstr "Set di livelli" + +#: src/addon/addon.cpp:74 src/supertux/menu/editor_levelset_menu.cpp:54 +#: data//images/engine/editor/objects.stoi:389 +msgid "Worldmap" +msgstr "Mappa del mondo" + +#: src/addon/addon.cpp:77 +msgid "World" +msgstr "Mondo" + +#: src/addon/addon.cpp:80 +msgid "Add-on" +msgstr "Componenti aggiuntivi" + +#: src/addon/addon.cpp:83 +msgid "Language Pack" +msgstr "Pacchetto Lingua" + +#: src/addon/addon.cpp:86 +msgid "Resource Pack" +msgstr "Pacchetto Risorse" + +#: src/addon/addon.cpp:89 +msgid "Unknown" +msgstr "Sconosciuto" + +#: src/addon/addon.cpp:100 +#, c++-format +msgid "{} \"{}\" by \"{}\"" +msgstr "" + +#: src/addon/addon.cpp:114 +msgid "add-on" +msgstr "" + +#: src/addon/addon.cpp:114 +msgid "add-ons" +msgstr "" + +#: src/badguy/toad.hpp:38 msgid "Toad" msgstr "Rospo" -#: src/badguy/mrtree.hpp:29 -msgid "Walking Tree" -msgstr "" +#: src/badguy/mrtree.hpp:32 +msgid "Mr. Tree" +msgstr "Signor Albero" -#: src/badguy/plant.hpp:33 +#: src/badguy/plant.hpp:34 msgid "Plant" msgstr "Pianta" -#: src/badguy/crystallo.hpp:30 +#: src/badguy/tarantula.hpp:39 src/badguy/tarantula.cpp:353 +msgid "Tarantula" +msgstr "Tarantola" + +#: src/badguy/granito_giant.cpp:71 +msgid "Awake" +msgstr "Sveglio" + +#: src/badguy/granito_giant.cpp:72 +msgid "Sleeping" +msgstr "Addormentato" + +#: src/badguy/granito_giant.cpp:73 +msgid "Corrupted A" +msgstr "" + +#: src/badguy/granito_giant.cpp:74 +msgid "Corrupted B" +msgstr "" + +#: src/badguy/granito_giant.cpp:75 +msgid "Corrupted C" +msgstr "" + +#: src/badguy/crystallo.hpp:33 msgid "Crystallo" msgstr "Crystallo" -#: src/badguy/totem.hpp:36 +#: src/badguy/viciousivy.cpp:45 src/badguy/snail.cpp:70 +#: src/badguy/kamikazesnowball.cpp:118 src/badguy/walkingleaf.cpp:36 +#: src/badguy/jumpy.cpp:46 src/badguy/igel.cpp:189 src/badguy/mrtree.cpp:51 +msgid "Corrupted" +msgstr "" + +#: src/badguy/totem.hpp:37 msgid "Totem" msgstr "Totem" -#: src/badguy/stalactite.hpp:38 +#: src/badguy/stalactite.hpp:42 msgid "Stalactite" msgstr "Stalattite" -#: src/badguy/haywire.hpp:42 +#: src/badguy/fish_chasing.cpp:198 +msgid "Tracking Distance" +msgstr "" + +#: src/badguy/fish_chasing.cpp:199 +msgid "Losing Distance" +msgstr "" + +#: src/badguy/fish_chasing.cpp:200 +msgid "Chase Speed" +msgstr "" + +#: src/badguy/root_sapling.hpp:41 +msgid "Root Sapling" +msgstr "Arboscello radice" + +#: src/badguy/haywire.hpp:46 msgid "Haywire" msgstr "Caotibomba" -#: src/badguy/dispenser.hpp:48 +#: src/badguy/dispenser.hpp:52 msgid "Dispenser" msgstr "Distributore" -#: src/badguy/short_fuse.hpp:29 +#: src/badguy/short_fuse.hpp:30 msgid "Short Fuse" -msgstr "" +msgstr "Miccia corta" -#: src/badguy/zeekling.hpp:36 +#: src/badguy/zeekling.hpp:39 msgid "Zeekling" -msgstr "Zeekling" +msgstr "Vivernofalco" + +#: src/badguy/smartball.cpp:35 +msgid "Pumpkin" +msgstr "Zucca" -#: src/badguy/mriceblock.hpp:46 -msgid "Iceblock" +#: src/badguy/bouncing_snowball.cpp:82 +msgid "Fatbat" msgstr "" -#: src/badguy/jumpy.hpp:36 +#: src/badguy/dive_mine.hpp:50 +msgid "Dive Mine" +msgstr "Scubamina" + +#: src/badguy/granito_big.hpp:33 +msgid "Big Granito" +msgstr "Grande Granito" + +#: src/badguy/mriceblock.hpp:49 +msgid "Mr. Iceblock" +msgstr "Signor Ghiaccio" + +#: src/badguy/granito.hpp:39 src/badguy/darttrap.cpp:163 +#: src/badguy/corrupted_granito.cpp:175 src/badguy/dispenser.cpp:438 +msgid "Granito" +msgstr "Granito" + +#: src/badguy/fish_swimming.cpp:54 src/badguy/jumpy.cpp:44 +#: data//images/ice_world.strf:10 data//images/tiles.strf:28 +#: data//images/worldmap.strf:41 +msgid "Snow" +msgstr "Neve" + +#: src/badguy/fish_swimming.cpp:55 data//images/ice_world.strf:211 +#: data//images/tiles.strf:366 data//images/worldmap.strf:67 +msgid "Forest" +msgstr "Foresta" + +#: src/badguy/crusher.hpp:71 +msgid "Crusher" +msgstr "Frantumatore" + +#: src/badguy/flame.cpp:84 +msgid "Fire" +msgstr "" + +#: src/badguy/flame.cpp:85 +msgid "Ghost" +msgstr "" + +#: src/badguy/corrupted_granito_big.hpp:35 +msgid "Corrupted Big Granito" +msgstr "Grande Granito Corrotto" + +#: src/badguy/scrystallo.cpp:57 +msgid "Walk Radius" +msgstr "Raggio di cammino" + +#: src/badguy/scrystallo.cpp:58 +msgid "Awakening Radius" +msgstr "Raggio di Risveglio" + +#: src/badguy/scrystallo.cpp:59 +msgid "Roof-attached" +msgstr "Attaccato al tetto" + +#: src/badguy/jumpy.hpp:40 msgid "Jumpy" msgstr "Saltellino" -#: src/badguy/captainsnowball.hpp:31 +#: src/badguy/captainsnowball.hpp:32 msgid "Captain Snowball" -msgstr "" +msgstr "Capitan Palla di Neve" -#: src/badguy/ghosttree.hpp:42 +#: src/badguy/ghosttree.hpp:43 msgid "Ghost Tree" -msgstr "" +msgstr "Albero fantasma" -#: src/badguy/willowisp.cpp:283 +#: src/badguy/willowisp.cpp:314 msgid "Track range" msgstr "Gittata d'inseguimento" -#: src/badguy/willowisp.cpp:284 +#: src/badguy/willowisp.cpp:315 msgid "Vanish range" msgstr "Gittata di scomparsa" -#: src/badguy/willowisp.cpp:285 +#: src/badguy/willowisp.cpp:316 msgid "Fly speed" msgstr "Velocità di volo" -#: src/badguy/kugelblitz.hpp:39 +#: src/badguy/kugelblitz.hpp:40 msgid "Kugelblitz" msgstr "Kugelblitz" -#: src/badguy/mole_rock.hpp:42 +#: src/badguy/mole_rock.hpp:44 msgid "Mole's rock" -msgstr "Roccia di Talpa" +msgstr "Talpa-Roccia" -#: src/badguy/badguy.cpp:834 +#: src/badguy/badguy.cpp:1064 msgid "Death script" msgstr "Script di morte" -#: src/badguy/sspiky.hpp:36 +#: src/badguy/sspiky.hpp:37 msgid "Sleeping Spiky" -msgstr "" +msgstr "Spiky dormiente" -#: src/badguy/yeti_stalactite.hpp:33 +#: src/badguy/yeti_stalactite.hpp:34 msgid "Yeti's Stalactite" -msgstr "" +msgstr "Stalattite dello Yeti" + +#: src/badguy/fish_harmless.hpp:30 +msgid "Harmless Fish" +msgstr "Pesce Innocuo" -#: src/badguy/livefire.hpp:37 +#: src/badguy/livefire.hpp:38 msgid "Walking Flame" -msgstr "" +msgstr "Fiamma camminante" -#: src/badguy/livefire.hpp:67 +#: src/badguy/livefire.hpp:71 msgid "Sleeping Flame" -msgstr "" +msgstr "Fiamma addormentata" -#: src/badguy/livefire.hpp:83 +#: src/badguy/livefire.hpp:89 msgid "Dormant Flame" -msgstr "" +msgstr "Fiamma dormiente" -#: src/badguy/owl.hpp:39 +#: src/badguy/owl.hpp:45 msgid "Owl" msgstr "Gufo" -#: src/badguy/igel.hpp:34 +#: src/badguy/igel.hpp:38 msgid "Igel" -msgstr "Igel" +msgstr "Spino" -#: src/badguy/darttrap.cpp:126 +#: src/badguy/darttrap.cpp:148 msgid "Initial delay" msgstr "Ritardo iniziale" -#: src/badguy/darttrap.cpp:128 +#: src/badguy/darttrap.cpp:150 msgid "Fire delay" msgstr "Ritardo fuoco" -#: src/badguy/darttrap.cpp:129 +#: src/badguy/darttrap.cpp:151 msgid "Ammo" msgstr "Munizioni" -#: src/badguy/snowball.hpp:29 -msgid "Snowball" -msgstr "Palla di neve" +#: src/badguy/darttrap.cpp:152 +msgid "Dart sprite" +msgstr "Sprite Dardo" -#: src/badguy/smartblock.hpp:29 -msgid "Smartblock" -msgstr "" +#: src/badguy/darttrap.cpp:164 +msgid "Skull" +msgstr "Teschio" -#: src/badguy/yeti.cpp:369 +#: src/badguy/snowball.hpp:30 +msgid "Mr. Snowball" +msgstr "Signor Palla di Neve" + +#: src/badguy/smartblock.hpp:30 +msgid "Mrs. Iceblock" +msgstr "Signora Ghiaccio" + +#: src/badguy/yeti.cpp:370 msgid "Fixed position" msgstr "Posizione fissata" -#: src/badguy/yeti.cpp:370 +#: src/badguy/yeti.cpp:371 msgid "Lives" msgstr "Vite" -#: src/badguy/goldbomb.hpp:49 +#: src/badguy/goldbomb.hpp:50 msgid "Gold Bomb" +msgstr "Bomba d'oro" + +#: src/badguy/corrupted_granito.hpp:44 +msgid "Corrupted Granito" +msgstr "Granito Corrotto" + +#: src/badguy/mrbomb.cpp:48 +msgid "Classic" msgstr "" -#: src/badguy/flyingsnowball.hpp:32 +#: src/badguy/flyingsnowball.hpp:33 msgid "Flying Snowball" +msgstr "Palla di Neve Volante" + +#: src/badguy/crusher.cpp:75 +msgid "Ice (normal)" msgstr "" -#: src/badguy/skullyhop.hpp:37 -msgid "Skullyhop" +#: src/badguy/crusher.cpp:76 +msgid "Ice (big)" msgstr "" -#: src/badguy/kamikazesnowball.hpp:32 -msgid "Snowshot" +#: src/badguy/crusher.cpp:77 +msgid "Rock (normal)" msgstr "" -#: src/badguy/kamikazesnowball.hpp:52 -msgid "Leafshot" +#: src/badguy/crusher.cpp:78 +msgid "Rock (big)" +msgstr "" + +#: src/badguy/crusher.cpp:79 +msgid "Corrupted (normal)" +msgstr "" + +#: src/badguy/crusher.cpp:80 +msgid "Corrupted (big)" +msgstr "" + +#: src/badguy/crusher.cpp:492 +msgid "Sideways" +msgstr "Laterale" + +#: src/badguy/kamikazesnowball.hpp:34 +msgid "Kamikaze Snowball" msgstr "" -#: src/badguy/flame.hpp:41 +#: src/badguy/kamikazesnowball.hpp:64 +msgid "Leafshot" +msgstr "Colpo di foglia" + +#: src/badguy/fish_swimming.hpp:40 +msgid "Swimming Fish" +msgstr "Pesce Nuotante" + +#: src/badguy/flame.hpp:47 msgid "Flame" msgstr "Fiamma" -#: src/badguy/poisonivy.hpp:30 -msgid "Spring Leaf" +#: src/badguy/scrystallo.hpp:31 +msgid "Sleeping Crystallo" +msgstr "Crystallo Dormiente" + +#: src/badguy/jumpy.cpp:45 +msgid "Wooden" msgstr "" -#: src/badguy/willowisp.hpp:55 -msgid "Will o' Wisp" +#: src/badguy/jumpy.cpp:47 +msgid "Metal" +msgstr "" + +#: src/badguy/jumpy.cpp:48 +msgid "Bag" msgstr "" -#: src/badguy/badguy.hpp:50 +#: src/badguy/willowisp.hpp:57 +msgid "Will o' Wisp" +msgstr "Fuoco Fatuo" + +#: src/badguy/fish_jumping.hpp:41 +msgid "Jumping Fish" +msgstr "Pesce Saltello" + +#: src/badguy/badguy.hpp:61 msgid "Badguy" msgstr "Cattivo" -#: src/badguy/ghostflame.hpp:30 -msgid "Ghost Flame" -msgstr "" +#: src/badguy/rcrystallo.hpp:33 +msgid "Roof Crystallo" +msgstr "Crystallo Soffitto" -#: src/badguy/spiky.hpp:30 +#: src/badguy/spiky.hpp:31 msgid "Spiky" msgstr "Spiky" -#: src/badguy/walkingleaf.hpp:30 -msgid "Autumn Leaf" -msgstr "" +#: src/badguy/walkingleaf.hpp:33 +msgid "Walking Leaf" +msgstr "Foglia Camminante" -#: src/badguy/owl.cpp:227 +#: src/badguy/root.hpp:39 +msgid "Root" +msgstr "Radice" + +#: src/badguy/owl.cpp:241 msgid "Carry" -msgstr "" +msgstr "Portare" -#: src/badguy/darttrap.hpp:33 +#: src/badguy/darttrap.hpp:35 msgid "Dart Trap" -msgstr "" +msgstr "Trappola dardi" -#: src/badguy/skydive.hpp:36 +#: src/badguy/skydive.hpp:43 msgid "Skydive" -msgstr "" +msgstr "Pescebomba" -#: src/badguy/yeti.hpp:37 +#: src/badguy/yeti.hpp:38 msgid "Yeti" msgstr "Yeti" -#: src/badguy/mole.hpp:39 +#: src/badguy/snowball.cpp:41 +msgid "Bumpkin" +msgstr "" + +#: src/badguy/snowball.cpp:42 +msgid "BSOD" +msgstr "" + +#: src/badguy/mole.hpp:38 msgid "Mole" msgstr "Talpa" -#: src/badguy/mrbomb.hpp:42 -msgid "Bomb" -msgstr "" +#: src/badguy/corrupted_granito.cpp:176 +msgid "Skullyhop" +msgstr "Salteschio" -#: src/badguy/walking_candle.hpp:40 +#: src/badguy/mrbomb.hpp:40 +msgid "Mr. Bomb" +msgstr "Signor Bomba" + +#: src/badguy/walking_candle.hpp:41 msgid "Walking Candle" -msgstr "" +msgstr "Candela Camminante" -#: src/badguy/angrystone.hpp:34 +#: src/badguy/angrystone.hpp:39 msgid "Angry Stone" -msgstr "" +msgstr "Pietra Arrabbiata" + +#: src/badguy/tarantula.cpp:354 +msgid "Spidermite" +msgstr "Acaro losco" -#: src/badguy/spidermite.hpp:35 -msgid "Spider" +#: src/badguy/tarantula.cpp:374 +msgid "Static" msgstr "" -#: src/badguy/ghoul.hpp:28 +#: src/badguy/ghoul.hpp:30 msgid "Ghoul" -msgstr "" +msgstr "Ghoul" + +#: src/badguy/granito_giant.hpp:32 +msgid "Giant Granito" +msgstr "Granito Gigante" -#: src/badguy/snowman.hpp:28 +#: src/badguy/snowman.hpp:29 msgid "Snowman" msgstr "Pupazzo di neve" -#: src/badguy/stumpy.hpp:35 -msgid "Walking Stump" +#: src/badguy/viciousivy.hpp:33 +msgid "Vicious Ivy" +msgstr "Crudel-Edera" + +#: src/badguy/stalactite.cpp:156 +msgid "ice" +msgstr "" + +#: src/badguy/stalactite.cpp:157 +msgid "rock" msgstr "" -#: src/badguy/fish.hpp:40 -msgid "Fish" -msgstr "Pesce" +#: src/badguy/fish_chasing.hpp:33 +msgid "Chasing Fish" +msgstr "Pesce Caccia" + +#: src/badguy/stumpy.hpp:38 +msgid "Stumpy" +msgstr "Troncone" -#: src/badguy/dispenser.cpp:439 +#: src/badguy/dispenser.cpp:412 msgid "Interval (seconds)" msgstr "Intervallo (secondi)" -#: src/badguy/dispenser.cpp:440 +#: src/badguy/dispenser.cpp:413 msgid "Random" msgstr "Casuale" -#: src/badguy/dispenser.cpp:441 data//images/engine/editor/objects.stoi:4 -msgid "Enemies" -msgstr "Nemici" +#: src/badguy/dispenser.cpp:416 +#: src/supertux/menu/editor_objectgroup_menu.cpp:30 +#: src/editor/toolbox_widget.cpp:101 +msgid "Objects" +msgstr "Oggetti" -#: src/badguy/dispenser.cpp:442 +#: src/badguy/dispenser.cpp:419 msgid "Limit dispensed badguys" msgstr "Limita la distribuzione dei cattivi" -#: src/badguy/dispenser.cpp:444 +#: src/badguy/dispenser.cpp:421 +msgid "Obey Gravity" +msgstr "Obbedire alla gravità" + +#: src/badguy/dispenser.cpp:423 msgid "Max concurrent badguys" msgstr "Numero massimo di cattivi simultanei" -#: src/badguy/dispenser.cpp:446 src/supertux/menu/editor_levelset_menu.cpp:60 -msgid "Type" -msgstr "Tipo" - -#: src/badguy/dispenser.cpp:447 -msgid "dropper" -msgstr "contagocce" - -#: src/badguy/dispenser.cpp:447 -msgid "rocket launcher" -msgstr "lanciarazzi" +#: src/badguy/dispenser.cpp:435 +msgid "Dropper" +msgstr "" -#: src/badguy/dispenser.cpp:447 -msgid "cannon" -msgstr "cannone" +#: src/badguy/dispenser.cpp:436 +msgid "Cannon" +msgstr "Cannone" -#: src/badguy/dispenser.cpp:447 -msgid "invisible" -msgstr "invisibile" +#: src/badguy/dispenser.cpp:437 src/worldmap/special_tile.cpp:77 +msgid "Invisible" +msgstr "Invisibile" -#: src/badguy/snail.hpp:42 +#: src/badguy/snail.hpp:43 msgid "Snail" msgstr "Lumaca" -#: src/badguy/smartball.hpp:31 -msgid "Smartball" -msgstr "" +#: src/badguy/smartball.hpp:32 +msgid "Mrs. Snowball" +msgstr "Signora Palla di Neve" -#: src/badguy/bouncing_snowball.hpp:31 +#: src/badguy/bouncing_snowball.hpp:39 msgid "Bouncing Snowball" -msgstr "Palla di neve rimbalzante" +msgstr "Palla di Neve Salterella" + +#: src/badguy/granito_big.cpp:52 src/badguy/granito.cpp:263 +msgid "Default" +msgstr "" + +#: src/badguy/granito_big.cpp:53 src/badguy/granito.cpp:264 +msgid "Standing" +msgstr "" + +#: src/badguy/granito_big.cpp:54 src/badguy/granito.cpp:265 +msgid "Walking" +msgstr "" -#: src/badguy/iceflame.hpp:33 -msgid "Ice Flame" +#: src/badguy/mriceblock.cpp:63 +msgid "Laptop" msgstr "" -#: src/badguy/dart.hpp:43 +#: src/badguy/dart.hpp:44 msgid "Dart" msgstr "Dardo" -#: src/supertux/statistics.cpp:47 +#: src/badguy/granito.cpp:268 +msgid "Sitting" +msgstr "" + +#: src/supertux/statistics.cpp:54 msgid "Max coins collected:" msgstr "N. massimo di monete raccolte:" -#: src/supertux/statistics.cpp:48 +#: src/supertux/statistics.cpp:55 msgid "Max fragging:" msgstr "N. massimo di uccisioni:" -#: src/supertux/statistics.cpp:49 +#: src/supertux/statistics.cpp:56 msgid "Max secrets found:" msgstr "N. massimo di segreti trovati:" -#: src/supertux/statistics.cpp:50 +#: src/supertux/statistics.cpp:57 msgid "Best time completed:" msgstr "Miglior tempo di completamento:" -#: src/supertux/statistics.cpp:51 +#: src/supertux/statistics.cpp:58 msgid "Level target time:" msgstr "Obiettivo tempo per il livello:" -#: src/supertux/statistics.cpp:139 src/supertux/levelintro.cpp:159 +#: src/supertux/statistics.cpp:149 src/supertux/levelintro.cpp:175 msgid "Best Level Statistics" msgstr "Statistiche dei migliori risultati dei livelli" -#: src/supertux/statistics.cpp:216 +#: src/supertux/statistics.cpp:238 msgid "You" msgstr "Tu" -#: src/supertux/statistics.cpp:218 +#: src/supertux/statistics.cpp:240 msgid "Best" msgstr "Migliore" -#: src/supertux/statistics.cpp:220 src/supertux/levelintro.cpp:165 +#: src/supertux/statistics.cpp:242 src/supertux/levelintro.cpp:181 msgid "Coins" msgstr "Monete" -#: src/supertux/statistics.cpp:229 +#: src/supertux/statistics.cpp:265 msgid "Badguys" msgstr "Cattivi" -#: src/supertux/statistics.cpp:237 src/supertux/levelintro.cpp:169 +#: src/supertux/statistics.cpp:281 src/supertux/levelintro.cpp:187 msgid "Secrets" msgstr "Segreti" -#: src/supertux/game_object.hpp:77 +#: src/supertux/game_object.hpp:88 msgid "Unknown object" msgstr "Oggetto sconosciuto" -#: src/supertux/command_line_arguments.cpp:74 -#, c-format +#: src/supertux/sector.cpp:507 +msgid "Press escape to skip" +msgstr "Premi escape per saltare" + +#: src/supertux/command_line_arguments.cpp:92 +#, c++-format msgid "Usage: {} [OPTIONS] [LEVELFILE]" -msgstr "Uso: {} [OPZIONI] [LIVELLO]" +msgstr "" -#: src/supertux/command_line_arguments.cpp:75 +#: src/supertux/command_line_arguments.cpp:93 msgid "General Options:" msgstr "Opzioni Generali:" -#: src/supertux/command_line_arguments.cpp:76 +#: src/supertux/command_line_arguments.cpp:94 msgid " -h, --help Show this help message and quit" msgstr "-h, --help Mostra questo messaggio di aiuto e chiude" -#: src/supertux/command_line_arguments.cpp:77 +#: src/supertux/command_line_arguments.cpp:95 msgid " -v, --version Show SuperTux version and quit" msgstr " -v, --version Mostra la versione di SuperTux e chiude" -#: src/supertux/command_line_arguments.cpp:78 +#: src/supertux/command_line_arguments.cpp:96 msgid " --verbose Print verbose messages" msgstr "--verbose Stampa messaggi prolissi" -#: src/supertux/command_line_arguments.cpp:79 +#: src/supertux/command_line_arguments.cpp:97 msgid " --debug Print extra verbose messages" msgstr "-debug Stampa messaggi prolissi extra" -#: src/supertux/command_line_arguments.cpp:80 +#: src/supertux/command_line_arguments.cpp:98 msgid "" " --print-datadir Print SuperTux's primary data directory." msgstr " --print-datadir Mostra la cartella di dati principale di SuperTux." -#: src/supertux/command_line_arguments.cpp:82 +#: src/supertux/command_line_arguments.cpp:99 +msgid "" +" --acknowledgements Print the licenses of libraries used by " +"SuperTux." +msgstr "--acknowledgements Stampa le licenze delle librerie usate da SuperTux" + +#: src/supertux/command_line_arguments.cpp:101 msgid "Video Options:" msgstr "Opzioni Video:" -#: src/supertux/command_line_arguments.cpp:83 +#: src/supertux/command_line_arguments.cpp:102 msgid " -f, --fullscreen Run in fullscreen mode" msgstr "-f, --fullscreen Esegui in modalità a schermo intero" -#: src/supertux/command_line_arguments.cpp:84 +#: src/supertux/command_line_arguments.cpp:103 msgid " -w, --window Run in window mode" msgstr "-w, --window Esegui in modalità finestra" -#: src/supertux/command_line_arguments.cpp:85 +#: src/supertux/command_line_arguments.cpp:104 msgid " -g, --geometry WIDTHxHEIGHT Run SuperTux in given resolution" msgstr "-g, --geometry WIDTHxHEIGHT Esegui SuperTux alla risoluzione data" -#: src/supertux/command_line_arguments.cpp:86 +#: src/supertux/command_line_arguments.cpp:105 msgid " -a, --aspect WIDTH:HEIGHT Run SuperTux with given aspect ratio" msgstr "-a, --aspect WIDTH:HEIGHT Esegui SuperTux con le proporzioni fornite" -#: src/supertux/command_line_arguments.cpp:87 +#: src/supertux/command_line_arguments.cpp:106 msgid " -d, --default Reset video settings to default values" msgstr "-d, --default Ripristina le impostazioni video ai valori originali" -#: src/supertux/command_line_arguments.cpp:88 +#: src/supertux/command_line_arguments.cpp:107 msgid " --renderer RENDERER Use sdl, opengl, or auto to render" msgstr "--renderer RENDERER Usa sdl, opengl, o auto per la visualizzazione" -#: src/supertux/command_line_arguments.cpp:90 +#: src/supertux/command_line_arguments.cpp:109 msgid "Audio Options:" msgstr "Opzioni Audio:" -#: src/supertux/command_line_arguments.cpp:91 +#: src/supertux/command_line_arguments.cpp:110 msgid " --disable-sound Disable sound effects" msgstr "--disable-sound Disabilita gli effetti sonori" -#: src/supertux/command_line_arguments.cpp:92 +#: src/supertux/command_line_arguments.cpp:111 msgid " --disable-music Disable music" msgstr "--disable-music Disabilita la musica" -#: src/supertux/command_line_arguments.cpp:94 +#: src/supertux/command_line_arguments.cpp:113 msgid "Game Options:" msgstr "Opzioni Gioco:" -#: src/supertux/command_line_arguments.cpp:95 +#: src/supertux/command_line_arguments.cpp:114 msgid " --edit-level Open given level in editor" msgstr " --edit-level Apri nell'editor il livello dato" -#: src/supertux/command_line_arguments.cpp:96 +#: src/supertux/command_line_arguments.cpp:115 msgid " --resave Loads given level and saves it" -msgstr "" +msgstr " --resave Carica il livello e lo salva" -#: src/supertux/command_line_arguments.cpp:97 +#: src/supertux/command_line_arguments.cpp:116 msgid " --show-fps Display framerate in levels" msgstr "--show-fps Mostra il framerate nei livelli" -#: src/supertux/command_line_arguments.cpp:98 +#: src/supertux/command_line_arguments.cpp:117 msgid " --no-show-fps Do not display framerate in levels" msgstr "--no-show-fps Non mostrare il framerate nei livelli" -#: src/supertux/command_line_arguments.cpp:99 +#: src/supertux/command_line_arguments.cpp:118 msgid " --show-pos Display player's current position" msgstr " --show-pos Mostra l'attuale posizione del giocatore" -#: src/supertux/command_line_arguments.cpp:100 +#: src/supertux/command_line_arguments.cpp:119 msgid " --no-show-pos Do not display player's position" msgstr " --no-show-pos Non mostra la posizione del giocatore" -#: src/supertux/command_line_arguments.cpp:101 +#: src/supertux/command_line_arguments.cpp:120 msgid " --developer Switch on developer feature" msgstr "--developer Attiva le funzionalità da sviluppatore" -#: src/supertux/command_line_arguments.cpp:102 +#: src/supertux/command_line_arguments.cpp:121 msgid " -s, --debug-scripts Enable script debugger." msgstr "-s, --debug-scripts Abilita lo script debugger." -#: src/supertux/command_line_arguments.cpp:103 +#: src/supertux/command_line_arguments.cpp:122 msgid "" " --spawn-pos X,Y Where in the level to spawn Tux. Only used if" " level is specified." msgstr "--spawn-pos X,Y Dove far apparire Tux nel livello. Utilizzato solo se il livello è specificato." -#: src/supertux/command_line_arguments.cpp:104 +#: src/supertux/command_line_arguments.cpp:123 msgid " --sector SECTOR Spawn Tux in SECTOR\n" msgstr " --sector SETTORE Metti Tux al SETTORE\n" -#: src/supertux/command_line_arguments.cpp:105 +#: src/supertux/command_line_arguments.cpp:124 msgid " --spawnpoint SPAWNPOINT Spawn Tux at SPAWNPOINT\n" msgstr " --spawnpoint PUNTO DI RINASCITA Metti Tux al PUNTO DI RINASCITA\n" -#: src/supertux/command_line_arguments.cpp:107 -msgid "Demo Recording Options:" -msgstr "Opzioni di registrazione demo:" - -#: src/supertux/command_line_arguments.cpp:108 -msgid " --record-demo FILE LEVEL Record a demo to FILE" -msgstr "--record-demo FILE LEVEL Registra una demo su FILE" - -#: src/supertux/command_line_arguments.cpp:109 -msgid " --play-demo FILE LEVEL Play a recorded demo" -msgstr "--play-demo FILE LEVEL Esegui una demo registrata" - -#: src/supertux/command_line_arguments.cpp:111 +#: src/supertux/command_line_arguments.cpp:126 msgid "Directory Options:" msgstr "Opzioni cartella:" -#: src/supertux/command_line_arguments.cpp:112 +#: src/supertux/command_line_arguments.cpp:127 msgid "" " --datadir DIR Set the directory for the games datafiles" msgstr "--datadir DIR Setta la cartella per i file del gioco" -#: src/supertux/command_line_arguments.cpp:113 +#: src/supertux/command_line_arguments.cpp:128 msgid "" " --userdir DIR Set the directory for user data (savegames, " "etc.)" msgstr "--userdir DIR Setta la cartella per i dati utente (salvataggi, ecc.)" -#: src/supertux/command_line_arguments.cpp:115 +#: src/supertux/command_line_arguments.cpp:130 msgid "Add-On Options:" msgstr "Opzioni componenti aggiuntivi" -#: src/supertux/command_line_arguments.cpp:116 +#: src/supertux/command_line_arguments.cpp:131 msgid " --repository-url URL Set the URL to the Add-On repository" msgstr " --repository-url URL Imposta l'URL dell'archivio dei componenti aggiuntivi" -#: src/supertux/command_line_arguments.cpp:118 +#: src/supertux/command_line_arguments.cpp:133 msgid "Environment variables:" msgstr "Variabili d'ambiente:" -#: src/supertux/command_line_arguments.cpp:119 +#: src/supertux/command_line_arguments.cpp:134 msgid "" " SUPERTUX2_USER_DIR Directory for user data (savegames, etc.)" msgstr "SUPERTUX2_USER_DIR Cartella per i dati (salvataggi, ecc.)" -#: src/supertux/command_line_arguments.cpp:120 +#: src/supertux/command_line_arguments.cpp:135 msgid " SUPERTUX2_DATA_DIR Directory for the games datafiles" msgstr "SUPERTUX2_DATA_DIR Cartella per i dati del gioco" -#: src/supertux/title_screen.cpp:43 +#: src/supertux/title_screen.cpp:272 msgid "Copyright" msgstr "Copyright" -#: src/supertux/title_screen.cpp:44 +#: src/supertux/title_screen.cpp:273 msgid "" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n" "redistribute it under certain conditions; see the license file for details.\n" msgstr "Il gioco viene fornito SENZA NESSUNA GARANZIA. Questo è software libero e sei libero di \nredistribuirlo sotto alcune condizioni; vedi il file di licenza per i dettagli.\n" -#: src/supertux/menu/contrib_menu.cpp:79 -#: src/supertux/menu/world_set_menu.cpp:31 -msgid "Contrib Levels" -msgstr "Livelli aggiuntivi" +#: src/supertux/game_object.cpp:114 +msgid "Version" +msgstr "Versione" -#: src/supertux/menu/contrib_menu.cpp:119 -#: src/supertux/menu/contrib_menu.cpp:150 -msgid "*NEW*" -msgstr "*NUOVO*" +#: src/supertux/game_object.cpp:129 +#: src/supertux/menu/editor_levelset_menu.cpp:54 +msgid "Type" +msgstr "Tipo" -#: src/supertux/menu/contrib_menu.cpp:172 src/supertux/menu/debug_menu.cpp:75 -#: src/supertux/menu/editor_level_select_menu.cpp:84 -#: src/supertux/menu/worldmap_cheat_menu.cpp:55 -#: src/supertux/menu/worldmap_cheat_menu.cpp:153 -#: src/supertux/menu/editor_levelset_select_menu.cpp:96 -#: src/supertux/menu/options_menu.cpp:405 -#: src/supertux/menu/profile_menu.cpp:47 src/supertux/menu/addon_menu.cpp:210 -#: src/supertux/menu/editor_new_levelset_menu.cpp:40 -#: src/supertux/menu/world_set_menu.cpp:33 -#: src/supertux/menu/keyboard_menu.cpp:51 -#: src/supertux/menu/language_menu.cpp:56 -#: src/supertux/menu/joystick_menu.cpp:99 -#: src/supertux/menu/contrib_levelset_menu.cpp:67 -#: src/supertux/menu/cheat_menu.cpp:44 -msgid "Back" -msgstr "Indietro" +#: src/supertux/menu/integrations_menu.cpp:49 +msgid "Integrations" +msgstr "Integrazioni" + +#: src/supertux/menu/integrations_menu.cpp:51 +msgid "Do not share level names when editing" +msgstr "Non condividere i nomi dei livelli durante l'editing" + +#: src/supertux/menu/integrations_menu.cpp:52 +msgid "" +"Enable this if you want to work on secret levels and don't want the names to" +" be spoiled" +msgstr "" + +#: src/supertux/menu/integrations_menu.cpp:54 +msgid "Enable Discord integration" +msgstr "Abilita le integrazioni di Discord" + +#: src/supertux/menu/integrations_menu.cpp:55 +msgid "" +"Sends information to your Discord application about what you're doing in the" +" game." +msgstr "" + +#: src/supertux/menu/integrations_menu.cpp:57 +msgid "Discord (disabled; not compiled)" +msgstr "Discord (disabilitato, non compilato)" + +#: src/supertux/menu/editor_converters_menu.cpp:61 +#: src/supertux/menu/editor_menu.cpp:85 +msgid "Convert Tiles" +msgstr "Converti Caselle" + +#: src/supertux/menu/editor_converters_menu.cpp:64 +msgid "Select Tile Conversion File" +msgstr "Seleziona il File di Conversione Casella" + +#: src/supertux/menu/editor_converters_menu.cpp:72 +#, c++-format +msgid "By: {}" +msgstr "" + +#: src/supertux/menu/editor_converters_menu.cpp:75 +msgid "Convert Tiles By File" +msgstr "Converti Caselle Con File" + +#: src/supertux/menu/editor_converters_menu.cpp:76 +msgid "Convert all tiles in the current level by a file, specified above." +msgstr "" + +#: src/supertux/menu/editor_converters_menu.cpp:89 +msgid "No tile conversion file selected." +msgstr "" + +#: src/supertux/menu/editor_converters_menu.cpp:93 +msgid "" +"This will convert all tiles in the level. Proceed?\n" +"\n" +"Note: This should not be ran more than once on a level.\n" +"Creating a separate copy of the level is highly recommended." +msgstr "" + +#: src/supertux/menu/video_system_menu.cpp:36 +msgid "Select Video System" +msgstr "" + +#: src/supertux/menu/video_system_menu.cpp:37 +#, c++-format +msgid "Used video system: {}" +msgstr "" + +#: src/supertux/menu/video_system_menu.cpp:54 +msgid "Restart game for the changes to take effect" +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:68 +#: src/supertux/menu/world_set_menu.cpp:31 +msgid "Contrib Levels" +msgstr "Livelli aggiuntivi" + +#: src/supertux/menu/contrib_menu.cpp:98 +#: src/supertux/menu/contrib_menu.cpp:112 +msgid "Official Contrib Levels" +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:99 +#: src/supertux/menu/contrib_menu.cpp:118 +msgid "Community Contrib Levels" +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:100 +#: src/supertux/menu/contrib_menu.cpp:124 +msgid "User Contrib Levels" +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:113 +msgid "How is this possible? There are no Official Contrib Levels!" +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:119 +msgid "No Community Contrib Levels yet. Download them from the Add-ons Menu." +msgstr "" + +#: src/supertux/menu/contrib_menu.cpp:125 +msgid "No User Contrib Levels yet. Create some with the Level Editor." +msgstr "" -#: src/supertux/menu/debug_menu.cpp:32 +#: src/supertux/menu/debug_menu.cpp:34 msgid "Debug" msgstr "Debug" -#: src/supertux/menu/debug_menu.cpp:56 +#: src/supertux/menu/debug_menu.cpp:58 msgid "Game Speed" msgstr "Velocità del gioco" -#: src/supertux/menu/debug_menu.cpp:57 +#: src/supertux/menu/debug_menu.cpp:59 msgid "Adjust Game Speed" msgstr "Aggiuta velocità del gioco" -#: src/supertux/menu/debug_menu.cpp:63 +#: src/supertux/menu/debug_menu.cpp:65 msgid "Show Collision Rects" msgstr "Mostra i rettangoli di collisione" -#: src/supertux/menu/debug_menu.cpp:64 +#: src/supertux/menu/debug_menu.cpp:66 msgid "Show Worldmap Path" msgstr "Mostra il percorso della mappa del mondo" -#: src/supertux/menu/debug_menu.cpp:65 +#: src/supertux/menu/debug_menu.cpp:67 msgid "Show Controller" -msgstr "" +msgstr "Mostra Controller" -#: src/supertux/menu/debug_menu.cpp:66 +#: src/supertux/menu/debug_menu.cpp:68 msgid "Show Framerate" -msgstr "" +msgstr "Mostra FPS" -#: src/supertux/menu/debug_menu.cpp:67 +#: src/supertux/menu/debug_menu.cpp:69 msgid "Draw Redundant Frames" -msgstr "" +msgstr "Mostra i frame rindondanti" -#: src/supertux/menu/debug_menu.cpp:68 +#: src/supertux/menu/debug_menu.cpp:70 msgid "Show Player Position" -msgstr "" +msgstr "Mostra la posizione del giocatore" -#: src/supertux/menu/debug_menu.cpp:69 +#: src/supertux/menu/debug_menu.cpp:71 msgid "Use Bitmap Fonts" msgstr "Usa font bitmap" -#: src/supertux/menu/debug_menu.cpp:72 +#: src/supertux/menu/debug_menu.cpp:74 msgid "Dump Texture Cache" +msgstr "Fai il dump della cache texture" + +#: src/supertux/menu/particle_editor_save_as.cpp:33 +msgid "Save particle as" +msgstr "Salva particolare come" + +#: src/supertux/menu/particle_editor_save_as.cpp:37 +#: src/supertux/menu/editor_save_as.cpp:37 +msgid "File name" +msgstr "Nome del file" + +#: src/supertux/menu/particle_editor_save_as.cpp:38 +#: src/supertux/menu/editor_save_as.cpp:38 src/editor/particle_editor.cpp:767 +msgid "Save" +msgstr "Salva" + +#: src/supertux/menu/multiplayer_menu.cpp:27 +#: src/supertux/menu/multiplayer_players_menu.cpp:34 +msgid "Multiplayer" +msgstr "" + +#: src/supertux/menu/multiplayer_menu.cpp:30 +msgid "Auto-manage Players" +msgstr "" + +#: src/supertux/menu/multiplayer_menu.cpp:31 +msgid "" +"Automatically add and remove players when controllers are plugged or " +"unplugged" +msgstr "" + +#: src/supertux/menu/multiplayer_menu.cpp:33 +msgid "Allow Multibind" +msgstr "" + +#: src/supertux/menu/multiplayer_menu.cpp:34 +msgid "Allow binding multiple joysticks to a single player" +msgstr "" + +#: src/supertux/menu/multiplayer_menu.cpp:36 +msgid "Manage Players" msgstr "" #: src/supertux/menu/editor_sectors_menu.cpp:31 msgid "Choose Sector" -msgstr "" +msgstr "Scegli il settore" #: src/supertux/menu/editor_sectors_menu.cpp:41 msgid "Sector Settings" -msgstr "" +msgstr "Impostazioni del settore" #: src/supertux/menu/editor_sectors_menu.cpp:42 msgid "Create Sector" -msgstr "" +msgstr "Crea settore" #: src/supertux/menu/editor_sectors_menu.cpp:43 msgid "Delete Sector" -msgstr "" +msgstr "Elimina settore" -#: src/supertux/menu/editor_sectors_menu.cpp:93 +#: src/supertux/menu/editor_sectors_menu.cpp:92 msgid "Each level must have at least one sector." msgstr "Ogni livello deve avere almeno un settore." -#: src/supertux/menu/editor_sectors_menu.cpp:98 +#: src/supertux/menu/editor_sectors_menu.cpp:97 msgid "Do you really want to delete this sector?" msgstr "Vuoi davvero eliminare questo settore?" -#: src/supertux/menu/editor_sectors_menu.cpp:101 +#: src/supertux/menu/editor_sectors_menu.cpp:100 msgid "Delete sector" msgstr "Elimina settore" -#: src/supertux/menu/editor_objectgroup_menu.cpp:30 -#: src/editor/toolbox_widget.cpp:92 -msgid "Objects" -msgstr "Oggetti" +#: src/supertux/menu/custom_menu_menu.cpp:49 +#: src/supertux/menu/options_menu.cpp:191 +msgid "Menu Customization" +msgstr "" -#: src/supertux/menu/editor_level_select_menu.cpp:58 -msgid "Empty World" +#: src/supertux/menu/custom_menu_menu.cpp:51 +msgid "Menu Back Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:52 +msgid "Menu Front Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:53 +msgid "Menu Help Back Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:54 +msgid "Menu Help Front Color" msgstr "" -#: src/supertux/menu/editor_level_select_menu.cpp:73 +#: src/supertux/menu/custom_menu_menu.cpp:55 +msgid "Label Text Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:56 +msgid "Active Text Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:57 +msgid "Divider Line Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:58 +msgid "Menu Roundness" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:60 +msgid "Editor Interface Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:61 +msgid "Editor Hover Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:62 +msgid "Editor Grab Color" +msgstr "" + +#: src/supertux/menu/custom_menu_menu.cpp:64 +msgid "Reset to defaults" +msgstr "" + +#: src/supertux/menu/editor_level_select_menu.cpp:72 +msgid "Empty World" +msgstr "Mondo vuoto" + +#: src/supertux/menu/editor_level_select_menu.cpp:87 msgid "Create Level" msgstr "Crea livello" -#: src/supertux/menu/editor_level_select_menu.cpp:77 +#: src/supertux/menu/editor_level_select_menu.cpp:91 msgid "Edit Worldmap" -msgstr "" +msgstr "Modifica mappa del mondo" -#: src/supertux/menu/editor_level_select_menu.cpp:79 +#: src/supertux/menu/editor_level_select_menu.cpp:93 msgid "Create Worldmap" -msgstr "" +msgstr "Crea mappa del mondo" -#: src/supertux/menu/editor_level_select_menu.cpp:83 -#: src/supertux/menu/editor_levelset_menu.cpp:56 +#: src/supertux/menu/editor_level_select_menu.cpp:95 +#: src/supertux/menu/editor_delete_level_menu.cpp:55 +msgid "Delete level" +msgstr "Elimina livello" + +#: src/supertux/menu/editor_level_select_menu.cpp:97 +#: src/supertux/menu/editor_levelset_menu.cpp:50 msgid "World Settings" -msgstr "" +msgstr "Impostazioni del mondo" -#: src/supertux/menu/editor_level_select_menu.cpp:123 +#: src/supertux/menu/editor_level_select_menu.cpp:141 msgid "" "Share this worldmap under license CC-BY-SA 4.0 International (advised).\n" "It allows modifications and redistribution by third-parties.\n" @@ -1488,7 +2820,7 @@ msgid "" "DISCLAIMER: The SuperTux authors take no responsibility for your choice of license." msgstr "Condividi questa mappa con licenza CC-BY-SA 4.0 Internazionale (consigliato).\nQuesto permette la modifica e la redistribuzione da terze parti.\nSe non sei d'accordo con questa licenza, cambiala nelle proprietà del livello.\nDICHIARAZIONE LIBERATORIA: Gli autori di SuperTux non si assumono alcuna responsabilità per la licenza scelta." -#: src/supertux/menu/editor_level_select_menu.cpp:130 +#: src/supertux/menu/editor_level_select_menu.cpp:148 msgid "" "Share this level under license CC-BY-SA 4.0 International (advised).\n" "It allows modifications and redistribution by third-parties.\n" @@ -1496,570 +2828,1077 @@ msgid "" "DISCLAIMER: The SuperTux authors take no responsibility for your choice of license." msgstr "Condividi questo livello con licenza CC-BY-SA 4.0 Internazionale (consigliato).\nQuesto permette la modifica e la redistribuzione da terze parti.\nSe non sei d'accordo con questa licenza, cambiala nelle proprietà del livello.\nDICHIARAZIONE LIBERATORIA: Gli autori di SuperTux non si assumono alcuna responsabilità per la licenza scelta." -#: src/supertux/menu/worldmap_cheat_menu.cpp:34 -#: src/supertux/menu/cheat_menu.cpp:30 +#: src/supertux/menu/editor_level_select_menu.cpp:179 +msgid "" +"An auto-save recovery file was found. Would you like to restore the recovery\n" +"file and resume where you were before the editor crashed?" +msgstr "Un auto-salvataggio recovery file è stato trovato. Vuoi ristabilire il recovery
file e riprendere dove eri prima che l'editor crashasse?" + +#: src/supertux/menu/editor_level_select_menu.cpp:186 +msgid "This will delete the auto-save file. Are you sure?" +msgstr "Questo eliminerà l'auto-salvataggio del file. Sei sicuro?" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:35 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:52 +#: src/supertux/menu/cheat_apply_menu.cpp:33 +#: src/supertux/menu/cheat_apply_menu.cpp:51 +msgid "Apply cheat to player" +msgstr "" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:39 +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:60 +#: src/supertux/menu/multiplayer_players_menu.cpp:39 +#: src/supertux/menu/keyboard_menu.cpp:63 +#: src/supertux/menu/cheat_apply_menu.cpp:39 +#: src/supertux/menu/cheat_apply_menu.cpp:59 +#: src/supertux/menu/multiplayer_player_menu.cpp:37 +#, c++-format +msgid "Player {}" +msgstr "" + +#: src/supertux/menu/worldmap_cheat_apply_menu.cpp:57 +#: src/supertux/menu/cheat_apply_menu.cpp:36 +#: src/supertux/menu/cheat_apply_menu.cpp:56 +msgid "All Players" +msgstr "" + +#: src/supertux/menu/worldmap_cheat_menu.cpp:36 +#: src/supertux/menu/cheat_menu.cpp:31 msgid "Cheats" msgstr "Trucchi" -#: src/supertux/menu/worldmap_cheat_menu.cpp:36 -#: src/supertux/menu/cheat_menu.cpp:32 +#: src/supertux/menu/worldmap_cheat_menu.cpp:38 +#: src/supertux/menu/cheat_menu.cpp:33 msgid "Bonus: Grow" msgstr "Bonus: Crescita" -#: src/supertux/menu/worldmap_cheat_menu.cpp:37 -#: src/supertux/menu/cheat_menu.cpp:33 +#: src/supertux/menu/worldmap_cheat_menu.cpp:39 +#: src/supertux/menu/cheat_menu.cpp:34 msgid "Bonus: Fire" msgstr "Bonus: Fuoco" -#: src/supertux/menu/worldmap_cheat_menu.cpp:38 -#: src/supertux/menu/cheat_menu.cpp:34 +#: src/supertux/menu/worldmap_cheat_menu.cpp:40 +#: src/supertux/menu/cheat_menu.cpp:35 msgid "Bonus: Ice" msgstr "Bonus: Ghiaccio" -#: src/supertux/menu/worldmap_cheat_menu.cpp:39 -#: src/supertux/menu/cheat_menu.cpp:35 +#: src/supertux/menu/worldmap_cheat_menu.cpp:41 +#: src/supertux/menu/cheat_menu.cpp:36 msgid "Bonus: Air" msgstr "Bonus: Aria" -#: src/supertux/menu/worldmap_cheat_menu.cpp:40 -#: src/supertux/menu/cheat_menu.cpp:36 +#: src/supertux/menu/worldmap_cheat_menu.cpp:42 +#: src/supertux/menu/cheat_menu.cpp:37 msgid "Bonus: Earth" msgstr "Bonus: Terra" -#: src/supertux/menu/worldmap_cheat_menu.cpp:41 +#: src/supertux/menu/worldmap_cheat_menu.cpp:43 msgid "Bonus: None" msgstr "Bonus: Nessuno" -#: src/supertux/menu/worldmap_cheat_menu.cpp:44 -#: src/supertux/menu/cheat_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_menu.cpp:46 +#: src/supertux/menu/cheat_menu.cpp:45 src/supertux/menu/cheat_menu.cpp:51 msgid "Leave Ghost Mode" msgstr "Lascia la modalità Fantasma" -#: src/supertux/menu/worldmap_cheat_menu.cpp:44 -#: src/supertux/menu/cheat_menu.cpp:42 +#: src/supertux/menu/worldmap_cheat_menu.cpp:46 +#: src/supertux/menu/cheat_menu.cpp:45 src/supertux/menu/cheat_menu.cpp:50 msgid "Activate Ghost Mode" msgstr "Attiva modalità fantasma" -#: src/supertux/menu/worldmap_cheat_menu.cpp:46 -#: src/supertux/menu/cheat_menu.cpp:40 +#: src/supertux/menu/worldmap_cheat_menu.cpp:48 +#: src/supertux/menu/cheat_menu.cpp:41 msgid "Finish Level" msgstr "Completa livello" -#: src/supertux/menu/worldmap_cheat_menu.cpp:47 +#: src/supertux/menu/worldmap_cheat_menu.cpp:49 msgid "Reset Level" msgstr "Resetta livello" -#: src/supertux/menu/worldmap_cheat_menu.cpp:49 +#: src/supertux/menu/worldmap_cheat_menu.cpp:51 msgid "Finish Worldmap" msgstr "Fine Mondo mappa" -#: src/supertux/menu/worldmap_cheat_menu.cpp:50 +#: src/supertux/menu/worldmap_cheat_menu.cpp:52 msgid "Reset Worldmap" msgstr "Resetta mondo mappa" -#: src/supertux/menu/worldmap_cheat_menu.cpp:52 +#: src/supertux/menu/worldmap_cheat_menu.cpp:54 msgid "Go to level" -msgstr "" +msgstr "Vai al livello" -#: src/supertux/menu/worldmap_cheat_menu.cpp:53 +#: src/supertux/menu/worldmap_cheat_menu.cpp:55 msgid "Go to main spawnpoint" -msgstr "" +msgstr "Vai al punto di generazione principale" -#: src/supertux/menu/worldmap_cheat_menu.cpp:145 +#: src/supertux/menu/worldmap_cheat_menu.cpp:188 msgid "Select level" -msgstr "" +msgstr "Scegli livello" + +#: src/supertux/menu/editor_save_as.cpp:33 +#: src/supertux/menu/editor_menu.cpp:63 +msgid "Save Level as" +msgstr "Salva livello come" + +#: src/supertux/menu/editor_save_as.cpp:33 +#: src/supertux/menu/editor_menu.cpp:64 +msgid "Save Copy" +msgstr "Salva una copia" -#: src/supertux/menu/editor_levelset_select_menu.cpp:54 +#: src/supertux/menu/editor_levelset_select_menu.cpp:71 msgid "Choose World" -msgstr "" +msgstr "Scegli il mondo" -#: src/supertux/menu/editor_levelset_select_menu.cpp:82 -#, c-format -msgid "%d level" -msgid_plural "%d levels" -msgstr[0] "%d livello" -msgstr[1] "%d livelli" +#: src/supertux/menu/editor_levelset_select_menu.cpp:99 +#, c++-format +msgid "{} level" +msgid_plural "{} levels" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" -#: src/supertux/menu/editor_levelset_select_menu.cpp:95 +#: src/supertux/menu/editor_levelset_select_menu.cpp:112 msgid "Create World" -msgstr "" +msgstr "Crea mondo" -#: src/supertux/menu/options_menu.cpp:85 src/supertux/menu/main_menu.cpp:53 -#: src/supertux/menu/game_menu.cpp:61 src/supertux/menu/worldmap_menu.cpp:31 -msgid "Options" -msgstr "Opzioni" - -#: src/supertux/menu/options_menu.cpp:91 -#: src/supertux/menu/options_menu.cpp:127 -#: src/supertux/menu/options_menu.cpp:418 -#: src/supertux/menu/options_menu.cpp:439 src/editor/object_settings.cpp:112 -msgid "auto" -msgstr "auto" +#: src/supertux/menu/editor_levelset_select_menu.cpp:113 +#: src/supertux/menu/editor_delete_levelset_menu.cpp:41 +msgid "Delete World" +msgstr "" -#: src/supertux/menu/options_menu.cpp:206 -msgid "Desktop" -msgstr "Scrivania" +#: src/supertux/menu/options_menu.cpp:72 +#: src/supertux/menu/options_select_menu.cpp:35 +msgid "Locale" +msgstr "" -#: src/supertux/menu/options_menu.cpp:332 +#: src/supertux/menu/options_menu.cpp:76 msgid "Select Language" msgstr "Seleziona la lingua" -#: src/supertux/menu/options_menu.cpp:333 +#: src/supertux/menu/options_menu.cpp:77 msgid "Select a different language to display text in" msgstr "Seleziona una lingua diversa in cui mostrare il testo" -#: src/supertux/menu/options_menu.cpp:335 +#: src/supertux/menu/options_menu.cpp:79 msgid "Language Packs" msgstr "Pacchetti lingua" -#: src/supertux/menu/options_menu.cpp:336 +#: src/supertux/menu/options_menu.cpp:80 msgid "Language packs contain up-to-date translations" msgstr "I pacchetti lingua contengono aggiornamenti alle traduzioni" -#: src/supertux/menu/options_menu.cpp:338 -#: src/supertux/menu/profile_menu.cpp:30 -msgid "Select Profile" -msgstr "Seleziona il profilo" - -#: src/supertux/menu/options_menu.cpp:339 -msgid "Select a profile to play with" -msgstr "Seleziona il profilo con cui giocare" +#: src/supertux/menu/options_menu.cpp:88 +#: src/supertux/menu/options_select_menu.cpp:37 +msgid "Video" +msgstr "" -#: src/supertux/menu/options_menu.cpp:342 +#: src/supertux/menu/options_menu.cpp:91 msgid "Window Resizable" msgstr "Finestra ridimensionabile" -#: src/supertux/menu/options_menu.cpp:343 +#: src/supertux/menu/options_menu.cpp:92 msgid "Allow window resizing, might require a restart to take effect" msgstr "Permetti il ridimensionamento della finestra. Potrebbe essere necessario riavvare il gioco affinché le modifiche abbiano effetto." -#: src/supertux/menu/options_menu.cpp:345 -msgid "Window Resolution" -msgstr "Risoluzione della finestra" - -#: src/supertux/menu/options_menu.cpp:346 -msgid "Resize the window to the given size" -msgstr "Ridimensiona la finestra data la dimensione" - -#: src/supertux/menu/options_menu.cpp:348 +#: src/supertux/menu/options_menu.cpp:96 msgid "Fullscreen" msgstr "Modalità schermo intero" -#: src/supertux/menu/options_menu.cpp:349 +#: src/supertux/menu/options_menu.cpp:97 msgid "Fill the entire screen" msgstr "Gioca a tutto schermo" -#: src/supertux/menu/options_menu.cpp:351 -msgid "Fullscreen Resolution" -msgstr "Risoluzione a schermo intero" - -#: src/supertux/menu/options_menu.cpp:352 -msgid "" -"Determine the resolution used in fullscreen mode (you must toggle fullscreen" -" to complete the change)" -msgstr "Determina la risoluzione usata a schermo intero (devi selezionare Schermo Intero per completare le modifiche)" - -#: src/supertux/menu/options_menu.cpp:354 -msgid "Magnification" -msgstr "Ingrandimento" +#: src/supertux/menu/options_menu.cpp:104 +msgid "Fit to browser" +msgstr "Adatta al browser" -#: src/supertux/menu/options_menu.cpp:355 -msgid "Change the magnification of the game area" -msgstr "Imposta l'ingrandimento dell'area di gioco" +#: src/supertux/menu/options_menu.cpp:105 +msgid "Fit the resolution to the size of your browser" +msgstr "Adatta la risoluzione alla grandezza del browser" -#: src/supertux/menu/options_menu.cpp:357 -msgid "VSync" -msgstr "VSync" - -#: src/supertux/menu/options_menu.cpp:358 -msgid "Set the VSync mode" -msgstr "Imposta la modalità VSync" +#: src/supertux/menu/options_menu.cpp:116 +msgid "Change Video System" +msgstr "" -#: src/supertux/menu/options_menu.cpp:360 -msgid "Aspect Ratio" -msgstr "Rapporto larghezza/altezza" +#: src/supertux/menu/options_menu.cpp:117 +msgid "Change video system used to render graphics" +msgstr "" -#: src/supertux/menu/options_menu.cpp:361 -msgid "Adjust the aspect ratio" -msgstr "Imposta il rapporto larghezza/altezza" +#: src/supertux/menu/options_menu.cpp:124 +#: src/supertux/menu/options_select_menu.cpp:38 +msgid "Audio" +msgstr "" -#: src/supertux/menu/options_menu.cpp:366 +#: src/supertux/menu/options_menu.cpp:129 msgid "Disable all sound effects" msgstr "Disattiva tutti gli effetti sonori" -#: src/supertux/menu/options_menu.cpp:368 +#: src/supertux/menu/options_menu.cpp:131 msgid "Disable all music" msgstr "Disattiva la musica" -#: src/supertux/menu/options_menu.cpp:370 -msgid "Sound Volume" -msgstr "Volume del sonoro" - -#: src/supertux/menu/options_menu.cpp:371 -msgid "Adjust sound volume" -msgstr "Modifica il volume del sonoro" - -#: src/supertux/menu/options_menu.cpp:373 -msgid "Music Volume" -msgstr "Volume della musica" - -#: src/supertux/menu/options_menu.cpp:374 -msgid "Adjust music volume" -msgstr "Modifica il volume della musica" - -#: src/supertux/menu/options_menu.cpp:378 +#: src/supertux/menu/options_menu.cpp:138 msgid "Sound (disabled)" msgstr "Suono (disattivato)" -#: src/supertux/menu/options_menu.cpp:379 +#: src/supertux/menu/options_menu.cpp:139 msgid "Music (disabled)" msgstr "Musica (disattivata)" -#: src/supertux/menu/options_menu.cpp:382 -#: src/supertux/menu/keyboard_menu.cpp:30 +#: src/supertux/menu/options_menu.cpp:147 +#: src/supertux/menu/options_select_menu.cpp:39 +msgid "Controls" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:151 +msgid "Enable Rumbling Controllers" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:152 +msgid "Enable vibrating the game controllers." +msgstr "" + +#: src/supertux/menu/options_menu.cpp:152 +msgid "This feature is currently only used in the multiplayer options menu." +msgstr "" + +#: src/supertux/menu/options_menu.cpp:154 +#: src/supertux/menu/keyboard_menu.cpp:34 msgid "Setup Keyboard" msgstr "Configurazione controlli" -#: src/supertux/menu/options_menu.cpp:383 +#: src/supertux/menu/options_menu.cpp:155 msgid "Configure key-action mappings" msgstr "Configura i tasti" -#: src/supertux/menu/options_menu.cpp:385 -#: src/supertux/menu/joystick_menu.cpp:52 +#: src/supertux/menu/options_menu.cpp:158 +#: src/supertux/menu/joystick_menu.cpp:54 msgid "Setup Joystick" msgstr "Configura joystick" -#: src/supertux/menu/options_menu.cpp:386 +#: src/supertux/menu/options_menu.cpp:159 msgid "Configure joystick control-action mappings" msgstr "Configura il joystick" -#: src/supertux/menu/options_menu.cpp:388 +#: src/supertux/menu/options_menu.cpp:167 +#: src/supertux/menu/options_select_menu.cpp:40 +msgid "Extras" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:170 +#: src/supertux/menu/profile_menu.cpp:56 +msgid "Select Profile" +msgstr "Seleziona il profilo" + +#: src/supertux/menu/options_menu.cpp:171 +msgid "Select a profile to play with" +msgstr "Seleziona il profilo con cui giocare" + +#: src/supertux/menu/options_menu.cpp:174 +msgid "Multiplayer settings" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:175 +msgid "Configure settings specific to multiplayer" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:178 msgid "Enable transitions" msgstr "Abilita le transizioni" -#: src/supertux/menu/options_menu.cpp:389 +#: src/supertux/menu/options_menu.cpp:179 msgid "Enable screen transitions and smooth menu animation" msgstr "Abilita le transizioni e le animazioni nei menù" -#: src/supertux/menu/options_menu.cpp:393 -msgid "Developer Mode" -msgstr "Modalità Sviluppatore" +#: src/supertux/menu/options_menu.cpp:181 +msgid "Custom title screen levels" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:182 +msgid "Allow overriding the title screen level, when loading certain worlds" +msgstr "" -#: src/supertux/menu/options_menu.cpp:398 +#: src/supertux/menu/options_menu.cpp:185 msgid "Christmas Mode" msgstr "Modalità Natale" -#: src/supertux/menu/options_menu.cpp:401 +#: src/supertux/menu/options_menu.cpp:187 +msgid "Integrations and presence" +msgstr "Integrazioni e presenze" + +#: src/supertux/menu/options_menu.cpp:188 +msgid "" +"Manage whether SuperTux should display the levels you play on your social " +"media profiles (Discord)" +msgstr "Gestisci se SuperTux deve visualizzare i livelli che giochi sui tuoi profili sui social media (Discord)" + +#: src/supertux/menu/options_menu.cpp:192 +msgid "Customize the appearance of the menus" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:199 +#: src/supertux/menu/options_select_menu.cpp:41 +msgid "Advanced" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:204 +msgid "Developer Mode" +msgstr "Modalità Sviluppatore" + +#: src/supertux/menu/options_menu.cpp:206 msgid "Confirmation Dialog" msgstr "Dialogo di conferma" -#: src/supertux/menu/options_menu.cpp:402 +#: src/supertux/menu/options_menu.cpp:206 +msgid "Confirm aborting level" +msgstr "Conferma l'uscita dal livello" + +#: src/supertux/menu/options_menu.cpp:208 msgid "Pause on focus loss" msgstr "Pausa alla perdita del focus" +#: src/supertux/menu/options_menu.cpp:209 +msgid "Automatically pause the game when the window loses focus" +msgstr "Pausa automatica il gioco quando la finestra perde concentrazione" + +#: src/supertux/menu/options_menu.cpp:211 +msgid "Use custom mouse cursor" +msgstr "Usa un cursore del mouse personalizzato" + +#: src/supertux/menu/options_menu.cpp:211 +msgid "Whether the game renders its own cursor or uses the system's cursor" +msgstr "Se il gioco esegue il rendering del proprio cursore o utilizza il cursore del sistema" + +#: src/supertux/menu/options_menu.cpp:214 +msgid "Check for new releases" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:215 +msgid "" +"Allows the game to perform checks for new SuperTux releases on startup and " +"notify if any found." +msgstr "" + +#: src/supertux/menu/options_menu.cpp:245 +#: src/supertux/menu/options_menu.cpp:288 src/supertux/direction.cpp:76 +msgid "auto" +msgstr "auto" + +#: src/supertux/menu/options_menu.cpp:281 +msgid "Magnification" +msgstr "Ingrandimento" + +#: src/supertux/menu/options_menu.cpp:282 +msgid "Change the magnification of the game area" +msgstr "Imposta l'ingrandimento dell'area di gioco" + +#: src/supertux/menu/options_menu.cpp:318 +msgid "Aspect Ratio" +msgstr "Rapporto larghezza/altezza" + +#: src/supertux/menu/options_menu.cpp:319 +msgid "Adjust the aspect ratio" +msgstr "Imposta il rapporto larghezza/altezza" + +#: src/supertux/menu/options_menu.cpp:346 +msgid "Window Resolution" +msgstr "Risoluzione della finestra" + +#: src/supertux/menu/options_menu.cpp:347 +msgid "Resize the window to the given size" +msgstr "Ridimensiona la finestra data la dimensione" + +#: src/supertux/menu/options_menu.cpp:377 +msgid "Desktop" +msgstr "Scrivania" + +#: src/supertux/menu/options_menu.cpp:404 +msgid "Fullscreen Resolution" +msgstr "Risoluzione a schermo intero" + +#: src/supertux/menu/options_menu.cpp:405 +msgid "" +"Determine the resolution used in fullscreen mode (you must toggle fullscreen" +" to complete the change)" +msgstr "Determina la risoluzione usata a schermo intero (devi selezionare Schermo Intero per completare le modifiche)" + +#: src/supertux/menu/options_menu.cpp:411 +msgid "on" +msgstr "Attivo" + +#: src/supertux/menu/options_menu.cpp:412 +msgid "off" +msgstr "Disattivo" + +#: src/supertux/menu/options_menu.cpp:413 +msgid "adaptive" +msgstr "Adattivo" + +#: src/supertux/menu/options_menu.cpp:431 +msgid "VSync" +msgstr "VSync" + +#: src/supertux/menu/options_menu.cpp:432 +msgid "Set the VSync mode" +msgstr "Imposta la modalità VSync" + +#: src/supertux/menu/options_menu.cpp:467 +msgid "Sound Volume" +msgstr "Volume del sonoro" + +#: src/supertux/menu/options_menu.cpp:468 +msgid "Adjust sound volume" +msgstr "Modifica il volume del sonoro" + +#: src/supertux/menu/options_menu.cpp:503 +msgid "Music Volume" +msgstr "Volume della musica" + +#: src/supertux/menu/options_menu.cpp:504 +msgid "Adjust music volume" +msgstr "Modifica il volume della musica" + +#: src/supertux/menu/options_menu.cpp:517 +msgid "On-screen controls scale" +msgstr "" + +#: src/supertux/menu/options_menu.cpp:638 +msgid "" +"The game couldn't detect your browser resolution.\n" +"This most likely happens because it is not embedded\n" +"in the SuperTux custom HTML template.\n" +msgstr "Il gioco non è riuscito a rilevare la risoluzione del tuo browser. \nQuesto molto probabilmente accade perché non è incorporato \nnel modello HTML personalizzato di SuperTux.\n" + +#: src/supertux/menu/editor_delete_levelset_menu.cpp:80 +msgid "You cannot delete the world that you are editing" +msgstr "" + +#: src/supertux/menu/editor_delete_levelset_menu.cpp:83 +#, c++-format +msgid "You are about to delete world \"{}\". Are you sure?" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:82 +#, c++-format +msgid "{} \"{}\"" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:87 +msgid "Some information about this add-on is not available." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:88 +msgid "Perform a \"Check Online\" to try retrieving it." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:92 +msgid "No author specified." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:92 +#, c++-format +msgid "Author: {}" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:93 +#, c++-format +msgid "Type: {}" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:94 +msgid "No license specified." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:94 +#, c++-format +msgid "License: {}" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:99 +msgid "Dependencies:" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:108 +msgid "Installed" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:108 +msgid "Not installed" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:113 +msgid "Not available!" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:120 +msgid "Description:" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:123 +msgid "No description available." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:147 +msgid "Failed to load all available screenshot previews." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:152 +msgid "Show screenshots" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:165 +msgid "Screenshot previews are disabled for automatic installs." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:169 +msgid "No screenshot previews available." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:177 +msgid "Install" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:190 +msgid "Uninstall" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:214 +#, c++-format +msgid "Are you sure you want to uninstall \"{}\"?" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:215 +msgid "" +"\n" +"Your progress won't be lost." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:227 +#, c++-format +msgid "" +"NOTE: The add-on \"{}\" is a dependency of {} other installed {}.\n" +"Are you sure you wish to uninstall?" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:246 +#, c++-format +msgid "" +"Cannot toggle add-on \"{}\":\n" +"{}" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:279 +msgid "Fetching screenshot previews..." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:300 +msgid "Updating" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:300 +msgid "Downloading" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:328 +msgid "Add-on uninstalled successfully." +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:333 +#, c++-format +msgid "" +"Error uninstalling add-on:\n" +"{}" +msgstr "" + +#: src/supertux/menu/addon_preview_menu.cpp:361 +msgid "" +"Please restart SuperTux\n" +"for these changes to take effect." +msgstr "Riavviare SuperTux\naffinché le modifiche abbiano effetto" + #: src/supertux/menu/main_menu.cpp:51 src/supertux/menu/world_set_menu.cpp:28 msgid "Start Game" msgstr "Inizia a giocare" -#: src/supertux/menu/main_menu.cpp:52 src/supertux/menu/addon_menu.cpp:119 +#: src/supertux/menu/main_menu.cpp:55 msgid "Add-ons" msgstr "Add-ons" -#: src/supertux/menu/main_menu.cpp:54 src/supertux/menu/editor_menu.cpp:39 +#: src/supertux/menu/main_menu.cpp:57 src/supertux/menu/web_asset_menu.cpp:38 +msgid "Manage Assets" +msgstr "Gestisci gli Assets" + +#: src/supertux/menu/main_menu.cpp:59 +#: src/supertux/menu/options_select_menu.cpp:29 +#: src/supertux/menu/game_menu.cpp:58 src/supertux/menu/worldmap_menu.cpp:31 +#: src/supertux/menu/editor_menu.cpp:70 +msgid "Options" +msgstr "Opzioni" + +#: src/supertux/menu/main_menu.cpp:60 src/supertux/menu/editor_menu.cpp:58 msgid "Level Editor" msgstr "Editor dei livelli" -#: src/supertux/menu/main_menu.cpp:55 +#: src/supertux/menu/main_menu.cpp:61 msgid "Credits" msgstr "Crediti" -#: src/supertux/menu/main_menu.cpp:56 -msgid "Donate" -msgstr "Dona" +#: src/supertux/menu/main_menu.cpp:64 +msgid "Donate" +msgstr "Dona" + +#: src/supertux/menu/main_menu.cpp:67 +msgid "Quit" +msgstr "Esci" + +#: src/supertux/menu/main_menu.cpp:106 +msgid "" +"This will take you to the SuperTux donation page. Are you sure you want to " +"continue?" +msgstr "" + +#: src/supertux/menu/editor_sector_menu.cpp:34 +#, c++-format +msgid "Sector {}" +msgstr "" + +#: src/supertux/menu/editor_sector_menu.cpp:37 +msgid "Initialization script" +msgstr "Script d'inizializzazione" + +#: src/supertux/menu/editor_sector_menu.cpp:38 +msgid "Gravity" +msgstr "Gravità" + +#: src/supertux/menu/editor_sector_menu.cpp:43 +msgid "Resize offset X" +msgstr "Ridimensiona offset X" + +#: src/supertux/menu/editor_sector_menu.cpp:44 +msgid "Resize offset Y" +msgstr "Ridimensiona offset Y" + +#: src/supertux/menu/editor_sector_menu.cpp:45 +msgid "Resize" +msgstr "Ridimensiona" + +#: src/supertux/menu/profile_menu.cpp:60 +msgid "No profiles found." +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:68 +#: src/supertux/menu/profile_menu.cpp:149 +#: src/supertux/menu/profile_menu.cpp:168 +#, c++-format +msgid "Profile {}" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:69 +#, c++-format +msgid "{} (Profile {})" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:84 +msgid "No profile selected." +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:91 src/supertux/menu/profile_menu.cpp:93 +#: src/supertux/menu/profile_name_menu.cpp:42 +msgid "Rename" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:98 +#: src/supertux/menu/profile_menu.cpp:100 +msgid "Reset" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:103 +#: src/supertux/menu/profile_menu.cpp:105 +msgid "Reset all" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:113 +#: src/supertux/menu/profile_menu.cpp:115 +msgid "Delete all" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:148 +#, c++-format +msgid "" +"This will reset all game progress on the profile \"{}\".\n" +"Are you sure?" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:157 +msgid "This will reset your game progress on all profiles. Are you sure?" +msgstr "Questo resetterà i tuoi progressi di gioco su tutti i profili. Sei sicuro?" + +#: src/supertux/menu/profile_menu.cpp:167 +#, c++-format +msgid "" +"This will delete the profile \"{}\",\n" +"including all game progress on it. Are you sure?" +msgstr "" + +#: src/supertux/menu/profile_menu.cpp:178 +msgid "" +"This will delete all profiles, including all game progress on them.\n" +"Are you sure?" +msgstr "" + +#: src/supertux/menu/editor_levelset_menu.cpp:53 +#: src/supertux/menu/editor_new_levelset_menu.cpp:35 +msgid "Description" +msgstr "Descrizione" + +#: src/supertux/menu/editor_levelset_menu.cpp:55 +msgid "Title Screen Level" +msgstr "" + +#: src/supertux/menu/editor_levelset_menu.cpp:56 +msgid "A level to be used for the title screen, after exiting the world." +msgstr "" + +#: src/supertux/menu/multiplayer_players_menu.cpp:46 +msgid "Add Player" +msgstr "" + +#: src/supertux/menu/multiplayer_players_menu.cpp:59 +msgid "Remove Last Player" +msgstr "" + +#: src/supertux/menu/multiplayer_players_menu.cpp:62 +msgid "" +"Warning: The player you are trying to\n" +"remove is currently in-game.\n" +"\n" +"Do you wish to remove them anyways?" +msgstr "" + +#: src/supertux/menu/addon_menu.cpp:68 +msgid "Installed Language Packs" +msgstr "" + +#: src/supertux/menu/addon_menu.cpp:68 +msgid "Installed Add-ons" +msgstr "" + +#: src/supertux/menu/addon_menu.cpp:76 src/supertux/menu/addon_menu.cpp:117 +msgid "No language packs installed" +msgstr "" + +#: src/supertux/menu/addon_menu.cpp:76 +msgid "No Add-ons installed" +msgstr "Nessun componente aggiuntivo installato" + +#: src/supertux/menu/addon_menu.cpp:124 +#, c++-format +msgid "{} {}*UPDATE*" +msgstr "" + +#: src/supertux/menu/addon_menu.cpp:130 +#, c++-format +msgid "{}{}" +msgstr "" -#: src/supertux/menu/main_menu.cpp:57 -msgid "Quit" -msgstr "Esci" +#: src/supertux/menu/addon_menu.cpp:140 +msgid "No updates available." +msgstr "" -#: src/supertux/menu/editor_sector_menu.cpp:35 -msgid "Initialization script" -msgstr "Script d'inizializzazione" +#: src/supertux/menu/addon_menu.cpp:144 +#, c++-format +msgid "{} {} available" +msgstr "" -#: src/supertux/menu/editor_sector_menu.cpp:36 -msgid "Gravity" -msgstr "Gravità" +#: src/supertux/menu/addon_menu.cpp:144 +msgid "update" +msgstr "" -#: src/supertux/menu/editor_sector_menu.cpp:41 -msgid "Resize offset X" -msgstr "Ridimensiona offset X" +#: src/supertux/menu/addon_menu.cpp:144 +msgid "updates" +msgstr "" -#: src/supertux/menu/editor_sector_menu.cpp:42 -msgid "Resize offset Y" -msgstr "Ridimensiona offset Y" +#: src/supertux/menu/addon_menu.cpp:146 +msgid "Check for updates" +msgstr "" -#: src/supertux/menu/editor_sector_menu.cpp:43 -msgid "Resize" -msgstr "Ridimensiona" +#: src/supertux/menu/addon_menu.cpp:150 +msgid "Browse language packs" +msgstr "" -#: src/supertux/menu/profile_menu.cpp:37 -#, c-format -msgid "[Profile {}]" -msgstr "[Profilo {}]" +#: src/supertux/menu/addon_menu.cpp:150 +#: src/supertux/menu/addon_browse_menu.cpp:70 +msgid "Browse Add-ons" +msgstr "" -#: src/supertux/menu/profile_menu.cpp:41 -#, c-format -msgid "Profile {}" -msgstr "Profilo {}" +#: src/supertux/menu/addon_menu.cpp:151 +msgid "Install from file" +msgstr "" -#: src/supertux/menu/editor_levelset_menu.cpp:59 -#: src/supertux/menu/editor_new_levelset_menu.cpp:35 -msgid "Description" -msgstr "Descrizione" +#: src/supertux/menu/addon_menu.cpp:208 +msgid "Checking for updates..." +msgstr "" -#: src/supertux/menu/editor_levelset_menu.cpp:60 -#: src/supertux/menu/addon_menu.cpp:48 -#: data//images/engine/editor/objects.stoi:329 -msgid "Worldmap" -msgstr "Mappa del mondo" +#: src/supertux/menu/editor_new_levelset_menu.cpp:31 +msgid "New World" +msgstr "Nuovo mondo" -#: src/supertux/menu/editor_levelset_menu.cpp:60 -#: src/supertux/menu/addon_menu.cpp:45 -msgid "Levelset" -msgstr "Set di livelli" +#: src/supertux/menu/editor_new_levelset_menu.cpp:51 +msgid "Please enter a name for this level subset." +msgstr "Inserisci un nome per questo gruppo di livelli" -#: src/supertux/menu/addon_menu.cpp:51 -msgid "World" -msgstr "Mondo" +#: src/supertux/menu/world_set_menu.cpp:30 +msgid "Story Mode" +msgstr "Storia" -#: src/supertux/menu/addon_menu.cpp:57 -msgid "Unknown" -msgstr "Sconosciuto" +#: src/supertux/menu/addon_browse_menu.cpp:70 +msgid "Browse Language Packs" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:68 -#, c-format -msgid "{} \"{}\" by \"{}\"" -msgstr "{} \"{}\" di \"{}\"" +#: src/supertux/menu/addon_browse_menu.cpp:112 +#, c++-format +msgid "Page {}/{}" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:126 -msgid "No Add-ons installed" -msgstr "Nessun componente aggiuntivo installato" +#: src/supertux/menu/addon_browse_menu.cpp:124 +msgid "No new language packs available" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:130 -msgid "No Add-ons found" -msgstr "Nessun componente aggiuntivo trovato" +#: src/supertux/menu/addon_browse_menu.cpp:124 +msgid "No new Add-ons available" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:176 -#, c-format -msgid "Install {} *NEW*" -msgstr "Installa {} *NUOVO*" +#: src/supertux/menu/addon_browse_menu.cpp:127 +msgid "No language packs available" +msgstr "" + +#: src/supertux/menu/addon_browse_menu.cpp:127 +msgid "No Add-ons available" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:187 -#, c-format -msgid "Install {}" -msgstr "Installa {}" +#: src/supertux/menu/addon_browse_menu.cpp:135 +#: src/supertux/menu/addon_browse_menu.cpp:139 +msgid "Previous page" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:196 -msgid "No new Add-ons found" -msgstr "Nessun nuovo componente aggiuntivo trovato" +#: src/supertux/menu/addon_browse_menu.cpp:143 +#: src/supertux/menu/addon_browse_menu.cpp:147 +msgid "Next page" +msgstr "" -#: src/supertux/menu/addon_menu.cpp:202 +#: src/supertux/menu/addon_browse_menu.cpp:154 msgid "Check Online (disabled)" msgstr "Controlla sul Web (disattivato)" -#: src/supertux/menu/addon_menu.cpp:206 +#: src/supertux/menu/addon_browse_menu.cpp:158 msgid "Check Online" msgstr "Controlla sul Web" -#: src/supertux/menu/addon_menu.cpp:283 +#: src/supertux/menu/addon_browse_menu.cpp:195 msgid "Downloading Add-On Repository Index" msgstr "Scaricamento dell'indice dei componenti aggiuntivi" -#: src/supertux/menu/addon_menu.cpp:298 -#, c-format -msgid "Downloading {}" -msgstr "Scaricamento di {}" - -#: src/supertux/menu/addon_menu.cpp:345 -msgid "" -"Please restart SuperTux\n" -"for these changes to take effect." -msgstr "Riavviare SuperTux\naffinché le modifiche abbiano effetto" +#: src/supertux/menu/web_asset_menu.cpp:42 +msgid "New files location" +msgstr "Nuova localizzazione dei file" -#: src/supertux/menu/editor_new_levelset_menu.cpp:31 -msgid "New World" -msgstr "" +#: src/supertux/menu/web_asset_menu.cpp:43 +msgid "Add Files" +msgstr "Aggiungi files" -#: src/supertux/menu/editor_new_levelset_menu.cpp:51 -msgid "Please enter a name for this level subset." -msgstr "Inserisci un nome per questo gruppo di livelli" +#: src/supertux/menu/web_asset_menu.cpp:44 +msgid "Download Files" +msgstr "Scarica files" -#: src/supertux/menu/world_set_menu.cpp:30 -msgid "Story Mode" -msgstr "Storia" +#: src/supertux/menu/particle_editor_open.cpp:32 +msgid "Load particle file" +msgstr "Carica file di particolari" -#: src/supertux/menu/game_menu.cpp:31 -msgid "Are you sure?" -msgstr "Sei sicuro?" +#: src/supertux/menu/particle_editor_open.cpp:39 +msgid "Open" +msgstr "Apri" -#: src/supertux/menu/game_menu.cpp:54 src/supertux/menu/worldmap_menu.cpp:30 +#: src/supertux/menu/game_menu.cpp:51 src/supertux/menu/worldmap_menu.cpp:30 msgid "Continue" msgstr "Continua" -#: src/supertux/menu/game_menu.cpp:55 +#: src/supertux/menu/game_menu.cpp:52 msgid "Restart Level" msgstr "Ricomincia livello" -#: src/supertux/menu/game_menu.cpp:58 +#: src/supertux/menu/game_menu.cpp:55 msgid "Restart from Checkpoint" -msgstr "" +msgstr "Riparti dal checkpoint" -#: src/supertux/menu/game_menu.cpp:63 +#: src/supertux/menu/game_menu.cpp:60 msgid "Abort Level" msgstr "Abbandona il livello" -#: src/supertux/menu/keyboard_menu.cpp:32 -#: src/supertux/menu/joystick_menu.cpp:69 -msgid "Up" -msgstr "Su" +#: src/supertux/menu/game_menu.cpp:76 src/supertux/menu/game_menu.cpp:87 +#: src/supertux/menu/game_menu.cpp:99 +msgid "Are you sure?" +msgstr "Sei sicuro?" -#: src/supertux/menu/keyboard_menu.cpp:33 -#: src/supertux/menu/joystick_menu.cpp:70 -msgid "Down" -msgstr "Giù/Abbassati" +#: src/supertux/menu/profile_name_menu.cpp:36 +#, c++-format +msgid "Rename \"{}\"" +msgstr "" -#: src/supertux/menu/keyboard_menu.cpp:34 +#: src/supertux/menu/profile_name_menu.cpp:36 +msgid "Add profile" +msgstr "" + +#: src/supertux/menu/profile_name_menu.cpp:40 +msgid "Profile names must have a maximum of 20 characters." +msgstr "" + +#: src/supertux/menu/profile_name_menu.cpp:42 +msgid "Create" +msgstr "" + +#: src/supertux/menu/profile_name_menu.cpp:56 +msgid "" +"Profile names must have a maximum of 20 characters.\n" +"Please choose a different name." +msgstr "" + +#: src/supertux/menu/profile_name_menu.cpp:77 +msgid "An error occurred while creating the profile." +msgstr "" + +#: src/supertux/menu/keyboard_menu.cpp:36 #: src/supertux/menu/joystick_menu.cpp:71 -msgid "Left" -msgstr "Sinistra" +msgid "Up" +msgstr "Su" -#: src/supertux/menu/keyboard_menu.cpp:35 +#: src/supertux/menu/keyboard_menu.cpp:37 #: src/supertux/menu/joystick_menu.cpp:72 -msgid "Right" -msgstr "Destra" +msgid "Down" +msgstr "Giù/Abbassati" -#: src/supertux/menu/keyboard_menu.cpp:36 -#: src/supertux/menu/joystick_menu.cpp:73 +#: src/supertux/menu/keyboard_menu.cpp:40 +#: src/supertux/menu/joystick_menu.cpp:75 msgid "Jump" msgstr "Salta" -#: src/supertux/menu/keyboard_menu.cpp:38 -#: src/supertux/menu/joystick_menu.cpp:76 +#: src/supertux/menu/keyboard_menu.cpp:43 +#: src/supertux/menu/joystick_menu.cpp:78 msgid "Peek Left" msgstr "Guarda a sinistra" -#: src/supertux/menu/keyboard_menu.cpp:39 -#: src/supertux/menu/joystick_menu.cpp:77 +#: src/supertux/menu/keyboard_menu.cpp:44 +#: src/supertux/menu/joystick_menu.cpp:79 msgid "Peek Right" msgstr "Guarda a destra" -#: src/supertux/menu/keyboard_menu.cpp:40 -#: src/supertux/menu/joystick_menu.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:45 +#: src/supertux/menu/joystick_menu.cpp:80 msgid "Peek Up" msgstr "Guarda su" -#: src/supertux/menu/keyboard_menu.cpp:41 -#: src/supertux/menu/joystick_menu.cpp:79 +#: src/supertux/menu/keyboard_menu.cpp:46 +#: src/supertux/menu/joystick_menu.cpp:81 msgid "Peek Down" msgstr "Guarda giù" -#: src/supertux/menu/keyboard_menu.cpp:43 -#: src/supertux/menu/joystick_menu.cpp:81 +#: src/supertux/menu/keyboard_menu.cpp:51 +#: src/supertux/menu/joystick_menu.cpp:83 msgid "Console" msgstr "Console" -#: src/supertux/menu/keyboard_menu.cpp:46 +#: src/supertux/menu/keyboard_menu.cpp:52 #: src/supertux/menu/joystick_menu.cpp:84 msgid "Cheat Menu" msgstr "Menù Trucchi" -#: src/supertux/menu/keyboard_menu.cpp:47 +#: src/supertux/menu/keyboard_menu.cpp:53 #: src/supertux/menu/joystick_menu.cpp:85 msgid "Debug Menu" msgstr "Menù di Debug" -#: src/supertux/menu/keyboard_menu.cpp:49 +#: src/supertux/menu/keyboard_menu.cpp:56 #: src/supertux/menu/joystick_menu.cpp:87 msgid "Jump with Up" msgstr "Salta con il tasto Su" -#: src/supertux/menu/keyboard_menu.cpp:62 +#: src/supertux/menu/keyboard_menu.cpp:82 msgid "Up cursor" msgstr "Freccia su" -#: src/supertux/menu/keyboard_menu.cpp:64 +#: src/supertux/menu/keyboard_menu.cpp:84 msgid "Down cursor" msgstr "Freccia giù" -#: src/supertux/menu/keyboard_menu.cpp:66 +#: src/supertux/menu/keyboard_menu.cpp:86 msgid "Left cursor" msgstr "Freccia sinistra" -#: src/supertux/menu/keyboard_menu.cpp:68 +#: src/supertux/menu/keyboard_menu.cpp:88 msgid "Right cursor" msgstr "Freccia destra" -#: src/supertux/menu/keyboard_menu.cpp:70 +#: src/supertux/menu/keyboard_menu.cpp:90 msgid "Return" msgstr "Invio" -#: src/supertux/menu/keyboard_menu.cpp:72 +#: src/supertux/menu/keyboard_menu.cpp:92 msgid "Space" msgstr "Spazio" -#: src/supertux/menu/keyboard_menu.cpp:74 +#: src/supertux/menu/keyboard_menu.cpp:94 msgid "Right Shift" msgstr "Shift destro" -#: src/supertux/menu/keyboard_menu.cpp:76 +#: src/supertux/menu/keyboard_menu.cpp:96 msgid "Left Shift" msgstr "Shift sinistro" -#: src/supertux/menu/keyboard_menu.cpp:78 +#: src/supertux/menu/keyboard_menu.cpp:98 msgid "Right Control" msgstr "Ctrl destro" -#: src/supertux/menu/keyboard_menu.cpp:80 +#: src/supertux/menu/keyboard_menu.cpp:100 msgid "Left Control" msgstr "Ctrl sinistro" -#: src/supertux/menu/keyboard_menu.cpp:82 +#: src/supertux/menu/keyboard_menu.cpp:102 msgid "Right Alt" msgstr "Alt destro" -#: src/supertux/menu/keyboard_menu.cpp:84 +#: src/supertux/menu/keyboard_menu.cpp:104 msgid "Left Alt" msgstr "Alt sinistro" -#: src/supertux/menu/keyboard_menu.cpp:86 +#: src/supertux/menu/keyboard_menu.cpp:106 msgid "Right Command" msgstr "comando destro" -#: src/supertux/menu/keyboard_menu.cpp:88 +#: src/supertux/menu/keyboard_menu.cpp:108 msgid "Left Command" msgstr "comando sinistra" -#: src/supertux/menu/keyboard_menu.cpp:102 +#: src/supertux/menu/keyboard_menu.cpp:122 msgid "Press Key" msgstr "Premi un tasto" -#: src/supertux/menu/language_menu.cpp:40 +#: src/supertux/menu/language_menu.cpp:43 msgid "Language" msgstr "Lingua" -#: src/supertux/menu/language_menu.cpp:42 +#: src/supertux/menu/language_menu.cpp:45 msgid "" msgstr "" -#: src/supertux/menu/joystick_menu.cpp:55 +#: src/supertux/menu/joystick_menu.cpp:57 msgid "Manual Configuration" msgstr "Configurazione Manuale" -#: src/supertux/menu/joystick_menu.cpp:57 +#: src/supertux/menu/joystick_menu.cpp:59 msgid "" "Use manual configuration instead of SDL2's automatic GameController support" msgstr "Utilizza la configurazione manuale anziché usare il supporto automatico per il GameController di SDL2" -#: src/supertux/menu/joystick_menu.cpp:75 +#: src/supertux/menu/joystick_menu.cpp:77 msgid "Pause/Menu" msgstr "Pausa/Menu" @@ -2119,45 +3958,111 @@ msgstr "Pausa" msgid "Leave World" msgstr "Esci dal mondo" -#: src/supertux/menu/download_dialog.cpp:27 +#: src/supertux/menu/download_dialog.cpp:42 msgid "Abort Download" msgstr "Interrompi Download" -#: src/supertux/menu/download_dialog.cpp:42 -msgid "Error:\n" -msgstr "Errore:\n" - -#: src/supertux/menu/download_dialog.cpp:96 -msgid "Close" -msgstr "Chiudi" +#: src/supertux/menu/download_dialog.cpp:59 +#, c++-format +msgid "" +"Error:\n" +"{}" +msgstr "" -#: src/supertux/menu/cheat_menu.cpp:37 +#: src/supertux/menu/cheat_menu.cpp:38 msgid "Bonus: Star" msgstr "Bonus: Stella" -#: src/supertux/menu/cheat_menu.cpp:38 +#: src/supertux/menu/cheat_menu.cpp:39 msgid "Shrink Tux" msgstr "Strizzacervelli Tux" -#: src/supertux/menu/cheat_menu.cpp:39 +#: src/supertux/menu/cheat_menu.cpp:40 msgid "Kill Tux" msgstr "Uccidi Tux" +#: src/supertux/menu/cheat_menu.cpp:55 +msgid "Prevent Death" +msgstr "" + +#: src/supertux/menu/addon_file_install_menu.cpp:32 +msgid "Install Add-on from file" +msgstr "" + +#: src/supertux/menu/addon_file_install_menu.cpp:34 +msgid "Drag and drop add-on ZIP archive" +msgstr "" + +#: src/supertux/menu/particle_editor_menu.cpp:32 +msgid "Particle Editor" +msgstr "Editore dei particolari" + +#: src/supertux/menu/particle_editor_menu.cpp:36 +#: src/supertux/menu/editor_menu.cpp:60 +msgid "Return to Editor" +msgstr "Tornare all'Editor" + +#: src/supertux/menu/particle_editor_menu.cpp:37 +msgid "New Particle Config" +msgstr "Configura nuovo particolare" + +#: src/supertux/menu/particle_editor_menu.cpp:38 +msgid "Save Particle Config" +msgstr "Salva nuova configurazione del particolare" + +#: src/supertux/menu/particle_editor_menu.cpp:39 +msgid "Save Particle Config as..." +msgstr "Salva particolare come..." + +#: src/supertux/menu/particle_editor_menu.cpp:40 +msgid "Load Another Particle Config" +msgstr "Carica un altra configurazione particolare" + +#: src/supertux/menu/particle_editor_menu.cpp:44 +msgid "Open Particle Directory" +msgstr "Apri la directory del particolare" + +#: src/supertux/menu/particle_editor_menu.cpp:45 +#: src/supertux/menu/editor_menu.cpp:118 +msgid "Keyboard Shortcuts" +msgstr "Scorciatoie da tastiera" + +#: src/supertux/menu/particle_editor_menu.cpp:49 +msgid "Exit Particle Editor" +msgstr "Esci dall'editor del particolare" + +#: src/supertux/menu/particle_editor_menu.cpp:121 +msgid "" +"Keyboard Shortcuts:\n" +"---------------------\n" +"Esc = Open Menu\n" +"Ctrl+S = Save\n" +"Ctrl+Shift+S = Save as\n" +"Ctrl+O = Open\n" +"Ctrl+Z = Undo\n" +"Ctrl+Y = Redo" +msgstr "Scorciatoie di tastiera: \n---------------------\nEsc = Apri Menu \nCtrl + S = Salva\nCtrl + Shift + S = Salva come\nCtrl + O = Apri \nCtrl + Z = Annulla\nCtrl + Y = Ripristina" + +#: src/supertux/menu/particle_editor_menu.cpp:122 +#: src/supertux/menu/editor_menu.cpp:206 +msgid "Got it!" +msgstr "Acchiappato!" + #: src/supertux/menu/editor_level_menu.cpp:31 -#: src/supertux/menu/editor_menu.cpp:70 +#: src/supertux/menu/editor_menu.cpp:116 msgid "Worldmap Settings" -msgstr "" +msgstr "Impostazioni della mappa del mondo" #: src/supertux/menu/editor_level_menu.cpp:31 -#: src/supertux/menu/editor_menu.cpp:70 +#: src/supertux/menu/editor_menu.cpp:116 msgid "Level Settings" -msgstr "" +msgstr "Impostazioni del livello" #: src/supertux/menu/editor_level_menu.cpp:34 msgid "Author" msgstr "Autore" -#: src/supertux/menu/editor_level_menu.cpp:35 data//credits.stxt:1113 +#: src/supertux/menu/editor_level_menu.cpp:35 data//credits.stxt:1253 msgid "Contact" msgstr "Contatti" @@ -2166,245 +4071,620 @@ msgid "License" msgstr "Licenza" #: src/supertux/menu/editor_level_menu.cpp:37 +msgid "Level Note" +msgstr "Note del livello" + +#: src/supertux/menu/editor_level_menu.cpp:38 msgid "Tileset" -msgstr "Tileset" +msgstr "Serie di Caselle" -#: src/supertux/menu/editor_level_menu.cpp:40 +#: src/supertux/menu/editor_level_menu.cpp:41 msgid "Target Time" -msgstr "" +msgstr "Tempo da raggiungere" -#: src/supertux/menu/editor_level_menu.cpp:82 +#: src/supertux/menu/editor_level_menu.cpp:83 msgid "Please enter a name for this level." msgstr "Inserisci un nome per questo livello" -#: src/supertux/menu/editor_level_menu.cpp:86 +#: src/supertux/menu/editor_level_menu.cpp:87 msgid "Please enter a level author for this level." msgstr "Inserisci un nome d'autore per questo livello" -#: src/supertux/menu/editor_level_menu.cpp:90 +#: src/supertux/menu/editor_level_menu.cpp:91 msgid "Please enter a license for this level." msgstr "Inserisci una licenza per questo livello" -#: src/supertux/menu/editor_menu.cpp:34 -msgid "1/8 tile (4px)" -msgstr "1/8 tile (4px)" +#: src/supertux/menu/editor_menu.cpp:53 +msgid "tiny tile (4px)" +msgstr "casella minuscola (4px)" -#: src/supertux/menu/editor_menu.cpp:35 -msgid "1/4 tile (8px)" -msgstr "1/4 tile (8px)" - -#: src/supertux/menu/editor_menu.cpp:36 -msgid "1/2 tile (16px)" -msgstr "1/2 tile (16px)" +#: src/supertux/menu/editor_menu.cpp:54 +msgid "small tile (8px)" +msgstr "casella piccola (8px)" -#: src/supertux/menu/editor_menu.cpp:37 -msgid "1 tile (32px)" -msgstr "1 tile (32px)" +#: src/supertux/menu/editor_menu.cpp:55 +msgid "medium tile (16px)" +msgstr "casella media (16px)" -#: src/supertux/menu/editor_menu.cpp:41 -msgid "Return to Editor" -msgstr "Tornare all'Editor" +#: src/supertux/menu/editor_menu.cpp:56 +msgid "big tile (32px)" +msgstr "casella grande (32px)" -#: src/supertux/menu/editor_menu.cpp:42 +#: src/supertux/menu/editor_menu.cpp:61 msgid "Save Worldmap" -msgstr "" +msgstr "Salva mappa del mondo" -#: src/supertux/menu/editor_menu.cpp:42 +#: src/supertux/menu/editor_menu.cpp:61 msgid "Save Level" -msgstr "" +msgstr "Salva livello" -#: src/supertux/menu/editor_menu.cpp:45 +#: src/supertux/menu/editor_menu.cpp:65 msgid "Test Level" -msgstr "" +msgstr "Prova il livello" -#: src/supertux/menu/editor_menu.cpp:49 +#: src/supertux/menu/editor_menu.cpp:67 msgid "Test Worldmap" -msgstr "" +msgstr "Prova la mappa del mondo" -#: src/supertux/menu/editor_menu.cpp:52 +#: src/supertux/menu/editor_menu.cpp:72 msgid "Share Level" -msgstr "" +msgstr "Condividi livello" -#: src/supertux/menu/editor_menu.cpp:54 +#: src/supertux/menu/editor_menu.cpp:74 +msgid "Package Add-On" +msgstr "Pacchetto Aggiunte" + +#: src/supertux/menu/editor_menu.cpp:76 msgid "Open Level Directory" +msgstr "Apri cartella del livello" + +#: src/supertux/menu/editor_menu.cpp:79 +msgid "Edit Another Level" +msgstr "Modifica un altro livello" + +#: src/supertux/menu/editor_menu.cpp:81 +msgid "Edit Another World" +msgstr "Modifica un altro mondo" + +#: src/supertux/menu/editor_menu.cpp:86 +msgid "Convert all tiles in the level using converters." +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:90 +msgid "Grid Size" +msgstr "Dimensione della griglia" + +#: src/supertux/menu/editor_menu.cpp:91 +msgid "Show Grid" +msgstr "Mostra griglia" + +#: src/supertux/menu/editor_menu.cpp:92 +msgid "Grid Snapping" +msgstr "Snap della griglia" + +#: src/supertux/menu/editor_menu.cpp:93 +msgid "Render Background" +msgstr "Renderizza sfondo" + +#: src/supertux/menu/editor_menu.cpp:94 +msgid "Render Light" +msgstr "Renderizza luce" + +#: src/supertux/menu/editor_menu.cpp:95 +msgid "Autotile Mode" +msgstr "Modalità Auto-Casella" + +#: src/supertux/menu/editor_menu.cpp:96 +msgid "Enable Autotile Help" +msgstr "Abilita Aiuto Auto-Casella" + +#: src/supertux/menu/editor_menu.cpp:97 +msgid "Enable Object Undo Tracking" +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:100 +msgid "Undo Stack Size" +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:102 +msgid "Autosave Frequency" +msgstr "Frequenza di salvataggio automatico" + +#: src/supertux/menu/editor_menu.cpp:108 +msgid "Check for Deprecated Tiles" +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:109 +msgid "Check if any deprecated tiles are currently present in the level." +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:110 +msgid "Show Deprecated Tiles" +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:111 +msgid "" +"Indicate all deprecated tiles on the active tilemap, without the need of " +"hovering over." +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:121 +msgid "Exit Level Editor" +msgstr "Esci dall'editor di livello" + +#: src/supertux/menu/editor_menu.cpp:170 +msgid "Do you want to package this world as an add-on?" +msgstr "Vuoi rendere questo mondo come un pacchetto di aggiunte?" + +#: src/supertux/menu/editor_menu.cpp:196 +msgid "" +"We encourage you to share your levels in the SuperTux forum.\n" +"To find your level, click the\n" +"\"Open Level directory\" menu item.\n" +"Do you want to go to the forum now?" +msgstr "Incoraggiamo la condivisione dei livelli nel forum di SuperTux.\nPer trovare i propri livelli, clicca su\n\"Apri cartella livelli\".\nAndare al forum adesso?" + +#: src/supertux/menu/editor_menu.cpp:205 +msgid "" +"Keyboard Shortcuts:\n" +"---------------------\n" +"Esc = Open Menu\n" +"Ctrl+S = Save\n" +"Ctrl+T = Test\n" +"Ctrl+Z = Undo\n" +"Ctrl+Y = Redo\n" +"F6 = Render Light\n" +"F7 = Grid Snapping\n" +"F8 = Show Grid\n" +"Ctrl++ or Ctrl+Scroll Up = Zoom In\n" +"Ctrl+- or Ctrl+Scroll Down = Zoom Out\n" +"Ctrl+D = Reset Zoom\n" +"\n" +"Scripting Shortcuts:\n" +" ------------- \n" +"Home = Go to beginning of line\n" +"End = Go to end of line\n" +"Left arrow = Go back in text\n" +"Right arrow = Go forward in text\n" +"Backspace = Delete in front of text cursor\n" +"Delete = Delete behind text cursor\n" +"Ctrl+X = Cut whole line\n" +"Ctrl+C = Copy whole line\n" +"Ctrl+V = Paste\n" +"Ctrl+D = Duplicate line\n" +"Ctrl+Z = Undo\n" +"Ctrl+Y = Redo" +msgstr "" + +#: src/supertux/menu/editor_menu.cpp:232 +msgid "Deprecated tiles are still present in the level." msgstr "" -#: src/supertux/menu/editor_menu.cpp:57 -msgid "Edit Another Level" +#: src/supertux/menu/editor_menu.cpp:239 +msgid "Do you want to show all deprecated tiles on active tilemaps?" msgstr "" -#: src/supertux/menu/editor_menu.cpp:60 -msgid "Edit Another World" +#: src/supertux/menu/editor_menu.cpp:246 +msgid "There are no more deprecated tiles in the level!" msgstr "" -#: src/supertux/menu/editor_menu.cpp:64 -msgid "Grid Size" +#: src/supertux/menu/multiplayer_player_menu.cpp:40 +msgid "Play with the keyboard" msgstr "" -#: src/supertux/menu/editor_menu.cpp:65 -msgid "Show Grid" +#: src/supertux/menu/multiplayer_player_menu.cpp:58 +msgid "Remove Player" msgstr "" -#: src/supertux/menu/editor_menu.cpp:66 -msgid "Grid Snapping" +#: src/supertux/menu/multiplayer_player_menu.cpp:82 +msgid "Respawn Player" msgstr "" -#: src/supertux/menu/editor_menu.cpp:67 -msgid "Render Background" +#: src/supertux/menu/multiplayer_player_menu.cpp:108 +msgid "Spawn Player" msgstr "" -#: src/supertux/menu/editor_menu.cpp:68 -msgid "Render Light" +#: src/supertux/menu/multiplayer_player_menu.cpp:136 +msgid "Controllers" msgstr "" -#: src/supertux/menu/editor_menu.cpp:72 -msgid "Keyboard Shortcuts" +#: src/supertux/menu/multiplayer_player_menu.cpp:152 +msgid "" +"This controller does not support rumbling;\n" +"please check the controllers manually." msgstr "" -#: src/supertux/menu/editor_menu.cpp:75 -msgid "Exit Level Editor" +#: src/supertux/menu/multiplayer_player_menu.cpp:157 +msgid "" +"This SuperTux build does not support rumbling\n" +"controllers; please check the controllers manually." msgstr "" -#: src/supertux/menu/editor_menu.cpp:122 +#: src/supertux/menu/multiplayer_player_menu.cpp:184 msgid "" -"We encourage you to share your levels in the SuperTux forum.\n" -"To find your level, click the\n" -"\"Open output directory\" menu item.\n" -"Do you want to go to the forum now?" +"This joystick does not support rumbling;\n" +"please check the joysticks manually." msgstr "" -#: src/supertux/menu/editor_menu.cpp:134 +#: src/supertux/menu/multiplayer_player_menu.cpp:189 msgid "" -"Keyboard Shortcuts:\n" -"---------------------\n" -"Esc = Open Menu\n" -"Ctrl+S = Save\n" -"Ctrl+T = Test\n" -"Ctrl+Z = Undo\n" -"Ctrl+Y = Redo\n" -"F6 = Render Light\n" -"F7 = Grid Snapping\n" -"F8 = Show Grid" +"This SuperTux build does not support rumbling\n" +"joysticks; please check the joysticks manually." msgstr "" -#: src/supertux/menu/editor_menu.cpp:135 -msgid "Got it!" +#: src/supertux/menu/editor_delete_level_menu.cpp:59 +msgid "No levels available" +msgstr "" + +#: src/supertux/menu/editor_delete_level_menu.cpp:79 +msgid "You cannot delete the level that you are editing!" +msgstr "" + +#: src/supertux/menu/editor_delete_level_menu.cpp:82 +#, c++-format +msgid "You are about to delete level \"{}\". Are you sure?" msgstr "" -#: src/supertux/levelintro.cpp:135 -#, c-format +#: src/supertux/levelintro.cpp:137 +#, c++-format msgid "contributed by {}" -msgstr "con il contributo di {}" +msgstr "" -#: src/supertux/levelintro.cpp:167 +#: src/supertux/levelintro.cpp:184 msgid "Badguys killed" msgstr "Cattivoni uccisi" -#: src/supertux/levelintro.cpp:171 +#: src/supertux/levelintro.cpp:192 msgid "Best time" msgstr "Miglior tempo" -#: src/supertux/levelintro.cpp:175 +#: src/supertux/levelintro.cpp:196 msgid "Level target time" msgstr "Obiettivo tempo per il livello" -#: src/supertux/tile_set.cpp:92 +#: src/supertux/tile_set.cpp:113 msgid "Others" msgstr "Altri" -#: src/supertux/moving_object.cpp:44 +#: src/supertux/direction.cpp:67 +msgid "up" +msgstr "su" + +#: src/supertux/direction.cpp:69 +msgid "down" +msgstr "giù" + +#: src/supertux/moving_object.cpp:63 msgid "Region" +msgstr "Regione" + +#: src/supertux/main.cpp:801 +#, c++-format +msgid "New release: SuperTux v{}!" +msgstr "" + +#: src/supertux/main.cpp:804 +#, c++-format +msgid "" +"A new release of SuperTux (v{}) is available!\n" +"For more information, you can visit the SuperTux website.\n" +"\n" +"Do you want to visit the website now?" +msgstr "" + +#: src/supertux/main.cpp:815 +msgid "Checking for new releases..." msgstr "" #: src/control/joystick_config.cpp:85 msgid "Joystick Mappings" msgstr "Configurazione Joystick" -#: src/worldmap/worldmap_parser.cpp:167 +#: src/worldmap/sprite_change.cpp:91 +msgid "Stay action" +msgstr "Azione di stasi" + +#: src/worldmap/sprite_change.cpp:92 +msgid "Initial stay action" +msgstr "Azione iniziale di stasi" + +#: src/worldmap/sprite_change.cpp:93 +msgid "Stay group" +msgstr "Ferma gruppo" + +#: src/worldmap/sprite_change.cpp:94 +msgid "Change on touch" +msgstr "Cambia al tocco" + +#: src/worldmap/special_tile.hpp:36 +msgid "Special Tile" +msgstr "" + +#: src/worldmap/level_tile.hpp:36 src/worldmap/level_tile.cpp:161 +msgid "Level" +msgstr "Livello" + +#: src/worldmap/teleporter.cpp:50 +msgid "Automatic" +msgstr "Automatico" + +#: src/worldmap/teleporter.cpp:51 +msgid "Target worldmap" +msgstr "Specifica mappa del mondo" + +#: src/worldmap/sprite_change.hpp:35 +msgid "Sprite Change" +msgstr "Cambio sprite" + +#: src/worldmap/special_tile.cpp:75 +msgid "Show message" +msgstr "Mostra messaggio" + +#: src/worldmap/level_tile.cpp:84 msgid "" msgstr "" -#: src/editor/node_marker.cpp:79 +#: src/worldmap/level_tile.cpp:162 +msgid "Outro script" +msgstr "Script di epilogo" + +#: src/worldmap/level_tile.cpp:163 +msgid "Auto play" +msgstr "Riproduzione automatica" + +#: src/worldmap/level_tile.cpp:164 +msgid "Title colour" +msgstr "Colore titolo" + +#: src/worldmap/teleporter.hpp:34 +msgid "Teleporter" +msgstr "Teletrasportatore" + +#: src/editor/tip.cpp:80 +msgid "" +"This object's current functionality is deprecated.\n" +"Updating to get its latest functionality is recommended." +msgstr "" + +#: src/editor/node_marker.cpp:122 msgid "Path Node" msgstr "Snodo del sentiero" -#: src/editor/object_settings.cpp:112 -msgid "up" -msgstr "su" +#: src/editor/node_marker.cpp:123 +msgid "Press CTRL to move Bezier handles" +msgstr "Premi CTRL per spostare le maniglie di Bezier" -#: src/editor/object_settings.cpp:112 -msgid "down" -msgstr "giù" +#: src/editor/node_marker.cpp:127 +msgid "Easing" +msgstr "Allentamento" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "West" msgstr "Ovest" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "East" msgstr "Est" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "North" msgstr "Nord" -#: src/editor/object_settings.cpp:124 +#: src/editor/object_settings.cpp:129 msgid "South" msgstr "Sud" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "One shot" msgstr "One shot" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "Ping-pong" msgstr "Ping-pong" -#: src/editor/object_settings.cpp:137 +#: src/editor/object_settings.cpp:142 msgid "Circular" msgstr "Circolare" -#: src/editor/object_settings.cpp:137 -msgid "Unordered" -msgstr "Non ordinato" +#: src/editor/layers_widget.cpp:331 +#, c++-format +msgid "Sector: {}" +msgstr "" -#: src/editor/object_option.cpp:83 +#: src/editor/object_option.cpp:92 msgid "true" msgstr "vero" -#: src/editor/object_option.cpp:83 +#: src/editor/object_option.cpp:92 msgid "false" msgstr "falso" -#: src/editor/object_option.cpp:246 src/editor/object_option.cpp:295 +#: src/editor/object_option.cpp:308 src/editor/object_option.cpp:356 msgid "invalid" msgstr "non valido" -#: src/editor/object_option.cpp:553 +#: src/editor/object_option.cpp:665 +msgid "Scale X" +msgstr "" + +#: src/editor/object_option.cpp:666 +msgid "Scale Y" +msgstr "" + +#: src/editor/object_option.cpp:667 +msgid "Offset X" +msgstr "" + +#: src/editor/object_option.cpp:668 +msgid "Offset Y" +msgstr "" + +#: src/editor/object_option.cpp:672 src/editor/object_menu.cpp:67 msgid "Remove" msgstr "Rimuovi" -#: src/editor/worldmap_objects.hpp:56 src/editor/worldmap_objects.cpp:129 -msgid "Level" -msgstr "Livello" +#: src/editor/object_option.cpp:689 +msgid "Test from here" +msgstr "Test da qui" -#: src/editor/worldmap_objects.hpp:79 -msgid "Teleporter" -msgstr "Teletrasportatore" +#: src/editor/object_option.cpp:706 +msgid "Open Particle Editor" +msgstr "Apri l'editor dei particolari" -#: src/editor/worldmap_objects.hpp:119 -msgid "Sprite Change" +#: src/editor/particle_editor.cpp:114 +msgid "Change texture... ->" +msgstr "" + +#: src/editor/particle_editor.cpp:126 +msgid "Max amount" +msgstr "Quantità massima" + +#: src/editor/particle_editor.cpp:142 +msgid "Spawn anywhere" +msgstr "Genera ovunque" + +#: src/editor/particle_editor.cpp:143 +msgid "Life duration" +msgstr "Durata della vita" + +#: src/editor/particle_editor.cpp:148 +msgid "Birth duration" +msgstr "Durata della nascita" + +#: src/editor/particle_editor.cpp:153 +msgid "Death duration" +msgstr "Durata della morte" + +#: src/editor/particle_editor.cpp:160 +msgid "Grow" +msgstr "Crescita" + +#: src/editor/particle_editor.cpp:175 +msgid "Horizontal speed" +msgstr "Velocità orizzontale" + +#: src/editor/particle_editor.cpp:180 +msgid "Vertical speed" +msgstr "Velocità verticale" + +#: src/editor/particle_editor.cpp:185 +msgid "Horizontal acceleration" +msgstr "Accelerazione orizzantale" + +#: src/editor/particle_editor.cpp:186 +msgid "Vertical acceleration" +msgstr "Accelerazione verticale" + +#: src/editor/particle_editor.cpp:187 +msgid "Horizontal friction" +msgstr "Attrito orizzontale" + +#: src/editor/particle_editor.cpp:188 +msgid "Vertical friction" +msgstr "Attrito verticale" + +#: src/editor/particle_editor.cpp:190 +msgid "Initial rotation" +msgstr "Rotazione iniziale" + +#: src/editor/particle_editor.cpp:201 +msgid "Rotation friction/decceleration" +msgstr "Rotazione
attrito/decelerazione" + +#: src/editor/particle_editor.cpp:211 +msgid "Destroy" +msgstr "Distruggi" + +#: src/editor/particle_editor.cpp:215 +msgid "Stick to surface" +msgstr "Attieniti alla superficie" + +#: src/editor/particle_editor.cpp:216 +msgid "Stick and stay" +msgstr "Attieniti e resta" + +#: src/editor/particle_editor.cpp:217 +msgid "No collision" +msgstr "Nessuna collisione" + +#: src/editor/particle_editor.cpp:222 +msgid "Always destroy" +msgstr "Distruggi sempre" + +#: src/editor/particle_editor.cpp:226 +msgid "Offscreen mode" +msgstr "Modalità di schermo spento" + +#: src/editor/particle_editor.cpp:229 +msgid "Clear" +msgstr "" + +#: src/editor/particle_editor.cpp:245 +msgid "<- General settings" +msgstr "" + +#: src/editor/particle_editor.cpp:255 +msgid "Likeliness" +msgstr "" + +#: src/editor/particle_editor.cpp:266 +msgid "Color (RGBA)" +msgstr "" + +#: src/editor/particle_editor.cpp:311 +msgid "Scale (x, y)" +msgstr "" + +#: src/editor/particle_editor.cpp:332 +msgid "Hitbox scale (x, y)" +msgstr "" + +#: src/editor/particle_editor.cpp:353 +msgid "Hitbox offset relative to scale" +msgstr "" + +#: src/editor/particle_editor.cpp:372 +msgid "Change texture..." +msgstr "" + +#: src/editor/particle_editor.cpp:766 +msgid "" +"This particle configuration contains unsaved changes,\n" +"do you want to save?" +msgstr "Questa configurazione dei particolari contiene modifiche non salvate, \nVuoi salvarle?" + +#: src/editor/particle_editor.cpp:774 +msgid "Save as" +msgstr "Salva come" + +#: src/editor/editor.cpp:577 +msgid "" +"This level contains deprecated tiles.\n" +"It is strongly recommended to replace all deprecated tiles\n" +"to avoid loss of compatibility in future versions." +msgstr "" + +#: src/editor/editor.cpp:579 +msgid "Tip: Turn on \"Show Deprecated Tiles\" from the level editor menu." msgstr "" -#: src/editor/worldmap_objects.hpp:140 -msgid "Special tile" -msgstr "Casella speciale" +#: src/editor/editor.cpp:626 +msgid "" +"Don't forget that your levels and assets\n" +"aren't saved between sessions!\n" +"If you want to keep your levels, download them\n" +"from the \"Manage Assets\" menu." +msgstr "Non dimenticare che i tuoi livelli e assets\nnon sono salvati tra le sessioni!\nSe vuoi tenere i tuoi livelli, scaricali dal menu \"Gestisci Assets\". " -#: src/editor/editor.cpp:481 +#: src/editor/editor.cpp:661 msgid "This level contains unsaved changes, do you want to save?" +msgstr "Questo livello contiene cambiamenti non salvati. Vuoi salvare?" + +#: src/editor/editor.cpp:662 +msgid "This level may contain unsaved changes, do you want to save?" msgstr "" -#: src/editor/editor.cpp:521 +#: src/editor/editor.cpp:797 msgid "" "Some obsolete add-ons are still active\n" "and might cause collisions with default Super Tux structure.\n" @@ -2412,432 +4692,463 @@ msgid "" "Disabling these add-ons will not delete your game progress." msgstr "Alcuni componenti aggiuntivi obsoleti sono ancora attivi\ne possono creare conflitti con la struttura di base di Super Tux.\nSi possono ancora abilitare questi componenti nel menu.\nDisabilitare questi componenti aggiuntivi non cancellerà i progressi di gioco." -#: src/editor/editor.cpp:524 +#: src/editor/editor.cpp:800 msgid "Disable add-ons" msgstr "Disabilita componenti aggiuntivi" -#: src/editor/editor.cpp:529 +#: src/editor/editor.cpp:805 msgid "Ignore (not advised)" msgstr "Ignora (sconsigliato)" -#: src/editor/editor.cpp:533 +#: src/editor/editor.cpp:809 msgid "Leave editor" msgstr "Esci dall'editor dei livelli" -#: src/editor/editor.cpp:743 +#: src/editor/editor.cpp:1023 msgid "" "Couldn't find a \"main\" sector.\n" "Please change the name of the sector where\n" "you'd like the player to start to \"main\"" msgstr "Impossibile trovare il settore \"main\".\nCambiare il nome del settore dove\nvorresti che il giocatore cominci su \"main\"" -#: src/editor/editor.cpp:747 +#: src/editor/editor.cpp:1027 msgid "" "Couldn't find a \"main\" spawnpoint.\n" " Please change the name of the spawnpoint where\n" "you'd like the player to start to \"main\"" msgstr "Impossibile trovare il punto di rinascita \"main\".\nCambiare il nome del punto di rinascita dove\nvorresti che il giocatore cominci su \"main\"" -#: src/editor/worldmap_objects.cpp:130 -msgid "Outro script" -msgstr "Script di epilogo" - -#: src/editor/worldmap_objects.cpp:131 -msgid "Auto play" -msgstr "Riproduzione automatica" - -#: src/editor/worldmap_objects.cpp:133 -msgid "Title colour" -msgstr "Colore titolo" +#: src/editor/object_menu.cpp:60 +msgid "Patch Notes" +msgstr "" -#: src/editor/worldmap_objects.cpp:175 -msgid "Automatic" -msgstr "Automatico" +#: src/editor/object_menu.cpp:84 +msgid "" +"This will update the object to its latest functionality.\n" +"Check the \"Patch Notes\" for more information.\n" +"\n" +"Keep in mind this is very likely to break the proper behaviour of the object.\n" +"Make sure to re-check any behaviour, related to the object." +msgstr "" -#: src/editor/worldmap_objects.cpp:177 -msgid "Target worldmap" -msgstr "Specifica mappa del mondo" +#: src/editor/object_menu.cpp:98 +#, c++-format +msgid "Patch notes for v{}:" +msgstr "" -#: src/editor/worldmap_objects.cpp:240 -msgid "Stay action" -msgstr "Azione di stasi" +#: src/editor/overlay_widget.cpp:1062 +msgid "Cannot select deprecated tiles" +msgstr "" -#: src/editor/worldmap_objects.cpp:241 -msgid "Initial stay action" -msgstr "Azione iniziale di stasi" +#: src/editor/overlay_widget.cpp:1567 +msgid "Autotile mode is on" +msgstr "Modalità Auto-Casella attiva" -#: src/editor/worldmap_objects.cpp:242 -msgid "Stay group" -msgstr "Ferma gruppo" +#: src/editor/overlay_widget.cpp:1571 +msgid "Hold Ctrl to enable autotile" +msgstr "Premi CTRL per abilitare la Modalità Auto-Casella" -#: src/editor/worldmap_objects.cpp:243 -msgid "Change on touch" -msgstr "Cambia al tocco" +#: src/editor/overlay_widget.cpp:1578 +msgid "Autotile erasing mode is on" +msgstr "Cancellazione Auto-Casella attiva" -#: src/editor/worldmap_objects.cpp:273 -msgid "Show message" -msgstr "Mostra messaggio" +#: src/editor/overlay_widget.cpp:1582 +msgid "Selected tile isn't autotileable" +msgstr "La casella selezionata non dispone di Auto-Casella" -#: src/editor/worldmap_objects.cpp:275 -msgid "Invisible" -msgstr "Invisibile" +#: src/editor/overlay_widget.cpp:1587 +msgid "Hold Ctrl to enable autotile erasing" +msgstr "Premi CTRL per abilitare la Cancellazione Auto-Casella" #: data//credits.stxt:25 msgid "Current SuperTux Team" -msgstr "" +msgstr "Team SuperTux corrente" #: data//credits.stxt:30 -msgid "Programming, project lead ad interim" -msgstr "Programmazione, capo progetto ad interim" +msgid "Maintainer, Programming" +msgstr "" #: data//credits.stxt:35 msgid "Graphics, Level Design, Story" -msgstr "" +msgstr "Grafica, design dei livelli, storia" #: data//credits.stxt:40 -msgid "Graphics, Story, Optimisation" -msgstr "" +msgid "Level Design, Story, Optimisation, Coordination" +msgstr "Design dei livelli, Storia, Ottimizzazione, Coordinamento" -#: data//credits.stxt:45 data//credits.stxt:100 data//credits.stxt:186 -#: data//credits.stxt:498 +#: data//credits.stxt:45 data//credits.stxt:120 data//credits.stxt:206 +#: data//credits.stxt:538 msgid "Graphics" msgstr "Grafica" -#: data//credits.stxt:50 data//credits.stxt:60 data//credits.stxt:82 -#: data//credits.stxt:88 +#: data//credits.stxt:50 data//credits.stxt:102 data//credits.stxt:108 msgid "Graphics, Programming, Level Design" msgstr "Grafica, programmazione, creazione livelli" #: data//credits.stxt:55 +msgid "Features and Programming" +msgstr "Caratteristiche a Programmazione" + +#: data//credits.stxt:60 +msgid "Minor features and programming" +msgstr "Caratteristiche minori e programmazione" + +#: data//credits.stxt:65 +msgid "Programming, Level Updates" +msgstr "Programmazione, Aggiornamento dei Livelli" + +#: data//credits.stxt:70 msgid "Graphics, Programming" -msgstr "" +msgstr "Grafica, programmazione" -#: data//credits.stxt:65 data//credits.stxt:130 data//credits.stxt:135 -#: data//credits.stxt:140 data//credits.stxt:145 data//credits.stxt:160 -#: data//credits.stxt:165 data//credits.stxt:494 data//credits.stxt:506 +#: data//credits.stxt:75 data//credits.stxt:85 data//credits.stxt:150 +#: data//credits.stxt:155 data//credits.stxt:160 data//credits.stxt:165 +#: data//credits.stxt:180 data//credits.stxt:185 data//credits.stxt:534 +#: data//credits.stxt:546 msgid "Programming" msgstr "Programmazione" -#: data//credits.stxt:71 +#: data//credits.stxt:80 data//credits.stxt:266 +msgid "Level Design" +msgstr "Creazione livelli" + +#: data//credits.stxt:91 msgid "Original Developers" -msgstr "" +msgstr "Sviluppatori originali" -#: data//credits.stxt:76 +#: data//credits.stxt:96 msgid "Original Developer" msgstr "Sviluppatore originale" -#: data//credits.stxt:94 +#: data//credits.stxt:114 msgid "Music, Level Design" msgstr "Musica, creazione livelli" -#: data//credits.stxt:106 +#: data//credits.stxt:126 msgid "Programming, Graphics, Level Design" msgstr "Programmazione, grafica, creazione livelli" -#: data//credits.stxt:112 +#: data//credits.stxt:132 msgid "Programming, Level Design" msgstr "Programmazione, creazione livelli" -#: data//credits.stxt:118 +#: data//credits.stxt:138 msgid "Graphics, Story" msgstr "Grafica, storia" -#: data//credits.stxt:124 +#: data//credits.stxt:144 msgid "Programming, Documentation" msgstr "Programmazione, documentazione" -#: data//credits.stxt:150 +#: data//credits.stxt:170 msgid "Coordination" msgstr "Coordinamento" -#: data//credits.stxt:155 +#: data//credits.stxt:175 msgid "Programming, \"Flexlay\" Level editor" msgstr "Programmazione, editor di livello \"Flexlay\"" -#: data//credits.stxt:170 +#: data//credits.stxt:190 msgid "Windows build fixes" msgstr "Correzioni alla versione Windows" -#: data//credits.stxt:175 +#: data//credits.stxt:195 msgid "Packaging, Nightly builds" msgstr "Paccheto, NIghtly build" -#: data//credits.stxt:180 +#: data//credits.stxt:200 msgid "Translation Guru (and many details anyone else could have done)" msgstr "Guru della traduzione (e molte altre minuzie che poteva fare chiunque altro)" -#: data//credits.stxt:240 -msgid "Level Design" -msgstr "Creazione livelli" - -#: data//credits.stxt:414 +#: data//credits.stxt:450 msgid "Additional contributors" msgstr "Altri contributori" -#: data//credits.stxt:419 +#: data//credits.stxt:455 msgid "Bug fixes" msgstr "Correzione bug" -#: data//credits.stxt:423 +#: data//credits.stxt:459 msgid "Scripting functions, Level fixes" msgstr "Funzioni scripting, correzioni ai livelli" -#: data//credits.stxt:427 +#: data//credits.stxt:463 msgid "Code quality fixes" msgstr "Correzioni di qualità al codice" -#: data//credits.stxt:431 data//credits.stxt:435 data//credits.stxt:439 -#: data//credits.stxt:466 +#: data//credits.stxt:467 data//credits.stxt:471 data//credits.stxt:475 +#: data//credits.stxt:502 msgid "Various contributions" msgstr "Contributi vari" -#: data//credits.stxt:443 +#: data//credits.stxt:479 msgid "Build issue fix" msgstr "Riparazioni ai problemi di compilazione" -#: data//credits.stxt:447 data//credits.stxt:451 +#: data//credits.stxt:483 data//credits.stxt:487 msgid "Code contributions" msgstr "Contributi al codice" -#: data//credits.stxt:454 +#: data//credits.stxt:490 msgid "Code contribution, AppData file" msgstr "Contributi al codice, file AppData" -#: data//credits.stxt:458 +#: data//credits.stxt:494 msgid "Bug fix" msgstr "Correzione bug" -#: data//credits.stxt:462 +#: data//credits.stxt:498 msgid "Menu reorganization" msgstr "Riorganizzazione menu" -#: data//credits.stxt:470 +#: data//credits.stxt:506 msgid "Fixing tile bugs" msgstr "Correzione bug caselle" -#: data//credits.stxt:474 +#: data//credits.stxt:510 msgid "Build error fix" msgstr "Correzione errori di compilazione" -#: data//credits.stxt:478 +#: data//credits.stxt:514 msgid "Scripting function fix" msgstr "Correzione funzione di scripting" -#: data//credits.stxt:482 +#: data//credits.stxt:518 +msgid "New features and notable updates" +msgstr "Nuove caratteristiche e aggiornamenti notevoli" + +#: data//credits.stxt:522 msgid "Support for \"glbinding\" as optional OpenGL binding" msgstr "Supporto per \"glbinding\" come binding OpenGL opzionale" -#: data//credits.stxt:486 +#: data//credits.stxt:526 msgid "New menu code" msgstr "Nuovo codice menu" -#: data//credits.stxt:490 +#: data//credits.stxt:530 msgid "Big Tux Walking Sprites improvements" msgstr "Miglioramenti agli sprite di camminata di Big Tux" -#: data//credits.stxt:502 data//credits.stxt:510 +#: data//credits.stxt:542 data//credits.stxt:550 msgid "Contrib Programming" msgstr "Contributi a Programmazione" -#: data//credits.stxt:514 +#: data//credits.stxt:554 msgid "Programming, Previous Maintainer" msgstr "Programmazione, manutentore precedente" -#: data//credits.stxt:518 +#: data//credits.stxt:558 msgid "Various Contributions" -msgstr "" +msgstr "Contributi vari" -#: data//credits.stxt:522 data//credits.stxt:526 data//credits.stxt:530 -#: data//credits.stxt:534 data//credits.stxt:538 data//credits.stxt:542 -#: data//credits.stxt:546 data//credits.stxt:550 data//credits.stxt:554 +#: data//credits.stxt:562 data//credits.stxt:566 data//credits.stxt:570 +#: data//credits.stxt:574 data//credits.stxt:578 data//credits.stxt:582 +#: data//credits.stxt:586 data//credits.stxt:590 data//credits.stxt:594 +#: data//credits.stxt:598 data//credits.stxt:602 data//credits.stxt:606 +#: data//credits.stxt:610 data//credits.stxt:614 data//credits.stxt:618 +#: data//credits.stxt:622 data//credits.stxt:626 data//credits.stxt:630 +#: data//credits.stxt:634 data//credits.stxt:638 data//credits.stxt:642 +#: data//credits.stxt:646 data//credits.stxt:650 data//credits.stxt:654 +#: data//credits.stxt:658 data//credits.stxt:662 msgid "Contributions" -msgstr "" +msgstr "Contributi" -#: data//credits.stxt:560 +#: data//credits.stxt:668 msgid "Localization" msgstr "Traduzione" -#: data//credits.stxt:1091 +#: data//credits.stxt:1231 msgid " Special Thanks to" -msgstr "" +msgstr "Ringraziamenti speciali a" -#: data//credits.stxt:1096 +#: data//credits.stxt:1236 msgid "Creator of Tux, the Linux penguin" msgstr "Creatore di Tux, il pinguino di Linux" -#: data//credits.stxt:1100 +#: data//credits.stxt:1240 msgid "SDL, OpenAL and OpenGL" msgstr "SDL, OpenAL e OpenGL" -#: data//credits.stxt:1101 +#: data//credits.stxt:1241 msgid "" "For making such a great gaming experience\n" " possible on Linux" msgstr "Per aver reso possibile una tale esperienza\ndi gioco su Linux" -#: data//credits.stxt:1106 +#: data//credits.stxt:1246 msgid "and you, the player" -msgstr "" +msgstr "e a te, giocatore!" -#: data//credits.stxt:1107 +#: data//credits.stxt:1247 msgid "for giving this game a chance and playing it" -msgstr "" +msgstr "per dare una chance a questo gioco giocandoci" -#: data//credits.stxt:1118 +#: data//credits.stxt:1258 msgid "Visit our webpage at" msgstr "Visita la nostra pagina a" -#: data//credits.stxt:1127 +#: data//credits.stxt:1267 msgid "Or visit us directly at IRC:" msgstr "Oppure facci visita direttamente su IRC:" -#: data//credits.stxt:1131 -msgid "#supertux at webchat.freenode.net" -msgstr "#supertux su webchat.freenode.net" +#: data//credits.stxt:1271 +msgid "#supertux at web.libera.chat" +msgstr "#supertux su web.libera.chat" -#: data//credits.stxt:1136 +#: data//credits.stxt:1276 msgid "Or at our Forum:" msgstr "O sul nostro Forum:" -#: data//credits.stxt:1145 +#: data//credits.stxt:1285 msgid "Comments, ideas and suggestions" msgstr "Commenti, idee e suggerimenti" -#: data//credits.stxt:1149 +#: data//credits.stxt:1289 msgid "go to our mailing list" msgstr "vai alla nostra mailing list" #. l10n: typo contact -#: data//credits.stxt:1159 +#: data//credits.stxt:1299 msgid "Typographical errors can be" msgstr "Gli errori tipografici possono essere" #. l10n: typo contact -#: data//credits.stxt:1164 +#: data//credits.stxt:1304 msgid "reported to" msgstr "riportato a" #. l10n: typo contact, see -#: data//credits.stxt:1169 +#: data//credits.stxt:1309 msgid "supertux-devel@lists.lethargik.org" msgstr "supertux-devel@lists.lethargik.org" -#: data//credits.stxt:1176 +#: data//credits.stxt:1316 msgid "Want to help…" msgstr "Vuoi aiutare..." -#: data//credits.stxt:1181 +#: data//credits.stxt:1321 msgid "…with localization?" msgstr "...con la traduzione?" -#: data//credits.stxt:1191 +#: data//credits.stxt:1331 msgid "…with something else?" msgstr "...con qualcos'altro?" -#: data//credits.stxt:1202 +#: data//credits.stxt:1342 msgid "Thank you for" msgstr "Grazie per" -#: data//credits.stxt:1206 +#: data//credits.stxt:1346 msgid "playing" msgstr "aver giocato" -#: data//credits.stxt:1216 +#: data//credits.stxt:1356 msgid "Penny awaits you in warmer temperatures!" -msgstr "" +msgstr "Penny ti attende in temperature più calde!" + +#: data//images/engine/editor/objects.stoi:4 +msgid "Enemies" +msgstr "Nemici" -#: data//images/engine/editor/objects.stoi:156 +#: data//images/engine/editor/objects.stoi:162 msgid "Bosses" msgstr "Boss" -#: data//images/engine/editor/objects.stoi:167 +#: data//images/engine/editor/objects.stoi:173 msgid "Projectiles" msgstr "Proiettili" -#: data//images/engine/editor/objects.stoi:181 +#: data//images/engine/editor/objects.stoi:184 msgid "Environment" -msgstr "" - -#: data//images/ice_world.strf:6 data//images/tiles.strf:327 -#: data//images/worldmap.strf:67 -msgid "Forest" -msgstr "Foresta" +msgstr "Ambiente" -#: data//images/ice_world.strf:106 +#: data//images/ice_world.strf:80 msgid "Ice Cave & Crystal" msgstr "Grotta di ghiaccio e cristallo" -#: data//images/ice_world.strf:153 +#: data//images/ice_world.strf:127 msgid "Embellishments" msgstr "Decorazioni" -#: data//images/ice_world.strf:237 -msgid "Ice" -msgstr "Ghiaccio" +#: data//images/ice_world.strf:320 +msgid "Underground Forest" +msgstr "Foresta Sotterranea" -#: data//images/ice_world.strf:282 data//images/tiles.strf:693 -msgid "Castle" -msgstr "Castello" +#: data//images/ice_world.strf:375 +msgid "Trees & Bushes" +msgstr "Alberi & Cespugli" -#: data//images/ice_world.strf:328 +#: data//images/ice_world.strf:406 +msgid "Seasonal" +msgstr "Stagionale" + +#: data//images/ice_world.strf:496 +msgid "Structure" +msgstr "Struttura" + +#: data//images/ice_world.strf:557 msgid "Pathing" msgstr "Instradamento" -#: data//images/ice_world.strf:424 +#: data//images/ice_world.strf:718 msgid "Water" msgstr "Acqua" -#: data//images/tiles.strf:19 data//images/worldmap.strf:41 -msgid "Snow" -msgstr "Neve" - -#: data//images/tiles.strf:124 +#: data//images/tiles.strf:252 msgid "Snow Background" -msgstr "" +msgstr "Sfondo innevato" -#: data//images/tiles.strf:162 -msgid "Snow Mountain" -msgstr "Montagna Nevosa" - -#: data//images/tiles.strf:236 +#: data//images/tiles.strf:300 msgid "Crystal" -msgstr "" +msgstr "Cristallo" -#: data//images/tiles.strf:457 +#: data//images/tiles.strf:539 msgid "Forest Background" +msgstr "Sfondo foresta" + +#: data//images/tiles.strf:690 +msgid "Corrupted Forest" msgstr "" -#: data//images/tiles.strf:572 -msgid "Block + Bonus" +#: data//images/tiles.strf:868 +msgid "Corrupted Background" msgstr "" -#: data//images/tiles.strf:618 +#: data//images/tiles.strf:991 +msgid "Block + Bonus" +msgstr "Blocchi + Bonus" + +#: data//images/tiles.strf:1069 msgid "Pole + Signs" -msgstr "" +msgstr "Pali + Segnali" -#: data//images/tiles.strf:661 +#: data//images/tiles.strf:1113 msgid "Liquid" -msgstr "" +msgstr "Liquido" + +#: data//images/tiles.strf:1131 +msgid "Castle" +msgstr "Castello" -#: data//images/tiles.strf:819 data//images/worldmap.strf:199 +#: data//images/tiles.strf:1231 data//images/worldmap.strf:199 msgid "Halloween" msgstr "Halloween" -#: data//images/tiles.strf:847 +#: data//images/tiles.strf:1272 msgid "Industrial" msgstr "Industriale" -#: data//images/tiles.strf:862 +#: data//images/tiles.strf:1287 msgid "Unisolid + Lightmap" -msgstr "" +msgstr "Unisolido + mappa della luce" -#: data//images/tiles.strf:879 +#: data//images/tiles.strf:1314 msgid "Miscellaneous" -msgstr "" +msgstr "Miscellanea" -#: data//images/tiles.strf:913 -msgid "Old/Unused" -msgstr "" +#: data//images/tiles.strf:1342 +msgid "Retro Tiles" +msgstr "Caselle Retro" #: data//images/worldmap.strf:24 msgid "Water paths" @@ -2850,3 +5161,19 @@ msgstr "Percorsi del castello" #: data//images/worldmap.strf:135 msgid "Darker Forest" msgstr "Foresta più oscura" + +#: data//images/converters/data.stcd:3 +msgid "Nightly Tiles" +msgstr "" + +#: data//images/converters/data.stcd:5 +msgid "For levels, created in previous Nightly builds." +msgstr "" + +#: data//images/converters/data.stcd:8 +msgid "Pre-0.6.3 Crystal Tiles" +msgstr "" + +#: data//images/converters/data.stcd:10 +msgid "For levels, created in pre-0.6.3 versions, which use crystal tiles." +msgstr "" diff --git a/data/locale/ja.po b/data/locale/ja.po index 08a13639956..80f4b296003 100644 --- a/data/locale/ja.po +++ b/data/locale/ja.po @@ -6,7 +6,7 @@ # 0ea743a388003249c3a27027490eb004_eb62725 <93be5fa112647d5d896be9f7b3c2eda8_426397>, 2019 # 111More1, 2023 # b1e11c107ebf1f339ff7adfc86b9dbe0_2e3e89d, 2016 -# 111More1, 2023 +# IAN RODRÍGUEZ Lorenzo, 2023 # 515ce455fbf38ec9585626e8d26b6324_7a9a6ef, 2016-2017 # Ryo Nakano, 2016 # Ryo Nakano, 2018-2022,2024 diff --git a/data/locale/nl.po b/data/locale/nl.po index 3437fabee78..918fdf5803a 100644 --- a/data/locale/nl.po +++ b/data/locale/nl.po @@ -7,7 +7,7 @@ # Frank van der Loo , 2014-2015 # Heimen Stoffels , 2021-2022,2024 # Heimen Stoffels , 2015-2016,2018-2020 -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # thetuxgirl, 2024 # Pieter De Decker , 2007,2013 # 62bd5b1da39b746abffbed10afdf3f48_dd9a6d2 , 2015 diff --git a/data/locale/pt.po b/data/locale/pt.po index 787d4db65eb..05653a8d010 100644 --- a/data/locale/pt.po +++ b/data/locale/pt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the SuperTux package. # # Translators: -# 111More1, 2022 +# IAN RODRÍGUEZ Lorenzo, 2022 # André Pinheiro , 2021 # Benjamin Leduc , 2015 # BlaCoiso, 2016 diff --git a/data/locale/pt_BR.po b/data/locale/pt_BR.po index f3a02e44603..8d50567dd9b 100644 --- a/data/locale/pt_BR.po +++ b/data/locale/pt_BR.po @@ -24,7 +24,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/SuperTux/supertux/issues\n" "POT-Creation-Date: 2024-05-30 16:19+0200\n" "PO-Revision-Date: 2013-08-10 22:56+0000\n" -"Last-Translator: Jesusaves , 2021,2024\n" +"Last-Translator: Fúlvio Alves , 2020-2021,2023-2024\n" "Language-Team: Portuguese (Brazil) (http://app.transifex.com/arctic-games/supertux/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,7 +47,7 @@ msgstr "Nome" #: src/trigger/secretarea_trigger.cpp:56 msgid "Fade tilemap" -msgstr "Esmaecer mapa de telas" +msgstr "Esmaecer mapa de blocos" #: src/trigger/secretarea_trigger.cpp:57 src/trigger/climbable.cpp:59 #: src/object/infoblock.cpp:76 src/worldmap/teleporter.cpp:49 @@ -162,7 +162,7 @@ msgstr "Novo ponto de partida do mapa mundi" #: src/trigger/sequence_trigger.cpp:54 msgid "Worldmap fade tilemap" -msgstr "Esmaecer mapa de telas do mapa-múndi" +msgstr "Esmaecer mapa de blocos do mapa-múndi" #: src/trigger/sequence_trigger.cpp:55 #: src/object/custom_particle_system.cpp:430 @@ -283,7 +283,7 @@ msgstr "Gradiente" #: src/object/tilemap.hpp:58 msgid "Tilemap" -msgstr "Mapa de Pisos" +msgstr "Mapa de Blocos" #: src/object/sound_object.cpp:69 src/object/ambient_sound.cpp:85 #: src/object/sound_object.hpp:42 src/supertux/menu/options_menu.cpp:128 @@ -1348,7 +1348,7 @@ msgstr "Desvanecer partícula" #: src/object/custom_particle_system.cpp:524 msgid "Delete if off-screen" -msgstr "Removê-la fora de tela" +msgstr "Excluir se estiver fora da tela" #: src/object/custom_particle_system.cpp:525 #: src/editor/particle_editor.cpp:224 @@ -1441,7 +1441,7 @@ msgstr "Matiz" #: src/object/tilemap.cpp:296 src/supertux/menu/editor_tilegroup_menu.cpp:26 #: src/editor/toolbox_widget.cpp:98 msgid "Tiles" -msgstr "Pisos" +msgstr "Blocos" #: src/object/gradient.cpp:98 msgid "Primary Colour" @@ -1830,7 +1830,7 @@ msgstr "Velocidade de Perseguição" #: src/badguy/root_sapling.hpp:41 msgid "Root Sapling" -msgstr "" +msgstr "Muda de raiz" #: src/badguy/haywire.hpp:46 msgid "Haywire" @@ -1854,11 +1854,11 @@ msgstr "Abóbora" #: src/badguy/bouncing_snowball.cpp:82 msgid "Fatbat" -msgstr "" +msgstr "Morcego gordo" #: src/badguy/dive_mine.hpp:50 msgid "Dive Mine" -msgstr "" +msgstr "Mina de mergulho" #: src/badguy/granito_big.hpp:33 msgid "Big Granito" @@ -1910,7 +1910,7 @@ msgstr "Raio de Despertar" #: src/badguy/scrystallo.cpp:59 msgid "Roof-attached" -msgstr "" +msgstr "Fixado no teto" #: src/badguy/jumpy.hpp:40 msgid "Jumpy" @@ -2042,11 +2042,11 @@ msgstr "Gelo (grande)" #: src/badguy/crusher.cpp:77 msgid "Rock (normal)" -msgstr "" +msgstr "Pedra (normal)" #: src/badguy/crusher.cpp:78 msgid "Rock (big)" -msgstr "" +msgstr "Pedra (grande)" #: src/badguy/crusher.cpp:79 msgid "Corrupted (normal)" @@ -2070,7 +2070,7 @@ msgstr "Folha-Bala" #: src/badguy/fish_swimming.hpp:40 msgid "Swimming Fish" -msgstr "" +msgstr "Peixes nadando" #: src/badguy/flame.hpp:47 msgid "Flame" @@ -2082,7 +2082,7 @@ msgstr "Cristal Adormecido" #: src/badguy/jumpy.cpp:45 msgid "Wooden" -msgstr "" +msgstr "De madeira" #: src/badguy/jumpy.cpp:47 msgid "Metal" @@ -2090,7 +2090,7 @@ msgstr "Metal" #: src/badguy/jumpy.cpp:48 msgid "Bag" -msgstr "" +msgstr "Bolsa" #: src/badguy/willowisp.hpp:57 msgid "Will o' Wisp" @@ -2098,7 +2098,7 @@ msgstr "Chama Perseguidora" #: src/badguy/fish_jumping.hpp:41 msgid "Jumping Fish" -msgstr "" +msgstr "Peixe saltador" #: src/badguy/badguy.hpp:61 msgid "Badguy" @@ -2114,7 +2114,7 @@ msgstr "Espinhoso" #: src/badguy/walkingleaf.hpp:33 msgid "Walking Leaf" -msgstr "" +msgstr "Folha ambulante" #: src/badguy/root.hpp:39 msgid "Root" @@ -2138,7 +2138,7 @@ msgstr "Yeti" #: src/badguy/snowball.cpp:41 msgid "Bumpkin" -msgstr "" +msgstr "Caipira" #: src/badguy/snowball.cpp:42 msgid "BSOD" @@ -2166,7 +2166,7 @@ msgstr "Pedra Irritada" #: src/badguy/tarantula.cpp:354 msgid "Spidermite" -msgstr "" +msgstr "Ácaro-aranha" #: src/badguy/tarantula.cpp:374 msgid "Static" @@ -2186,7 +2186,7 @@ msgstr "Homem neve" #: src/badguy/viciousivy.hpp:33 msgid "Vicious Ivy" -msgstr "" +msgstr "Hera Viciosa" #: src/badguy/stalactite.cpp:156 msgid "ice" @@ -2194,11 +2194,11 @@ msgstr "gelo" #: src/badguy/stalactite.cpp:157 msgid "rock" -msgstr "" +msgstr "pedra" #: src/badguy/fish_chasing.hpp:33 msgid "Chasing Fish" -msgstr "" +msgstr "Peixe perseguidor" #: src/badguy/stumpy.hpp:38 msgid "Stumpy" @@ -2232,7 +2232,7 @@ msgstr "Máximo de badguys simultâneos" #: src/badguy/dispenser.cpp:435 msgid "Dropper" -msgstr "" +msgstr "Conta-gotas" #: src/badguy/dispenser.cpp:436 msgid "Cannon" @@ -2260,7 +2260,7 @@ msgstr "Padrão" #: src/badguy/granito_big.cpp:53 src/badguy/granito.cpp:264 msgid "Standing" -msgstr "" +msgstr "Em pé" #: src/badguy/granito_big.cpp:54 src/badguy/granito.cpp:265 msgid "Walking" @@ -2523,7 +2523,7 @@ msgstr "Não compartilhar o nome dos níveis enquanto edita" msgid "" "Enable this if you want to work on secret levels and don't want the names to" " be spoiled" -msgstr "" +msgstr "Ative isso se quiser trabalhar em níveis secretos e não quiser que os nomes sejam entregues" #: src/supertux/menu/integrations_menu.cpp:54 msgid "Enable Discord integration" @@ -2533,7 +2533,7 @@ msgstr "Ativar integração com o Discord" msgid "" "Sends information to your Discord application about what you're doing in the" " game." -msgstr "" +msgstr "Envia informações para seu aplicativo Discord sobre o que você está fazendo no jogo." #: src/supertux/menu/integrations_menu.cpp:57 msgid "Discord (disabled; not compiled)" @@ -2542,11 +2542,11 @@ msgstr "Discord (desativado; não compilado)" #: src/supertux/menu/editor_converters_menu.cpp:61 #: src/supertux/menu/editor_menu.cpp:85 msgid "Convert Tiles" -msgstr "" +msgstr "Converter blocos" #: src/supertux/menu/editor_converters_menu.cpp:64 msgid "Select Tile Conversion File" -msgstr "" +msgstr "Selecione o arquivo de conversão de bloco" #: src/supertux/menu/editor_converters_menu.cpp:72 #, c++-format @@ -2555,15 +2555,15 @@ msgstr "Por: {}" #: src/supertux/menu/editor_converters_menu.cpp:75 msgid "Convert Tiles By File" -msgstr "" +msgstr "Converter blocos por arquivo" #: src/supertux/menu/editor_converters_menu.cpp:76 msgid "Convert all tiles in the current level by a file, specified above." -msgstr "" +msgstr "Converter todos os blocos no nível atual por um arquivo, especificado acima." #: src/supertux/menu/editor_converters_menu.cpp:89 msgid "No tile conversion file selected." -msgstr "" +msgstr "Nenhum arquivo de conversão de bloco selecionado." #: src/supertux/menu/editor_converters_menu.cpp:93 msgid "" @@ -2571,7 +2571,7 @@ msgid "" "\n" "Note: This should not be ran more than once on a level.\n" "Creating a separate copy of the level is highly recommended." -msgstr "" +msgstr "Isso converterá todos os blocos no nível. Continuar?\n\nNota: Isso não deve ser executado mais de uma vez em um nível.\nÉ altamente recomendado criar uma cópia separada do nível." #: src/supertux/menu/video_system_menu.cpp:36 msgid "Select Video System" @@ -2679,25 +2679,25 @@ msgstr "Salvar" #: src/supertux/menu/multiplayer_menu.cpp:27 #: src/supertux/menu/multiplayer_players_menu.cpp:34 msgid "Multiplayer" -msgstr "" +msgstr "Multijogador" #: src/supertux/menu/multiplayer_menu.cpp:30 msgid "Auto-manage Players" -msgstr "" +msgstr "Gerenciar jogadores automaticamente" #: src/supertux/menu/multiplayer_menu.cpp:31 msgid "" "Automatically add and remove players when controllers are plugged or " "unplugged" -msgstr "" +msgstr "Adicione e remova jogadores automaticamente quando os controladores estiverem conectados ou desconectados" #: src/supertux/menu/multiplayer_menu.cpp:33 msgid "Allow Multibind" -msgstr "" +msgstr "Permitir Multibind" #: src/supertux/menu/multiplayer_menu.cpp:34 msgid "Allow binding multiple joysticks to a single player" -msgstr "" +msgstr "Permitir vincular vários joysticks a um único jogador" #: src/supertux/menu/multiplayer_menu.cpp:36 msgid "Manage Players" @@ -2725,64 +2725,64 @@ msgstr "Cada nível deve ter pelo menos um setor." #: src/supertux/menu/editor_sectors_menu.cpp:97 msgid "Do you really want to delete this sector?" -msgstr "Você realmente quer deletar este setor?" +msgstr "Você realmente quer excluir este setor?" #: src/supertux/menu/editor_sectors_menu.cpp:100 msgid "Delete sector" -msgstr "Deletar setor" +msgstr "Excluir setor" #: src/supertux/menu/custom_menu_menu.cpp:49 #: src/supertux/menu/options_menu.cpp:191 msgid "Menu Customization" -msgstr "" +msgstr "Personalização do menu" #: src/supertux/menu/custom_menu_menu.cpp:51 msgid "Menu Back Color" -msgstr "" +msgstr "Cor de fundo do menu" #: src/supertux/menu/custom_menu_menu.cpp:52 msgid "Menu Front Color" -msgstr "" +msgstr "Cor da frente do menu" #: src/supertux/menu/custom_menu_menu.cpp:53 msgid "Menu Help Back Color" -msgstr "" +msgstr "Cor de fundo do menu de ajuda" #: src/supertux/menu/custom_menu_menu.cpp:54 msgid "Menu Help Front Color" -msgstr "" +msgstr "Cor da frente do menu de ajuda" #: src/supertux/menu/custom_menu_menu.cpp:55 msgid "Label Text Color" -msgstr "" +msgstr "Cor do texto do rótulo" #: src/supertux/menu/custom_menu_menu.cpp:56 msgid "Active Text Color" -msgstr "" +msgstr "Cor de texto ativo" #: src/supertux/menu/custom_menu_menu.cpp:57 msgid "Divider Line Color" -msgstr "" +msgstr "Cor da linha divisória" #: src/supertux/menu/custom_menu_menu.cpp:58 msgid "Menu Roundness" -msgstr "" +msgstr "Redondeza do menu" #: src/supertux/menu/custom_menu_menu.cpp:60 msgid "Editor Interface Color" -msgstr "" +msgstr "Cor da interface do editor" #: src/supertux/menu/custom_menu_menu.cpp:61 msgid "Editor Hover Color" -msgstr "" +msgstr "Cor do cursor do editor" #: src/supertux/menu/custom_menu_menu.cpp:62 msgid "Editor Grab Color" -msgstr "" +msgstr "Cor de captura do editor" #: src/supertux/menu/custom_menu_menu.cpp:64 msgid "Reset to defaults" -msgstr "" +msgstr "Resetar para os padrões" #: src/supertux/menu/editor_level_select_menu.cpp:72 msgid "Empty World" @@ -2803,7 +2803,7 @@ msgstr "Criar Mapa do Mundo" #: src/supertux/menu/editor_level_select_menu.cpp:95 #: src/supertux/menu/editor_delete_level_menu.cpp:55 msgid "Delete level" -msgstr "Deletar nível" +msgstr "Excluir nível" #: src/supertux/menu/editor_level_select_menu.cpp:97 #: src/supertux/menu/editor_levelset_menu.cpp:50 @@ -2834,14 +2834,14 @@ msgstr "Um arquivo de recuperação automático foi encontrado. Você gostaria d #: src/supertux/menu/editor_level_select_menu.cpp:186 msgid "This will delete the auto-save file. Are you sure?" -msgstr "Isso irá deletar o arquivo de recuperação. Você tem certeza?" +msgstr "Isso irá excluir o arquivo de recuperação. Você tem certeza?" #: src/supertux/menu/worldmap_cheat_apply_menu.cpp:35 #: src/supertux/menu/worldmap_cheat_apply_menu.cpp:52 #: src/supertux/menu/cheat_apply_menu.cpp:33 #: src/supertux/menu/cheat_apply_menu.cpp:51 msgid "Apply cheat to player" -msgstr "" +msgstr "Aplicar truque ao jogador" #: src/supertux/menu/worldmap_cheat_apply_menu.cpp:39 #: src/supertux/menu/worldmap_cheat_apply_menu.cpp:60 @@ -2852,13 +2852,13 @@ msgstr "" #: src/supertux/menu/multiplayer_player_menu.cpp:37 #, c++-format msgid "Player {}" -msgstr "" +msgstr "Jogador {}" #: src/supertux/menu/worldmap_cheat_apply_menu.cpp:57 #: src/supertux/menu/cheat_apply_menu.cpp:36 #: src/supertux/menu/cheat_apply_menu.cpp:56 msgid "All Players" -msgstr "" +msgstr "Todos os jogadores" #: src/supertux/menu/worldmap_cheat_menu.cpp:36 #: src/supertux/menu/cheat_menu.cpp:31 @@ -2951,9 +2951,9 @@ msgstr "Escolher Mundo" #, c++-format msgid "{} level" msgid_plural "{} levels" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "{} nível" +msgstr[1] "{} níveis" +msgstr[2] "{} níveis" #: src/supertux/menu/editor_levelset_select_menu.cpp:112 msgid "Create World" @@ -2962,12 +2962,12 @@ msgstr "Criar Mundo" #: src/supertux/menu/editor_levelset_select_menu.cpp:113 #: src/supertux/menu/editor_delete_levelset_menu.cpp:41 msgid "Delete World" -msgstr "" +msgstr "Excluir mundo" #: src/supertux/menu/options_menu.cpp:72 #: src/supertux/menu/options_select_menu.cpp:35 msgid "Locale" -msgstr "" +msgstr "Local" #: src/supertux/menu/options_menu.cpp:76 msgid "Select Language" @@ -3016,11 +3016,11 @@ msgstr "Ajustar a resolução ao tamanho do seu navegador" #: src/supertux/menu/options_menu.cpp:116 msgid "Change Video System" -msgstr "" +msgstr "Alterar sistema de vídeo" #: src/supertux/menu/options_menu.cpp:117 msgid "Change video system used to render graphics" -msgstr "" +msgstr "Alterar sistema de vídeo usado para renderizar gráficos" #: src/supertux/menu/options_menu.cpp:124 #: src/supertux/menu/options_select_menu.cpp:38 @@ -3050,15 +3050,15 @@ msgstr "Controles" #: src/supertux/menu/options_menu.cpp:151 msgid "Enable Rumbling Controllers" -msgstr "" +msgstr "Habilitar ruído de controladores" #: src/supertux/menu/options_menu.cpp:152 msgid "Enable vibrating the game controllers." -msgstr "" +msgstr "Ativar a vibração dos controles do jogo." #: src/supertux/menu/options_menu.cpp:152 msgid "This feature is currently only used in the multiplayer options menu." -msgstr "" +msgstr "Atualmente, este recurso só é usado no menu de opções de multijogador." #: src/supertux/menu/options_menu.cpp:154 #: src/supertux/menu/keyboard_menu.cpp:34 @@ -3094,11 +3094,11 @@ msgstr "Selecione um perfil para jogar" #: src/supertux/menu/options_menu.cpp:174 msgid "Multiplayer settings" -msgstr "" +msgstr "Configurações de multijogador" #: src/supertux/menu/options_menu.cpp:175 msgid "Configure settings specific to multiplayer" -msgstr "" +msgstr "Definir configurações específicas para multijogador" #: src/supertux/menu/options_menu.cpp:178 msgid "Enable transitions" @@ -3110,11 +3110,11 @@ msgstr "Habilita transições de tela e animação suavizada de menus" #: src/supertux/menu/options_menu.cpp:181 msgid "Custom title screen levels" -msgstr "" +msgstr "Telas de título de níveis personalizados" #: src/supertux/menu/options_menu.cpp:182 msgid "Allow overriding the title screen level, when loading certain worlds" -msgstr "" +msgstr "Permite a substituição da tela de título do nível ao carregar certos mundos" #: src/supertux/menu/options_menu.cpp:185 msgid "Christmas Mode" @@ -3132,7 +3132,7 @@ msgstr "Gerencia se o SuperTux deveria exibir os níveis que você joga nos perf #: src/supertux/menu/options_menu.cpp:192 msgid "Customize the appearance of the menus" -msgstr "" +msgstr "Personalizar a aparência dos menus" #: src/supertux/menu/options_menu.cpp:199 #: src/supertux/menu/options_select_menu.cpp:41 @@ -3175,7 +3175,7 @@ msgstr "Verificar por atualizações" msgid "" "Allows the game to perform checks for new SuperTux releases on startup and " "notify if any found." -msgstr "" +msgstr "Permite que o jogo execute verificações por novos lançamentos do SuperTux ao inicializar e notifique se algum for encontrado." #: src/supertux/menu/options_menu.cpp:245 #: src/supertux/menu/options_menu.cpp:288 src/supertux/direction.cpp:76 @@ -3258,7 +3258,7 @@ msgstr "Ajustar volume de música" #: src/supertux/menu/options_menu.cpp:517 msgid "On-screen controls scale" -msgstr "" +msgstr "Escala de controles na tela" #: src/supertux/menu/options_menu.cpp:638 msgid "" @@ -3269,12 +3269,12 @@ msgstr "O jogo não conseguiu detectar a resolução do seu navegador.\nIsso pro #: src/supertux/menu/editor_delete_levelset_menu.cpp:80 msgid "You cannot delete the world that you are editing" -msgstr "" +msgstr "Você não pode excluir o mundo que está editando" #: src/supertux/menu/editor_delete_levelset_menu.cpp:83 #, c++-format msgid "You are about to delete world \"{}\". Are you sure?" -msgstr "" +msgstr "Você está prestes a excluir o mundo \"{}\". Tem certeza?" #: src/supertux/menu/addon_preview_menu.cpp:82 #, c++-format @@ -3283,15 +3283,15 @@ msgstr "{} \"{}\"" #: src/supertux/menu/addon_preview_menu.cpp:87 msgid "Some information about this add-on is not available." -msgstr "" +msgstr "Algumas informações sobre este complemento não estão disponíveis." #: src/supertux/menu/addon_preview_menu.cpp:88 msgid "Perform a \"Check Online\" to try retrieving it." -msgstr "" +msgstr "Execute uma \"Verificação online\" para tentar recuperá-lo." #: src/supertux/menu/addon_preview_menu.cpp:92 msgid "No author specified." -msgstr "" +msgstr "Nenhum autor especificado." #: src/supertux/menu/addon_preview_menu.cpp:92 #, c++-format @@ -3376,14 +3376,14 @@ msgstr "\nSeu progresso não será perdido." msgid "" "NOTE: The add-on \"{}\" is a dependency of {} other installed {}.\n" "Are you sure you wish to uninstall?" -msgstr "" +msgstr "NOTA: O complemento \"{}\" é uma dependência de {} outros {} instalados.\nTem certeza de que deseja desinstalar?" #: src/supertux/menu/addon_preview_menu.cpp:246 #, c++-format msgid "" "Cannot toggle add-on \"{}\":\n" "{}" -msgstr "" +msgstr "Não é possível alternar o complemento \"{}\":\n{}" #: src/supertux/menu/addon_preview_menu.cpp:279 msgid "Fetching screenshot previews..." @@ -3518,14 +3518,14 @@ msgstr "Resetar tudo" #: src/supertux/menu/profile_menu.cpp:113 #: src/supertux/menu/profile_menu.cpp:115 msgid "Delete all" -msgstr "Deletar tudo" +msgstr "Excluir tudo" #: src/supertux/menu/profile_menu.cpp:148 #, c++-format msgid "" "This will reset all game progress on the profile \"{}\".\n" "Are you sure?" -msgstr "" +msgstr "Isso irá resetar todo o progresso do jogo no perfil \"{}\".\nTem certeza?" #: src/supertux/menu/profile_menu.cpp:157 msgid "This will reset your game progress on all profiles. Are you sure?" @@ -3536,13 +3536,13 @@ msgstr "Isso irá reiniciar o seu progresso no jogo em todos os perfis. Você te msgid "" "This will delete the profile \"{}\",\n" "including all game progress on it. Are you sure?" -msgstr "" +msgstr "Isso excluirá o perfil \"{}\",\nincluindo todo o progresso do jogo nele. Tem certeza?" #: src/supertux/menu/profile_menu.cpp:178 msgid "" "This will delete all profiles, including all game progress on them.\n" "Are you sure?" -msgstr "" +msgstr "Isso excluirá todos os perfis, incluindo todo o progresso no jogo neles.\nTem certeza?" #: src/supertux/menu/editor_levelset_menu.cpp:53 #: src/supertux/menu/editor_new_levelset_menu.cpp:35 @@ -3551,11 +3551,11 @@ msgstr "Descrição" #: src/supertux/menu/editor_levelset_menu.cpp:55 msgid "Title Screen Level" -msgstr "" +msgstr "Tela de título do nível" #: src/supertux/menu/editor_levelset_menu.cpp:56 msgid "A level to be used for the title screen, after exiting the world." -msgstr "" +msgstr "Um nível a ser usado na tela de título, depois de sair do mundo." #: src/supertux/menu/multiplayer_players_menu.cpp:46 msgid "Add Player" @@ -3571,19 +3571,19 @@ msgid "" "remove is currently in-game.\n" "\n" "Do you wish to remove them anyways?" -msgstr "" +msgstr "Aviso: O jogador que você está tentando\nremover está atualmente no jogo.\n\nVocê deseja removê-lo mesmo assim?" #: src/supertux/menu/addon_menu.cpp:68 msgid "Installed Language Packs" -msgstr "" +msgstr "Pacotes de idiomas instalados" #: src/supertux/menu/addon_menu.cpp:68 msgid "Installed Add-ons" -msgstr "" +msgstr "Complementos instalados" #: src/supertux/menu/addon_menu.cpp:76 src/supertux/menu/addon_menu.cpp:117 msgid "No language packs installed" -msgstr "" +msgstr "Nenhum pacote de idioma instalado" #: src/supertux/menu/addon_menu.cpp:76 msgid "No Add-ons installed" @@ -3592,7 +3592,7 @@ msgstr "Não há Complementos instalados" #: src/supertux/menu/addon_menu.cpp:124 #, c++-format msgid "{} {}*UPDATE*" -msgstr "" +msgstr "{} {}*ATUALIZAÇÃO*" #: src/supertux/menu/addon_menu.cpp:130 #, c++-format @@ -3601,7 +3601,7 @@ msgstr "{}{}" #: src/supertux/menu/addon_menu.cpp:140 msgid "No updates available." -msgstr "" +msgstr "Nenhuma atualização disponível." #: src/supertux/menu/addon_menu.cpp:144 #, c++-format @@ -3610,32 +3610,32 @@ msgstr "{} {} disponível" #: src/supertux/menu/addon_menu.cpp:144 msgid "update" -msgstr "" +msgstr "atualização" #: src/supertux/menu/addon_menu.cpp:144 msgid "updates" -msgstr "" +msgstr "atualizações" #: src/supertux/menu/addon_menu.cpp:146 msgid "Check for updates" -msgstr "" +msgstr "Verificar por atualizações" #: src/supertux/menu/addon_menu.cpp:150 msgid "Browse language packs" -msgstr "" +msgstr "Navegar pelos pacotes de idiomas" #: src/supertux/menu/addon_menu.cpp:150 #: src/supertux/menu/addon_browse_menu.cpp:70 msgid "Browse Add-ons" -msgstr "" +msgstr "Navegar pelos Complementos" #: src/supertux/menu/addon_menu.cpp:151 msgid "Install from file" -msgstr "" +msgstr "Instalar do arquivo" #: src/supertux/menu/addon_menu.cpp:208 msgid "Checking for updates..." -msgstr "" +msgstr "Verificando por atualizações..." #: src/supertux/menu/editor_new_levelset_menu.cpp:31 msgid "New World" @@ -3651,7 +3651,7 @@ msgstr "Modo de História" #: src/supertux/menu/addon_browse_menu.cpp:70 msgid "Browse Language Packs" -msgstr "" +msgstr "Navegar pelos pacotes de idiomas" #: src/supertux/menu/addon_browse_menu.cpp:112 #, c++-format @@ -3660,29 +3660,29 @@ msgstr "Página {}/{}" #: src/supertux/menu/addon_browse_menu.cpp:124 msgid "No new language packs available" -msgstr "" +msgstr "Nenhum novo pacote de idiomas disponível" #: src/supertux/menu/addon_browse_menu.cpp:124 msgid "No new Add-ons available" -msgstr "" +msgstr "Nenhum Complemento novo disponível" #: src/supertux/menu/addon_browse_menu.cpp:127 msgid "No language packs available" -msgstr "" +msgstr "Nenhum pacote de idiomas disponível" #: src/supertux/menu/addon_browse_menu.cpp:127 msgid "No Add-ons available" -msgstr "" +msgstr "Nenhum Complemento disponível" #: src/supertux/menu/addon_browse_menu.cpp:135 #: src/supertux/menu/addon_browse_menu.cpp:139 msgid "Previous page" -msgstr "" +msgstr "Página anterior" #: src/supertux/menu/addon_browse_menu.cpp:143 #: src/supertux/menu/addon_browse_menu.cpp:147 msgid "Next page" -msgstr "" +msgstr "Próxima página" #: src/supertux/menu/addon_browse_menu.cpp:154 msgid "Check Online (disabled)" @@ -3694,7 +3694,7 @@ msgstr "Verificar Online" #: src/supertux/menu/addon_browse_menu.cpp:195 msgid "Downloading Add-On Repository Index" -msgstr "Baixando o Índice de Complementos do Repositório" +msgstr "Baixando o índice de complementos do repositório" #: src/supertux/menu/web_asset_menu.cpp:42 msgid "New files location" @@ -3702,11 +3702,11 @@ msgstr "Localização de novos arquivos" #: src/supertux/menu/web_asset_menu.cpp:43 msgid "Add Files" -msgstr "Adicionar Arquivos" +msgstr "Adicionar arquivos" #: src/supertux/menu/web_asset_menu.cpp:44 msgid "Download Files" -msgstr "Baixar Arquivos" +msgstr "Baixar arquivos" #: src/supertux/menu/particle_editor_open.cpp:32 msgid "Load particle file" @@ -3740,15 +3740,15 @@ msgstr "Tem certeza?" #: src/supertux/menu/profile_name_menu.cpp:36 #, c++-format msgid "Rename \"{}\"" -msgstr "" +msgstr "Renomear \"{}\"" #: src/supertux/menu/profile_name_menu.cpp:36 msgid "Add profile" -msgstr "" +msgstr "Adicionar perfil" #: src/supertux/menu/profile_name_menu.cpp:40 msgid "Profile names must have a maximum of 20 characters." -msgstr "" +msgstr "O nome do perfil deve ter no máximo 20 caracteres." #: src/supertux/menu/profile_name_menu.cpp:42 msgid "Create" @@ -3758,11 +3758,11 @@ msgstr "Criar" msgid "" "Profile names must have a maximum of 20 characters.\n" "Please choose a different name." -msgstr "" +msgstr "O nome do perfil deve ter no máximo 20 caracteres.\nPor favor, escolha um nome diferente." #: src/supertux/menu/profile_name_menu.cpp:77 msgid "An error occurred while creating the profile." -msgstr "" +msgstr "Ocorreu um erro ao criar o perfil." #: src/supertux/menu/keyboard_menu.cpp:36 #: src/supertux/menu/joystick_menu.cpp:71 @@ -3965,7 +3965,7 @@ msgstr "Abortar Download" msgid "" "Error:\n" "{}" -msgstr "" +msgstr "Erro:\n{}" #: src/supertux/menu/cheat_menu.cpp:38 msgid "Bonus: Star" @@ -3981,15 +3981,15 @@ msgstr "Matar Tux" #: src/supertux/menu/cheat_menu.cpp:55 msgid "Prevent Death" -msgstr "" +msgstr "Prevenir a morte" #: src/supertux/menu/addon_file_install_menu.cpp:32 msgid "Install Add-on from file" -msgstr "" +msgstr "Instalar Complemento do arquivo" #: src/supertux/menu/addon_file_install_menu.cpp:34 msgid "Drag and drop add-on ZIP archive" -msgstr "" +msgstr "Arraste e solte o arquivo ZIP do complemento" #: src/supertux/menu/particle_editor_menu.cpp:32 msgid "Particle Editor" @@ -4074,7 +4074,7 @@ msgstr "Nota do Nível" #: src/supertux/menu/editor_level_menu.cpp:38 msgid "Tileset" -msgstr "Blocos" +msgstr "Conjunto de blocos" #: src/supertux/menu/editor_level_menu.cpp:41 msgid "Target Time" @@ -4146,7 +4146,7 @@ msgstr "Editar Outro Mundo" #: src/supertux/menu/editor_menu.cpp:86 msgid "Convert all tiles in the level using converters." -msgstr "" +msgstr "Converter todos os blocos do nível usando conversores." #: src/supertux/menu/editor_menu.cpp:90 msgid "Grid Size" @@ -4158,7 +4158,7 @@ msgstr "Mostrar Grelha" #: src/supertux/menu/editor_menu.cpp:92 msgid "Grid Snapping" -msgstr "Encaixar na Grelha" +msgstr "Encaixar na grade" #: src/supertux/menu/editor_menu.cpp:93 msgid "Render Background" @@ -4178,11 +4178,11 @@ msgstr "Ativar Ajuda do Piso Automático" #: src/supertux/menu/editor_menu.cpp:97 msgid "Enable Object Undo Tracking" -msgstr "" +msgstr "Ativar rastreamento de desfazer objetos" #: src/supertux/menu/editor_menu.cpp:100 msgid "Undo Stack Size" -msgstr "" +msgstr "Desfazer tamanho da pilha" #: src/supertux/menu/editor_menu.cpp:102 msgid "Autosave Frequency" @@ -4190,21 +4190,21 @@ msgstr "Frequência de Salvamento Automático" #: src/supertux/menu/editor_menu.cpp:108 msgid "Check for Deprecated Tiles" -msgstr "" +msgstr "Verificar por blocos obsoletos" #: src/supertux/menu/editor_menu.cpp:109 msgid "Check if any deprecated tiles are currently present in the level." -msgstr "" +msgstr "Verificar se há algum bloco obsoleto presente no nível." #: src/supertux/menu/editor_menu.cpp:110 msgid "Show Deprecated Tiles" -msgstr "" +msgstr "Mostrar blocos obsoletos" #: src/supertux/menu/editor_menu.cpp:111 msgid "" "Indicate all deprecated tiles on the active tilemap, without the need of " "hovering over." -msgstr "" +msgstr "Indicar todos os blocos obsoletos no mapa de blocos ativos, sem a necessidade de passar o mouse sobre eles." #: src/supertux/menu/editor_menu.cpp:121 msgid "Exit Level Editor" @@ -4252,35 +4252,35 @@ msgid "" "Ctrl+D = Duplicate line\n" "Ctrl+Z = Undo\n" "Ctrl+Y = Redo" -msgstr "" +msgstr "Atalhos de Teclado:\n---------------------\nEsc = Abrir menu\nCtrl+S = Salvar\nCtrl+T = Testar\nCtrl+Z = Desfazer\nCtrl+Y = Refazer\nF6 = Renderizar luz\nF7 = Encaixar na grade\nF8 = Mostrar grades\nCtrl++ ou Ctrl+Scroll Up = Aumentar o zoom\nCtrl+- ou Ctrl+Scroll Down = Reduzir o zoom\nCtrl+D = Resetar zoom\n\nAtalhos de Script:\n ------------- \nHome = Ir para o início da linha\nEnd = Ir para o fim da linha\nSeta esquerda = Voltar no texto\nSeta direita = Avançar no texto\nBackspace = Excluir na frente do cursor de texto\nDelete = Excluir atrás do cursor de texto\nCtrl+X = Cortar linha inteira\nCtrl+C = Copiar linha inteira\nCtrl+V = Colar\nCtrl+D = Duplicar linha\nCtrl+Z = Desfazer\nCtrl+Y = Refazer" #: src/supertux/menu/editor_menu.cpp:232 msgid "Deprecated tiles are still present in the level." -msgstr "" +msgstr "Blocos obsoletos ainda estão presentes no nível." #: src/supertux/menu/editor_menu.cpp:239 msgid "Do you want to show all deprecated tiles on active tilemaps?" -msgstr "" +msgstr "Você quer mostrar todos os blocos obsoletos no mapa de blocos ativos?" #: src/supertux/menu/editor_menu.cpp:246 msgid "There are no more deprecated tiles in the level!" -msgstr "" +msgstr "Não há mais blocos obsoletos no nível!" #: src/supertux/menu/multiplayer_player_menu.cpp:40 msgid "Play with the keyboard" -msgstr "" +msgstr "Jogar com o teclado" #: src/supertux/menu/multiplayer_player_menu.cpp:58 msgid "Remove Player" -msgstr "" +msgstr "Remover jogador" #: src/supertux/menu/multiplayer_player_menu.cpp:82 msgid "Respawn Player" -msgstr "" +msgstr "Regerar jogador" #: src/supertux/menu/multiplayer_player_menu.cpp:108 msgid "Spawn Player" -msgstr "" +msgstr "Gerar jogador" #: src/supertux/menu/multiplayer_player_menu.cpp:136 msgid "Controllers" @@ -4290,38 +4290,38 @@ msgstr "Controladores" msgid "" "This controller does not support rumbling;\n" "please check the controllers manually." -msgstr "" +msgstr "Este controlador não possui suporte a vibrações;\nverifique os controles manualmente." #: src/supertux/menu/multiplayer_player_menu.cpp:157 msgid "" "This SuperTux build does not support rumbling\n" "controllers; please check the controllers manually." -msgstr "" +msgstr "Esta compilação do SuperTux não suporta controles\ncom vibração; verifique os controles manualmente." #: src/supertux/menu/multiplayer_player_menu.cpp:184 msgid "" "This joystick does not support rumbling;\n" "please check the joysticks manually." -msgstr "" +msgstr "Este joystick não possui suporte a vibrações;\nverifique os joysticks manualmente." #: src/supertux/menu/multiplayer_player_menu.cpp:189 msgid "" "This SuperTux build does not support rumbling\n" "joysticks; please check the joysticks manually." -msgstr "" +msgstr "Esta compilação do SuperTux não suporta joysticks\ncom vibração; verifique os joysticks manualmente." #: src/supertux/menu/editor_delete_level_menu.cpp:59 msgid "No levels available" -msgstr "" +msgstr "Nenhum nível disponível" #: src/supertux/menu/editor_delete_level_menu.cpp:79 msgid "You cannot delete the level that you are editing!" -msgstr "" +msgstr "Você não pode excluir o nível que está editando!" #: src/supertux/menu/editor_delete_level_menu.cpp:82 #, c++-format msgid "You are about to delete level \"{}\". Are you sure?" -msgstr "" +msgstr "Você está prestes a excluir o nível \"{}\". Tem certeza?" #: src/supertux/levelintro.cpp:137 #, c++-format @@ -4359,7 +4359,7 @@ msgstr "Região" #: src/supertux/main.cpp:801 #, c++-format msgid "New release: SuperTux v{}!" -msgstr "" +msgstr "Novo lançamento: SuperTux v{}!" #: src/supertux/main.cpp:804 #, c++-format @@ -4368,11 +4368,11 @@ msgid "" "For more information, you can visit the SuperTux website.\n" "\n" "Do you want to visit the website now?" -msgstr "" +msgstr "Uma nova versão do SuperTux (v{}) está disponível!\nPara mais informações, você pode visitar o site do SuperTux.\n\nVocê quer visitar o site agora?" #: src/supertux/main.cpp:815 msgid "Checking for new releases..." -msgstr "" +msgstr "Verificando por novos lançamentos..." #: src/control/joystick_config.cpp:85 msgid "Joystick Mappings" @@ -4396,7 +4396,7 @@ msgstr "Alterar ao tocar" #: src/worldmap/special_tile.hpp:36 msgid "Special Tile" -msgstr "" +msgstr "Bloco especial" #: src/worldmap/level_tile.hpp:36 src/worldmap/level_tile.cpp:161 msgid "Level" @@ -4442,7 +4442,7 @@ msgstr "Tele-transportador" msgid "" "This object's current functionality is deprecated.\n" "Updating to get its latest functionality is recommended." -msgstr "" +msgstr "A funcionalidade atual deste objeto está obsoleta.\nÉ recomendável atualizar para obter sua funcionalidade mais recente." #: src/editor/node_marker.cpp:122 msgid "Path Node" @@ -4487,15 +4487,15 @@ msgstr "Circular" #: src/editor/layers_widget.cpp:331 #, c++-format msgid "Sector: {}" -msgstr "" +msgstr "Setor: {}" #: src/editor/object_option.cpp:92 msgid "true" -msgstr "sim" +msgstr "verdadeiro" #: src/editor/object_option.cpp:92 msgid "false" -msgstr "não" +msgstr "falso" #: src/editor/object_option.cpp:308 src/editor/object_option.cpp:356 msgid "invalid" @@ -4503,19 +4503,19 @@ msgstr "inválido" #: src/editor/object_option.cpp:665 msgid "Scale X" -msgstr "" +msgstr "Escala X" #: src/editor/object_option.cpp:666 msgid "Scale Y" -msgstr "" +msgstr "Escala Y" #: src/editor/object_option.cpp:667 msgid "Offset X" -msgstr "" +msgstr "Deslocamento X" #: src/editor/object_option.cpp:668 msgid "Offset Y" -msgstr "" +msgstr "Deslocamento Y" #: src/editor/object_option.cpp:672 src/editor/object_menu.cpp:67 msgid "Remove" @@ -4531,11 +4531,11 @@ msgstr "Abrir Editor de Partículas" #: src/editor/particle_editor.cpp:114 msgid "Change texture... ->" -msgstr "" +msgstr "Alterar textura... ->" #: src/editor/particle_editor.cpp:126 msgid "Max amount" -msgstr "Quantia máxima" +msgstr "Quantidade máxima" #: src/editor/particle_editor.cpp:142 msgid "Spawn anywhere" @@ -4619,27 +4619,27 @@ msgstr "Limpar" #: src/editor/particle_editor.cpp:245 msgid "<- General settings" -msgstr "" +msgstr "<- Configurações gerais" #: src/editor/particle_editor.cpp:255 msgid "Likeliness" -msgstr "" +msgstr "Probabilidade" #: src/editor/particle_editor.cpp:266 msgid "Color (RGBA)" -msgstr "" +msgstr "Cor (RGBA)" #: src/editor/particle_editor.cpp:311 msgid "Scale (x, y)" -msgstr "" +msgstr "Escala (x, y)" #: src/editor/particle_editor.cpp:332 msgid "Hitbox scale (x, y)" -msgstr "" +msgstr "Escala de hitbox (x, y)" #: src/editor/particle_editor.cpp:353 msgid "Hitbox offset relative to scale" -msgstr "" +msgstr "Deslocamento da hitbox em relação à escala" #: src/editor/particle_editor.cpp:372 msgid "Change texture..." @@ -4660,11 +4660,11 @@ msgid "" "This level contains deprecated tiles.\n" "It is strongly recommended to replace all deprecated tiles\n" "to avoid loss of compatibility in future versions." -msgstr "" +msgstr "Este nível contém blocos obsoletos.\nÉ altamente recomendado substituir todos os blocos obsoletos\npara evitar perda de compatibilidade em versões futuras." #: src/editor/editor.cpp:579 msgid "Tip: Turn on \"Show Deprecated Tiles\" from the level editor menu." -msgstr "" +msgstr "Dica: Ative \"Mostrar blocos obsoletos\" no menu do editor de níveis." #: src/editor/editor.cpp:626 msgid "" @@ -4680,7 +4680,7 @@ msgstr "Este nível contém alterações não salvas. Gostaria de salvá-las?" #: src/editor/editor.cpp:662 msgid "This level may contain unsaved changes, do you want to save?" -msgstr "" +msgstr "Este nível pode conter alterações não salvas. Você deseja salvá-las?" #: src/editor/editor.cpp:797 msgid "" @@ -4718,7 +4718,7 @@ msgstr "Não foi possível encontrar um ponto de começo \"principal\".\nPor fav #: src/editor/object_menu.cpp:60 msgid "Patch Notes" -msgstr "" +msgstr "Notas do Patch" #: src/editor/object_menu.cpp:84 msgid "" @@ -4727,16 +4727,16 @@ msgid "" "\n" "Keep in mind this is very likely to break the proper behaviour of the object.\n" "Make sure to re-check any behaviour, related to the object." -msgstr "" +msgstr "Isso atualizará o objeto para sua funcionalidade mais recente.\nVerifique as \"Notas do Patch\" para mais informações.\n\nLembre-se de que é muito provável que isso interrompa o comportamento adequado do objeto.\nCertifique-se de verificar novamente qualquer comportamento relacionado ao objeto." #: src/editor/object_menu.cpp:98 #, c++-format msgid "Patch notes for v{}:" -msgstr "" +msgstr "Notas de patch para v{}:" #: src/editor/overlay_widget.cpp:1062 msgid "Cannot select deprecated tiles" -msgstr "" +msgstr "Não é possível selecionar blocos obsoletos." #: src/editor/overlay_widget.cpp:1567 msgid "Autotile mode is on" @@ -4832,7 +4832,7 @@ msgstr "Programação, Design de Níveis" #: data//credits.stxt:138 msgid "Graphics, Story" -msgstr "Gráficos, Estória" +msgstr "Gráficos, História" #: data//credits.stxt:144 msgid "Programming, Documentation" @@ -5146,7 +5146,7 @@ msgstr "Miscelânea" #: data//images/tiles.strf:1342 msgid "Retro Tiles" -msgstr "" +msgstr "Blocos retrô" #: data//images/worldmap.strf:24 msgid "Water paths" @@ -5162,16 +5162,16 @@ msgstr "Floresta Escura" #: data//images/converters/data.stcd:3 msgid "Nightly Tiles" -msgstr "" +msgstr "Blocos noturnos" #: data//images/converters/data.stcd:5 msgid "For levels, created in previous Nightly builds." -msgstr "" +msgstr "Para níveis criados em versões Noturnas anteriores." #: data//images/converters/data.stcd:8 msgid "Pre-0.6.3 Crystal Tiles" -msgstr "" +msgstr "Blocos de cristal pré-0.6.3" #: data//images/converters/data.stcd:10 msgid "For levels, created in pre-0.6.3 versions, which use crystal tiles." -msgstr "" +msgstr "Para níveis criados em versões anteriores à 0.6.3, que utilizam blocos de cristal." diff --git a/data/music/forest/forest_midday.music b/data/music/forest/forest_midday.music new file mode 100644 index 00000000000..32262f97744 --- /dev/null +++ b/data/music/forest/forest_midday.music @@ -0,0 +1,5 @@ +(supertux-music + (file "forest_midday.ogg") + (loop-begin 8.067) + (loop-at 112.941) +) diff --git a/data/music/forest/forest_midday.ogg b/data/music/forest/forest_midday.ogg new file mode 100644 index 00000000000..7932376d28b Binary files /dev/null and b/data/music/forest/forest_midday.ogg differ diff --git a/data/music/forest/forest_midday_alt.music b/data/music/forest/forest_midday_alt.music new file mode 100644 index 00000000000..9429d197311 --- /dev/null +++ b/data/music/forest/forest_midday_alt.music @@ -0,0 +1,5 @@ +(supertux-music + (file "forest_midday_alt.ogg") + (loop-begin 7.215) + (loop-at 101.053) +) diff --git a/data/music/forest/forest_midday_alt.ogg b/data/music/forest/forest_midday_alt.ogg new file mode 100644 index 00000000000..4cfec7458bf Binary files /dev/null and b/data/music/forest/forest_midday_alt.ogg differ diff --git a/data/scripts/default.nut b/data/scripts/default.nut index 6625a954384..9cce66f726f 100644 --- a/data/scripts/default.nut +++ b/data/scripts/default.nut @@ -3,23 +3,6 @@ * and variables you define here can be used in all threads */ -//Create Level table -Level <- { - finish=Level_finish, - has_active_sequence=Level_has_active_sequence, - spawn=Level_spawn, - spawn_transition=Level_spawn_transition, - set_start_point=Level_set_start_point, - set_start_pos=Level_set_start_pos, - set_respawn_point=Level_set_respawn_point, - set_respawn_pos=Level_set_respawn_pos, - flip_vertically=Level_flip_vertically, - toggle_pause=Level_toggle_pause, - pause_target_timer=Level_pause_target_timer, - resume_target_timer=Level_resume_target_timer -}; - - function end_level() { play_music("music/misc/leveldone.ogg"); diff --git a/external/simplesquirrel b/external/simplesquirrel new file mode 160000 index 00000000000..801de40151c --- /dev/null +++ b/external/simplesquirrel @@ -0,0 +1 @@ +Subproject commit 801de40151ca978b8554a9e590b01c398b7417c0 diff --git a/external/squirrel b/external/squirrel deleted file mode 160000 index b31e5bdc213..00000000000 --- a/external/squirrel +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b31e5bdc213359f6612e77d36bae26fa85424c56 diff --git a/mk/cmake/SuperTux/BuildCPack.cmake b/mk/cmake/SuperTux/BuildCPack.cmake index d7fc4c4cdf4..5ecc5c9fa77 100644 --- a/mk/cmake/SuperTux/BuildCPack.cmake +++ b/mk/cmake/SuperTux/BuildCPack.cmake @@ -1,7 +1,7 @@ option(DISABLE_CPACK_BUNDLING "Build an .app bundle without CPack" OFF) include(InstallRequiredSystemLibraries) -set(DIRS ${Boost_LIBRARY_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/external/squirrel ${CMAKE_CURRENT_BINARY_DIR}/external/tinygettext) +set(DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/tinygettext ${CMAKE_CURRENT_BINARY_DIR}/external/simplesquirrel) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT DISABLE_CPACK_BUNDLING) set(INFOPLIST_CFBUNDLEEXECUTABLE "SuperTux") diff --git a/mk/cmake/SuperTux/BuildDocumentation.cmake b/mk/cmake/SuperTux/BuildDocumentation.cmake index ab265f1e0b3..6c8607819d8 100644 --- a/mk/cmake/SuperTux/BuildDocumentation.cmake +++ b/mk/cmake/SuperTux/BuildDocumentation.cmake @@ -2,7 +2,7 @@ # Adapted from https://tty1.net/blog/2014/cmake-doxygen_en.html # add a target to generate API documentation with Doxygen option(BUILD_DOCUMENTATION "Build API documentation using Doxygen" ${DOXYGEN_FOUND}) -option(BUILD_SCRIPTING_DOCUMENTATION "Build scripting API documentation using Doxygen" ${DOXYGEN_FOUND}) +option(BUILD_DOCUMENTATION_WITH_SCRIPTING "Build API documentation, including scripting API, using Doxygen" OFF) # CMakeLists, including this file from a different directory, can define PROJECT_SOURCE_DIR as the path to the SuperTux source. if(NOT DEFINED PROJECT_SOURCE_DIR) @@ -10,10 +10,14 @@ if(NOT DEFINED PROJECT_SOURCE_DIR) set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) endif() -if(BUILD_DOCUMENTATION) +if(BUILD_DOCUMENTATION OR BUILD_DOCUMENTATION_WITH_SCRIPTING) find_package(Doxygen REQUIRED) - set(doxyfile_in ${PROJECT_SOURCE_DIR}/Doxyfile.in) + if(BUILD_DOCUMENTATION_WITH_SCRIPTING) + set(doxyfile_in ${PROJECT_SOURCE_DIR}/mk/doxygen/Doxyfile_scripting.in) + else() + set(doxyfile_in ${PROJECT_SOURCE_DIR}/mk/doxygen/Doxyfile.in) + endif() set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/docs/Doxyfile) configure_file(${doxyfile_in} ${doxyfile} @ONLY) @@ -25,19 +29,4 @@ if(BUILD_DOCUMENTATION) VERBATIM) endif() -if(BUILD_SCRIPTING_DOCUMENTATION) - find_package(Doxygen REQUIRED) - - set(doxyfile_in ${PROJECT_SOURCE_DIR}/mk/doxygen/Doxyfile_scripting.in) - set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/docs/scripting/Doxyfile) - - configure_file(${doxyfile_in} ${doxyfile} @ONLY) - - add_custom_target(scripting_doc - COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating scripting API documentation with Doxygen" - VERBATIM) -endif() - # EOF # diff --git a/mk/cmake/SuperTux/BuildInstall.cmake b/mk/cmake/SuperTux/BuildInstall.cmake index 8158dd44c03..ae28707251a 100644 --- a/mk/cmake/SuperTux/BuildInstall.cmake +++ b/mk/cmake/SuperTux/BuildInstall.cmake @@ -1,11 +1,15 @@ if(WIN32 AND NOT UNIX) - if(VCPKG_BUILD) - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/" DESTINATION ${INSTALL_SUBDIR_BIN} FILES_MATCHING PATTERN "*.dll") - else() - install(FILES ${DLLS} DESTINATION ${INSTALL_SUBDIR_BIN}) - endif() + install(DIRECTORY $/ + DESTINATION ${INSTALL_SUBDIR_BIN} + FILES_MATCHING PATTERN "*.dll") + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.ico + DESTINATION ".") - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.png ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.ico DESTINATION ".") + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux.bat + ${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux_portable.bat + DESTINATION ".") option(PACKAGE_VCREDIST "Package the VCREDIST libraries with the program" OFF) diff --git a/mk/cmake/SuperTux/BuildMiniswigWrapper.cmake b/mk/cmake/SuperTux/BuildMiniswigWrapper.cmake deleted file mode 100644 index 38550f1bf76..00000000000 --- a/mk/cmake/SuperTux/BuildMiniswigWrapper.cmake +++ /dev/null @@ -1,27 +0,0 @@ -option(GENERATE_WRAPPER "Build miniswig and generate the wrapper" OFF) -if(GENERATE_WRAPPER) - add_subdirectory(tools/miniswig) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.hpp - COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_CXX_COMPILER} - ARGS -x "c++" -E -CC - -DSCRIPTING_API src/scripting/wrapper.interface.hpp - -o ${CMAKE_CURRENT_BINARY_DIR}/miniswig.tmp - -I${CMAKE_CURRENT_SOURCE_DIR}/src - COMMAND tools/miniswig/miniswig - ARGS --input miniswig.tmp - --input-hpp scripting/wrapper.interface.hpp - --output-cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.cpp - --output-hpp ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.hpp - --output-hpp-include scripting/wrapper.hpp - --module supertux - --select-namespace scripting - DEPENDS tools/miniswig/miniswig - IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/src/scripting/wrapper.interface.hpp - ) - if(USE_CLANG_TIDY) - set_target_properties(miniswig PROPERTIES CXX_CLANG_TIDY "") - endif() -endif() - -# EOF # diff --git a/mk/cmake/SuperTux/ProvideSimpleSquirrel.cmake b/mk/cmake/SuperTux/ProvideSimpleSquirrel.cmake new file mode 100644 index 00000000000..8e9c413735e --- /dev/null +++ b/mk/cmake/SuperTux/ProvideSimpleSquirrel.cmake @@ -0,0 +1,14 @@ +if(EMSCRIPTEN) + set(SQ_DISABLE_INSTALLER ON) +endif() + +add_subdirectory("${CMAKE_SOURCE_DIR}/external/simplesquirrel/") + +if(MSVC) + add_library(LibSimpleSquirrel ALIAS simplesquirrel_static) +else() + add_library(LibSimpleSquirrel ALIAS simplesquirrel) +endif() + +# Set variables +set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/external/simplesquirrel/libs/squirrel) diff --git a/mk/cmake/SuperTux/ProvideSquirrel.cmake b/mk/cmake/SuperTux/ProvideSquirrel.cmake deleted file mode 100644 index 06598261908..00000000000 --- a/mk/cmake/SuperTux/ProvideSquirrel.cmake +++ /dev/null @@ -1,91 +0,0 @@ -option(USE_SYSTEM_SQUIRREL "Use preinstalled squirrel if available" ON) - -if(USE_SYSTEM_SQUIRREL) - find_package(squirrel 3.2 QUIET) -endif() - -if(TARGET squirrel::squirrel) - message(STATUS "Found preinstalled squirrel") - - add_library(LibSquirrel ALIAS squirrel::squirrel) - add_library(LibSqstdlib ALIAS squirrel::sqstdlib) -else() - if(USE_SYSTEM_SQUIRREL) - message(STATUS "Could NOT find squirrel, using external/squirrel fallback") - endif() - - if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt) - message(FATAL_ERROR "squirrel submodule is not checked out or ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt is missing") - endif() - - if(CMAKE_CROSSCOMPILING AND NOT EMSCRIPTEN) - set(SQUIRREL_MULTIARCH_DIR "${CMAKE_LIBRARY_ARCHITECTURE}/") - else() - set(SQUIRREL_MULTIARCH_DIR "") - endif() - - # Cannot build Debug version when using gcc on arm64 because an incompatible flag is being passed in - if(CMAKE_COMPILER_IS_GNUCXX AND "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64" AND "${CMAKE_BUILD_TYPE}" MATCHES "Debug") - set (BUILD_TYPE "RelWithDebInfo") - else() - set (BUILD_TYPE ${CMAKE_BUILD_TYPE}) - endif() - - set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex) - ExternalProject_Add(squirrel_project - SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/" - BUILD_BYPRODUCTS - "${SQUIRREL_PREFIX}/lib/${SQUIRREL_MULTIARCH_DIR}${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${SQUIRREL_PREFIX}/lib/${SQUIRREL_MULTIARCH_DIR}${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}" - CMAKE_ARGS - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} - -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} - -DCMAKE_INSTALL_LIBDIR=lib - -DINSTALL_INC_DIR=include - -DCMAKE_POSITION_INDEPENDENT_CODE=ON) - - if(WIN32) - add_library(LibSquirrel SHARED IMPORTED) - set_target_properties(LibSquirrel PROPERTIES - IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}" - IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/squirrel${CMAKE_LINK_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${SQUIRREL_PREFIX}/include") - - add_library(LibSqstdlib SHARED IMPORTED) - set_target_properties(LibSqstdlib PROPERTIES - IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}" - IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/sqstdlib${CMAKE_LINK_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${SQUIRREL_PREFIX}/include") - - #For debug run purposes - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux.bat.in" "${CMAKE_CURRENT_BINARY_DIR}/run_supertux.bat") - else() - add_library(LibSquirrel STATIC IMPORTED) - set_target_properties(LibSquirrel PROPERTIES - IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${SQUIRREL_MULTIARCH_DIR}${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${SQUIRREL_PREFIX}/include") - - add_library(LibSqstdlib STATIC IMPORTED) - set_target_properties(LibSqstdlib PROPERTIES - IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${SQUIRREL_MULTIARCH_DIR}${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${SQUIRREL_PREFIX}/include") - endif() - - # Pre-create directory so that cmake doesn't complain about its non-existance - file(MAKE_DIRECTORY ${SQUIRREL_PREFIX}/include) - - add_dependencies(LibSquirrel squirrel_project) - add_dependencies(LibSqstdlib squirrel_project) - - if(WIN32) - get_property(SQUIRREL_LIB_PATH TARGET LibSquirrel PROPERTY IMPORTED_LOCATION) - get_property(SQSTDLIB_LIB_PATH TARGET LibSqstdlib PROPERTY IMPORTED_LOCATION) - install(FILES ${SQUIRREL_LIB_PATH} ${SQSTDLIB_LIB_PATH} DESTINATION "${INSTALL_SUBDIR_BIN}") - endif() -endif() - -# EOF # diff --git a/mk/cmake/SuperTux/WarningFlags.cmake b/mk/cmake/SuperTux/WarningFlags.cmake index a36165116b1..2ee2773d49c 100644 --- a/mk/cmake/SuperTux/WarningFlags.cmake +++ b/mk/cmake/SuperTux/WarningFlags.cmake @@ -59,6 +59,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") # flags that we deliberately ignore "-Wno-unused-parameter " + "-Wno-unused-template " "-Wno-c++98-compat " "-Wno-c++98-compat-pedantic " "-Wno-float-equal " diff --git a/Doxyfile.in b/mk/doxygen/Doxyfile.in similarity index 99% rename from Doxyfile.in rename to mk/doxygen/Doxyfile.in index 8ce41f6596f..5e71fef254a 100644 --- a/Doxyfile.in +++ b/mk/doxygen/Doxyfile.in @@ -238,7 +238,8 @@ TAB_SIZE = 8 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES += "scripting=\xrefitem scripting \"Scripting\" \"Scripting\"" +ALIASES += "description=\xrefitem description \"Description\" \"Description\"" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/mk/doxygen/Doxyfile_scripting.in b/mk/doxygen/Doxyfile_scripting.in index 0c5b588a2b1..e29aff5b64e 100644 --- a/mk/doxygen/Doxyfile_scripting.in +++ b/mk/doxygen/Doxyfile_scripting.in @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = docs/scripting/doxygen +OUTPUT_DIRECTORY = docs/doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/src/scripting +STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/src # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -238,9 +238,12 @@ TAB_SIZE = 8 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. +ALIASES += "scripting=\xrefitem scripting \"Scripting\" \"Scripting\"" ALIASES += "summary=\xrefitem summary \"Summary\" \"Summary\"" ALIASES += "instances=\xrefitem instances \"Instances\" \"Instances\"" ALIASES += "constants=\xrefitem constants \"Constants\" \"Constants\"" +ALIASES += "description=\xrefitem description \"Description\" \"Description\"" +ALIASES += "prefix=\xrefitem prefix \"Prefix\" \"Prefix\"" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" @@ -793,7 +796,7 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = @doxy_main_page@ \ - @PROJECT_SOURCE_DIR@/src/scripting + @PROJECT_SOURCE_DIR@/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -852,8 +855,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = @PROJECT_SOURCE_DIR@/src/scripting/wrapper.* \ - @PROJECT_SOURCE_DIR@/src/scripting/game_object.* +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/mk/msvc/run_supertux.bat b/mk/msvc/run_supertux.bat new file mode 100644 index 00000000000..76b1744e4fd --- /dev/null +++ b/mk/msvc/run_supertux.bat @@ -0,0 +1,2 @@ +@echo off +start "" "%~dp0\bin\supertux2.exe" %* diff --git a/mk/msvc/run_supertux.bat.in b/mk/msvc/run_supertux.bat.in deleted file mode 100644 index b3a1025f5c7..00000000000 --- a/mk/msvc/run_supertux.bat.in +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -set PATH=@SQUIRREL_PREFIX@\bin;@PHYSFS_PREFIX@\bin;@DEPENDENCY_FOLDER@\dll;%PATH% - -start supertux2.exe %* \ No newline at end of file diff --git a/mk/msvc/run_supertux_portable.bat b/mk/msvc/run_supertux_portable.bat new file mode 100644 index 00000000000..2e992cb9f3e --- /dev/null +++ b/mk/msvc/run_supertux_portable.bat @@ -0,0 +1,3 @@ +@echo off +set "SUPERTUX2_USER_DIR=%~dp0\user\" +start "" "%~dp0\bin\supertux2.exe" %* diff --git a/src/badguy/angrystone.hpp b/src/badguy/angrystone.hpp index f5470e0aab1..fec61367164 100644 --- a/src/badguy/angrystone.hpp +++ b/src/badguy/angrystone.hpp @@ -38,6 +38,7 @@ class AngryStone final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Angry Stone"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(AngryStone)); } protected: virtual std::vector get_allowed_directions() const override; diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 131050fff93..a3ee560d57c 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -16,6 +16,9 @@ #include "badguy/badguy.hpp" +#include +#include + #include "audio/sound_manager.hpp" #include "badguy/dispenser.hpp" #include "editor/editor.hpp" @@ -50,7 +53,6 @@ BadGuy::BadGuy(const Vector& pos, const std::string& sprite_name, int layer, BadGuy::BadGuy(const Vector& pos, Direction direction, const std::string& sprite_name, int layer, const std::string& light_sprite_name, const std::string& ice_sprite_name) : MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED), - ExposedObject(this), m_physic(), m_countMe(true), m_is_initialized(false), @@ -94,7 +96,6 @@ BadGuy::BadGuy(const ReaderMapping& reader, const std::string& sprite_name, Direction default_direction, int layer, const std::string& light_sprite_name, const std::string& ice_sprite_name) : MovingSprite(reader, sprite_name, layer, COLGROUP_DISABLED), - ExposedObject(this), m_physic(), m_countMe(true), m_is_initialized(false), @@ -220,7 +221,7 @@ BadGuy::update(float dt_sec) } // Deactivate badguy, if off-screen and not falling down. - if (m_is_active_flag && is_offscreen() && m_physic.get_velocity_y() <= 0.f) + if (m_is_active_flag && is_offscreen() && m_physic.get_velocity_y() <= 0.f && !always_active()) { deactivate(); set_state(STATE_INACTIVE); @@ -1200,4 +1201,14 @@ BadGuy::add_wind_velocity(const Vector& velocity, const Vector& end_speed) m_physic.set_velocity_y(std::max(m_physic.get_velocity_y() + velocity.y, end_speed.y)); } + +void +BadGuy::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("BadGuy", vm.findClass("MovingSprite")); + + cls.addFunc("kill", &BadGuy::kill_fall); + cls.addFunc("ignite", &BadGuy::ignite); +} + /* EOF */ diff --git a/src/badguy/badguy.hpp b/src/badguy/badguy.hpp index a3a3d9fc078..9973086c8be 100644 --- a/src/badguy/badguy.hpp +++ b/src/badguy/badguy.hpp @@ -20,8 +20,6 @@ #include "editor/object_option.hpp" #include "object/moving_sprite.hpp" #include "object/portable.hpp" -#include "scripting/badguy.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/physic.hpp" #include "supertux/timer.hpp" @@ -29,11 +27,20 @@ enum class Direction; class Player; class Bullet; -/** Base class for moving sprites that can hurt the Player. */ +/** + * Base class for moving sprites that can hurt the Player. + + * @scripting + * @summary A ""BadGuy"" that was given a name can be controlled by scripts. + * @instances A ""BadGuy"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ class BadGuy : public MovingSprite, - public ExposedObject, public Portable { +public: + static void register_class(ssq::VM& vm); + public: BadGuy(const Vector& pos, const std::string& sprite_name, int layer = LAYER_OBJECTS, const std::string& light_sprite_name = "images/objects/lightmap_light/lightmap_light-medium.sprite", @@ -58,8 +65,10 @@ class BadGuy : public MovingSprite, static std::string class_name() { return "badguy"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "BadGuy"; } static std::string display_name() { return _("Badguy"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Portable)).add(typeid(BadGuy)); } virtual std::string get_overlay_size() const { return "1x1"; } @@ -78,6 +87,13 @@ class BadGuy : public MovingSprite, /** Set the badguy to kill/falling state, which makes him falling of the screen (his sprite is turned upside-down) */ virtual void kill_fall(); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @description Sets the badguy to kill/falling state, which makes it fall of the screen (its sprite is turned upside-down). + */ + void kill(); +#endif /** Call this, if you use custom kill_fall() or kill_squashed(GameObject& object) */ virtual void run_dead_script(); @@ -93,7 +109,10 @@ class BadGuy : public MovingSprite, virtual void ungrab(MovingObject& object, Direction dir) override; virtual bool is_portable() const override; - /** Called when hit by a fire bullet, and is_flammable() returns true */ + /** + * @scripting + * @description Kills the badguy by igniting it. + */ virtual void ignite(); /** Called to revert a badguy when is_ignited() returns true */ @@ -121,6 +140,8 @@ class BadGuy : public MovingSprite, Returns false if enemy is spiky or too large */ virtual bool is_snipable() const { return false; } + virtual bool always_active() const { return false; } + bool is_frozen() const; bool is_in_water() const; diff --git a/src/badguy/bomb.hpp b/src/badguy/bomb.hpp index 5b4b9e24e91..642914d57f7 100644 --- a/src/badguy/bomb.hpp +++ b/src/badguy/bomb.hpp @@ -25,6 +25,7 @@ class Bomb final : public BadGuy { public: Bomb(const Vector& pos, Direction dir, const std::string& custom_sprite = "images/creatures/mr_bomb/bomb.sprite" ); + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Bomb)); } virtual bool is_saveable() const override { return false; } diff --git a/src/badguy/boss.cpp b/src/badguy/boss.cpp new file mode 100644 index 00000000000..c31c3bad07f --- /dev/null +++ b/src/badguy/boss.cpp @@ -0,0 +1,93 @@ +// SuperTux +// Copyright (C) 2024 Daniel Ward +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +namespace +{ + const int DEFAULT_LIVES = 5; // default lives + const int DEFAULT_PINCH_LIVES = 2; // default pinch lives +} + +#include "badguy/boss.hpp" + +#include "object/player.hpp" +#include "sprite/sprite.hpp" +#include "supertux/sector.hpp" +#include "util/reader_mapping.hpp" +#include "video/surface.hpp" + +Boss::Boss(const ReaderMapping& reader, const std::string& sprite_name, int layer) : + BadGuy(reader, sprite_name, layer), + m_lives(), + m_pinch_lives(), + m_hud_head(), + m_hud_icon(), + m_pinch_mode(), + m_pinch_activation_script() +{ + reader.get("lives", m_lives, DEFAULT_LIVES); + reader.get("pinch-lives", m_pinch_lives, DEFAULT_PINCH_LIVES); + m_countMe = true; + + reader.get("pinch-activation-script", m_pinch_activation_script, ""); +} + +void +Boss::boss_update(float dt_sec) +{ + if (!m_pinch_mode && (m_lives <= m_pinch_lives)) + { + m_pinch_mode = true; + Sector::get().run_script(m_pinch_activation_script, "pinch-activation-script"); + } +} + +void +Boss::draw(DrawingContext& context) +{ + draw_hit_points(context); + BadGuy::draw(context); +} + +void +Boss::draw_hit_points(DrawingContext& context) +{ + if (m_hud_head) + { + context.push_transform(); + context.set_translation(Vector(0, 0)); + context.transform().scale = 1.f; + + for (int i = 0; i < m_lives; ++i) + { + context.color().draw_surface(m_hud_head, Vector(BORDER_X + (static_cast(i * m_hud_head->get_width())), BORDER_Y + 1), LAYER_HUD); + } + + context.pop_transform(); + } +} + +ObjectSettings +Boss::get_settings() +{ + ObjectSettings result = BadGuy::get_settings(); + + result.add_text("hud-icon", &m_hud_icon, "hud-icon", "images/creatures/yeti/hudlife.png", OPTION_HIDDEN); + result.add_int(_("Lives"), &m_lives, "lives", DEFAULT_LIVES); + result.add_int(_("Lives to Pinch Mode"), &m_pinch_lives, "pinch-lives", DEFAULT_PINCH_LIVES); + result.add_script(_("Pinch Mode Activation Script"), &m_pinch_activation_script, "pinch-activation-script"); + + return result; +} diff --git a/src/badguy/boss.hpp b/src/badguy/boss.hpp new file mode 100644 index 00000000000..2a891de106f --- /dev/null +++ b/src/badguy/boss.hpp @@ -0,0 +1,53 @@ +// SuperTux +// Copyright (C) 2024 Daniel Ward +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_BADGUY_BOSS_HPP +#define HEADER_SUPERTUX_BADGUY_BOSS_HPP + +#include "badguy/badguy.hpp" + +// This is a class for our (currently two) bosses, but can apply to future ones also. +// Includes information on lives, HUD, pinch mode activation, and death behavior. + +class Boss : public BadGuy +{ +public: + Boss(const ReaderMapping& mapping, const std::string& sprite_name, int layer = LAYER_OBJECTS); + virtual void boss_update(float dt_sec); + virtual void draw(DrawingContext& context) override; + void draw_hit_points(DrawingContext& context); + virtual ObjectSettings get_settings() override; + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Boss)); } + + virtual bool is_flammable() const override { return false; } + virtual bool is_freezable() const override { return false; } + +protected: + int m_lives; + int m_pinch_lives; + SurfacePtr m_hud_head; + std::string m_hud_icon; + bool m_pinch_mode; + std::string m_pinch_activation_script; + +private: + Boss(const Boss&) = delete; + Boss& operator=(const Boss&) = delete; +}; + +#endif + +/* EOF */ diff --git a/src/badguy/bouncing_snowball.cpp b/src/badguy/bouncing_snowball.cpp index 22d237cac37..143468720d4 100644 --- a/src/badguy/bouncing_snowball.cpp +++ b/src/badguy/bouncing_snowball.cpp @@ -26,16 +26,28 @@ static const float BSNOWBALL_WALKSPEED = 80; BouncingSnowball::BouncingSnowball(const ReaderMapping& reader) : BadGuy(reader, "images/creatures/bouncing_snowball/bouncing_snowball.sprite"), + m_x_speed(), m_turn_around_timer(), m_turn_around_counter() { + m_x_speed = BSNOWBALL_WALKSPEED; parse_type(reader); } +BouncingSnowball::BouncingSnowball(const Vector& pos, Direction d, float x_vel) : + BadGuy(pos, d, "images/creatures/bouncing_snowball/bouncing_snowball.sprite"), + m_x_speed(), + m_turn_around_timer(), + m_turn_around_counter() +{ + m_countMe = false; + m_x_speed = x_vel; +} + void BouncingSnowball::initialize() { - m_physic.set_velocity_x(m_dir == Direction::LEFT ? -BSNOWBALL_WALKSPEED : BSNOWBALL_WALKSPEED); + m_physic.set_velocity_x(m_dir == Direction::LEFT ? -m_x_speed : m_x_speed); set_action(m_dir); } @@ -51,8 +63,10 @@ BouncingSnowball::active_update(float dt_sec) set_action(m_dir); } Rectf lookbelow = get_bbox(); - lookbelow.set_bottom(lookbelow.get_bottom() + 48); - lookbelow.set_top(lookbelow.get_top() + 31); + lookbelow.set_bottom(get_bbox().get_bottom() + 48); + lookbelow.set_left(get_bbox().get_left() + 10); + lookbelow.set_right(get_bbox().get_right() - 10); + lookbelow.set_top(get_bbox().get_top() + 31); bool groundBelow = !Sector::get().is_free_of_statics(lookbelow); if (groundBelow && (m_physic.get_velocity_y() >= 64.0f)) { diff --git a/src/badguy/bouncing_snowball.hpp b/src/badguy/bouncing_snowball.hpp index cdf3f5f0465..aec140bb9d2 100644 --- a/src/badguy/bouncing_snowball.hpp +++ b/src/badguy/bouncing_snowball.hpp @@ -23,6 +23,7 @@ class BouncingSnowball final : public BadGuy { public: BouncingSnowball(const ReaderMapping& reader); + BouncingSnowball(const Vector& pos, Direction d, float x_vel = 80); virtual void initialize() override; @@ -38,6 +39,7 @@ class BouncingSnowball final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Bouncing Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(BouncingSnowball)); } virtual GameObjectTypes get_types() const override; virtual std::string get_default_sprite_name() const override; @@ -56,6 +58,7 @@ class BouncingSnowball final : public BadGuy FATBAT }; + float m_x_speed; Timer m_turn_around_timer; int m_turn_around_counter; /**< Counts number of turns since turn_around_timer was started */ diff --git a/src/badguy/captainsnowball.hpp b/src/badguy/captainsnowball.hpp index 9a295ef56aa..70cde6961e5 100644 --- a/src/badguy/captainsnowball.hpp +++ b/src/badguy/captainsnowball.hpp @@ -31,6 +31,7 @@ class CaptainSnowball final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Captain Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(CaptainSnowball)); } virtual bool is_snipable() const override { return true; } bool might_climb(int width, int height) const; diff --git a/src/badguy/corrupted_granito.hpp b/src/badguy/corrupted_granito.hpp index fcd266f901b..977caa7848a 100644 --- a/src/badguy/corrupted_granito.hpp +++ b/src/badguy/corrupted_granito.hpp @@ -43,6 +43,7 @@ class CorruptedGranito final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Corrupted Granito"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(CorruptedGranito)); } virtual bool is_snipable() const override { return true; } virtual bool is_flammable() const override { return m_type != GRANITO; } diff --git a/src/badguy/corrupted_granito_big.hpp b/src/badguy/corrupted_granito_big.hpp index e007e35d8a4..c1723a54fd4 100644 --- a/src/badguy/corrupted_granito_big.hpp +++ b/src/badguy/corrupted_granito_big.hpp @@ -34,6 +34,7 @@ class CorruptedGranitoBig final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Corrupted Big Granito"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(CorruptedGranitoBig)); } virtual bool is_snipable() const override { return false; } virtual bool is_freezable() const override { return false; } diff --git a/src/badguy/crusher.hpp b/src/badguy/crusher.hpp index ad186509d29..a0dd52a3c91 100644 --- a/src/badguy/crusher.hpp +++ b/src/badguy/crusher.hpp @@ -70,6 +70,7 @@ class Crusher final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Crusher"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Crusher)); } virtual ObjectSettings get_settings() override; GameObjectTypes get_types() const override; @@ -115,6 +116,7 @@ class CrusherRoot : public MovingSprite { public: CrusherRoot(Vector position, Crusher::Direction direction, float delay, int layer); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(CrusherRoot)); } virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; virtual void update(float dt_sec) override; diff --git a/src/badguy/crystallo.hpp b/src/badguy/crystallo.hpp index 7389f646060..00913e7362e 100644 --- a/src/badguy/crystallo.hpp +++ b/src/badguy/crystallo.hpp @@ -32,6 +32,7 @@ class Crystallo final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Crystallo"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Crystallo)); } virtual void active_update(float dt_sec) override; virtual bool is_flammable() const override; diff --git a/src/badguy/dart.hpp b/src/badguy/dart.hpp index ae3ba35d909..e5cfc99bb58 100644 --- a/src/badguy/dart.hpp +++ b/src/badguy/dart.hpp @@ -43,6 +43,7 @@ class Dart final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Dart"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Dart)); } virtual bool is_flammable() const override; diff --git a/src/badguy/darttrap.cpp b/src/badguy/darttrap.cpp index 09a23b63417..a19c756a006 100644 --- a/src/badguy/darttrap.cpp +++ b/src/badguy/darttrap.cpp @@ -49,7 +49,7 @@ DartTrap::DartTrap(const ReaderMapping& reader) : SoundManager::current()->preload("sounds/dartfire.wav"); if (m_start_dir == Direction::AUTO) { log_warning << "Setting a DartTrap's direction to AUTO is no good idea" << std::endl; } m_state = IDLE; - set_colgroup_active(COLGROUP_DISABLED); + set_group(COLGROUP_DISABLED); if (!Editor::is_active()) { if (m_initial_delay == 0) m_initial_delay = 0.1f; diff --git a/src/badguy/darttrap.hpp b/src/badguy/darttrap.hpp index 42bab088aa4..69ffb1aaca9 100644 --- a/src/badguy/darttrap.hpp +++ b/src/badguy/darttrap.hpp @@ -34,6 +34,7 @@ class DartTrap final : public StickyBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Dart Trap"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyBadguy::get_class_types().add(typeid(DartTrap)); } virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index d160789f8b2..71efb37dc0a 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -16,6 +16,9 @@ #include "badguy/dispenser.hpp" +#include +#include + #include "audio/sound_manager.hpp" #include "editor/editor.hpp" #include "math/random.hpp" @@ -30,7 +33,6 @@ Dispenser::Dispenser(const ReaderMapping& reader) : BadGuy(reader, "images/creatures/dispenser/dropper.sprite", LAYER_OBJECTS + 5), - ExposedObject(this), m_cycle(), m_objects(), m_next_object(0), @@ -461,4 +463,14 @@ Dispenser::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } + +void +Dispenser::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Dispenser", vm.findClass("BadGuy")); + + cls.addFunc("activate", &Dispenser::activate); + cls.addFunc("deactivate", &Dispenser::deactivate); +} + /* EOF */ diff --git a/src/badguy/dispenser.hpp b/src/badguy/dispenser.hpp index 53adda7f61c..b5d6dedb4ca 100644 --- a/src/badguy/dispenser.hpp +++ b/src/badguy/dispenser.hpp @@ -18,14 +18,20 @@ #define HEADER_SUPERTUX_BADGUY_DISPENSER_HPP #include "badguy/badguy.hpp" -#include "scripting/dispenser.hpp" -#include "squirrel/exposed_object.hpp" class GameObject; -class Dispenser final : public BadGuy, - public ExposedObject +/** + * @scripting + * @summary A ""Dispenser"" that was given a name can be controlled by scripts. + * @instances A ""Dispenser"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Dispenser final : public BadGuy { +public: + static void register_class(ssq::VM& vm); + private: enum DispenserType { DROPPER, CANNON, POINT, GRANITO @@ -36,7 +42,15 @@ class Dispenser final : public BadGuy, virtual void draw(DrawingContext& context) override; virtual void initialize() override; + /** + * @scripting + * @description Makes the dispenser start dispensing badguys. + */ virtual void activate() override; + /** + * @scripting + * @description Stops the dispenser from dispensing badguys. + */ virtual void deactivate() override; virtual void active_update(float dt_sec) override; @@ -45,12 +59,15 @@ class Dispenser final : public BadGuy, virtual void unfreeze(bool melt = true) override; virtual bool is_freezable() const override; virtual bool is_flammable() const override; + virtual bool always_active() const override { return true; } virtual bool is_portable() const override; static std::string class_name() { return "dispenser"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Dispenser"; } static std::string display_name() { return _("Dispenser"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Dispenser)); } virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; @@ -60,16 +77,6 @@ class Dispenser final : public BadGuy, virtual void after_editor_set() override; - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override - { - ExposedObject::expose(vm, table_idx); - } - - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override - { - ExposedObject::unexpose(vm, table_idx); - } - void notify_dead() { if (m_limit_dispensed_badguys) { m_current_badguys--; diff --git a/src/badguy/dive_mine.hpp b/src/badguy/dive_mine.hpp index 7e71dec6cb1..bb4c122d583 100644 --- a/src/badguy/dive_mine.hpp +++ b/src/badguy/dive_mine.hpp @@ -49,6 +49,7 @@ class DiveMine final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Dive Mine"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(DiveMine)); } protected: virtual std::vector get_allowed_directions() const override; diff --git a/src/badguy/fish_chasing.hpp b/src/badguy/fish_chasing.hpp index a7ce8661e9c..0dcfbe7d310 100644 --- a/src/badguy/fish_chasing.hpp +++ b/src/badguy/fish_chasing.hpp @@ -33,6 +33,7 @@ class FishChasing final : public FishSwimming static std::string display_name() { return _("Chasing Fish"); } virtual std::string get_display_name() const override { return display_name(); } virtual std::string get_overlay_size() const override { return "2x2"; } + virtual GameObjectClasses get_class_types() const override { return FishSwimming::get_class_types().add(typeid(FishChasing)); } virtual ObjectSettings get_settings() override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/fish_harmless.hpp b/src/badguy/fish_harmless.hpp index 58895c3954e..fd1f777cede 100644 --- a/src/badguy/fish_harmless.hpp +++ b/src/badguy/fish_harmless.hpp @@ -29,6 +29,7 @@ class FishHarmless final : public FishSwimming virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Harmless Fish"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return FishSwimming::get_class_types().add(typeid(FishHarmless)); } virtual std::string get_overlay_size() const override { return "1x1"; } GameObjectTypes get_types() const override { return {}; } diff --git a/src/badguy/fish_jumping.hpp b/src/badguy/fish_jumping.hpp index ed97fe28182..99cf62ea851 100644 --- a/src/badguy/fish_jumping.hpp +++ b/src/badguy/fish_jumping.hpp @@ -40,6 +40,7 @@ class FishJumping final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Jumping Fish"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(FishJumping)); } protected: virtual std::vector get_allowed_directions() const override; diff --git a/src/badguy/fish_swimming.hpp b/src/badguy/fish_swimming.hpp index 5b9efe76c41..cecce233060 100644 --- a/src/badguy/fish_swimming.hpp +++ b/src/badguy/fish_swimming.hpp @@ -40,6 +40,7 @@ class FishSwimming : public BadGuy static std::string display_name() { return _("Swimming Fish"); } virtual std::string get_display_name() const override { return display_name(); } virtual std::string get_overlay_size() const override { return "2x1"; } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(FishSwimming)); } virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; diff --git a/src/badguy/flame.hpp b/src/badguy/flame.hpp index f1dcce809c0..0b4f10aab0e 100644 --- a/src/badguy/flame.hpp +++ b/src/badguy/flame.hpp @@ -46,6 +46,7 @@ class Flame final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Flame"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Flame)); } virtual void stop_looping_sounds() override; virtual void play_looping_sounds() override; diff --git a/src/badguy/flyingsnowball.hpp b/src/badguy/flyingsnowball.hpp index 6665ce29ab6..206b9084f73 100644 --- a/src/badguy/flyingsnowball.hpp +++ b/src/badguy/flyingsnowball.hpp @@ -32,6 +32,7 @@ class FlyingSnowBall final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Flying Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(FlyingSnowBall)); } virtual bool is_snipable() const override { return true; } protected: diff --git a/src/badguy/ghosttree.cpp b/src/badguy/ghosttree.cpp index b74b3b60725..c777ddaed45 100644 --- a/src/badguy/ghosttree.cpp +++ b/src/badguy/ghosttree.cpp @@ -29,6 +29,8 @@ #include "sprite/sprite_manager.hpp" #include "supertux/flip_level_transformer.hpp" #include "supertux/sector.hpp" +#include "util/reader_mapping.hpp" +#include "video/surface.hpp" static const size_t WILLOWISP_COUNT = 10; static const float WILLOWISP_TOP_OFFSET = -64; @@ -36,7 +38,7 @@ static const Vector SUCK_TARGET_OFFSET = Vector(-16,-16); static const float SUCK_TARGET_SPREAD = 8; GhostTree::GhostTree(const ReaderMapping& mapping) : - BadGuy(mapping, "images/creatures/ghosttree/ghosttree.sprite", LAYER_OBJECTS - 10), + Boss(mapping, "images/creatures/ghosttree/ghosttree.sprite", LAYER_OBJECTS - 10), mystate(STATE_IDLE), willowisp_timer(), willo_spawn_y(0), @@ -49,9 +51,13 @@ GhostTree::GhostTree(const ReaderMapping& mapping) : root_timer(), treecolor(0), suck_lantern_color(), + m_taking_life(), suck_lantern(nullptr), willowisps() { + mapping.get("hud-icon", m_hud_icon, "images/creatures/ghosttree/hudlife.png"); + m_hud_head = Surface::from_file(m_hud_icon); + set_colgroup_active(COLGROUP_TOUCHABLE); SoundManager::current()->preload("sounds/tree_howling.ogg"); SoundManager::current()->preload("sounds/tree_suck.ogg"); @@ -60,14 +66,17 @@ GhostTree::GhostTree(const ReaderMapping& mapping) : void GhostTree::die() { - mystate = STATE_DYING; - set_action("dying", 1); - glow_sprite->set_action("dying", 1); for (const auto& willo : willowisps) { willo->vanish(); } - run_dead_script(); + + if (m_lives <= 0) { + mystate = STATE_DYING; + set_action("dying", 1); + glow_sprite->set_action("dying", 1); + run_dead_script(); + } } void @@ -79,9 +88,12 @@ GhostTree::activate() } void -GhostTree::active_update(float /*dt_sec*/) +GhostTree::active_update(float dt_sec) { + Boss::boss_update(dt_sec); + if (mystate == STATE_IDLE) { + m_taking_life = false; if (colorchange_timer.check()) { SoundManager::current()->play("sounds/tree_howling.ogg", get_pos()); suck_timer.start(3); @@ -180,8 +192,13 @@ GhostTree::active_update(float /*dt_sec*/) // Wait until the lantern is swallowed completely. if (m_sprite->animation_done()) { if (is_color_deadly(suck_lantern_color)) { + if (!m_taking_life) { + m_lives--; + m_taking_life = true; + } die(); - } else { + } + if (m_lives > 0) { set_action("normal"); mystate = STATE_IDLE; spawn_lantern(); @@ -215,7 +232,7 @@ GhostTree::willowisp_died(TreeWillOWisp* willowisp) void GhostTree::draw(DrawingContext& context) { - BadGuy::draw(context); + Boss::draw(context); context.push_transform(); if (mystate == STATE_SUCKING) { diff --git a/src/badguy/ghosttree.hpp b/src/badguy/ghosttree.hpp index caad21d9ca9..cd900f1de69 100644 --- a/src/badguy/ghosttree.hpp +++ b/src/badguy/ghosttree.hpp @@ -17,18 +17,16 @@ #ifndef HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP #define HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP -#include "badguy/badguy.hpp" +#include "badguy/boss.hpp" class TreeWillOWisp; class Lantern; -class GhostTree final : public BadGuy +class GhostTree final : public Boss { public: GhostTree(const ReaderMapping& mapping); - virtual bool is_flammable() const override { return false; } - virtual bool is_freezable() const override { return false; } virtual void kill_fall() override { } virtual void activate() override; @@ -42,6 +40,7 @@ class GhostTree final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Ghost Tree"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Boss::get_class_types().add(typeid(GhostTree)); } virtual void on_flip(float height) override; @@ -75,6 +74,8 @@ class GhostTree final : public BadGuy int treecolor; Color suck_lantern_color; + bool m_taking_life; + Lantern* suck_lantern; /**< Lantern that is currently being sucked in */ std::vector willowisps; diff --git a/src/badguy/ghoul.hpp b/src/badguy/ghoul.hpp index 4227a902d57..65d01c1af9a 100644 --- a/src/badguy/ghoul.hpp +++ b/src/badguy/ghoul.hpp @@ -30,6 +30,7 @@ class Ghoul final : public BadGuy, static std::string display_name() { return _("Ghoul"); } std::string get_class_name() const override { return class_name(); } std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(PathObject)).add(typeid(Ghoul)); } bool is_freezable() const override; bool is_flammable() const override; virtual bool is_snipable() const override { return true; } diff --git a/src/badguy/goldbomb.hpp b/src/badguy/goldbomb.hpp index c9e56f0d2a2..f33ef1bfa29 100644 --- a/src/badguy/goldbomb.hpp +++ b/src/badguy/goldbomb.hpp @@ -49,6 +49,7 @@ class GoldBomb final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Gold Bomb"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(GoldBomb)); } virtual bool is_snipable() const override { return true; } virtual void stop_looping_sounds() override; diff --git a/src/badguy/granito.cpp b/src/badguy/granito.cpp index 72faf257910..5c84edaca81 100644 --- a/src/badguy/granito.cpp +++ b/src/badguy/granito.cpp @@ -20,6 +20,7 @@ #include "math/random.hpp" #include "object/player.hpp" #include "supertux/sector.hpp" +#include "util/reader_mapping.hpp" Granito::Granito(const ReaderMapping& reader, const std::string& sprite_name, int layer) : WalkingBadguy(reader, sprite_name, "left", "right", layer), @@ -28,7 +29,9 @@ Granito::Granito(const ReaderMapping& reader, const std::string& sprite_name, in m_original_state(STATE_STAND), m_has_waved(false), m_stepped_on(false), - m_airborne(false) + m_airborne(false), + m_detect_script(), + m_carried_script() { parse_type(reader); @@ -39,6 +42,9 @@ Granito::Granito(const ReaderMapping& reader, const std::string& sprite_name, in set_colgroup_active(COLGROUP_MOVING_STATIC); m_col.set_unisolid(true); + + reader.get("detect-script", m_detect_script); + reader.get("carried-script", m_carried_script); } void @@ -122,8 +128,13 @@ Granito::active_update(float dt_sec) return; } - // Only called, when timer has finished - if (!m_walk_interval.started() && !m_walk_interval.check()) + if (m_type == SCRIPTABLE && m_walk_interval.check()) + { + stand(); + } + + // Only called when timer has finished + else if (m_type != SCRIPTABLE && !m_walk_interval.started() && !m_walk_interval.check()) { m_walk_interval.start(gameRandom.randf(1.f, 4.f)); @@ -133,8 +144,7 @@ Granito::active_update(float dt_sec) if (gameRandom.rand(100) > 50) { // Turn around - m_dir = m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT; - set_action("stand", m_dir); + turn(m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT); } break; @@ -144,28 +154,19 @@ Granito::active_update(float dt_sec) if (gameRandom.rand(100) > 50 && walk_speed == 0) { // Turn around - m_dir = m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT; - set_action("stand", m_dir); + turn(m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT); } else { // Walk/stop if (walk_speed > 0) { - walk_speed = 0; - m_state = STATE_STAND; - m_original_state = STATE_STAND; - m_physic.set_velocity_x(0); - set_action("stand", m_dir); + stand(); } else { - m_dir = (gameRandom.rand(2) == 0 ? Direction::LEFT : Direction::RIGHT); - walk_speed = 80; - m_state = STATE_WALK; - m_original_state = STATE_WALK; - m_physic.set_velocity_x(80 * (m_dir == Direction::LEFT ? -1 : 1)); - set_action(m_dir); + turn(m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT); + walk(); } } @@ -185,7 +186,7 @@ Granito::active_update(float dt_sec) HitResponse Granito::collision_player(Player& player, const CollisionHit& hit) { - if (m_state == STATE_SIT || m_type == WALK) return FORCE_MOVE; + if (m_state == STATE_SIT || m_type == WALK || m_type == SCRIPTABLE) return FORCE_MOVE; if (hit.top) { @@ -225,17 +226,18 @@ Granito::collision(GameObject& other, const CollisionHit& hit) return WalkingBadguy::collision(other, hit); } - if (granito->m_carrying != nullptr) + if (granito->get_carrying() != nullptr) { // Sorry, im already carrying this guy. return WalkingBadguy::collision(other, hit); } // Sure dude. - granito->m_carrying = this; + granito->carry(this); // Yay! m_state = STATE_SIT; + Sector::get().run_script(m_carried_script, "carried-script"); } return WalkingBadguy::collision(other, hit); @@ -247,14 +249,26 @@ Granito::kill_fall() return; } +ObjectSettings +Granito::get_settings() +{ + auto settings = WalkingBadguy::get_settings(); + + settings.remove("dead-script"); + + settings.add_script(_("Detect script"), &m_detect_script, "detect-script"); + settings.add_script(_("Carried script"), &m_carried_script, "carried-script"); + + return settings; +} + void Granito::activate() { WalkingBadguy::activate(); - m_has_waved = false; + reset_detection(); } - GameObjectTypes Granito::get_types() const { @@ -263,6 +277,7 @@ Granito::get_types() const { "default", _("Default") }, { "standing", _("Standing") }, { "walking", _("Walking") }, + { "scriptable", _("Scriptable") }, // Small granito only { "sitting", _("Sitting") } @@ -282,12 +297,32 @@ Granito::after_editor_set() case SIT: set_action("sit", m_dir); break; + case SCRIPTABLE: case STAND: set_action("stand", m_dir); break; } } +GranitoBig* +Granito::get_carrier() const +{ + for (auto& granito : Sector::get().get_objects_by_type()) + { + if (granito.get_carrying() == this) + return &granito; + } + + return nullptr; +} + +std::string +Granito::get_carrier_name() const +{ + GranitoBig* carrier = get_carrier(); + return carrier != nullptr ? carrier->get_name() : ""; +} + void Granito::initialize() { @@ -314,6 +349,7 @@ Granito::initialize() set_action("sit", m_dir); break; + case SCRIPTABLE: case STAND: set_action("stand", m_dir); break; @@ -335,26 +371,32 @@ Granito::try_wave() if (!on_ground()) return false; Player* player = get_nearest_player(); - if (!player) return false; + if (!player) + return false; - RaycastResult result = Sector::get().get_first_line_intersection(get_bbox().get_middle(), - player->get_bbox().get_middle(), - false, - get_collision_object()); + Vector mid = get_bbox().get_middle(); + Vector plrmid = player->get_bbox().get_middle(); + + float xdist = mid.x - plrmid.x; + if (std::abs(xdist) > 32.f*4.f) + return false; + + RaycastResult result = Sector::get().get_first_line_intersection(mid, plrmid, false, get_collision_object()); CollisionObject** resultobj = std::get_if(&result.hit); if (resultobj && *resultobj == player->get_collision_object()) { - float xdist = get_bbox().get_middle().x - result.box.get_middle().x; - if (std::abs(xdist) < 32.f*4.f) - { - // Only wave if facing player. - if (xdist == std::abs(xdist) * (m_dir == Direction::LEFT ? -1 : 1)) - return false; + // Only wave if facing player. + if (xdist == std::abs(xdist) * (m_dir == Direction::LEFT ? -1 : 1)) + return false; + Sector::get().run_script(m_detect_script, "detect-script"); + if (m_type == SCRIPTABLE) + m_has_waved = true; + else wave(); - return true; - } + + return true; } return false; @@ -363,6 +405,9 @@ Granito::try_wave() void Granito::wave() { + if (m_type == SCRIPTABLE) + reset_detection(); + walk_speed = 0; m_physic.set_velocity_x(0); @@ -371,6 +416,93 @@ Granito::wave() set_action("wave", m_dir, 1); } +void +Granito::sit() +{ + walk_speed = 0; + m_state = STATE_SIT; + m_original_state = STATE_SIT; + m_physic.set_velocity_x(0); + + if (!m_airborne) + { + float oldheight = get_bbox().get_size().height; + set_action("sit", m_dir); + + float height = get_bbox().get_size().height; + set_pos(Vector(get_bbox().get_left(), get_bbox().get_top() + oldheight - height)); + } + else + { + set_action("sit", m_dir); + } +} + +void +Granito::turn(const Direction& direction) +{ + m_dir = direction; + switch (m_state) + { + case STATE_WALK: + walk(); + break; + + case STATE_STAND: + set_action("stand", m_dir); + break; + + case STATE_SIT: + set_action("sit", m_dir); + break; + + case STATE_LOOKUP: + set_action("lookup", m_dir); + break; + + case STATE_JUMPING: + set_action("jump", m_dir); + break; + + default: + break; + } +} + +void +Granito::turn(const std::string& direction) +{ + turn(string_to_dir(direction)); +} + +void +Granito::walk() +{ + walk_speed = 80; + m_state = STATE_WALK; + m_original_state = STATE_WALK; + m_physic.set_velocity_x(80 * (m_dir == Direction::LEFT ? -1 : 1)); + set_action(m_dir); +} + +void +Granito::walk_for(float seconds) +{ + m_walk_interval.start(seconds); + if (m_original_state != STATE_WALK) + walk(); +} + +void +Granito::stand() +{ + walk_speed = 0; + m_state = STATE_STAND; + m_original_state = STATE_STAND; + m_physic.set_velocity_x(0); + set_action("stand", m_dir); +} + bool Granito::try_jump() { @@ -418,25 +550,60 @@ Granito::jump() m_physic.set_velocity_y(-420.f); } +void Granito::eject() +{ + GranitoBig* granito = get_carrier(); + + if (!granito) + return; + + granito->eject(); +} + void Granito::restore_original_state() { - if (m_state == m_original_state) return; + if (m_state == m_original_state) + return; m_state = m_original_state; if (m_state == STATE_WALK) { - set_action(m_dir); - walk_speed = 80; - m_physic.set_velocity_x(80 * (m_dir == Direction::LEFT ? -1 : 1)); + walk(); } else { - set_action("stand", m_dir); - walk_speed = 0; - m_physic.set_velocity_x(0); + stand(); } } + +void +Granito::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Granito", vm.findClass("BadGuy")); + + cls.addFunc("wave", &Granito::wave); + cls.addFunc("sit", &Granito::sit); + cls.addFunc("turn", static_cast(&Granito::turn)); + cls.addFunc("set_walking", &Granito::set_walking); + cls.addFunc("walk", &Granito::walk); + cls.addFunc("walk_for", &Granito::walk_for); + cls.addFunc("stand", &Granito::stand); + cls.addFunc("jump", &Granito::jump); + cls.addFunc("get_state", &Granito::get_state); + cls.addFunc("get_carrier_name", &Granito::get_carrier_name); + cls.addFunc("reset_detection", &Granito::reset_detection); + cls.addFunc("eject", &Granito::eject); + + // Enumerators + vm.setConst("GRANITO_STATE_SIT", Granito::STATE_SIT); + vm.setConst("GRANITO_STATE_STAND", Granito::STATE_STAND); + vm.setConst("GRANITO_STATE_WALK", Granito::STATE_WALK); + vm.setConst("GRANITO_STATE_WAVE", Granito::STATE_WAVE); + vm.setConst("GRANITO_STATE_LOOKUP", Granito::STATE_LOOKUP); + vm.setConst("GRANITO_STATE_JUMPING", Granito::STATE_JUMPING); +} + /* EOF */ diff --git a/src/badguy/granito.hpp b/src/badguy/granito.hpp index c005a0cece0..a009a959ad8 100644 --- a/src/badguy/granito.hpp +++ b/src/badguy/granito.hpp @@ -21,9 +21,21 @@ class GranitoBig; -/** Interactable friendly NPC */ +/** + * Interactable friendly NPC + * + * @scripting + * @summary A ""Granito"" that was given a name can be controlled by scripts. + * Note: Using these functions in a non-"Scriptable" granito can lead to undefined behavior! + * You can do it, but make sure you know what you're doing. + * @instances A ""Granito"" is instantiated by placing a definition inside a level. + * It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ class Granito : public WalkingBadguy { +public: + static void register_class(ssq::VM& vm); + public: Granito(const ReaderMapping& reader, const std::string& sprite_name = "images/creatures/granito/granito.sprite", @@ -36,8 +48,10 @@ class Granito : public WalkingBadguy static std::string class_name() { return "granito"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Granito"; } static std::string display_name() { return _("Granito"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Granito)); } virtual bool is_snipable() const override { return false; } virtual bool is_freezable() const override { return false; } @@ -45,9 +59,96 @@ class Granito : public WalkingBadguy virtual void kill_fall() override; + virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; virtual void after_editor_set() override; + virtual GranitoBig* get_carrier() const; + void turn(const Direction& direction); + + /** + * @scripting + * @description Makes the Granito wave. + */ + virtual void wave(); + + /** + * @scripting + * @description Makes the Granito sit. + */ + virtual void sit(); + + /** + * @scripting + * @description Makes the Granito sit. + * @param string $direction Direction to turn to. Can be "left or "right". + */ + void turn(const std::string& direction); + + /** + * @scripting + * @description Sets the walking state for the Granito. + * @param bool $walking + */ + void set_walking(bool walking) + { + if (walking) + walk(); + else + stand(); + } + + /** + * @scripting + * @description Makes the Granito walk. + */ + void walk(); + + /** + * @scripting + * @description Makes the Granito walk for a specified amount of seconds. + * @param float $seconds + */ + void walk_for(float seconds); + + /** + * @scripting + * @description Makes the Granito stand, or stop if walking. + */ + void stand(); + + /** + * @scripting + * @description Makes the Granito jump. + */ + virtual void jump(); + + /** + * @scripting + * @description Eject itself from the Big Granito. + */ + virtual void eject(); + + /** + * @scripting + * @description Gets the current Granito state. Value is any of the ""GRANITO_STATE"" enumerators. + */ + int get_state() const { return static_cast(m_state); } + + /** + * @scripting + * @description Gets the name of the Big Granito that is carrying the Granito. + */ + std::string get_carrier_name() const; + + /** + * @scripting + * @description Resets the player detection used for waving, + * allowing the Detect Script to be ran again. + * Only works on Standing and Default granito. + */ + void reset_detection() { m_has_waved = false; } + protected: virtual void initialize() override; virtual void update_hitbox() override; @@ -55,27 +156,31 @@ class Granito : public WalkingBadguy void activate() override; protected: - enum Type { DEFAULT, STAND, WALK, SIT }; + enum Type { DEFAULT, STAND, WALK, SCRIPTABLE, SIT }; + + /** + * NOTE: Make sure to expose any new enumerators to Squirrel. + * + * @scripting + * @prefix GRANITO_ + */ enum State { - STATE_SIT, - STATE_STAND, - STATE_WALK, - STATE_WAVE, - STATE_LOOKUP, - STATE_JUMPING + STATE_SIT = 0, /*!< @description The Granito is sitting. */ + STATE_STAND = 1, /*!< @description The Granito is standing. */ + STATE_WALK = 2, /*!< @description The Granito is walking. */ + STATE_WAVE = 3, /*!< @description The Granito is waving. */ + STATE_LOOKUP = 4, /*!< @description The Granito is looking up. */ + STATE_JUMPING = 5 /*!< @description The Granito is jumping. */ }; protected: virtual bool try_wave(); - void wave(); - virtual bool try_jump(); - void jump(); void restore_original_state(); -private: +protected: Timer m_walk_interval; State m_state; State m_original_state; @@ -84,6 +189,9 @@ class Granito : public WalkingBadguy bool m_stepped_on; /** True if tux was on top of granito last frame. */ bool m_airborne; /** Unfortunately, on_ground() sucks. */ + std::string m_detect_script; + std::string m_carried_script; /** This is ran when the Granito is carried by a Big Granito */ + private: Granito(const Granito&) = delete; Granito& operator=(const Granito&) = delete; diff --git a/src/badguy/granito_big.cpp b/src/badguy/granito_big.cpp index 4824cc816dc..37104ebb479 100644 --- a/src/badguy/granito_big.cpp +++ b/src/badguy/granito_big.cpp @@ -16,12 +16,17 @@ #include "badguy/granito_big.hpp" +#include "util/reader_mapping.hpp" +#include "supertux/sector.hpp" + GranitoBig::GranitoBig(const ReaderMapping& reader) : Granito(reader, "images/creatures/granito/big/granito_big.sprite", LAYER_OBJECTS - 2), m_carrying(nullptr) { parse_type(reader); + reader.get("carrying-script", m_carried_script); + max_drop_height = 16; } @@ -37,12 +42,28 @@ GranitoBig::active_update(float dt_sec) { Granito::active_update(dt_sec); - if (!m_carrying) return; + if (!m_carrying) + return; Vector pos(get_bbox().get_middle().x - m_carrying->get_bbox().get_width() / 2, get_bbox().get_top() - m_carrying->get_bbox().get_height()); m_carrying->set_pos(pos); - m_carrying->set_action("sit", m_dir); + m_carrying->turn(m_dir); +} + +ObjectSettings +GranitoBig::get_settings() +{ + auto settings = Granito::get_settings(); + + settings.remove("detect-script"); + settings.remove("carried-script"); + + // No need to make another member for the carrying script. + // Just repurpose the carried script. + settings.add_script(_("Carrying Script"), &m_carried_script, "carrying-script"); + + return settings; } GameObjectTypes @@ -51,10 +72,35 @@ GranitoBig::get_types() const return { { "default", _("Default") }, { "standing", _("Standing") }, - { "walking", _("Walking") } + { "walking", _("Walking") }, + { "scriptable", _("Scriptable") }, }; } +void +GranitoBig::carry(Granito* granito) +{ + m_carrying = granito; + Sector::get().run_script(m_carried_script, "carrying-script"); +} + +void +GranitoBig::eject() +{ + if (!m_carrying) + return; + + m_carrying->walk_for(1.5f); + m_carrying->jump(); + m_carrying = nullptr; +} + +std::string +GranitoBig::get_carrying_name() const +{ + return m_carrying ? m_carrying->get_name() : ""; +} + bool GranitoBig::try_wave() { @@ -67,4 +113,12 @@ GranitoBig::try_jump() return false; } +void +GranitoBig::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("GranitoBig", vm.findClass("Granito")); + + cls.addFunc("get_carrying_name", &GranitoBig::get_carrying_name); +} + /* EOF */ diff --git a/src/badguy/granito_big.hpp b/src/badguy/granito_big.hpp index cff94547514..7d6f6467e16 100644 --- a/src/badguy/granito_big.hpp +++ b/src/badguy/granito_big.hpp @@ -19,8 +19,18 @@ #include "badguy/granito.hpp" +/** + * @scripting + * @summary A ""GranitoBig"" that was given a name can be controlled by scripts. + * It has some features from its base class, ""Granito"", disabled. + * @instances A ""GranitoBig"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ class GranitoBig final : public Granito { +public: + static void register_class(ssq::VM& vm); + public: GranitoBig(const ReaderMapping& reader); @@ -30,11 +40,37 @@ class GranitoBig final : public Granito static std::string class_name() { return "granito_big"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "GranitoBig"; } static std::string display_name() { return _("Big Granito"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Granito::get_class_types().add(typeid(GranitoBig)); } + virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; + void carry(Granito* granito); + Granito* get_carrying() const { return m_carrying; } + + /** + * @scripting + * @description This function tells the Granito being carried to + * unglue itself from the Big Granito, by jumping and walking off. + */ + virtual void eject() override; + + /** + * @scripting + * @description Gets the name of the Granito being carried by the Big Granito. + */ + std::string get_carrying_name() const; + + // The following functions are unimplemented for Big Granito. + virtual void wave() override {} + virtual void jump() override {} + virtual void sit() override {} + virtual GranitoBig* get_carrier() const override { return nullptr; } + +public: Granito* m_carrying; protected: diff --git a/src/badguy/granito_giant.hpp b/src/badguy/granito_giant.hpp index a3df651eab2..aebe7c34658 100644 --- a/src/badguy/granito_giant.hpp +++ b/src/badguy/granito_giant.hpp @@ -31,6 +31,7 @@ class GranitoGiant final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Giant Granito"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(GranitoGiant)); } virtual void kill_fall() override; diff --git a/src/badguy/haywire.hpp b/src/badguy/haywire.hpp index bca973206a4..e0280b8db7a 100644 --- a/src/badguy/haywire.hpp +++ b/src/badguy/haywire.hpp @@ -45,6 +45,7 @@ class Haywire final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Haywire"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Haywire)); } virtual bool is_snipable() const override { return true; } inline bool is_exploding() const { return m_is_exploding; } diff --git a/src/badguy/igel.hpp b/src/badguy/igel.hpp index 0aef788a590..70039c4f4d8 100644 --- a/src/badguy/igel.hpp +++ b/src/badguy/igel.hpp @@ -38,6 +38,7 @@ class Igel final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Igel"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Igel)); } virtual bool is_freezable() const override { return true; } virtual void unfreeze(bool melt = true) override; diff --git a/src/badguy/jumpy.hpp b/src/badguy/jumpy.hpp index 07bf84a9771..f8378833679 100644 --- a/src/badguy/jumpy.hpp +++ b/src/badguy/jumpy.hpp @@ -39,6 +39,7 @@ class Jumpy final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Jumpy"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Jumpy)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/kamikazesnowball.hpp b/src/badguy/kamikazesnowball.hpp index fdcb5da4149..1c279813740 100644 --- a/src/badguy/kamikazesnowball.hpp +++ b/src/badguy/kamikazesnowball.hpp @@ -33,6 +33,7 @@ class KamikazeSnowball : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Kamikaze Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(KamikazeSnowball)); } virtual bool is_snipable() const override { return true; } protected: @@ -63,6 +64,7 @@ class LeafShot final : public KamikazeSnowball virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Leafshot"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return KamikazeSnowball::get_class_types().add(typeid(LeafShot)); } virtual bool is_snipable() const override { return true; } diff --git a/src/badguy/kugelblitz.hpp b/src/badguy/kugelblitz.hpp index a3fee55dc97..6dea704955d 100644 --- a/src/badguy/kugelblitz.hpp +++ b/src/badguy/kugelblitz.hpp @@ -39,6 +39,7 @@ class Kugelblitz final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Kugelblitz"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Kugelblitz)); } void explode(); diff --git a/src/badguy/livefire.hpp b/src/badguy/livefire.hpp index 3eae46303c5..29331628c1f 100644 --- a/src/badguy/livefire.hpp +++ b/src/badguy/livefire.hpp @@ -37,6 +37,7 @@ class LiveFire : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Walking Flame"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(LiveFire)); } private: std::string death_sound; @@ -70,6 +71,7 @@ class LiveFireAsleep final : public LiveFire virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Sleeping Flame"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return LiveFire::get_class_types().add(typeid(LiveFireAsleep)); } private: LiveFireAsleep(const LiveFireAsleep&) = delete; @@ -88,6 +90,7 @@ class LiveFireDormant final : public LiveFire virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Dormant Flame"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return LiveFire::get_class_types().add(typeid(LiveFireDormant)); } private: LiveFireDormant(const LiveFireDormant&) = delete; diff --git a/src/badguy/mole.hpp b/src/badguy/mole.hpp index 30a8de7c5d8..07d808cf692 100644 --- a/src/badguy/mole.hpp +++ b/src/badguy/mole.hpp @@ -37,6 +37,7 @@ class Mole final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mole"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Mole)); } virtual bool is_snipable() const override { return true; } diff --git a/src/badguy/mole_rock.hpp b/src/badguy/mole_rock.hpp index b472e05bd4e..e9c378aa700 100644 --- a/src/badguy/mole_rock.hpp +++ b/src/badguy/mole_rock.hpp @@ -43,6 +43,7 @@ class MoleRock final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mole's rock"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(MoleRock)); } protected: const BadGuy* parent; /**< collisions with this BadGuy will be ignored */ diff --git a/src/badguy/mrbomb.hpp b/src/badguy/mrbomb.hpp index b4f6c221cdd..914251e92f9 100644 --- a/src/badguy/mrbomb.hpp +++ b/src/badguy/mrbomb.hpp @@ -39,6 +39,7 @@ class MrBomb final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mr. Bomb"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(MrBomb)); } virtual bool is_snipable() const override { return true; } GameObjectTypes get_types() const override; diff --git a/src/badguy/mriceblock.hpp b/src/badguy/mriceblock.hpp index b8f5ce8ee43..7b84e4ba1b5 100644 --- a/src/badguy/mriceblock.hpp +++ b/src/badguy/mriceblock.hpp @@ -48,6 +48,7 @@ class MrIceBlock : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mr. Iceblock"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(MrIceBlock)); } virtual bool is_snipable() const override { return ice_state != ICESTATE_KICKED; } virtual bool is_freezable() const override; diff --git a/src/badguy/mrtree.hpp b/src/badguy/mrtree.hpp index 24250aa09fc..21856013658 100644 --- a/src/badguy/mrtree.hpp +++ b/src/badguy/mrtree.hpp @@ -31,6 +31,7 @@ class MrTree final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mr. Tree"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(MrTree)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/owl.hpp b/src/badguy/owl.hpp index 3571d6248fd..4ec6e31584e 100644 --- a/src/badguy/owl.hpp +++ b/src/badguy/owl.hpp @@ -44,6 +44,7 @@ class Owl final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Owl"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Owl)); } virtual ObjectSettings get_settings() override; virtual bool is_snipable() const override { return true; } diff --git a/src/badguy/plant.hpp b/src/badguy/plant.hpp index 8f8136d474d..2478a12b30b 100644 --- a/src/badguy/plant.hpp +++ b/src/badguy/plant.hpp @@ -33,6 +33,7 @@ class Plant final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Plant"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Plant)); } protected: enum PlantState { diff --git a/src/badguy/rcrystallo.hpp b/src/badguy/rcrystallo.hpp index 0c6f2faedc8..b47ea645463 100644 --- a/src/badguy/rcrystallo.hpp +++ b/src/badguy/rcrystallo.hpp @@ -32,6 +32,7 @@ class RCrystallo final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Roof Crystallo"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(RCrystallo)); } virtual void active_update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/badguy/root.hpp b/src/badguy/root.hpp index c2a8903480a..ec727246773 100644 --- a/src/badguy/root.hpp +++ b/src/badguy/root.hpp @@ -38,6 +38,7 @@ class Root final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Root"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Root)); } virtual bool is_flammable() const override { return false; } virtual bool is_freezable() const override { return false; } diff --git a/src/badguy/root_sapling.hpp b/src/badguy/root_sapling.hpp index 6d30bea8c66..2de801170f8 100644 --- a/src/badguy/root_sapling.hpp +++ b/src/badguy/root_sapling.hpp @@ -40,6 +40,7 @@ class RootSapling final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Root Sapling"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(RootSapling)); } virtual void on_flip(float height) override; diff --git a/src/badguy/scrystallo.hpp b/src/badguy/scrystallo.hpp index 5761bc35667..2ac8a59cc95 100644 --- a/src/badguy/scrystallo.hpp +++ b/src/badguy/scrystallo.hpp @@ -30,6 +30,7 @@ class SCrystallo final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Sleeping Crystallo"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(SCrystallo)); } virtual void collision_solid(const CollisionHit& hit) override; virtual HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit) override; diff --git a/src/badguy/short_fuse.hpp b/src/badguy/short_fuse.hpp index 74c80754eac..bac740e5b1c 100644 --- a/src/badguy/short_fuse.hpp +++ b/src/badguy/short_fuse.hpp @@ -29,6 +29,7 @@ class ShortFuse final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Short Fuse"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(ShortFuse)); } protected: virtual HitResponse collision_player (Player& player, const CollisionHit& hit) override; diff --git a/src/badguy/skydive.hpp b/src/badguy/skydive.hpp index dfb2b37efb9..88b1c1f441a 100644 --- a/src/badguy/skydive.hpp +++ b/src/badguy/skydive.hpp @@ -42,6 +42,7 @@ class SkyDive final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Skydive"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(SkyDive)); } virtual bool is_snipable() const override { return true; } protected: diff --git a/src/badguy/smartball.hpp b/src/badguy/smartball.hpp index 044b8564eb6..a4b5ed8ecef 100644 --- a/src/badguy/smartball.hpp +++ b/src/badguy/smartball.hpp @@ -31,6 +31,7 @@ class SmartBall final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mrs. Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(SmartBall)); } virtual bool is_snipable() const override { return true; } virtual bool is_freezable() const override; diff --git a/src/badguy/smartblock.hpp b/src/badguy/smartblock.hpp index 0b060b27e5b..6564227c8aa 100644 --- a/src/badguy/smartblock.hpp +++ b/src/badguy/smartblock.hpp @@ -29,6 +29,7 @@ class SmartBlock final : public MrIceBlock virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mrs. Iceblock"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MrIceBlock::get_class_types().add(typeid(SmartBlock)); } GameObjectTypes get_types() const override { return {}; } diff --git a/src/badguy/snail.hpp b/src/badguy/snail.hpp index a08a6040103..e77b41b2d31 100644 --- a/src/badguy/snail.hpp +++ b/src/badguy/snail.hpp @@ -42,6 +42,7 @@ class Snail final : virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Snail"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Snail)); } virtual GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/snowball.hpp b/src/badguy/snowball.hpp index 65e1a06dc29..ed0fe2433c3 100644 --- a/src/badguy/snowball.hpp +++ b/src/badguy/snowball.hpp @@ -29,6 +29,7 @@ class SnowBall final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Mr. Snowball"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(SnowBall)); } virtual bool is_snipable() const override { return true; } virtual bool is_freezable() const override; diff --git a/src/badguy/snowman.hpp b/src/badguy/snowman.hpp index 82b8b2060e9..f241643f23c 100644 --- a/src/badguy/snowman.hpp +++ b/src/badguy/snowman.hpp @@ -28,6 +28,7 @@ class Snowman final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Snowman"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Snowman)); } protected: void loose_head(); diff --git a/src/badguy/spiky.hpp b/src/badguy/spiky.hpp index 8a48a26209e..c3f95eb9e27 100644 --- a/src/badguy/spiky.hpp +++ b/src/badguy/spiky.hpp @@ -30,6 +30,7 @@ class Spiky final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Spiky"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Spiky)); } private: Spiky(const Spiky&) = delete; diff --git a/src/badguy/sspiky.hpp b/src/badguy/sspiky.hpp index 551e1b12fd8..c09f713941c 100644 --- a/src/badguy/sspiky.hpp +++ b/src/badguy/sspiky.hpp @@ -36,6 +36,7 @@ class SSpiky final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Sleeping Spiky"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(SSpiky)); } virtual void after_editor_set() override; protected: diff --git a/src/badguy/stalactite.hpp b/src/badguy/stalactite.hpp index 10f928325ed..39ad7ebb60c 100644 --- a/src/badguy/stalactite.hpp +++ b/src/badguy/stalactite.hpp @@ -41,6 +41,7 @@ class Stalactite : public StickyBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Stalactite"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyBadguy::get_class_types().add(typeid(Stalactite)); } virtual ObjectSettings get_settings() override; diff --git a/src/badguy/stumpy.hpp b/src/badguy/stumpy.hpp index bfee886a51b..a46c7ff4eb2 100644 --- a/src/badguy/stumpy.hpp +++ b/src/badguy/stumpy.hpp @@ -37,6 +37,7 @@ class Stumpy final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Stumpy"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(Stumpy)); } protected: enum MyState { diff --git a/src/badguy/tarantula.hpp b/src/badguy/tarantula.hpp index 5c454ab5862..52b25d40af7 100644 --- a/src/badguy/tarantula.hpp +++ b/src/badguy/tarantula.hpp @@ -38,6 +38,7 @@ class Tarantula final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Tarantula"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Tarantula)); } virtual bool is_snipable() const override; virtual GameObjectTypes get_types() const override; diff --git a/src/badguy/toad.hpp b/src/badguy/toad.hpp index e2ff16d447d..330b2c6d1b1 100644 --- a/src/badguy/toad.hpp +++ b/src/badguy/toad.hpp @@ -37,6 +37,7 @@ class Toad final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Toad"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Toad)); } virtual bool is_snipable() const override { return true; } protected: diff --git a/src/badguy/totem.hpp b/src/badguy/totem.hpp index a4fb02769cc..d7188fba479 100644 --- a/src/badguy/totem.hpp +++ b/src/badguy/totem.hpp @@ -36,6 +36,7 @@ class Totem final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Totem"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Totem)); } virtual bool is_snipable() const override { return true; } protected: diff --git a/src/badguy/treewillowisp.hpp b/src/badguy/treewillowisp.hpp index c69ab63c705..a03c9a8dc93 100644 --- a/src/badguy/treewillowisp.hpp +++ b/src/badguy/treewillowisp.hpp @@ -27,6 +27,7 @@ class TreeWillOWisp final : public BadGuy public: TreeWillOWisp(GhostTree* tree, const Vector& pos, float radius, float speed); ~TreeWillOWisp() override; + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(TreeWillOWisp)); } virtual void activate() override; virtual void active_update(float dt_sec) override; diff --git a/src/badguy/viciousivy.hpp b/src/badguy/viciousivy.hpp index 99d566eb770..b9fa837d434 100644 --- a/src/badguy/viciousivy.hpp +++ b/src/badguy/viciousivy.hpp @@ -32,6 +32,7 @@ class ViciousIvy final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Vicious Ivy"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(ViciousIvy)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/walking_badguy.hpp b/src/badguy/walking_badguy.hpp index b65537f2e0a..4e43ed62235 100644 --- a/src/badguy/walking_badguy.hpp +++ b/src/badguy/walking_badguy.hpp @@ -52,6 +52,7 @@ class WalkingBadguy : public BadGuy const std::string& walk_right_action, int layer = LAYER_OBJECTS, const std::string& light_sprite_name = "images/objects/lightmap_light/lightmap_light-medium.sprite"); + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(WalkingBadguy)); } virtual void initialize() override; virtual void active_update(float dt_sec) override; diff --git a/src/badguy/walking_candle.hpp b/src/badguy/walking_candle.hpp index d621c46b833..3dd92d626ed 100644 --- a/src/badguy/walking_candle.hpp +++ b/src/badguy/walking_candle.hpp @@ -40,6 +40,7 @@ class WalkingCandle final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Walking Candle"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(WalkingCandle)); } private: Color lightcolor; diff --git a/src/badguy/walkingleaf.hpp b/src/badguy/walkingleaf.hpp index d2204841f00..7b4cdb15958 100644 --- a/src/badguy/walkingleaf.hpp +++ b/src/badguy/walkingleaf.hpp @@ -32,6 +32,7 @@ class WalkingLeaf final : public WalkingBadguy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Walking Leaf"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(WalkingLeaf)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/badguy/willowisp.cpp b/src/badguy/willowisp.cpp index 2f64bcde0b3..ff0933ac1e5 100644 --- a/src/badguy/willowisp.cpp +++ b/src/badguy/willowisp.cpp @@ -37,7 +37,6 @@ static const std::string SOUNDFILE = "sounds/willowisp.wav"; WillOWisp::WillOWisp(const ReaderMapping& reader) : BadGuy(reader, "images/creatures/willowisp/willowisp.sprite", LAYER_FLOATINGOBJECTS, "images/objects/lightmap_light/lightmap_light-small.sprite"), - ExposedObject(this), PathObject(), m_mystate(STATE_IDLE), m_target_sector(), @@ -263,44 +262,37 @@ WillOWisp::collision_player(Player& player, const CollisionHit& ) { void WillOWisp::goto_node(int node_idx) { - get_walker()->goto_node(node_idx); - if (m_mystate != STATE_PATHMOVING && m_mystate != STATE_PATHMOVING_TRACK) { - m_mystate = STATE_PATHMOVING; - } -} - -void -WillOWisp::start_moving() -{ - get_walker()->start_moving(); -} + PathObject::goto_node(node_idx); -void -WillOWisp::stop_moving() -{ - get_walker()->stop_moving(); + if (m_mystate != STATE_PATHMOVING && m_mystate != STATE_PATHMOVING_TRACK) + m_mystate = STATE_PATHMOVING; } void WillOWisp::set_state(const std::string& new_state) { - if (new_state == "stopped") { + if (new_state == "stopped") m_mystate = STATE_STOPPED; - } else if (new_state == "idle") { + else if (new_state == "idle") m_mystate = STATE_IDLE; - } else if (new_state == "move_path") { + else if (new_state == "move_path") + { m_mystate = STATE_PATHMOVING; - get_walker()->start_moving(); - } else if (new_state == "move_path_track") { + if (get_walker()) + get_walker()->start_moving(); + } + else if (new_state == "move_path_track") + { m_mystate = STATE_PATHMOVING_TRACK; - get_walker()->start_moving(); - } else if (new_state == "normal") { + if (get_walker()) + get_walker()->start_moving(); + } + else if (new_state == "normal") m_mystate = STATE_IDLE; - } else if (new_state == "vanish") { + else if (new_state == "vanish") vanish(); - } else { - log_warning << "Can't set unknown willowisp state '" << new_state << std::endl; - } + else + log_warning << "Cannot set unknown Will-O-Wisp state: '" << new_state << "'." << std::endl; } ObjectSettings @@ -365,4 +357,16 @@ WillOWisp::on_flip(float height) PathObject::on_flip(); } + +void +WillOWisp::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("WillOWisp", vm.findClass("BadGuy")); + + PathObject::register_members(cls); + + cls.addFunc("goto_node", &WillOWisp::goto_node); + cls.addFunc("set_state", &WillOWisp::set_state); +} + /* EOF */ diff --git a/src/badguy/willowisp.hpp b/src/badguy/willowisp.hpp index 25d625b8ebd..91436301b3a 100644 --- a/src/badguy/willowisp.hpp +++ b/src/badguy/willowisp.hpp @@ -19,16 +19,21 @@ #include "badguy/badguy.hpp" #include "object/path_object.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/willowisp.hpp" class SoundSource; -class WillOWisp final : - public BadGuy, - public ExposedObject, - public PathObject +/** + * @scripting + * @summary A ""WillOWisp"" that was given a name can be controlled by scripts. + * @instances A ""WillOWisp"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class WillOWisp final : public BadGuy, + public PathObject { +public: + static void register_class(ssq::VM& vm); + public: WillOWisp(const ReaderMapping& reader); @@ -44,34 +49,32 @@ class WillOWisp final : virtual bool is_hurtable() const override { return false; } virtual void kill_fall() override { vanish(); } - virtual void goto_node(int node_idx); - virtual void set_state(const std::string& state); - virtual void start_moving(); - virtual void stop_moving(); + void goto_node(int node_idx); + + /** + * @scripting + * @description Sets the state of the WillOWisp. + * @param string $state One of the following: "stopped", "move_path" (moves along a path), + "move_path_track" (moves along a path but catches Tux when he is near), "normal" (starts tracking Tux when he is near enough), + "vanish". + */ + void set_state(const std::string& state); virtual void stop_looping_sounds() override; virtual void play_looping_sounds() override; static std::string class_name() { return "willowisp"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "WillOWisp"; } static std::string display_name() { return _("Will o' Wisp"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(PathObject)).add(typeid(WillOWisp)); } virtual ObjectSettings get_settings() override; virtual void move_to(const Vector& pos) override; virtual void on_flip(float height) override; - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override - { - ExposedObject::expose(vm, table_idx); - } - - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override - { - ExposedObject::unexpose(vm, table_idx); - } - /** make WillOWisp vanish */ void vanish(); diff --git a/src/badguy/yeti.cpp b/src/badguy/yeti.cpp index 2bc4d7ef3c1..13b8e6079bf 100644 --- a/src/badguy/yeti.cpp +++ b/src/badguy/yeti.cpp @@ -20,8 +20,10 @@ #include #include "audio/sound_manager.hpp" +#include "badguy/bouncing_snowball.hpp" #include "badguy/yeti_stalactite.hpp" #include "math/random.hpp" +#include "object/bigsnowball.hpp" #include "object/camera.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" @@ -31,21 +33,19 @@ namespace { -const float JUMP_DOWN_VX = 250; /**< Horizontal speed while jumping off the dais. */ -const float JUMP_DOWN_VY = -250; /**< Vertical speed while jumping off the dais. */ - const float RUN_VX = 350; /**< Horizontal speed while running. */ +const float RUN_PINCH_VX = 400; /**< Horizontal speed while running. */ -const float JUMP_UP_VX = 350; /**< Horizontal speed while jumping on the dais. */ -const float JUMP_UP_VY = -700; /**< Vertical speed while jumping on the dais. */ +const float JUMP_UP_VY = -750; /**< Vertical speed while jumping on the dais. */ const float STOMP_VY = -300; /**< Vertical speed while stomping on the dais. */ const float RUN_DISTANCE = 1060; /**< Distance between the x-coordinates of left and right end positions. */ const float JUMP_SPACE = 448; /**< Distance between the jump position and the stand position. */ +const float BEFORE_WAIT = 3; +const float BALL_WAIT = 2; const float STOMP_WAIT = 0.5; /**< Time we stay on the dais before jumping again. */ -const float SAFE_TIME = 0.5; /**< The time we are safe when Tux just hit us. */ -const int INITIAL_HITPOINTS = 5; /**< Number of hits we can take. */ +const float SAFE_TIME = 1; /**< The time we are safe when Tux just hit us. */ const float YETI_SQUISH_TIME = 3; @@ -56,34 +56,32 @@ const float SNOW_EXPLOSIONS_VY = -200; /**< Speed of snowballs. */ } Yeti::Yeti(const ReaderMapping& reader) : - BadGuy(reader, "images/creatures/yeti/yeti.sprite"), + Boss(reader, "images/creatures/yeti/yeti.sprite"), m_state(), m_state_timer(), m_safe_timer(), m_stomp_count(), - m_hit_points(), - m_hud_head(), m_left_stand_x(), m_right_stand_x(), m_left_jump_x(), m_right_jump_x(), m_fixed_pos(), - m_hud_icon() + m_just_hit(), + m_just_threw(), + m_grabbed_tux(), + m_jumped() { - reader.get("lives", m_hit_points, INITIAL_HITPOINTS); - m_countMe = true; - SoundManager::current()->preload("sounds/yeti_gna.wav"); - SoundManager::current()->preload("sounds/yeti_roar.wav"); - reader.get("hud-icon", m_hud_icon, "images/creatures/yeti/hudlife.png"); m_hud_head = Surface::from_file(m_hud_icon); + SoundManager::current()->preload("sounds/yeti_gna.wav"); + SoundManager::current()->preload("sounds/yeti_roar.wav"); initialize(); reader.get("fixed-pos", m_fixed_pos, false); if (m_fixed_pos) { - m_left_stand_x = 80; - m_right_stand_x = 1140; + m_left_stand_x = 216; + m_right_stand_x = 1014; m_left_jump_x = 528; m_right_jump_x = 692; } else { @@ -95,7 +93,7 @@ void Yeti::initialize() { m_dir = Direction::RIGHT; - jump_down(); + run(); } void @@ -120,46 +118,103 @@ Yeti::draw(DrawingContext& context) if (m_safe_timer.started() && size_t(g_game_time * 40) % 2) return; - draw_hit_points(context); - - BadGuy::draw(context); + Boss::draw(context); } void -Yeti::draw_hit_points(DrawingContext& context) +Yeti::active_update(float dt_sec) { - if (m_hud_head) - { - context.push_transform(); - context.set_translation(Vector(0, 0)); - context.transform().scale = 1.f; + Boss::boss_update(dt_sec); + auto player = get_nearest_player(); - for (int i = 0; i < m_hit_points; ++i) - { - context.color().draw_surface(m_hud_head, Vector(BORDER_X + (static_cast(i * m_hud_head->get_width())), BORDER_Y + 1), LAYER_FOREGROUND1); - } + float push_distance; + push_distance = player ? (glm::length(get_bbox().get_middle() - player->get_bbox().get_middle())) : 0.f; - context.pop_transform(); + if (on_ground() && (m_state == BE_ANGRY || m_state == THROW) && push_distance <= 160.f && m_physic.get_velocity_x() == 0.f) + { + m_state_timer.stop(); + m_physic.enable_gravity(false); + set_group(COLGROUP_DISABLED); + m_state = REMOVE_TUX; } -} -void -Yeti::active_update(float dt_sec) -{ switch (m_state) { - case JUMP_DOWN: - m_physic.set_velocity_x((m_dir==Direction::RIGHT)?+JUMP_DOWN_VX:-JUMP_DOWN_VX); - break; case RUN: - m_physic.set_velocity_x((m_dir==Direction::RIGHT)?+RUN_VX:-RUN_VX); - if (((m_dir == Direction::RIGHT) && (get_pos().x >= m_right_jump_x)) || ((m_dir == Direction::LEFT) && (get_pos().x <= m_left_jump_x))) jump_up(); + if (!m_just_threw || m_state_timer.check()) + { + set_action("jump", m_dir); + m_just_threw = false; + if (!m_jumped && (push_distance >= 160.f)) { + m_physic.set_velocity_y(STOMP_VY * 2.5f / 3.f); + m_jumped = true; + } + + if (m_pinch_mode) + { + if (std::abs(m_physic.get_velocity_x()) < (RUN_PINCH_VX - 10.f)) { + m_physic.set_acceleration_x(5.f * (m_dir == Direction::RIGHT ? RUN_PINCH_VX : -RUN_PINCH_VX)); + } + else + { + m_physic.set_acceleration_x(0.f); + m_physic.set_velocity_x(RUN_PINCH_VX * (m_dir == Direction::RIGHT ? 1.f : -1.f)); + } + } + else + { + if (std::abs(m_physic.get_velocity_x()) < (RUN_VX - 10.f)) { + m_physic.set_acceleration_x(5.f * (m_dir == Direction::RIGHT ? RUN_VX : -RUN_VX)); + } + else + { + m_physic.set_acceleration_x(0.f); + m_physic.set_velocity_x(RUN_VX * (m_dir == Direction::RIGHT ? 1.f : -1.f)); + } + } + + if (((m_dir == Direction::RIGHT) && (get_pos().x >= m_right_jump_x)) || ((m_dir == Direction::LEFT) && (get_pos().x <= m_left_jump_x))) jump_up(); + } break; case JUMP_UP: - m_physic.set_velocity_x((m_dir==Direction::RIGHT)?+JUMP_UP_VX:-JUMP_UP_VX); - if (((m_dir == Direction::RIGHT) && (get_pos().x >= m_right_stand_x)) || ((m_dir == Direction::LEFT) && (get_pos().x <= m_left_stand_x))) be_angry(); + if (((m_dir == Direction::RIGHT) && (get_pos().x >= m_right_stand_x)) || ((m_dir == Direction::LEFT) && (get_pos().x <= m_left_stand_x))) + { + m_jumped = false; + m_dir = (m_dir == Direction::RIGHT) ? Direction::LEFT : Direction::RIGHT; + throw_snowballs(); + } + break; + case THROW: + m_physic.set_velocity_x((std::abs(m_physic.get_velocity_x()) > 10.f) ? (m_physic.get_velocity_x() / 1.125f) : 0.f); + if (m_state_timer.check()) + { + summon_snowball(); + set_action("stand", m_dir); + m_stomp_count++; + if ((m_pinch_mode && m_stomp_count == 3) || (!m_pinch_mode && m_stomp_count == 2)) { + be_angry(); + } else { + m_state_timer.start(BALL_WAIT / (m_pinch_mode ? 1.2f : 1.f)); + } + } + break; + case THROW_BIG: + if (m_state_timer.check()) + { + summon_big_snowball(); + set_action("stand", m_dir); + m_stomp_count++; + if ((m_lives == 1 && m_stomp_count == 3) || (m_lives > 1 && m_stomp_count == 1)) { + m_just_threw = true; + run(); + } + else { + m_state_timer.start(BALL_WAIT); + } + } break; case BE_ANGRY: - if (m_state_timer.check() && on_ground()) { + if (m_state_timer.check() && on_ground()) + { m_physic.set_velocity_y(STOMP_VY); set_action("stomp", m_dir); SoundManager::current()->play("sounds/yeti_gna.wav", get_pos()); @@ -176,7 +231,8 @@ Yeti::active_update(float dt_sec) m_dir = newdir; set_action("jump", m_dir); } - if (m_state_timer.check()) { + if (m_state_timer.check()) + { BadGuy::kill_fall(); m_state = FALLING; m_physic.set_velocity_y(JUMP_UP_VY / 2); // Move up a bit before falling @@ -189,56 +245,93 @@ Yeti::active_update(float dt_sec) break; case FALLING: break; + case REMOVE_TUX: + if (push_distance < 160.f && player) + { + if (!m_grabbed_tux) { + player->get_physic().set_velocity(5.f * Vector(get_bbox().get_middle().x - player->get_bbox().get_middle().x, + get_bbox().get_middle().y - player->get_bbox().get_middle().y)); + } + if (!m_grabbed_tux && push_distance < 10.f) + { + m_state_timer.start(BALL_WAIT / 2.f); + m_grabbed_tux = true; + player->get_physic().set_velocity(m_dir == Direction::RIGHT ? 600.f : -600.f, -200.f); + } + } + if (m_state_timer.check()) + { + set_group(COLGROUP_MOVING); + m_physic.enable_gravity(true); + m_grabbed_tux = false; + throw_snowballs(); + } + break; } m_col.set_movement(m_physic.get_movement(dt_sec)); } -void -Yeti::jump_down() -{ - set_action("jump", m_dir); - m_physic.set_velocity(m_dir == Direction::RIGHT ? JUMP_DOWN_VX : -JUMP_DOWN_VX, JUMP_DOWN_VY); - m_state = JUMP_DOWN; -} - void Yeti::run() { - set_action("walking", m_dir); - m_physic.set_velocity(m_dir == Direction::RIGHT ? RUN_VX : -RUN_VX, 0); m_state = RUN; + m_state_timer.start(BEFORE_WAIT); } void Yeti::jump_up() { set_action("jump", m_dir); - m_physic.set_velocity(m_dir == Direction::RIGHT ? JUMP_UP_VX : -JUMP_UP_VX, JUMP_UP_VY); + m_physic.set_velocity_y(JUMP_UP_VY); m_state = JUMP_UP; } void -Yeti::be_angry() +Yeti::throw_snowballs() { // Turn around. - m_dir = (m_dir==Direction::RIGHT) ? Direction::LEFT : Direction::RIGHT; - set_action("stand", m_dir); - m_physic.set_velocity_x(0); + + m_stomp_count = 0; + m_state = THROW; + m_state_timer.start(STOMP_WAIT / (m_pinch_mode ? 1.2f : 1.f)); +} + +void +Yeti::throw_big_snowballs() +{ + m_stomp_count = 0; + m_state = THROW_BIG; + m_state_timer.start(BALL_WAIT); +} + +void +Yeti::be_angry() +{ m_stomp_count = 0; m_state = BE_ANGRY; - m_state_timer.start(STOMP_WAIT); + m_state_timer.start(BALL_WAIT); } bool Yeti::collision_squished(GameObject& object) { - kill_squished(object); + if (m_state != YetiState::JUMP_UP && m_state != YetiState::RUN && m_state != YetiState::BE_ANGRY) { + return false; + } + kill_squished(object); return true; } +HitResponse +Yeti::collision_badguy(BadGuy& badguy, const CollisionHit& hit) +{ + badguy.kill_fall(); + return FORCE_MOVE; +} + void Yeti::kill_squished(GameObject& object) { @@ -251,13 +344,16 @@ Yeti::kill_squished(GameObject& object) void Yeti::take_hit(Player& ) { - if (m_safe_timer.started()) + if (m_safe_timer.started() || m_just_hit || + std::abs(m_left_stand_x - get_pos().x) < 80 || std::abs(m_right_stand_x - get_pos().x) < 80) return; + m_just_hit = true; + SoundManager::current()->play("sounds/yeti_roar.wav", get_pos()); - m_hit_points--; + m_lives--; - if (m_hit_points <= 0) { + if (m_lives <= 0) { // We're dead. m_physic.set_velocity((m_dir == Direction::RIGHT ? RUN_VX : -RUN_VX) / 5, 0); @@ -292,7 +388,7 @@ Yeti::drop_stalactite() for (auto& stalactite : Sector::get().get_objects_by_type()) { if (stalactite.is_hanging()) { - if (m_hit_points >= 3) { + if (!m_pinch_mode) { // Drop stalactites within 3 units of player, going out with each jump. float distancex = fabsf(stalactite.get_bbox().get_middle().x - player->get_bbox().get_middle().x); if (distancex < static_cast(m_stomp_count) * 32.0f) { @@ -308,6 +404,20 @@ Yeti::drop_stalactite() } } +void +Yeti::summon_snowball() +{ + Vector bs_pos = get_pos() + Vector(m_dir == Direction::LEFT ? -32.f : (get_bbox().get_width() + 1.f), 0.f); + Sector::get().add(bs_pos, m_dir, 150.f * (m_pinch_mode ? 1.2f : 1.f)); +} + +void +Yeti::summon_big_snowball() +{ + Vector bs_pos = Vector(get_bbox().get_middle().x - 44.f, get_bbox().get_top() - 89.f); + Sector::get().add(bs_pos, m_dir, true); +} + void Yeti::collision_solid(const CollisionHit& hit) { @@ -316,13 +426,17 @@ Yeti::collision_solid(const CollisionHit& hit) // Hit floor or roof. m_physic.set_velocity_y(0); switch (m_state) { - case JUMP_DOWN: - run(); - break; case RUN: + if (!m_just_threw) { + set_action("walking", m_dir); + } break; case JUMP_UP: break; + case THROW: + break; + case THROW_BIG: + break; case BE_ANGRY: // We just landed. if (!m_state_timer.started()) @@ -334,12 +448,18 @@ Yeti::collision_solid(const CollisionHit& hit) // Go to the other side after 3 jumps. if (m_stomp_count == 3) { - jump_down(); + m_just_hit = false; + if (m_pinch_mode) { + throw_big_snowballs(); + } + else { + run(); + } } else { // Jump again. - m_state_timer.start(STOMP_WAIT); + m_state_timer.start(STOMP_WAIT / (m_pinch_mode ? 1.2f : 1.f)); } } break; @@ -347,6 +467,8 @@ Yeti::collision_solid(const CollisionHit& hit) break; case FALLING: break; + case REMOVE_TUX: + break; } } else if (hit.left || hit.right) { // Hit wall. @@ -355,20 +477,12 @@ Yeti::collision_solid(const CollisionHit& hit) } } -bool -Yeti::is_flammable() const -{ - return false; -} - ObjectSettings Yeti::get_settings() { - ObjectSettings result = BadGuy::get_settings(); + ObjectSettings result = Boss::get_settings(); - result.add_text("hud-icon", &m_hud_icon, "hud-icon", "images/creatures/yeti/hudlife.png", OPTION_HIDDEN); result.add_bool(_("Fixed position"), &m_fixed_pos, "fixed-pos", false); - result.add_int(_("Lives"), &m_hit_points, "lives", 5); return result; } diff --git a/src/badguy/yeti.hpp b/src/badguy/yeti.hpp index 68aea592bb5..a3b1211ad1c 100644 --- a/src/badguy/yeti.hpp +++ b/src/badguy/yeti.hpp @@ -18,9 +18,9 @@ #ifndef HEADER_SUPERTUX_BADGUY_YETI_HPP #define HEADER_SUPERTUX_BADGUY_YETI_HPP -#include "badguy/badguy.hpp" +#include "badguy/boss.hpp" -class Yeti final : public BadGuy +class Yeti final : public Boss { public: Yeti(const ReaderMapping& mapping); @@ -30,13 +30,14 @@ class Yeti final : public BadGuy virtual void active_update(float dt_sec) override; virtual void collision_solid(const CollisionHit& hit) override; virtual bool collision_squished(GameObject& object) override; + virtual HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit) override; virtual void kill_fall() override; - virtual bool is_flammable() const override; static std::string class_name() { return "yeti"; } virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Yeti"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Boss::get_class_types().add(typeid(Yeti)); } virtual ObjectSettings get_settings() override; @@ -48,11 +49,12 @@ class Yeti final : public BadGuy private: void run(); void jump_up(); + void throw_snowballs(); + void throw_big_snowballs(); void be_angry(); void drop_stalactite(); - void jump_down(); - - void draw_hit_points(DrawingContext& context); + void summon_snowball(); + void summon_big_snowball(); void take_hit(Player& player); @@ -61,12 +63,14 @@ class Yeti final : public BadGuy private: enum YetiState { - JUMP_DOWN, RUN, JUMP_UP, + THROW, + THROW_BIG, BE_ANGRY, SQUISHED, - FALLING + FALLING, + REMOVE_TUX }; private: @@ -74,8 +78,6 @@ class Yeti final : public BadGuy Timer m_state_timer; Timer m_safe_timer; int m_stomp_count; - int m_hit_points; - SurfacePtr m_hud_head; float m_left_stand_x; float m_right_stand_x; @@ -83,12 +85,16 @@ class Yeti final : public BadGuy float m_right_jump_x; bool m_fixed_pos; - std::string m_hud_icon; + bool m_just_hit; + bool m_just_threw; + bool m_grabbed_tux; + bool m_jumped; class SnowExplosionParticle: public BadGuy { public: SnowExplosionParticle(const Vector& pos, const Vector& velocity); + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Yeti::SnowExplosionParticle)); } }; private: diff --git a/src/badguy/yeti_stalactite.hpp b/src/badguy/yeti_stalactite.hpp index 70a4bd01460..01904f07b39 100644 --- a/src/badguy/yeti_stalactite.hpp +++ b/src/badguy/yeti_stalactite.hpp @@ -33,6 +33,7 @@ class YetiStalactite final : public Stalactite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Yeti's Stalactite"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Stalactite::get_class_types().add(typeid(YetiStalactite)); } void start_shaking(); bool is_hanging() const; diff --git a/src/badguy/zeekling.hpp b/src/badguy/zeekling.hpp index 73577595821..28efb11f88d 100644 --- a/src/badguy/zeekling.hpp +++ b/src/badguy/zeekling.hpp @@ -38,6 +38,7 @@ class Zeekling final : public BadGuy virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Zeekling"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(Zeekling)); } virtual bool is_snipable() const override { return true; } private: diff --git a/src/editor/bezier_marker.hpp b/src/editor/bezier_marker.hpp index 383416bba6e..daf2e038a57 100644 --- a/src/editor/bezier_marker.hpp +++ b/src/editor/bezier_marker.hpp @@ -26,6 +26,7 @@ class BezierMarker final : public MarkerObject { public: BezierMarker(Path::Node* node, Vector* bezier_pos); + virtual GameObjectClasses get_class_types() const override { return MarkerObject::get_class_types().add(typeid(BezierMarker)); } virtual void move_to(const Vector& pos) override; virtual Vector get_point_vector() const override; diff --git a/src/editor/marker_object.hpp b/src/editor/marker_object.hpp index 03cb561d128..8341d182b79 100644 --- a/src/editor/marker_object.hpp +++ b/src/editor/marker_object.hpp @@ -28,6 +28,7 @@ class MarkerObject : public MovingObject public: MarkerObject(const Vector& pos); MarkerObject(); + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(MarkerObject)); } virtual void update(float dt_sec) override {} virtual void draw(DrawingContext& context) override; diff --git a/src/editor/node_marker.hpp b/src/editor/node_marker.hpp index 1a0f1e964bf..1014a960d35 100644 --- a/src/editor/node_marker.hpp +++ b/src/editor/node_marker.hpp @@ -25,6 +25,7 @@ class NodeMarker final : public MarkerObject { public: NodeMarker(std::vector::iterator node_iterator, size_t id_, UID before, UID after); + virtual GameObjectClasses get_class_types() const override { return MarkerObject::get_class_types().add(typeid(NodeMarker)); } virtual void move_to(const Vector& pos) override; virtual void editor_delete() override; diff --git a/src/editor/overlay_widget.cpp b/src/editor/overlay_widget.cpp index 7cccb9628ec..6e33179d161 100644 --- a/src/editor/overlay_widget.cpp +++ b/src/editor/overlay_widget.cpp @@ -112,6 +112,7 @@ EditorOverlayWidget::delete_markers() if (m_selected_object && m_selected_object->is_valid()) m_selected_object->editor_deselect(); + sector->flush_game_objects(); // Flush any markers queued to be added for (auto& marker : sector->get_objects_by_type()) { marker.remove_me(); diff --git a/src/editor/resize_marker.hpp b/src/editor/resize_marker.hpp index 5a832ae6269..ba0f16d623b 100644 --- a/src/editor/resize_marker.hpp +++ b/src/editor/resize_marker.hpp @@ -32,6 +32,7 @@ class ResizeMarker final : public MarkerObject public: ResizeMarker(MovingObject* obj, Side vert, Side horz); + virtual GameObjectClasses get_class_types() const override { return MarkerObject::get_class_types().add(typeid(ResizeMarker)); } void move_to(const Vector& pos) override; Vector get_point_vector() const override; diff --git a/src/editor/tilebox.cpp b/src/editor/tilebox.cpp index a5264872918..fc63e1ba612 100644 --- a/src/editor/tilebox.cpp +++ b/src/editor/tilebox.cpp @@ -22,6 +22,7 @@ #include "editor/tile_selection.hpp" #include "editor/tip.hpp" #include "supertux/colorscheme.hpp" +#include "supertux/debug.hpp" #include "supertux/gameconfig.hpp" #include "supertux/game_object_factory.hpp" #include "supertux/globals.hpp" @@ -108,7 +109,7 @@ EditorTilebox::draw_tilegroup(DrawingContext& context) auto position = get_tile_coords(pos, false); m_editor.get_tileset()->get(tile_ID).draw(context.color(), position, LAYER_GUI - 9); - if (g_config->developer_mode && m_active_tilegroup->developers_group) + if (g_config->developer_mode && (m_active_tilegroup->developers_group || g_debug.show_toolbox_tile_ids) && tile_ID != 0) { // Display tile ID on top of tile: context.color().draw_text(Resources::console_font, std::to_string(tile_ID), diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index 86aefee9acf..8c235b05dcf 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -145,110 +145,74 @@ Menu::delete_item(int pos_) ItemHorizontalLine& Menu::add_hl() { - auto item = std::make_unique(); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(); } ItemLabel& Menu::add_label(const std::string& text) { - auto item = std::make_unique(text); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text); } ItemControlField& Menu::add_controlfield(int id, const std::string& text, const std::string& mapping) { - auto item = std::make_unique(text, mapping, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, mapping, id); } ItemTextField& Menu::add_textfield(const std::string& text, std::string* input, int id) { - auto item = std::make_unique(text, input, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, input, id); } ItemScript& Menu::add_script(const std::string& text, std::string* script, int id) { - auto item = std::make_unique(text, script, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, script, id); } ItemScriptLine& Menu::add_script_line(std::string* input, int id) { - auto item = std::make_unique(input, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(input, id); } ItemIntField& Menu::add_intfield(const std::string& text, int* input, int id, bool positive) { - auto item = std::make_unique(text, input, id, positive); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, input, id, positive); } ItemFloatField& Menu::add_floatfield(const std::string& text, float* input, int id, bool positive) { - auto item = std::make_unique(text, input, id, positive); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, input, id, positive); } ItemAction& Menu::add_entry(int id, const std::string& text) { - auto item = std::make_unique(text, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, id); } ItemAction& Menu::add_entry(const std::string& text, const std::function& callback) { - auto item = std::make_unique(text, -1, callback); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, -1, callback); } ItemInactive& Menu::add_inactive(const std::string& text, bool default_color) { - auto item = std::make_unique(text, default_color); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, default_color); } ItemToggle& Menu::add_toggle(int id, const std::string& text, bool* toggled, bool center_text) { - auto item = std::make_unique(text, toggled, id, center_text); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, toggled, id, center_text); } ItemToggle& @@ -257,28 +221,19 @@ Menu::add_toggle(int id, const std::string& text, const std::function& set_func, bool center_text) { - auto item = std::make_unique(text, get_func, set_func, id, center_text); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, get_func, set_func, id, center_text); } ItemStringSelect& Menu::add_string_select(int id, const std::string& text, int* selected, const std::vector& strings) { - auto item = std::make_unique(text, strings, selected, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, strings, selected, id); } ItemStringSelect& Menu::add_string_select(int id, const std::string& text, int default_item, const std::vector& strings) { - auto item = std::make_unique(text, strings, default_item, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, strings, default_item, id); } ItemAction& @@ -286,118 +241,84 @@ Menu::add_file(const std::string& text, std::string* input, const std::vector& item_processor, int id) { - auto item = std::make_unique(text, id, + return add_item(text, id, [input, extensions, basedir, path_relative_to_basedir, item_processor]() { MenuManager::instance().push_menu(std::make_unique(input, extensions, basedir, path_relative_to_basedir, nullptr, item_processor)); }); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; } ItemBack& Menu::add_back(const std::string& text, int id) { - auto item = std::make_unique(text, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, id); } ItemGoTo& Menu::add_submenu(const std::string& text, int submenu, int id) { - auto item = std::make_unique(text, submenu, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, submenu, id); } ItemColorChannelRGBA& -Menu::add_color_channel_rgba(float* input, Color channel, int id, bool is_linear) { - auto item = std::make_unique(input, channel, id, is_linear); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; +Menu::add_color_channel_rgba(float* input, Color channel, int id, bool is_linear) +{ + return add_item(input, channel, id, is_linear); } ItemColorChannelOKLab& -Menu::add_color_channel_oklab(Color* color, int channel) { - auto item = std::make_unique(color, channel, this); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; +Menu::add_color_channel_oklab(Color* color, int channel) +{ + return add_item(color, channel, this); } ItemPaths& -Menu::add_path_settings(const std::string& text, PathObject& target, const std::string& path_ref) { - auto item = std::make_unique(text, target, path_ref); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; +Menu::add_path_settings(const std::string& text, PathObject& target, const std::string& path_ref) +{ + return add_item(text, target, path_ref); } ItemColorDisplay& -Menu::add_color_display(Color* color, int id) { - auto item = std::make_unique(color, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; +Menu::add_color_display(Color* color, int id) +{ + return add_item(color, id); } ItemColor& -Menu::add_color(const std::string& text, Color* color, int id) { - auto item = std::make_unique(text, color, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; +Menu::add_color(const std::string& text, Color* color, int id) +{ + return add_item(text, color, id); } ItemStringArray& Menu::add_string_array(const std::string& text, std::vector& items, int id) { - auto item = std::make_unique(text, items, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, items, id); } ItemImages& Menu::add_images(const std::string& image_path, int max_image_width, int max_image_height, int id) { - auto item = std::make_unique(image_path, max_image_width, max_image_height, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(image_path, max_image_width, max_image_height, id); } ItemImages& Menu::add_images(const std::vector& image_paths, int max_image_width, int max_image_height, int id) { - auto item = std::make_unique(image_paths, max_image_width, max_image_height, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(image_paths, max_image_width, max_image_height, id); } ItemList& Menu::add_list(const std::string& text, const std::vector& items, std::string* value_ptr, int id) { - auto item = std::make_unique(text, items, value_ptr, id); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(text, items, value_ptr, id); } ItemHorizontalMenu& Menu::add_horizontalmenu(int id, float height, float min_item_width) { - auto item = std::make_unique(id, height, min_item_width); - auto item_ptr = item.get(); - add_item(std::move(item)); - return *item_ptr; + return add_item(id, height, min_item_width); } void diff --git a/src/gui/menu.hpp b/src/gui/menu.hpp index 954d8f188d3..0e0a1d05053 100644 --- a/src/gui/menu.hpp +++ b/src/gui/menu.hpp @@ -133,6 +133,14 @@ class Menu protected: MenuItem& add_item(std::unique_ptr menu_item); MenuItem& add_item(std::unique_ptr menu_item, int pos_); + template + T& add_item(Args&&... args) + { + auto item = std::make_unique(std::forward(args)...); + auto item_ptr = item.get(); + add_item(std::move(item)); + return *item_ptr; + } void delete_item(int pos_); /** Recalculates the width for this menu */ diff --git a/src/gui/menu_filesystem.cpp b/src/gui/menu_filesystem.cpp index a8708989e11..31c1e683a91 100644 --- a/src/gui/menu_filesystem.cpp +++ b/src/gui/menu_filesystem.cpp @@ -29,7 +29,7 @@ #include "util/string_util.hpp" FileSystemMenu::FileSystemMenu(std::string* filename, const std::vector& extensions, - const std::string& basedir, bool path_relative_to_basedir, std::function callback, + const std::string& basedir, bool path_relative_to_basedir, std::function callback, const std::function& item_processor) : m_filename(filename), // when a basedir is given, 'filename' is relative to basedir, so diff --git a/src/gui/menu_filesystem.hpp b/src/gui/menu_filesystem.hpp index f05f6d0794a..5143b9ce29e 100644 --- a/src/gui/menu_filesystem.hpp +++ b/src/gui/menu_filesystem.hpp @@ -23,7 +23,7 @@ class FileSystemMenu final : public Menu { public: FileSystemMenu(std::string* filename, const std::vector& extensions, - const std::string& basedir, bool path_relative_to_basedir, const std::function callback = nullptr, + const std::string& basedir, bool path_relative_to_basedir, const std::function callback = nullptr, const std::function& item_processor = {}); ~FileSystemMenu() override; @@ -41,7 +41,7 @@ class FileSystemMenu final : public Menu std::vector m_directories; std::vector m_files; bool m_path_relative_to_basedir; - std::function m_callback; + std::function m_callback; std::function m_item_processor; private: diff --git a/src/interface/control_enum.hpp b/src/interface/control_enum.hpp index 9faab88e018..778a9389094 100644 --- a/src/interface/control_enum.hpp +++ b/src/interface/control_enum.hpp @@ -21,6 +21,8 @@ #include "interface/control.hpp" +#include "util/log.hpp" + template class ControlEnum : public InterfaceControl { diff --git a/src/math/anchor_point.hpp b/src/math/anchor_point.hpp index c2f87301bc2..8709dfbda42 100644 --- a/src/math/anchor_point.hpp +++ b/src/math/anchor_point.hpp @@ -24,19 +24,34 @@ class Rectf; +#ifdef DOXYGEN_SCRIPTING +/** + * @scripting + * @summary This module contains global anchor constants. + */ +namespace AnchorPoints { +#endif + +/** + * @scripting + */ enum AnchorPoint { - ANCHOR_TOP_LEFT, - ANCHOR_TOP, - ANCHOR_TOP_RIGHT, - ANCHOR_LEFT, - ANCHOR_MIDDLE, - ANCHOR_RIGHT, - ANCHOR_BOTTOM_LEFT, - ANCHOR_BOTTOM, - ANCHOR_BOTTOM_RIGHT, + ANCHOR_TOP_LEFT = 0, /*!< @description Top-left anchor point. */ + ANCHOR_TOP = 1, /*!< @description Top anchor point. */ + ANCHOR_TOP_RIGHT = 2, /*!< @description Top-right anchor point. */ + ANCHOR_LEFT = 3, /*!< @description Left anchor point. */ + ANCHOR_MIDDLE = 4, /*!< @description Middle anchor point. */ + ANCHOR_RIGHT = 5, /*!< @description Right anchor point. */ + ANCHOR_BOTTOM_LEFT = 6, /*!< @description Bottom-left anchor point. */ + ANCHOR_BOTTOM = 7, /*!< @description Bottom anchor point. */ + ANCHOR_BOTTOM_RIGHT = 8, /*!< @description Bottom-right anchor point. */ ANCHOR_LAST = ANCHOR_BOTTOM_RIGHT }; +#ifdef DOXYGEN_SCRIPTING +} // namespace AnchorPoints +#endif + const std::vector g_anchor_keys = { "topleft", "top", "topright", "left", "middle", "right", "bottomleft", "bottom", "bottomright" diff --git a/src/math/rectf.hpp b/src/math/rectf.hpp index 7952ea51808..1e374e28480 100644 --- a/src/math/rectf.hpp +++ b/src/math/rectf.hpp @@ -81,7 +81,6 @@ class Rectf final m_size == other.m_size); } - // This is a temporary hack to pass x/y to ReaderMapping float& get_left() { return m_p1.x; } float& get_top() { return m_p1.y; } @@ -90,6 +89,9 @@ class Rectf final float get_top() const { return m_p1.y; } float get_bottom() const { return m_p1.y + m_size.height; } + float& get_width() { return m_size.width; } + float& get_height() { return m_size.height; } + float get_width() const { return m_size.width; } float get_height() const { return m_size.height; } diff --git a/src/object/ambient_light.hpp b/src/object/ambient_light.hpp index 34c4cead95e..43311a21ac2 100644 --- a/src/object/ambient_light.hpp +++ b/src/object/ambient_light.hpp @@ -37,6 +37,7 @@ class AmbientLight : public GameObject static std::string display_name() { return _("Ambient Light"); } virtual std::string get_display_name() const override { return display_name(); } virtual const std::string get_icon_path() const override { return "images/engine/editor/ambient_light.png"; } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(AmbientLight)); } virtual ObjectSettings get_settings() override; diff --git a/src/object/ambient_sound.cpp b/src/object/ambient_sound.cpp index cf1736aa5c4..aa8c3910735 100644 --- a/src/object/ambient_sound.cpp +++ b/src/object/ambient_sound.cpp @@ -19,6 +19,9 @@ #include +#include +#include + #include "audio/sound_manager.hpp" #include "audio/sound_source.hpp" #include "editor/editor.hpp" @@ -29,7 +32,6 @@ AmbientSound::AmbientSound(const ReaderMapping& mapping) : MovingObject(mapping), - ExposedObject(this), m_sample(), m_sound_source(), m_radius(), @@ -56,7 +58,6 @@ AmbientSound::AmbientSound(const ReaderMapping& mapping) : } AmbientSound::AmbientSound(const Vector& pos, float radius, float vol, const std::string& file) : - ExposedObject(this), m_sample(file), m_sound_source(), m_radius(radius), @@ -91,32 +92,6 @@ AmbientSound::get_settings() return result; } -#ifndef SCRIPTING_API -void -AmbientSound::set_pos(const Vector& pos) -{ - MovingObject::set_pos(pos); -} -#endif - -void -AmbientSound::set_pos(float x, float y) -{ - m_col.m_bbox.set_pos(Vector(x, y)); -} - -float -AmbientSound::get_pos_x() const -{ - return m_col.m_bbox.get_left(); -} - -float -AmbientSound::get_pos_y() const -{ - return m_col.m_bbox.get_top(); -} - HitResponse AmbientSound::collision(GameObject& other, const CollisionHit& hit_) { @@ -213,4 +188,14 @@ AmbientSound::prepare_sound_source() } } + +void +AmbientSound::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("AmbientSound"); + + cls.addFunc("get_pos_x", &MovingObject::get_x); + cls.addFunc("get_pos_y", &MovingObject::get_y); +} + /* EOF */ diff --git a/src/object/ambient_sound.hpp b/src/object/ambient_sound.hpp index 2bf0994f10d..e37403f7f68 100644 --- a/src/object/ambient_sound.hpp +++ b/src/object/ambient_sound.hpp @@ -20,17 +20,23 @@ #include "math/vector.hpp" #include "supertux/moving_object.hpp" -#include "scripting/ambient_sound.hpp" -#include "squirrel/exposed_object.hpp" #include "video/layer.hpp" class GameObject; class ReaderMapping; class SoundSource; -class AmbientSound final : public MovingObject, - public ExposedObject +/** + * @scripting + * @summary An ""AmbientSound"" that was given a name can be controlled by scripts. + * @instances An ""AmbientSound"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class AmbientSound final : public MovingObject { +public: + static void register_class(ssq::VM& vm); + public: AmbientSound(const ReaderMapping& mapping); AmbientSound(const Vector& pos, float radius, float vol, const std::string& file); @@ -40,19 +46,11 @@ class AmbientSound final : public MovingObject, static std::string class_name() { return "ambient-sound"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "AmbientSound"; } static std::string display_name() { return _("Ambient Sound"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } - - /** @name Scriptable Methods - @{ */ -#ifndef SCRIPTING_API - virtual void set_pos(const Vector& pos) override; -#endif - void set_pos(float x, float y); - float get_pos_x() const; - float get_pos_y() const; - /** @} */ + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(AmbientSound)); } virtual void draw(DrawingContext& context) override; @@ -63,6 +61,21 @@ class AmbientSound final : public MovingObject, virtual void stop_looping_sounds() override; virtual void play_looping_sounds() override; +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @deprecated Use ""get_x()"" instead! + * @description Returns the ambient sound's X coordinate. + */ + float get_pos_x() const; + /** + * @scripting + * @deprecated Use ""get_y()"" instead! + * @description Returns the ambient sound's Y coordinate. + */ + float get_pos_y() const; +#endif + protected: virtual void update(float dt_sec) override; diff --git a/src/object/background.cpp b/src/object/background.cpp index 66ba9657ac1..7008e00cb4d 100644 --- a/src/object/background.cpp +++ b/src/object/background.cpp @@ -16,9 +16,12 @@ #include "object/background.hpp" -#include #include +#include +#include +#include + #include "editor/editor.hpp" #include "supertux/d_scope.hpp" #include "supertux/flip_level_transformer.hpp" @@ -31,7 +34,6 @@ #include "video/surface.hpp" Background::Background() : - ExposedObject(this), m_alignment(NO_ALIGNMENT), m_fill(false), m_layer(LAYER_BACKGROUND0), @@ -57,7 +59,6 @@ Background::Background() : Background::Background(const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), m_alignment(NO_ALIGNMENT), m_fill(false), m_layer(LAYER_BACKGROUND0), @@ -235,6 +236,12 @@ Background::update(float dt_sec) } } +void +Background::set_color(float red, float green, float blue, float alpha) +{ + m_color = Color(red, green, blue, alpha); +} + void Background::fade_color(Color color, float time) { @@ -246,6 +253,12 @@ Background::fade_color(Color color, float time) m_color = m_src_color; } +void +Background::fade_color(float red, float green, float blue, float alpha, float time) +{ + fade_color(Color(red, green, blue, alpha), time); +} + void Background::set_image(const std::string& name) { @@ -275,12 +288,35 @@ Background::set_speed(float speed) m_parallax_speed.y = speed; } +float +Background::get_color_red() const +{ + return m_color.red; +} + +float +Background::get_color_green() const +{ + return m_color.green; +} + +float +Background::get_color_blue() const +{ + return m_color.blue; +} + +float +Background::get_color_alpha() const +{ + return m_color.alpha; +} + void Background::draw_image(DrawingContext& context, const Vector& pos_) { const Sizef level(d_gameobject_manager->get_width(), d_gameobject_manager->get_height()); - const Sizef screen(context.get_width(), - context.get_height()); + const Sizef screen = context.get_viewport().get_size(); const Sizef parallax_image_size((1.0f - m_parallax_speed.x) * screen.width + level.width * m_parallax_speed.x, (1.0f - m_parallax_speed.y) * screen.height + level.height * m_parallax_speed.y); @@ -297,7 +333,6 @@ Background::draw_image(DrawingContext& context, const Vector& pos_) const int end_y = static_cast(ceilf((cliprect.get_bottom() - (pos_.y + img_h/2.0f)) / img_h)) + 1; Canvas& canvas = context.get_canvas(m_target); - context.set_flip(context.get_flip() ^ m_flip); if (m_fill) { @@ -370,7 +405,6 @@ Background::draw_image(DrawingContext& context, const Vector& pos_) break; } } - context.set_flip(context.get_flip() ^ m_flip); } void @@ -381,19 +415,27 @@ Background::draw(DrawingContext& context) if (!m_image) return; + + context.push_transform(); + if (!context.perspective_scale(m_parallax_speed.x, m_parallax_speed.y)) { + //The background is placed behind the camera. + context.pop_transform(); + return; + } + context.set_flip(context.get_flip() ^ m_flip); - Sizef level_size(d_gameobject_manager->get_width(), + const Sizef level_size(d_gameobject_manager->get_width(), d_gameobject_manager->get_height()); - Sizef screen(context.get_width(), - context.get_height()); - Sizef translation_range = level_size - screen; - Vector center_offset(context.get_translation().x - translation_range.width / 2.0f, - context.get_translation().y - translation_range.height / 2.0f); - - Vector pos(level_size.width / 2, - level_size.height / 2); + const Sizef screen = context.get_viewport().get_size(); + const Sizef translation_range = level_size - screen; + const Vector center_offset(context.get_translation().x - translation_range.width / 2.0f, + context.get_translation().y - translation_range.height / 2.0f); + + const Vector pos(level_size.width / 2, + level_size.height / 2); draw_image(context, pos + m_scroll_offset + Vector(center_offset.x * (1.0f - m_parallax_speed.x), center_offset.y * (1.0f - m_parallax_speed.y))); + context.pop_transform(); } namespace { @@ -500,4 +542,21 @@ Background::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } + +void +Background::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Background", vm.findClass("GameObject")); + + cls.addFunc("set_image", &Background::set_image); + cls.addFunc("set_images", &Background::set_images); + cls.addFunc("set_speed", &Background::set_speed); + cls.addFunc("get_color_red", &Background::get_color_red); + cls.addFunc("get_color_green", &Background::get_color_green); + cls.addFunc("get_color_blue", &Background::get_color_blue); + cls.addFunc("get_color_alpha", &Background::get_color_alpha); + cls.addFunc("set_color", &Background::set_color); + cls.addFunc("fade_color", &Background::fade_color); +} + /* EOF */ diff --git a/src/object/background.hpp b/src/object/background.hpp index 9c438bf3a43..94bbbee5784 100644 --- a/src/object/background.hpp +++ b/src/object/background.hpp @@ -18,8 +18,6 @@ #define HEADER_SUPERTUX_OBJECT_BACKGROUND_HPP #include "math/vector.hpp" -#include "scripting/background.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/game_object.hpp" #include "supertux/timer.hpp" #include "video/blend.hpp" @@ -29,9 +27,16 @@ class ReaderMapping; -class Background final : public GameObject, - public ExposedObject +/** + * @scripting + * @summary A ""Background"" that was given a name can be manipulated by scripts. + * @instances A ""Background"" can be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Background final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: Background(); Background(const ReaderMapping& reader); @@ -42,8 +47,10 @@ class Background final : public GameObject, static std::string class_name() { return "background"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Background"; } static std::string display_name() { return _("Background"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Background)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/background.png"; @@ -54,10 +61,6 @@ class Background final : public GameObject, virtual void on_flip(float height) override; - void set_image(const std::string& name); - void set_images(const std::string& name_top, const std::string& name_middle, const std::string& name_bottom); - void set_speed(float bgd_speed); - void draw_image(DrawingContext& context, const Vector& pos); const std::string& get_image() const { return m_imagefile; } @@ -65,9 +68,70 @@ class Background final : public GameObject, int get_layer() const { return m_layer; } Color get_color() const { return m_color; } - void set_color(Color color) { m_color = color; } void fade_color(Color color, float time); + /** + * @scripting + * @description Sets the background's image. + * @param string $image + */ + void set_image(const std::string& image); + /** + * @scripting + * @description Sets the top, middle and bottom background images. + * @param string $top_image + * @param string $middle_image + * @param string $bottom_image + */ + void set_images(const std::string& top_image, const std::string& middle_image, + const std::string& bottom_image); + /** + * @scripting + * @description Sets the background speed. + * @param float $speed + */ + void set_speed(float speed); + + /** + * @scripting + * @description Returns the red color value. + */ + float get_color_red() const; + /** + * @scripting + * @description Returns the green color value. + */ + float get_color_green() const; + /** + * @scripting + * @description Returns the blue color value. + */ + float get_color_blue() const; + /** + * @scripting + * @description Returns the alpha color value. + */ + float get_color_alpha() const; + /** + * @scripting + * @description Sets the background color. + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + */ + void set_color(float red, float green, float blue, float alpha); + /** + * @scripting + * @description Fades to specified background color in ""time"" seconds. + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + * @param float $time + */ + void fade_color(float red, float green, float blue, float alpha, float time); + private: enum Alignment { NO_ALIGNMENT, diff --git a/src/object/bicycle_platform.hpp b/src/object/bicycle_platform.hpp index 9df28d6c09f..fcec2c931a9 100644 --- a/src/object/bicycle_platform.hpp +++ b/src/object/bicycle_platform.hpp @@ -28,6 +28,7 @@ class BicyclePlatformChild : public MovingSprite public: BicyclePlatformChild(const ReaderMapping& reader, float angle_offset, BicyclePlatform& parent); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(BicyclePlatformChild)); } virtual void update(float dt_sec) override; virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; @@ -66,6 +67,7 @@ class BicyclePlatform final : public GameObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Bicycle Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(BicyclePlatform)); } virtual ObjectSettings get_settings() override; virtual void editor_delete() override; diff --git a/src/object/bigsnowball.cpp b/src/object/bigsnowball.cpp new file mode 100644 index 00000000000..3f8239b8ebf --- /dev/null +++ b/src/object/bigsnowball.cpp @@ -0,0 +1,223 @@ +// Copyright (C) 2024 Daniel Ward +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "object/bigsnowball.hpp" + +#include "badguy/badguy.hpp" +#include "badguy/yeti.hpp" +#include "math/random.hpp" +#include "math/util.hpp" +#include "object/bumper.hpp" +#include "object/player.hpp" +#include "object/sprite_particle.hpp" +#include "object/trampoline.hpp" +#include "sprite/sprite.hpp" +#include "sprite/sprite_manager.hpp" +#include "supertux/sector.hpp" +#include "supertux/tile.hpp" +#include "util/reader_mapping.hpp" + +namespace { + const float SPEED_X = 350.f; + const float SPEED_Y = -300.f; +} + +BigSnowball::BigSnowball(const ReaderMapping& reader) : + MovingSprite(reader, "images/objects/big_snowball/big_snowball.sprite", LAYER_OBJECTS, COLGROUP_MOVING_STATIC), + m_physic(), + m_dir(Direction::LEFT), + m_speed(), + m_break_on_impact(), + m_bounce() +{ + reader.get("speed", m_speed, SPEED_X); + reader.get("break-on-impact", m_break_on_impact, false); + reader.get("bounce", m_bounce, true); + std::string dir_str; + if (reader.get("direction", dir_str)) { + m_dir = string_to_dir(dir_str); + } + m_physic.set_velocity_x(m_dir == Direction::RIGHT ? m_speed : -m_speed); + set_action("normal", m_dir); +} + +BigSnowball::BigSnowball(const Vector& pos, const Direction& dir, bool bounce) : + MovingSprite(pos, "images/objects/big_snowball/big_snowball.sprite", LAYER_OBJECTS, COLGROUP_MOVING_STATIC), + m_physic(), + m_dir(Direction::LEFT), + m_speed(), + m_break_on_impact(), + m_bounce() +{ + // settings used by Yeti when it throws it + m_dir = dir; + m_speed = SPEED_X; + m_break_on_impact = true; + m_bounce = false; + m_physic.set_velocity_x(m_dir == Direction::RIGHT ? SPEED_X : -SPEED_X); + if (bounce) { + m_physic.set_velocity_y(SPEED_Y); + } + set_action("normal", m_dir); +} + +ObjectSettings +BigSnowball::get_settings() +{ + ObjectSettings result = MovingSprite::get_settings(); + + result.add_direction(_("Direction"), &m_dir, { Direction::RIGHT, Direction::LEFT }, "direction"); + result.add_float(_("Speed"), &m_speed, "speed", SPEED_X); + result.add_bool(_("Break on impact?"), &m_break_on_impact, "break-on-impact", false); + result.add_bool(_("Bounce?"), &m_bounce, "bounce", true); + result.reorder({ "direction", "speed", "break-on-impact", "bounce", "sprite", "x", "y" }); + return result; +} + +void +BigSnowball::update(float dt_sec) +{ + if (get_bbox().get_top() > Sector::get().get_height()) { + remove_me(); + } + + // Left-right faux collision + + Rectf side_look_box = get_bbox().grown(-1.f); + side_look_box.set_left(get_bbox().get_left() + (m_dir == Direction::LEFT ? -1.f : 1.f)); + side_look_box.set_right(get_bbox().get_right() + (m_dir == Direction::LEFT ? -1.f : 1.f)); + if (!Sector::get().is_free_of_statics(side_look_box)) + { + if (m_break_on_impact) { + spawn_particles(); + } + else + { + m_dir = m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT; + set_action(m_dir); + m_physic.set_velocity_x(-m_physic.get_velocity_x()); + } + } + + Rectf spikebox = get_bbox().grown(-6.f); + spikebox.set_bottom(get_bbox().get_bottom() - (m_physic.get_velocity_y() > 300.f ? 6.f : 40.f)); + if (!Sector::get().is_free_of_tiles(spikebox, false, Tile::HURTS)) { + spawn_particles(); + } + + bool in_water = !Sector::get().is_free_of_tiles(get_bbox(), true, Tile::WATER); + + Vector movement = m_physic.get_movement(dt_sec) * Vector(in_water ? 0.4f : 1.f, in_water ? 0.6f : 1.f); + m_sprite->set_angle(m_sprite->get_angle() + movement.x * 3.141592653898f / 2.f); + m_col.set_movement(movement); + //m_col.propagate_movement(movement); +} + +HitResponse +BigSnowball::collision(GameObject& other, const CollisionHit& hit) +{ + // ignore collisions with yeti + auto yeti = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (yeti) { + return ABORT_MOVE; + } + + auto badguy = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (badguy && ((m_dir == Direction::LEFT && hit.left) || (m_dir == Direction::RIGHT && hit.right) || hit.bottom)) + { + badguy->kill_fall(); + return ABORT_MOVE; + } + + auto player = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (player && player->m_does_buttjump && hit.top) + { + spawn_particles(); + return ABORT_MOVE; + } + + auto bs = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (bs) { + collision_solid(hit); + return ABORT_MOVE; + } + + auto tramp = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (tramp) + { + m_physic.set_velocity_y(-500.f); + tramp->bounce(); + return ABORT_MOVE; + } + + auto bumper = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (bumper) + { + m_physic.set_velocity_x(-m_physic.get_velocity_x()); + m_dir = m_dir == Direction::LEFT ? Direction::RIGHT : Direction::LEFT; + bumper->bounce(); + return ABORT_MOVE; + } + + return FORCE_MOVE; +} + +void +BigSnowball::collision_solid(const CollisionHit& hit) +{ + if (hit.bottom) + { + if (m_physic.get_velocity_y() > 10.f && m_bounce) { + m_physic.set_velocity_y(-std::pow(m_physic.get_velocity_y(), (9.f / 10.f))); + } + else { + m_physic.set_velocity_y(0.f); + } + } + + if ((hit.left || hit.right) && m_break_on_impact) { + spawn_particles(); + } + + if (!m_break_on_impact) + { + if (m_dir == Direction::LEFT && hit.left) + { + m_physic.set_velocity_x(m_speed); + m_dir = Direction::RIGHT; + } + if (m_dir == Direction::RIGHT && hit.right) + { + m_physic.set_velocity_x(-m_speed); + m_dir = Direction::LEFT; + } + } +} + +void +BigSnowball::spawn_particles() +{ + for (int i = 0; i < 8; i++) + { + Sector::get().add(m_sprite_name, "particle", + get_bbox().get_middle() + (15.f * Vector(std::cos(math::PI_4*static_cast(i)), std::sin(math::PI_4*static_cast(i)))), + ANCHOR_MIDDLE, (150.f * (glm::normalize(Vector(std::cos(math::PI_4*static_cast(i)), std::sin(math::PI_4*static_cast(i)))))) + + Vector(gameRandom.randf(-40.f, 40.f), gameRandom.randf(-40.f, 40.f)), + Vector(0.f, 1000.f), LAYER_OBJECTS + 1, true); + } + remove_me(); +} + +/* EOF */ diff --git a/src/object/bigsnowball.hpp b/src/object/bigsnowball.hpp new file mode 100644 index 00000000000..757056f45f1 --- /dev/null +++ b/src/object/bigsnowball.hpp @@ -0,0 +1,60 @@ +// Copyright (C) 2024 Daniel Ward +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_OBJECT_BIGSNOWBALL_HPP +#define HEADER_SUPERTUX_OBJECT_BIGSNOWBALL_HPP + +#include "object/moving_sprite.hpp" + +#include "supertux/physic.hpp" + +enum class Direction; + +class BigSnowball final : public MovingSprite +{ +public: + BigSnowball(const ReaderMapping& reader); + BigSnowball(const Vector& pos, const Direction& dir, bool bounce = false); + + virtual ObjectSettings get_settings() override; + + virtual void update(float dt_sec) override; + virtual void collision_solid(const CollisionHit& hit) override; + virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; + + static std::string class_name() { return "bigsnowball"; } + virtual std::string get_class_name() const override { return class_name(); } + static std::string display_name() { return _("Big Snowball"); } + virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(BigSnowball)); } + +private: + void spawn_particles(); + +private: + Physic m_physic; + Direction m_dir; + float m_speed; + bool m_break_on_impact; + bool m_bounce; + +private: + BigSnowball(const BigSnowball&) = delete; + BigSnowball& operator=(const BigSnowball&) = delete; +}; + +#endif + +/* EOF */ diff --git a/src/object/block.hpp b/src/object/block.hpp index 8e647bf4852..50345044f89 100644 --- a/src/object/block.hpp +++ b/src/object/block.hpp @@ -30,6 +30,8 @@ class Block : public MovingSprite Block(const Vector& pos, const std::string& sprite_file); Block(const ReaderMapping& mapping, const std::string& sprite_file); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Block)); } + virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/bonus_block.hpp b/src/object/bonus_block.hpp index 9b7ec20239d..924f59bc0ad 100644 --- a/src/object/bonus_block.hpp +++ b/src/object/bonus_block.hpp @@ -61,6 +61,7 @@ class BonusBlock final : public Block virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Bonus Block"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Block::get_class_types().add(typeid(BonusBlock)); } virtual ObjectSettings get_settings() override; GameObjectTypes get_types() const override; diff --git a/src/object/bouncy_coin.hpp b/src/object/bouncy_coin.hpp index 79c8099a65d..67f2a8de3c6 100644 --- a/src/object/bouncy_coin.hpp +++ b/src/object/bouncy_coin.hpp @@ -27,6 +27,7 @@ class BouncyCoin final : public GameObject public: BouncyCoin(const Vector& pos, bool emerge = false, const std::string& sprite_path = "images/objects/coin/coin.sprite"); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(BouncyCoin)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; virtual bool is_saveable() const override { diff --git a/src/object/brick.hpp b/src/object/brick.hpp index ffe8f0432c1..21803d4de37 100644 --- a/src/object/brick.hpp +++ b/src/object/brick.hpp @@ -33,6 +33,7 @@ class Brick : public Block virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Brick"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Block::get_class_types().add(typeid(Brick)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; @@ -69,6 +70,7 @@ class HeavyBrick : public Brick virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Heavy Brick"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Brick::get_class_types().add(typeid(HeavyBrick)); } GameObjectTypes get_types() const override { return {}; } diff --git a/src/object/bullet.hpp b/src/object/bullet.hpp index aefdbbbf8c4..601c35b1d0a 100644 --- a/src/object/bullet.hpp +++ b/src/object/bullet.hpp @@ -31,6 +31,8 @@ class Bullet final : public MovingObject public: Bullet(const Vector& pos, const Vector& xm, Direction dir, BonusType type, Player& player); + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(Bullet)); } + virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; virtual void collision_solid(const CollisionHit& hit) override; diff --git a/src/object/bumper.cpp b/src/object/bumper.cpp index 3e28edb4d91..aed2c14b563 100644 --- a/src/object/bumper.cpp +++ b/src/object/bumper.cpp @@ -101,8 +101,7 @@ Bumper::collision(GameObject& other, const CollisionHit& hit) { player->get_physic().set_velocity(0.f, player->is_swimming() ? 0.f : BOUNCE_Y); player->sideways_push(m_dir == Direction::LEFT ? -BOUNCE_X : BOUNCE_X); - SoundManager::current()->play(TRAMPOLINE_SOUND, get_pos()); - set_action("swinging", m_dir, 1); + bounce(); } auto badguy = dynamic_cast (&other); @@ -143,4 +142,11 @@ Bumper::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } +void +Bumper::bounce() +{ + SoundManager::current()->play(TRAMPOLINE_SOUND, get_pos()); + set_action("swinging", m_dir, 1); +} + /* EOF */ diff --git a/src/object/bumper.hpp b/src/object/bumper.hpp index bc9b40c8700..536427122ac 100644 --- a/src/object/bumper.hpp +++ b/src/object/bumper.hpp @@ -37,12 +37,15 @@ class Bumper final : public StickyObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Bumper"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyObject::get_class_types().add(typeid(Bumper)); } virtual void after_editor_set() override; virtual void on_flip(float height) override; Physic& get_physic(); + void bounce(); + private: Physic m_physic; diff --git a/src/object/camera.cpp b/src/object/camera.cpp index 306ba03e55b..65ed00eb89d 100644 --- a/src/object/camera.cpp +++ b/src/object/camera.cpp @@ -19,9 +19,14 @@ #include +#include +#include + #include "math/random.hpp" #include "math/util.hpp" #include "object/player.hpp" +#include "supertux/gameconfig.hpp" +#include "supertux/globals.hpp" #include "supertux/level.hpp" #include "supertux/sector.hpp" #include "util/reader_mapping.hpp" @@ -32,11 +37,6 @@ /* Very small value, used in Camera checks. */ static const float CAMERA_EPSILON = .00001f; -/* This is the fractional distance toward the peek - position to move each frame; lower is slower, - 0 is never get there, 1 is instant. */ -static const float PEEK_ARRIVE_RATIO = 0.03f; - /** * For the multiplayer camera, the camera will ensure all players are visible. * These variables allow establishing a minimum zone around them that will also @@ -52,7 +52,6 @@ static const float MULTIPLAYER_CAM_WEIGHT = 0.1f; Camera::Camera(const std::string& name) : GameObject(name), - ExposedObject(this), m_mode(Mode::NORMAL), m_defaultmode(Mode::NORMAL), m_screen_size(static_cast(SCREEN_WIDTH), static_cast(SCREEN_HEIGHT)), @@ -89,7 +88,6 @@ Camera::Camera(const std::string& name) : Camera::Camera(const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), m_mode(Mode::NORMAL), m_defaultmode(Mode::NORMAL), m_screen_size(static_cast(SCREEN_WIDTH), static_cast(SCREEN_HEIGHT)), @@ -368,8 +366,8 @@ Camera::keep_in_bounds(const Rectf& bounds) void Camera::keep_in_bounds(Vector& translation_) { - float width = d_sector->get_width(); - float height = d_sector->get_height(); + float width = get_parent()->get_width(); + float height = get_parent()->get_height(); // Remove any earthquake offset from the translation. translation_.y -= m_earthquake_last_offset; @@ -487,11 +485,8 @@ Camera::update_scroll_normal(float dt_sec) else if (player.peeking_direction_y() == Direction::DOWN) peek_to_y = top_edge - translation_compensation_y; - float peek_move_y = (peek_to_y - m_peek_pos.y) * PEEK_ARRIVE_RATIO; - if (fabsf(peek_move_y) < 1.0f) - peek_move_y = 0.0; - - m_peek_pos.y += peek_move_y; + if (m_translation.y + m_screen_size.height < get_parent()->get_height()) + m_peek_pos.y += (peek_to_y - m_peek_pos.y) * g_config->camera_peek_multiplier; m_translation.y -= m_peek_pos.y; m_translation.y = math::clamp(m_translation.y, @@ -550,11 +545,7 @@ Camera::update_scroll_normal(float dt_sec) else if (player.peeking_direction_x() == Direction::RIGHT) peek_to_x = left_edge - translation_compensation_x; - float peek_move_x = (peek_to_x - m_peek_pos.x) * PEEK_ARRIVE_RATIO; - if (fabsf(peek_move_x) < 1.0f) - peek_move_x = 0.0f; - - m_peek_pos.x += peek_move_x; + m_peek_pos.x += (peek_to_x - m_peek_pos.x) * g_config->camera_peek_multiplier; m_translation.x -= m_peek_pos.x; m_translation.x = math::clamp(m_translation.x, @@ -645,7 +636,7 @@ Camera::update_scroll_normal_multiplayer(float dt_sec) void Camera::update_scroll_autoscroll(float dt_sec) { - if (!d_sector->get_object_count([](const Player& p) { return !p.is_dead() && !p.is_dying(); })) + if (!get_parent()->get_object_count([](const Player& p) { return !p.is_dead() && !p.is_dying(); })) return; get_walker()->update(dt_sec); @@ -774,6 +765,95 @@ Camera::ease_scale(float scale, float time, easing ease, AnchorPoint anchor) } } +void +Camera::set_pos(float x, float y) +{ + scroll_to(Vector(x, y), 0.0f); +} + +void +Camera::move(float x, float y) +{ + scroll_to(m_translation + Vector(x, y), 0.0f); +} + +void +Camera::set_mode(const std::string& mode) +{ + if (mode == "normal") + m_mode = Mode::NORMAL; + else if (mode == "manual") + m_mode = Mode::MANUAL; + else + log_warning << "Camera mode '" << mode << "' unknown." << std::endl; +} + +void +Camera::scroll_to(float x, float y, float scrolltime) +{ + scroll_to(Vector(x, y), scrolltime); +} + +void +Camera::set_scale(float scale) +{ + m_scale = scale; +} + +void +Camera::set_scale_anchor(float scale, int anchor) +{ + ease_scale_anchor(scale, 0, anchor, ""); +} + +void +Camera::scale(float scale, float time) +{ + ease_scale(scale, time, ""); +} + +void +Camera::scale_anchor(float scale, float time, int anchor) +{ + ease_scale_anchor(scale, time, anchor, ""); +} + +void +Camera::ease_scale(float scale, float time, const std::string& ease) +{ + ease_scale_anchor(scale, time, AnchorPoint::ANCHOR_MIDDLE, ease); +} + +void +Camera::ease_scale_anchor(float scale, float time, int anchor, const std::string& ease) +{ + ease_scale(scale, time, getEasingByName(EasingMode_from_string(ease)), static_cast(anchor)); +} + +float +Camera::get_screen_width() const +{ + return m_screen_size.width; +} + +float +Camera::get_screen_height() const +{ + return m_screen_size.height; +} + +float +Camera::get_x() const +{ + return m_translation.x; +} + +float +Camera::get_y() const +{ + return m_translation.y; +} + Vector Camera::get_center() const { @@ -806,4 +886,34 @@ Camera::is_saveable() const return !(Level::current() && Level::current()->is_worldmap()); } + + +void +Camera::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Camera", vm.findClass("GameObject")); + + PathObject::register_members(cls); + + cls.addFunc("shake", &Camera::shake); + cls.addFunc("start_earthquake", &Camera::start_earthquake); + cls.addFunc("stop_earthquake", &Camera::stop_earthquake); + cls.addFunc("set_pos", &Camera::set_pos); + cls.addFunc("move", &Camera::move); + cls.addFunc("set_mode", &Camera::set_mode); + cls.addFunc("scroll_to", &Camera::scroll_to); + cls.addFunc("get_current_scale", &Camera::get_current_scale); + cls.addFunc("get_target_scale", &Camera::get_target_scale); + cls.addFunc("set_scale", &Camera::set_scale); + cls.addFunc("set_scale_anchor", &Camera::set_scale_anchor); + cls.addFunc("scale", &Camera::scale); + cls.addFunc("scale_anchor", &Camera::scale_anchor); + cls.addFunc("ease_scale", &Camera::ease_scale); + cls.addFunc("ease_scale_anchor", &Camera::ease_scale_anchor); + cls.addFunc("get_screen_width", &Camera::get_screen_width); + cls.addFunc("get_screen_height", &Camera::get_screen_height); + cls.addFunc("get_x", &Camera::get_x); + cls.addFunc("get_y", &Camera::get_y); +} + /* EOF */ diff --git a/src/object/camera.hpp b/src/object/camera.hpp index 62d5628fd1c..f91a9d34b32 100644 --- a/src/object/camera.hpp +++ b/src/object/camera.hpp @@ -24,8 +24,6 @@ #include "math/size.hpp" #include "math/vector.hpp" #include "object/path_object.hpp" -#include "scripting/camera.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/game_object.hpp" #include "supertux/timer.hpp" @@ -33,10 +31,18 @@ class Path; class PathWalker; class ReaderMapping; +/** + * @scripting + * @summary A ""Camera"" that was given a name can be manipulated by scripts. + * @instances An instance named ""Camera"" (""sector.Camera"" in the console) is available.${SRG_NEWPARAGRAPH} + The mode of the camera is either ""normal"" (the camera is following the player) or ""autoscroll"". In the latter mode, the camera is forced along a specified path. + */ class Camera final : public GameObject, - public ExposedObject, public PathObject { +public: + static void register_class(ssq::VM& vm); + public: enum class Mode { @@ -58,8 +64,10 @@ class Camera final : public GameObject, static std::string class_name() { return "camera"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Camera"; } static std::string display_name() { return _("Camera"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(PathObject)).add(typeid(Camera)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; @@ -118,13 +126,107 @@ class Camera final : public GameObject, /** get the scale towards which the camera is moving */ float get_target_scale() const { return m_scale_target; } - /** Instantly set the scale of the camera */ - void set_scale(float scale) { m_scale = scale; } - /** smoothly slide the scale and anchor position of the camera towards a new value */ void ease_scale(float scale, float time, easing ease, AnchorPoint anchor = AnchorPoint::ANCHOR_MIDDLE); /** @} */ + /** + * @scripting + * @description Moves the camera to the specified absolute position. The origin is at the top left. + * @param float $x + * @param float $y + */ + void set_pos(float x, float y); + /** + * @scripting + * @description Moves the camera ""x"" to the left and ""y"" down. + * @param float $x + * @param float $y + */ + void move(float x, float y); + /** + * @scripting + * @description Sets the camera mode. + * @param string $mode The mode can be "normal" or "manual". + */ + void set_mode(const std::string& mode); + /** + * @scripting + * @description Scrolls the camera to specific coordinates in ""scrolltime"" seconds. + * @param float $x + * @param float $y + * @param float $scrolltime + */ + void scroll_to(float x, float y, float scrolltime); + /** + * @scripting + * @description Sets the scale factor. + * @param float $scale + */ + void set_scale(float scale); + /** + * @scripting + * @description Sets the scale factor and the target position anchor. + NOTE: Target position anchor is only applied, if the camera is in "manual" mode. + * @param float $scale + * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). + */ + void set_scale_anchor(float scale, int anchor); + /** + * @scripting + * @description Fades to a specified scale factor in ""time"" seconds. + * @param float $scale + * @param float $time + */ + void scale(float scale, float time); + /** + * @scripting + * @description Fades to a specified scale factor and target position anchor in ""time"" seconds. + NOTE: Target position anchor is only applied, if the camera is in "manual" mode. + * @param float $scale + * @param float $time + * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). + */ + void scale_anchor(float scale, float time, int anchor); + /** + * @scripting + * @description Fades to a specified scale factor in ""time"" seconds with easing (smooth movement). + * @param float $scale + * @param float $time + * @param string $ease + */ + void ease_scale(float scale, float time, const std::string& ease); + /** + * @scripting + * @description Fades to a specified scale factor and target position anchor in ""time"" seconds with easing (smooth movement). + NOTE: Target position anchor is only applied, if the camera is in "manual" mode. + * @param float $scale + * @param float $time + * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). + * @param string $ease + */ + void ease_scale_anchor(float scale, float time, int anchor, const std::string& ease); + /** + * @scripting + * @description Gets the current width of the screen. + */ + float get_screen_width() const; + /** + * @scripting + * @description Gets the current height of the screen. + */ + float get_screen_height() const; + /** + * @scripting + * @description Gets the X coordinate of the top-left corner of the screen. + */ + float get_x() const; + /** + * @scripting + * @description Gets the Y coordinate of the top-left corner of the screen. + */ + float get_y() const; + private: void keep_in_bounds(Vector& vector); diff --git a/src/object/candle.cpp b/src/object/candle.cpp index bb049413318..883c011ecbe 100644 --- a/src/object/candle.cpp +++ b/src/object/candle.cpp @@ -16,6 +16,9 @@ #include "object/candle.hpp" +#include +#include + #include "math/random.hpp" #include "object/sprite_particle.hpp" #include "sprite/sprite.hpp" @@ -26,7 +29,6 @@ Candle::Candle(const ReaderMapping& mapping) : MovingSprite(mapping, "images/objects/candle/candle.sprite", LAYER_BACKGROUNDTILES+1, COLGROUP_DISABLED), - ExposedObject(this), burning(true), flicker(true), lightcolor(1.0f, 1.0f, 1.0f), @@ -146,4 +148,15 @@ Candle::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } + +void +Candle::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Candle", vm.findClass("MovingSprite")); + + cls.addFunc("puff_smoke", &Candle::puff_smoke); + cls.addFunc("get_burning", &Candle::get_burning); + cls.addFunc("set_burning", &Candle::set_burning); +} + /* EOF */ diff --git a/src/object/candle.hpp b/src/object/candle.hpp index 8f5ad6d9284..cc3a4e0a833 100644 --- a/src/object/candle.hpp +++ b/src/object/candle.hpp @@ -18,15 +18,20 @@ #define HEADER_SUPERTUX_OBJECT_CANDLE_HPP #include "object/moving_sprite.hpp" -#include "scripting/candle.hpp" -#include "squirrel/exposed_object.hpp" /** * A burning candle: Simple, scriptable level decoration. + + * @scripting + * @summary A ""Candle"" that was given a name can be controlled by scripts. + * @instances A ""Candle"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. */ -class Candle final : public MovingSprite, - public ExposedObject +class Candle final : public MovingSprite { +public: + static void register_class(ssq::VM& vm); + public: Candle(const ReaderMapping& mapping); virtual void draw(DrawingContext& context) override; @@ -34,20 +39,32 @@ class Candle final : public MovingSprite, virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; static std::string class_name() { return "candle"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Candle"; } static std::string display_name() { return _("Candle"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Candle)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; virtual void on_flip(float height) override; - /** @name Scriptable Methods - @{ */ - void puff_smoke(); /**< spawn a puff of smoke */ - bool get_burning() const; /**< returns true if candle is lighted */ - void set_burning(bool burning); /**< true: light candle, false: extinguish candle */ - /** @} */ + /** + * @scripting + * @description Spawns a puff of smoke. + */ + void puff_smoke(); + /** + * @scripting + * @description Returns ""true"" if the candle is lit up. + */ + bool get_burning() const; + /** + * @scripting + * @description Sets the burning state of the candle. + * @param bool $burning If ""true"", the candle is lit up. If ""false"", it's extinguished. + */ + void set_burning(bool burning); private: bool burning; /**< true if candle is currently lighted */ diff --git a/src/object/circleplatform.hpp b/src/object/circleplatform.hpp index 11892f4b274..4da7c150726 100644 --- a/src/object/circleplatform.hpp +++ b/src/object/circleplatform.hpp @@ -34,6 +34,7 @@ class CirclePlatform : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Circular Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(CirclePlatform)); } private: virtual void initialize(); diff --git a/src/object/cloud_particle_system.cpp b/src/object/cloud_particle_system.cpp index 0b9ed19263a..aafee814586 100644 --- a/src/object/cloud_particle_system.cpp +++ b/src/object/cloud_particle_system.cpp @@ -16,6 +16,9 @@ #include "object/cloud_particle_system.hpp" +#include +#include + #include "math/random.hpp" #include "object/camera.hpp" #include "supertux/sector.hpp" @@ -29,13 +32,10 @@ CloudParticleSystem::CloudParticleSystem() : ParticleSystem(128), - ExposedObject(this), cloudimage(Surface::from_file("images/particles/cloud.png")), - m_current_speed(1.f), m_target_speed(1.f), m_speed_fade_time_remaining(0.f), - m_current_amount(15), m_current_real_amount(0) { @@ -44,13 +44,10 @@ CloudParticleSystem::CloudParticleSystem() : CloudParticleSystem::CloudParticleSystem(const ReaderMapping& reader) : ParticleSystem(reader, 128), - ExposedObject(this), cloudimage(Surface::from_file("images/particles/cloud.png")), - m_current_speed(1.f), m_target_speed(1.f), m_speed_fade_time_remaining(0.f), - m_current_amount(15), m_current_real_amount(0) { @@ -229,6 +226,12 @@ void CloudParticleSystem::fade_amount(int new_amount, float fade_time, float tim } // If delta is zero, there is nothing to do. } +void +CloudParticleSystem::set_amount(int amount, float time) +{ + fade_amount(amount, time, 0.f); +} + void CloudParticleSystem::draw(DrawingContext& context) { @@ -277,4 +280,15 @@ void CloudParticleSystem::draw(DrawingContext& context) context.pop_transform(); } + +void +CloudParticleSystem::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("CloudParticleSystem", vm.findClass("ParticleSystem")); + + cls.addFunc("fade_speed", &CloudParticleSystem::fade_speed); + cls.addFunc("fade_amount", &CloudParticleSystem::fade_amount); + cls.addFunc("set_amount", &CloudParticleSystem::set_amount); +} + /* EOF */ diff --git a/src/object/cloud_particle_system.hpp b/src/object/cloud_particle_system.hpp index b81c6e68155..81b49cc6c46 100644 --- a/src/object/cloud_particle_system.hpp +++ b/src/object/cloud_particle_system.hpp @@ -18,15 +18,22 @@ #define HEADER_SUPERTUX_OBJECT_CLOUD_PARTICLE_SYSTEM_HPP #include "object/particlesystem.hpp" -#include "scripting/clouds.hpp" + #include "video/surface_ptr.hpp" class ReaderMapping; -class CloudParticleSystem final : - public ParticleSystem, - public ExposedObject +/** + * @scripting + * @summary A ""CloudParticleSystem"" that was given a name can be controlled by scripts. + * @instances A ""CloudParticleSystem"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class CloudParticleSystem final : public ParticleSystem { +public: + static void register_class(ssq::VM& vm); + public: CloudParticleSystem(); CloudParticleSystem(const ReaderMapping& reader); @@ -39,29 +46,43 @@ class CloudParticleSystem final : static std::string class_name() { return "particles-clouds"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "CloudParticleSystem"; } static std::string display_name() { return _("Cloud Particles"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem::get_class_types().add(typeid(CloudParticleSystem)); } virtual ObjectSettings get_settings() override; virtual const std::string get_icon_path() const override { return "images/engine/editor/clouds.png"; } - void fade_speed(float new_speed, float fade_time); - void fade_amount(int new_amount, float fade_time, float time_between = 0.f); + /** + * @scripting + * @description Smoothly changes the rain speed to the given value in ""time"" seconds. + * @param float $speed + * @param float $time + */ + void fade_speed(float speed, float time); + /** + * @scripting + * @description Smoothly changes the amount of particles to the given value in ""time"" seconds. + * @param int $amount + * @param float $time + * @param float $time_between + */ + void fade_amount(int amount, float time, float time_between); + /** + * @scripting + * @description Smoothly changes the amount of particles to the given value in ""time"" seconds. + * @param int $amount + * @param float $time + */ + void set_amount(int amount, float time); // Minimum and maximum multiplier for the amount of clouds static int constexpr const max_amount = 500; static int constexpr const min_amount = 0; - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::expose(vm, table_idx); - } - - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::unexpose(vm, table_idx); - } - private: /** Returns the amount that got inserted (In case max_amount got hit) */ int add_clouds(int amount, float fade_time); diff --git a/src/object/coin.hpp b/src/object/coin.hpp index 194be61b99b..8b8bdc22967 100644 --- a/src/object/coin.hpp +++ b/src/object/coin.hpp @@ -43,6 +43,7 @@ class Coin : public MovingSprite, virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Coin"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(PathObject)).add(typeid(Coin)); } virtual ObjectSettings get_settings() override; GameObjectTypes get_types() const override; @@ -96,6 +97,7 @@ class HeavyCoin final : public Coin virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Heavy Coin"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Coin::get_class_types().add(typeid(HeavyCoin)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/coin_explode.hpp b/src/object/coin_explode.hpp index b8ec2233e8d..e7a316d4e77 100644 --- a/src/object/coin_explode.hpp +++ b/src/object/coin_explode.hpp @@ -25,6 +25,7 @@ class CoinExplode final : public GameObject public: CoinExplode(const Vector& pos, bool count_stats = true, const std::string& sprite_path = "images/objects/coin/coin.sprite"); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(CoinExplode)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; virtual bool is_saveable() const override { diff --git a/src/object/coin_rain.hpp b/src/object/coin_rain.hpp index 55a8ce5b222..df5c8ea3e5e 100644 --- a/src/object/coin_rain.hpp +++ b/src/object/coin_rain.hpp @@ -27,6 +27,7 @@ class CoinRain final : public GameObject public: CoinRain(const Vector& pos, bool emerge=false, bool count_stats = true, const std::string& sprite_path = "images/objects/coin/coin.sprite"); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(CoinRain)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; virtual bool is_saveable() const override { diff --git a/src/object/conveyor_belt.cpp b/src/object/conveyor_belt.cpp index 66ae15f0199..0820031d44d 100644 --- a/src/object/conveyor_belt.cpp +++ b/src/object/conveyor_belt.cpp @@ -16,6 +16,9 @@ #include "object/conveyor_belt.hpp" +#include +#include + #include "badguy/walking_badguy.hpp" #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" @@ -25,7 +28,6 @@ ConveyorBelt::ConveyorBelt(const ReaderMapping &reader) : MovingSprite(reader, "images/objects/conveyor_belt/conveyor.sprite"), - ExposedObject(this), m_running(true), m_dir(Direction::LEFT), m_length(1), @@ -170,4 +172,17 @@ ConveyorBelt::set_speed(float target_speed) m_speed = target_speed; } + +void +ConveyorBelt::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("ConveyorBelt", vm.findClass("MovingSprite")); + + cls.addFunc("start", &ConveyorBelt::start); + cls.addFunc("stop", &ConveyorBelt::stop); + cls.addFunc("move_left", &ConveyorBelt::move_left); + cls.addFunc("move_right", &ConveyorBelt::move_right); + cls.addFunc("set_speed", &ConveyorBelt::set_speed); +} + /* EOF */ diff --git a/src/object/conveyor_belt.hpp b/src/object/conveyor_belt.hpp index c3228811b1e..eb45c47e656 100644 --- a/src/object/conveyor_belt.hpp +++ b/src/object/conveyor_belt.hpp @@ -18,15 +18,22 @@ #define HEADER_SUPERTUX_OBJECT_CONVEYOR_BELT_HPP #include "object/moving_sprite.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/conveyor_belt.hpp" #include "supertux/timer.hpp" -/** This class represents a platform that moves entities riding it. */ -class ConveyorBelt final : public MovingSprite, - public ExposedObject +/** + * This class represents a platform that moves entities riding it. + + * @scripting + * @summary A ""ConveyorBelt"" that was given a name can be controlled by scripts. + * @instances A ""ConveyorBelt"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class ConveyorBelt final : public MovingSprite { +public: + static void register_class(ssq::VM& vm); + public: ConveyorBelt(const ReaderMapping& reader); @@ -36,8 +43,10 @@ class ConveyorBelt final : public MovingSprite, static std::string class_name() { return "conveyor-belt"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "ConveyorBelt"; } static std::string display_name() { return _("Conveyor Belt"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(ConveyorBelt)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; @@ -47,20 +56,31 @@ class ConveyorBelt final : public MovingSprite, virtual void after_editor_set() override; /** @name Scriptable Methods */ - - /** Starts the conveyor belt. */ + /** + * @scripting + * Starts the conveyor belt. + */ void start(); - - /** Stops the conveyor belt. */ + /** + * @scripting + * Stops the conveyor belt. + */ void stop(); - - /** Makes the conveyor shift objects to the left. */ + /** + * @scripting + * Makes the conveyor shift objects to the left. + */ void move_left(); - - /** Makes the conveyor shift objects to the right. */ + /** + * @scripting + * Makes the conveyor shift objects to the right. + */ void move_right(); - - /** Changes the shifting speed of the conveyor. */ + /** + * @scripting + * Change the shifting speed of the conveyor. + * @param float $target_speed + */ void set_speed(float target_speed); private: diff --git a/src/object/custom_particle_system.cpp b/src/object/custom_particle_system.cpp index 3069e1c30b9..11ecc6be51c 100644 --- a/src/object/custom_particle_system.cpp +++ b/src/object/custom_particle_system.cpp @@ -43,7 +43,6 @@ #include "video/viewport.hpp" CustomParticleSystem::CustomParticleSystem() : - ExposedObject(this), texture_sum_odds(0.f), time_last_remaining(0.f), script_easings(), @@ -87,7 +86,6 @@ CustomParticleSystem::CustomParticleSystem() : CustomParticleSystem::CustomParticleSystem(const ReaderMapping& reader) : ParticleSystem_Interactive(reader), - ExposedObject(this), texture_sum_odds(0.f), time_last_remaining(0.f), script_easings(), @@ -1072,7 +1070,7 @@ CustomParticleSystem::get_collision(Particle* object, const Vector& movement) // LOCAL CustomParticleSystem::SpriteProperties -CustomParticleSystem::get_random_texture() +CustomParticleSystem::get_random_texture() const { float val = graphicsRandom.randf(texture_sum_odds); for (const auto& texture : m_textures) @@ -1087,7 +1085,7 @@ CustomParticleSystem::get_random_texture() } std::vector -CustomParticleSystem::get_zones() +CustomParticleSystem::get_zones() const { std::vector list; @@ -1116,13 +1114,13 @@ CustomParticleSystem::get_zones() } float -CustomParticleSystem::get_abs_x() +CustomParticleSystem::get_abs_x() const { return (Sector::current()) ? Sector::get().get_camera().get_translation().x : 0.f; } float -CustomParticleSystem::get_abs_y() +CustomParticleSystem::get_abs_y() const { return (Sector::current()) ? Sector::get().get_camera().get_translation().y : 0.f; } @@ -1227,7 +1225,14 @@ CustomParticleSystem::spawn_particles(float lifetime) // SCRIPTING void -CustomParticleSystem::ease_value(float* value, float target, float time, easing func) { +CustomParticleSystem::clear() +{ + custom_particles.clear(); +} + +void +CustomParticleSystem::ease_value(float* value, float target, float time, easing func) +{ assert(value); ease_request req; @@ -1241,4 +1246,957 @@ CustomParticleSystem::ease_value(float* value, float target, float time, easing script_easings.push_back(req); } +void +CustomParticleSystem::spawn_particles(int amount, bool instantly) +{ + if (!instantly) + { + // TODO: Implement delayed spawn mode for scripting. + log_warning << "Delayed spawn mode is not yet implemented for scripting." << std::endl; + return; + } + + for (int i = 0; i < amount; i++) + spawn_particles(0.f); +} + +// ============================================================================= +// ============================ ATTRIBUTES ================================= +// ============================================================================= + +int +CustomParticleSystem::get_max_amount() const +{ + return m_max_amount; +} + +void +CustomParticleSystem::set_max_amount(int amount) +{ + m_max_amount = amount; +} + +bool +CustomParticleSystem::get_cover_screen() const +{ + return m_cover_screen; +} + +void +CustomParticleSystem::set_cover_screen(bool cover) +{ + m_cover_screen = cover; +} + +std::string +CustomParticleSystem::get_birth_mode() const +{ + switch (m_particle_birth_mode) + { + case FadeMode::None: + return "None"; + case FadeMode::Fade: + return "Fade"; + case FadeMode::Shrink: + return "Shrink"; + default: + return ""; + } +} + +void +CustomParticleSystem::set_birth_mode(const std::string& mode) +{ + if (mode == "None") + m_particle_birth_mode = FadeMode::None; + else if (mode == "Fade") + m_particle_birth_mode = FadeMode::Fade; + else if (mode == "Shrink") + m_particle_birth_mode = FadeMode::Shrink; + else + log_warning << "Invalid option " + mode + "; valid options are: None, Fade, Shrink." << std::endl; +} + +std::string +CustomParticleSystem::get_death_mode() const +{ + switch (m_particle_death_mode) + { + case FadeMode::None: + return "None"; + case FadeMode::Fade: + return "Fade"; + case FadeMode::Shrink: + return "Shrink"; + default: + return ""; + } +} + +void +CustomParticleSystem::set_death_mode(const std::string& mode) +{ + if (mode == "None") + m_particle_death_mode = FadeMode::None; + else if (mode == "Fade") + m_particle_death_mode = FadeMode::Fade; + else if (mode == "Shrink") + m_particle_death_mode = FadeMode::Shrink; + else + log_warning << "Invalid option " + mode + "; valid options are: None, Fade, Shrink." << std::endl; +} + +std::string +CustomParticleSystem::get_rotation_mode() const +{ + switch (m_particle_rotation_mode) + { + case RotationMode::Fixed: + return "Fixed"; + case RotationMode::Facing: + return "Facing"; + case RotationMode::Wiggling: + return "Wiggling"; + default: + return ""; + } +} + +void +CustomParticleSystem::set_rotation_mode(const std::string& mode) +{ + if (mode == "Fixed") + m_particle_rotation_mode = RotationMode::Fixed; + else if (mode == "Facing") + m_particle_rotation_mode = RotationMode::Facing; + else if (mode == "Wiggling") + m_particle_rotation_mode = RotationMode::Wiggling; + else + log_warning << "Invalid option " + mode + "; valid options are: Fixed, Facing, Wiggling." << std::endl; +} + +std::string +CustomParticleSystem::get_collision_mode() const +{ + switch (m_particle_collision_mode) + { + case CollisionMode::Ignore: + return "Ignore"; + case CollisionMode::Stick: + return "Stick"; + case CollisionMode::StickForever: + return "StickForever"; + case CollisionMode::BounceHeavy: + return "BounceHeavy"; + case CollisionMode::BounceLight: + return "BounceLight"; + case CollisionMode::Destroy: + return "Destroy"; + default: + return ""; + } +} + +void +CustomParticleSystem::set_collision_mode(const std::string& mode) +{ + if (mode == "Ignore") + m_particle_collision_mode = CollisionMode::Ignore; + else if (mode == "Stick") + m_particle_collision_mode = CollisionMode::Stick; + else if (mode == "StickForever") + m_particle_collision_mode = CollisionMode::StickForever; + else if (mode == "BounceHeavy") + m_particle_collision_mode = CollisionMode::BounceHeavy; + else if (mode == "BounceLight") + m_particle_collision_mode = CollisionMode::BounceLight; + else if (mode == "Destroy") + m_particle_collision_mode = CollisionMode::Destroy; + else + log_warning << "Invalid option " + mode + "; valid options are: Ignore, Stick, StickForever, BounceHeavy, BounceLight, Destroy." << std::endl; +} + +std::string +CustomParticleSystem::get_offscreen_mode() const +{ + switch (m_particle_offscreen_mode) + { + case OffscreenMode::Never: + return "Never"; + case OffscreenMode::OnlyOnExit: + return "OnlyOnExit"; + case OffscreenMode::Always: + return "Always"; + default: + return ""; + } +} + +void +CustomParticleSystem::set_offscreen_mode(const std::string& mode) +{ + if (mode == "Never") + m_particle_offscreen_mode = OffscreenMode::Never; + else if (mode == "OnlyOnExit") + m_particle_offscreen_mode = OffscreenMode::OnlyOnExit; + else if (mode == "Always") + m_particle_offscreen_mode = OffscreenMode::Always; + else + log_warning << "Invalid option " + mode + "; valid options are: Never, OnlyOnExit, Always." << std::endl; +} + +// ============================================================================= +// Delay +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_delay() const +{ + return m_delay; +} + +void +CustomParticleSystem::set_delay(float delay) +{ + m_delay = delay; +} + +void +CustomParticleSystem::fade_delay(float delay, float time) +{ + ease_value(&m_delay, delay, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_delay(float delay, float time, const std::string& easing_) +{ + ease_value(&m_delay, delay, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Lifetime +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_lifetime() const +{ + return m_particle_lifetime; +} + +void +CustomParticleSystem::set_lifetime(float lifetime) +{ + m_particle_lifetime = lifetime; +} + +void +CustomParticleSystem::fade_lifetime(float lifetime, float time) +{ + ease_value(&m_particle_lifetime, lifetime, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_lifetime(float lifetime, float time, const std::string& easing_) +{ + ease_value(&m_particle_lifetime, lifetime, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Lifetime variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_lifetime_variation() const +{ + return m_particle_lifetime_variation; +} + +void +CustomParticleSystem::set_lifetime_variation(float lifetime_variation) +{ + m_particle_lifetime_variation = lifetime_variation; +} + +void +CustomParticleSystem::fade_lifetime_variation(float lifetime_variation, float time) +{ + ease_value(&m_particle_lifetime_variation, lifetime_variation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_lifetime_variation(float lifetime_variation, float time, const std::string& easing_) +{ + ease_value(&m_particle_lifetime_variation, lifetime_variation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Birth time +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_birth_time() const +{ + return m_particle_birth_time; +} + +void +CustomParticleSystem::set_birth_time(float birth_time) +{ + m_particle_birth_time = birth_time; +} + +void +CustomParticleSystem::fade_birth_time(float birth_time, float time) +{ + ease_value(&m_particle_birth_time, birth_time, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_birth_time(float birth_time, float time, const std::string& easing_) +{ + ease_value(&m_particle_birth_time, birth_time, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Birth time variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_birth_time_variation() const +{ + return m_particle_birth_time_variation; +} + +void +CustomParticleSystem::set_birth_time_variation(float birth_time_variation) +{ + m_particle_birth_time_variation = birth_time_variation; +} + +void +CustomParticleSystem::fade_birth_time_variation(float birth_time_variation, float time) +{ + ease_value(&m_particle_birth_time_variation, birth_time_variation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_birth_time_variation(float birth_time_variation, float time, const std::string& easing_) +{ + ease_value(&m_particle_birth_time_variation, birth_time_variation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Death time +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_death_time() const +{ + return m_particle_death_time; +} + +void +CustomParticleSystem::set_death_time(float death_time) +{ + m_particle_death_time = death_time; +} + +void +CustomParticleSystem::fade_death_time(float death_time, float time) +{ + ease_value(&m_particle_death_time, death_time, time, LinearInterpolation); +} + +void +CustomParticleSystem::ease_death_time(float death_time, float time, const std::string& easing_) +{ + ease_value(&m_particle_death_time, death_time, time, getEasingByName(EasingMode_from_string(easing_))); +} + + + +// ============================================================================= +// Death time variation +// ----------------------------------------------------------------------------- +float +CustomParticleSystem::get_death_time_variation() const +{ + return m_particle_death_time_variation; +} + +void +CustomParticleSystem::set_death_time_variation(float death_time_variation) +{ + m_particle_death_time_variation = death_time_variation; +} + +void +CustomParticleSystem::fade_death_time_variation(float death_time_variation, float time) +{ + ease_value(&m_particle_death_time_variation, death_time_variation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_death_time_variation(float death_time_variation, float time, const std::string& easing_) +{ + ease_value(&m_particle_death_time_variation, death_time_variation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// X speed +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_speed_x() const +{ + return m_particle_speed_x; +} + +void +CustomParticleSystem::set_speed_x(float speed_x) +{ + m_particle_speed_x = speed_x; +} + +void +CustomParticleSystem::fade_speed_x(float speed_x, float time) +{ + ease_value(&m_particle_speed_x, speed_x, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_speed_x(float speed_x, float time, const std::string& easing_) +{ + ease_value(&m_particle_speed_x, speed_x, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Y speed +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_speed_y() const +{ + return m_particle_speed_y; +} + +void +CustomParticleSystem::set_speed_y(float speed_y) +{ + m_particle_speed_y = speed_y; +} + +void +CustomParticleSystem::fade_speed_y(float speed_y, float time) +{ + ease_value(&m_particle_speed_y, speed_y, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_speed_y(float speed_y, float time, const std::string& easing_) +{ + ease_value(&m_particle_speed_y, speed_y, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// X speed variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_speed_variation_x() const +{ + return m_particle_speed_variation_x; +} + +void +CustomParticleSystem::set_speed_variation_x(float speed_variation_x) +{ + m_particle_speed_variation_x = speed_variation_x; +} + +void +CustomParticleSystem::fade_speed_variation_x(float speed_variation_x, float time) +{ + ease_value(&m_particle_speed_variation_x, speed_variation_x, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_speed_variation_x(float speed_variation_x, float time, const std::string& easing_) +{ + ease_value(&m_particle_speed_variation_x, speed_variation_x, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Y speed variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_speed_variation_y() const +{ + return m_particle_speed_variation_y; +} + +void +CustomParticleSystem::set_speed_variation_y(float speed_variation_y) +{ + m_particle_speed_variation_y = speed_variation_y; +} + +void +CustomParticleSystem::fade_speed_variation_y(float speed_variation_y, float time) +{ + ease_value(&m_particle_speed_variation_y, speed_variation_y, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_speed_variation_y(float speed_variation_y, float time, const std::string& easing_) +{ + ease_value(&m_particle_speed_variation_y, speed_variation_y, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// X acceleration +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_acceleration_x() const +{ + return m_particle_acceleration_x; +} + +void +CustomParticleSystem::set_acceleration_x(float acceleration_x) +{ + m_particle_acceleration_x = acceleration_x; +} + +void +CustomParticleSystem::fade_acceleration_x(float acceleration_x, float time) +{ + ease_value(&m_particle_acceleration_x, acceleration_x, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_acceleration_x(float acceleration_x, float time, const std::string& easing_) +{ + ease_value(&m_particle_acceleration_x, acceleration_x, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Y acceleration +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_acceleration_y() const +{ + return m_particle_acceleration_y; +} + +void +CustomParticleSystem::set_acceleration_y(float acceleration_y) +{ + m_particle_acceleration_y = acceleration_y; +} + +void +CustomParticleSystem::fade_acceleration_y(float acceleration_y, float time) +{ + ease_value(&m_particle_acceleration_y, acceleration_y, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_acceleration_y(float acceleration_y, float time, const std::string& easing_) +{ + ease_value(&m_particle_acceleration_y, acceleration_y, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// X friction +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_friction_x() const +{ + return m_particle_friction_x; +} + +void +CustomParticleSystem::set_friction_x(float friction_x) +{ + m_particle_friction_x = friction_x; +} + +void +CustomParticleSystem::fade_friction_x(float friction_x, float time) +{ + ease_value(&m_particle_friction_x, friction_x, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_friction_x(float friction_x, float time, const std::string& easing_) +{ + ease_value(&m_particle_friction_x, friction_x, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Y friction +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_friction_y() const +{ + return m_particle_friction_y; +} + +void +CustomParticleSystem::set_friction_y(float friction_y) +{ + m_particle_friction_y = friction_y; +} + +void +CustomParticleSystem::fade_friction_y(float friction_y, float time) +{ + ease_value(&m_particle_friction_y, friction_y, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_friction_y(float friction_y, float time, const std::string& easing_) +{ + ease_value(&m_particle_friction_y, friction_y, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Feather factor +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_feather_factor() const +{ + return m_particle_feather_factor; +} + +void +CustomParticleSystem::set_feather_factor(float feather_factor) +{ + m_particle_feather_factor = feather_factor; +} + +void +CustomParticleSystem::fade_feather_factor(float feather_factor, float time) +{ + ease_value(&m_particle_feather_factor, feather_factor, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_feather_factor(float feather_factor, float time, const std::string& easing_) +{ + ease_value(&m_particle_feather_factor, feather_factor, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation() const +{ + return m_particle_rotation; +} + +void +CustomParticleSystem::set_rotation(float rotation) +{ + m_particle_rotation = rotation; +} + +void +CustomParticleSystem::fade_rotation(float rotation, float time) +{ + ease_value(&m_particle_rotation, rotation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation(float rotation, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation, rotation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation_variation() const +{ + return m_particle_rotation_variation; +} + +void +CustomParticleSystem::set_rotation_variation(float rotation_variation) +{ + m_particle_rotation_variation = rotation_variation; +} + +void +CustomParticleSystem::fade_rotation_variation(float rotation_variation, float time) +{ + ease_value(&m_particle_rotation_variation, rotation_variation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation_variation(float rotation_variation, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation_variation, rotation_variation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation speed +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation_speed() const +{ + return m_particle_rotation_speed; +} + +void +CustomParticleSystem::set_rotation_speed(float rotation_speed) +{ + m_particle_rotation_speed = rotation_speed; +} + +void +CustomParticleSystem::fade_rotation_speed(float rotation_speed, float time) +{ + ease_value(&m_particle_rotation_speed, rotation_speed, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation_speed(float rotation_speed, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation_speed, rotation_speed, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation speed variation +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation_speed_variation() const +{ + return m_particle_rotation_speed_variation; +} + +void +CustomParticleSystem::set_rotation_speed_variation(float rotation_speed_variation) +{ + m_particle_rotation_speed_variation = rotation_speed_variation; +} + +void +CustomParticleSystem::fade_rotation_speed_variation(float rotation_speed_variation, float time) +{ + ease_value(&m_particle_rotation_speed_variation, rotation_speed_variation, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation_speed_variation(float rotation_speed_variation, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation_speed_variation, rotation_speed_variation, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation acceleration +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation_acceleration() const +{ + return m_particle_rotation_acceleration; +} + +void +CustomParticleSystem::set_rotation_acceleration(float rotation_acceleration) +{ + m_particle_rotation_acceleration = rotation_acceleration; +} + +void +CustomParticleSystem::fade_rotation_acceleration(float rotation_acceleration, float time) +{ + ease_value(&m_particle_rotation_acceleration, rotation_acceleration, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation_acceleration(float rotation_acceleration, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation_acceleration, rotation_acceleration, time, getEasingByName(EasingMode_from_string(easing_))); +} + +// ============================================================================= +// Rotation decceleration +// ----------------------------------------------------------------------------- + +float +CustomParticleSystem::get_rotation_decceleration() const +{ + return m_particle_rotation_decceleration; +} + +void +CustomParticleSystem::set_rotation_decceleration(float rotation_decceleration) +{ + m_particle_rotation_decceleration = rotation_decceleration; +} + +void +CustomParticleSystem::fade_rotation_decceleration(float rotation_decceleration, float time) +{ + ease_value(&m_particle_rotation_decceleration, rotation_decceleration, time, getEasingByName(EasingMode::EaseNone)); +} + +void +CustomParticleSystem::ease_rotation_decceleration(float rotation_decceleration, float time, const std::string& easing_) +{ + ease_value(&m_particle_rotation_decceleration, rotation_decceleration, time, getEasingByName(EasingMode_from_string(easing_))); +} + + +void +CustomParticleSystem::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("CustomParticleSystem", vm.findClass("ParticleSystem")); + + cls.addFunc("clear", &CustomParticleSystem::clear); + cls.addFunc("spawn_particles", &CustomParticleSystem::spawn_particles); + cls.addFunc("get_max_amount", &CustomParticleSystem::get_max_amount); + cls.addFunc("set_max_amount", &CustomParticleSystem::set_max_amount); + cls.addFunc("get_cover_screen", &CustomParticleSystem::get_cover_screen); + cls.addFunc("set_cover_screen", &CustomParticleSystem::set_cover_screen); + cls.addFunc("get_birth_mode", &CustomParticleSystem::get_birth_mode); + cls.addFunc("set_birth_mode", &CustomParticleSystem::set_birth_mode); + cls.addFunc("get_death_mode", &CustomParticleSystem::get_death_mode); + cls.addFunc("set_death_mode", &CustomParticleSystem::set_death_mode); + cls.addFunc("get_rotation_mode", &CustomParticleSystem::get_rotation_mode); + cls.addFunc("set_rotation_mode", &CustomParticleSystem::set_rotation_mode); + cls.addFunc("get_collision_mode", &CustomParticleSystem::get_collision_mode); + cls.addFunc("set_collision_mode", &CustomParticleSystem::set_collision_mode); + cls.addFunc("get_offscreen_mode", &CustomParticleSystem::get_offscreen_mode); + cls.addFunc("set_offscreen_mode", &CustomParticleSystem::set_offscreen_mode); + cls.addFunc("get_delay", &CustomParticleSystem::get_delay); + cls.addFunc("set_delay", &CustomParticleSystem::set_delay); + cls.addFunc("fade_delay", &CustomParticleSystem::fade_delay); + cls.addFunc("ease_delay", &CustomParticleSystem::ease_delay); + cls.addFunc("get_lifetime", &CustomParticleSystem::get_lifetime); + cls.addFunc("set_lifetime", &CustomParticleSystem::set_lifetime); + cls.addFunc("fade_lifetime", &CustomParticleSystem::fade_lifetime); + cls.addFunc("ease_lifetime", &CustomParticleSystem::ease_lifetime); + cls.addFunc("get_lifetime_variation", &CustomParticleSystem::get_lifetime_variation); + cls.addFunc("set_lifetime_variation", &CustomParticleSystem::set_lifetime_variation); + cls.addFunc("fade_lifetime_variation", &CustomParticleSystem::fade_lifetime_variation); + cls.addFunc("ease_lifetime_variation", &CustomParticleSystem::ease_lifetime_variation); + cls.addFunc("get_birth_time", &CustomParticleSystem::get_birth_time); + cls.addFunc("set_birth_time", &CustomParticleSystem::set_birth_time); + cls.addFunc("fade_birth_time", &CustomParticleSystem::fade_birth_time); + cls.addFunc("ease_birth_time", &CustomParticleSystem::ease_birth_time); + cls.addFunc("get_birth_time_variation", &CustomParticleSystem::get_birth_time_variation); + cls.addFunc("set_birth_time_variation", &CustomParticleSystem::set_birth_time_variation); + cls.addFunc("fade_birth_time_variation", &CustomParticleSystem::fade_birth_time_variation); + cls.addFunc("ease_birth_time_variation", &CustomParticleSystem::ease_birth_time_variation); + cls.addFunc("get_death_time", &CustomParticleSystem::get_death_time); + cls.addFunc("set_death_time", &CustomParticleSystem::set_death_time); + cls.addFunc("fade_death_time", &CustomParticleSystem::fade_death_time); + cls.addFunc("ease_death_time", &CustomParticleSystem::ease_death_time); + cls.addFunc("get_death_time_variation", &CustomParticleSystem::get_death_time_variation); + cls.addFunc("set_death_time_variation", &CustomParticleSystem::set_death_time_variation); + cls.addFunc("fade_death_time_variation", &CustomParticleSystem::fade_death_time_variation); + cls.addFunc("ease_death_time_variation", &CustomParticleSystem::ease_death_time_variation); + cls.addFunc("get_speed_x", &CustomParticleSystem::get_speed_x); + cls.addFunc("set_speed_x", &CustomParticleSystem::set_speed_x); + cls.addFunc("fade_speed_x", &CustomParticleSystem::fade_speed_x); + cls.addFunc("ease_speed_x", &CustomParticleSystem::ease_speed_x); + cls.addFunc("get_speed_y", &CustomParticleSystem::get_speed_y); + cls.addFunc("set_speed_y", &CustomParticleSystem::set_speed_y); + cls.addFunc("fade_speed_y", &CustomParticleSystem::fade_speed_y); + cls.addFunc("ease_speed_y", &CustomParticleSystem::ease_speed_y); + cls.addFunc("get_speed_variation_x", &CustomParticleSystem::get_speed_variation_x); + cls.addFunc("set_speed_variation_x", &CustomParticleSystem::set_speed_variation_x); + cls.addFunc("fade_speed_variation_x", &CustomParticleSystem::fade_speed_variation_x); + cls.addFunc("ease_speed_variation_x", &CustomParticleSystem::ease_speed_variation_x); + cls.addFunc("get_speed_variation_y", &CustomParticleSystem::get_speed_variation_y); + cls.addFunc("set_speed_variation_y", &CustomParticleSystem::set_speed_variation_y); + cls.addFunc("fade_speed_variation_y", &CustomParticleSystem::fade_speed_variation_y); + cls.addFunc("ease_speed_variation_y", &CustomParticleSystem::ease_speed_variation_y); + cls.addFunc("get_acceleration_x", &CustomParticleSystem::get_acceleration_x); + cls.addFunc("set_acceleration_x", &CustomParticleSystem::set_acceleration_x); + cls.addFunc("fade_acceleration_x", &CustomParticleSystem::fade_acceleration_x); + cls.addFunc("ease_acceleration_x", &CustomParticleSystem::ease_acceleration_x); + cls.addFunc("get_acceleration_y", &CustomParticleSystem::get_acceleration_y); + cls.addFunc("set_acceleration_y", &CustomParticleSystem::set_acceleration_y); + cls.addFunc("fade_acceleration_y", &CustomParticleSystem::fade_acceleration_y); + cls.addFunc("ease_acceleration_y", &CustomParticleSystem::ease_acceleration_y); + cls.addFunc("get_friction_x", &CustomParticleSystem::get_friction_x); + cls.addFunc("set_friction_x", &CustomParticleSystem::set_friction_x); + cls.addFunc("fade_friction_x", &CustomParticleSystem::fade_friction_x); + cls.addFunc("ease_friction_x", &CustomParticleSystem::ease_friction_x); + cls.addFunc("get_friction_y", &CustomParticleSystem::get_friction_y); + cls.addFunc("set_friction_y", &CustomParticleSystem::set_friction_y); + cls.addFunc("fade_friction_y", &CustomParticleSystem::fade_friction_y); + cls.addFunc("ease_friction_y", &CustomParticleSystem::ease_friction_y); + cls.addFunc("get_feather_factor", &CustomParticleSystem::get_feather_factor); + cls.addFunc("set_feather_factor", &CustomParticleSystem::set_feather_factor); + cls.addFunc("fade_feather_factor", &CustomParticleSystem::fade_feather_factor); + cls.addFunc("ease_feather_factor", &CustomParticleSystem::ease_feather_factor); + cls.addFunc("get_rotation", &CustomParticleSystem::get_rotation); + cls.addFunc("set_rotation", &CustomParticleSystem::set_rotation); + cls.addFunc("fade_rotation", &CustomParticleSystem::fade_rotation); + cls.addFunc("ease_rotation", &CustomParticleSystem::ease_rotation); + cls.addFunc("get_rotation_variation", &CustomParticleSystem::get_rotation_variation); + cls.addFunc("set_rotation_variation", &CustomParticleSystem::set_rotation_variation); + cls.addFunc("fade_rotation_variation", &CustomParticleSystem::fade_rotation_variation); + cls.addFunc("ease_rotation_variation", &CustomParticleSystem::ease_rotation_variation); + cls.addFunc("get_rotation_speed", &CustomParticleSystem::get_rotation_speed); + cls.addFunc("set_rotation_speed", &CustomParticleSystem::set_rotation_speed); + cls.addFunc("fade_rotation_speed", &CustomParticleSystem::fade_rotation_speed); + cls.addFunc("ease_rotation_speed", &CustomParticleSystem::ease_rotation_speed); + cls.addFunc("get_rotation_speed_variation", &CustomParticleSystem::get_rotation_speed_variation); + cls.addFunc("set_rotation_speed_variation", &CustomParticleSystem::set_rotation_speed_variation); + cls.addFunc("fade_rotation_speed_variation", &CustomParticleSystem::fade_rotation_speed_variation); + cls.addFunc("ease_rotation_speed_variation", &CustomParticleSystem::ease_rotation_speed_variation); + cls.addFunc("get_rotation_acceleration", &CustomParticleSystem::get_rotation_acceleration); + cls.addFunc("set_rotation_acceleration", &CustomParticleSystem::set_rotation_acceleration); + cls.addFunc("fade_rotation_acceleration", &CustomParticleSystem::fade_rotation_acceleration); + cls.addFunc("ease_rotation_acceleration", &CustomParticleSystem::ease_rotation_acceleration); + cls.addFunc("get_rotation_decceleration", &CustomParticleSystem::get_rotation_decceleration); + cls.addFunc("set_rotation_decceleration", &CustomParticleSystem::set_rotation_decceleration); + cls.addFunc("fade_rotation_decceleration", &CustomParticleSystem::fade_rotation_decceleration); + cls.addFunc("ease_rotation_decceleration", &CustomParticleSystem::ease_rotation_decceleration); + + cls.addVar("max_amount", &CustomParticleSystem::m_max_amount); + cls.addVar("cover_screen", &CustomParticleSystem::m_cover_screen); + cls.addVar("delay", &CustomParticleSystem::m_delay); + cls.addVar("particle_lifetime", &CustomParticleSystem::m_particle_lifetime); + cls.addVar("particle_lifetime_variation", &CustomParticleSystem::m_particle_lifetime_variation); + cls.addVar("particle_birth_time", &CustomParticleSystem::m_particle_birth_time); + cls.addVar("particle_birth_time_variation", &CustomParticleSystem::m_particle_birth_time_variation); + cls.addVar("particle_death_time", &CustomParticleSystem::m_particle_death_time); + cls.addVar("particle_death_time_variation", &CustomParticleSystem::m_particle_death_time_variation); + cls.addVar("particle_speed_x", &CustomParticleSystem::m_particle_speed_x); + cls.addVar("particle_speed_y", &CustomParticleSystem::m_particle_speed_y); + cls.addVar("particle_speed_variation_x", &CustomParticleSystem::m_particle_speed_variation_x); + cls.addVar("particle_speed_variation_y", &CustomParticleSystem::m_particle_speed_variation_y); + cls.addVar("particle_acceleration_x", &CustomParticleSystem::m_particle_acceleration_x); + cls.addVar("particle_acceleration_y", &CustomParticleSystem::m_particle_acceleration_y); + cls.addVar("particle_friction_x", &CustomParticleSystem::m_particle_friction_x); + cls.addVar("particle_friction_y", &CustomParticleSystem::m_particle_friction_y); + cls.addVar("particle_feather_factor", &CustomParticleSystem::m_particle_feather_factor); + cls.addVar("particle_rotation", &CustomParticleSystem::m_particle_rotation); + cls.addVar("particle_rotation_variation", &CustomParticleSystem::m_particle_rotation_variation); + cls.addVar("particle_rotation_speed", &CustomParticleSystem::m_particle_rotation_speed); + cls.addVar("particle_rotation_speed_variation", &CustomParticleSystem::m_particle_rotation_speed_variation); + cls.addVar("particle_rotation_acceleration", &CustomParticleSystem::m_particle_rotation_acceleration); + cls.addVar("particle_rotation_decceleration", &CustomParticleSystem::m_particle_rotation_decceleration); +} + /* EOF */ diff --git a/src/object/custom_particle_system.hpp b/src/object/custom_particle_system.hpp index ca2b00dc66d..2076a0b1716 100644 --- a/src/object/custom_particle_system.hpp +++ b/src/object/custom_particle_system.hpp @@ -17,20 +17,27 @@ #ifndef HEADER_SUPERTUX_OBJECT_CUSTOM_PARTICLE_SYSTEM_HPP #define HEADER_SUPERTUX_OBJECT_CUSTOM_PARTICLE_SYSTEM_HPP +#include "object/particlesystem_interactive.hpp" + #include "math/easing.hpp" #include "math/vector.hpp" -#include "object/particlesystem_interactive.hpp" #include "object/particle_zone.hpp" -#include "scripting/custom_particles.hpp" #include "video/surface.hpp" #include "video/surface_ptr.hpp" -class CustomParticleSystem : - public ParticleSystem_Interactive, - public ExposedObject +/** + * @scripting + * @summary A ""CustomParticleSystem"" that was given a name can be controlled by scripts. + * @instances A ""CustomParticleSystem"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class CustomParticleSystem : public ParticleSystem_Interactive { friend class ParticleEditor; - friend class scripting::CustomParticles; + +public: + static void register_class(ssq::VM& vm); + public: CustomParticleSystem(); CustomParticleSystem(const ReaderMapping& reader); @@ -43,8 +50,10 @@ class CustomParticleSystem : static std::string class_name() { return "particles-custom"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "CustomParticleSystem"; } static std::string display_name() { return _("Custom Particles"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem_Interactive::get_class_types().add(typeid(CustomParticleSystem)); } virtual void save(Writer& writer) override; virtual ObjectSettings get_settings() override; @@ -52,15 +61,8 @@ class CustomParticleSystem : return "images/engine/editor/particle.png"; } - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::expose(vm, table_idx); - } - - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::unexpose(vm, table_idx); - } - //void fade_amount(int new_amount, float fade_time); + protected: virtual int collision(Particle* particle, const Vector& movement) override; CollisionHit get_collision(Particle* particle, const Vector& movement); @@ -80,19 +82,661 @@ class CustomParticleSystem : void add_particle(float lifetime, float x, float y); void spawn_particles(float lifetime); - std::vector get_zones(); + std::vector get_zones() const; - float get_abs_x(); - float get_abs_y(); + float get_abs_x() const; + float get_abs_y() const; float texture_sum_odds; float time_last_remaining; public: // Scripting - void clear() { custom_particles.clear(); } void ease_value(float* value, float target, float time, easing func); + /** + * @scripting + * @description Instantly removes all particles of that type on the screen. + */ + void clear(); + + /** + * @scripting + * @description Spawns particles, regardless of whether or not particles are enabled. + * @param int $amount + * @param bool $instantly If ""true"", disregard the delay settings. + */ + void spawn_particles(int amount, bool instantly); + + /** + * @scripting + * @deprecated Use the ""max_amount"" property instead! + */ + int get_max_amount() const; + /** + * @scripting + * @deprecated Use the ""max_amount"" property instead! + * @param int $amount + */ + void set_max_amount(int amount); + + /** + * @scripting + * @description Returns "None", "Fade", "Shrink". + */ + std::string get_birth_mode() const; + /** + * @scripting + * @param string $mode Possible values: "None", "Fade", "Shrink". + */ + void set_birth_mode(const std::string& mode); + + /** + * @scripting + * @description Returns "None", "Fade", "Shrink". + */ + std::string get_death_mode() const; + /** + * @scripting + * @param string $mode Possible values: "None", "Fade", "Shrink". + */ + void set_death_mode(const std::string& mode); + + /** + * @scripting + * @description Returns "Fixed", "Facing", "Wiggling". + */ + std::string get_rotation_mode() const; + /** + * @scripting + * @param string $mode Possible values: "Fixed", "Facing", "Wiggling". + */ + void set_rotation_mode(const std::string& mode); + + /** + * @scripting + * @description Returns "Ignore", "Stick", "StickForever", "BounceHeavy", "BounceLight", "Destroy". + */ + std::string get_collision_mode() const; + /** + * @scripting + * @param string $mode Possible values: "Ignore", "Stick", "StickForever", "BounceHeavy", "BounceLight", "Destroy". + */ + void set_collision_mode(const std::string& mode); + + /** + * @scripting + * @description Returns "Never", "OnlyOnExit", "Always". + */ + std::string get_offscreen_mode() const; + /** + * @scripting + * @param string $mode Possible values: "Never", "OnlyOnExit", "Always". + */ + void set_offscreen_mode(const std::string& mode); + + /** + * @scripting + * @deprecated Use the ""cover_screen"" property instead! + */ + bool get_cover_screen() const; + /** + * @scripting + * @deprecated Use the ""cover_screen"" property instead! + * @param bool $cover + */ + void set_cover_screen(bool cover); + + /** + * @scripting + * @deprecated Use the ""delay"" property instead! + */ + float get_delay() const; + /** + * @scripting + * @deprecated Use the ""delay"" property instead! + * @param float $delay + */ + void set_delay(float delay); + /** + * @scripting + * @param float $delay + * @param float $time + */ + void fade_delay(float delay, float time); + /** + * @scripting + * @param float $delay + * @param float $time + * @param string $easing + */ + void ease_delay(float delay, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_lifetime"" property instead! + */ + float get_lifetime() const; + /** + * @scripting + * @deprecated Use the ""particle_lifetime"" property instead! + * @param float $lifetime + */ + void set_lifetime(float lifetime); + /** + * @scripting + * @param float $lifetime + * @param float $time + */ + void fade_lifetime(float lifetime, float time); + /** + * @scripting + * @param float $lifetime + * @param float $time + * @param string $easing + */ + void ease_lifetime(float lifetime, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_lifetime_variation"" property instead! + */ + float get_lifetime_variation() const; + /** + * @scripting + * @deprecated Use the ""particle_lifetime_variation"" property instead! + * @param float $lifetime_variation + */ + void set_lifetime_variation(float lifetime_variation); + /** + * @scripting + * @param float $lifetime_variation + * @param float $time + */ + void fade_lifetime_variation(float lifetime_variation, float time); + /** + * @scripting + * @param float $lifetime_variation + * @param float $time + * @param string $easing + */ + void ease_lifetime_variation(float lifetime_variation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_birth_time"" property instead! + */ + float get_birth_time() const; + /** + * @scripting + * @deprecated Use the ""particle_birth_time"" property instead! + * @param float $birth_time + */ + void set_birth_time(float birth_time); + /** + * @scripting + * @param float $birth_time + * @param float $time + */ + void fade_birth_time(float birth_time, float time); + /** + * @scripting + * @param float $birth_time + * @param float $time + * @param string $easing + */ + void ease_birth_time(float birth_time, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_birth_time_variation"" property instead! + */ + float get_birth_time_variation() const; + /** + * @scripting + * @deprecated Use the ""particle_birth_time_variation"" property instead! + * @param float $birth_time_variation + */ + void set_birth_time_variation(float birth_time_variation); + /** + * @scripting + * @param float $birth_time_variation + * @param float $time + */ + void fade_birth_time_variation(float birth_time_variation, float time); + /** + * @scripting + * @param float $birth_time_variation + * @param float $time + * @param string $easing + */ + void ease_birth_time_variation(float birth_time_variation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_death_time"" property instead! + */ + float get_death_time() const; + /** + * @scripting + * @deprecated Use the ""particle_death_time"" property instead! + * @param float $death_time + */ + void set_death_time(float death_time); + /** + * @scripting + * @param float $death_time + * @param float $time + */ + void fade_death_time(float death_time, float time); + /** + * @scripting + * @param float $death_time + * @param float $time + * @param string $easing + */ + void ease_death_time(float death_time, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_death_time_variation"" property instead! + */ + float get_death_time_variation() const; + /** + * @scripting + * @deprecated Use the ""particle_death_time_variation"" property instead! + * @param float $death_time_variation + */ + void set_death_time_variation(float death_time_variation); + /** + * @scripting + * @param float $death_time_variation + * @param float $time + */ + void fade_death_time_variation(float death_time_variation, float time); + /** + * @scripting + * @param float $death_time_variation + * @param float $time + * @param string $easing + */ + void ease_death_time_variation(float death_time_variation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_speed_x"" property instead! + */ + float get_speed_x() const; + /** + * @scripting + * @deprecated Use the ""particle_speed_x"" property instead! + * @param float $speed_x + */ + void set_speed_x(float speed_x); + /** + * @scripting + * @param float $speed_x + * @param float $time + */ + void fade_speed_x(float speed_x, float time); + /** + * @scripting + * @param float $speed_x + * @param float $time + * @param string $easing + */ + void ease_speed_x(float speed_x, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_speed_y"" property instead! + */ + float get_speed_y() const; + /** + * @scripting + * @deprecated Use the ""particle_speed_y"" property instead! + * @param float $speed_y + */ + void set_speed_y(float speed_y); + /** + * @scripting + * @param float $speed_y + * @param float $time + */ + void fade_speed_y(float speed_y, float time); + /** + * @scripting + * @param float $speed_y + * @param float $time + * @param string $easing + */ + void ease_speed_y(float speed_y, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_speed_variation_x"" property instead! + */ + float get_speed_variation_x() const; + /** + * @scripting + * @deprecated Use the ""particle_speed_variation_x"" property instead! + * @param float $speed_variation_x + */ + void set_speed_variation_x(float speed_variation_x); + /** + * @scripting + * @param float $speed_variation_x + * @param float $time + */ + void fade_speed_variation_x(float speed_variation_x, float time); + /** + * @scripting + * @param float $speed_variation_x + * @param float $time + * @param string $easing + */ + void ease_speed_variation_x(float speed_variation_x, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_speed_variation_y"" property instead! + */ + float get_speed_variation_y() const; + /** + * @scripting + * @deprecated Use the ""particle_speed_variation_y"" property instead! + * @param float $speed_variation_y + */ + void set_speed_variation_y(float speed_variation_y); + /** + * @scripting + * @param float $speed_variation_y + * @param float $time + */ + void fade_speed_variation_y(float speed_variation_y, float time); + /** + * @scripting + * @param float $speed_variation_y + * @param float $time + * @param string $easing + */ + void ease_speed_variation_y(float speed_variation_y, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_acceleration_x"" property instead! + */ + float get_acceleration_x() const; + /** + * @scripting + * @deprecated Use the ""particle_acceleration_x"" property instead! + * @param float $acceleration_x + */ + void set_acceleration_x(float acceleration_x); + /** + * @scripting + * @param float $acceleration_x + * @param float $time + */ + void fade_acceleration_x(float acceleration_x, float time); + /** + * @scripting + * @param float $acceleration_x + * @param float $time + * @param string $easing + */ + void ease_acceleration_x(float acceleration_x, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_acceleration_y"" property instead! + */ + float get_acceleration_y() const; + /** + * @scripting + * @deprecated Use the ""particle_acceleration_y"" property instead! + * @param float $acceleration_y + */ + void set_acceleration_y(float acceleration_y); + /** + * @scripting + * @param float $acceleration_y + * @param float $time + */ + void fade_acceleration_y(float acceleration_y, float time); + /** + * @scripting + * @param float $acceleration_y + * @param float $time + * @param string $easing + */ + void ease_acceleration_y(float acceleration_y, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_friction_x"" property instead! + */ + float get_friction_x() const; + /** + * @scripting + * @deprecated Use the ""particle_friction_x"" property instead! + * @param float $friction_x + */ + void set_friction_x(float friction_x); + /** + * @scripting + * @param float $friction_x + * @param float $time + */ + void fade_friction_x(float friction_x, float time); + /** + * @scripting + * @param float $friction_x + * @param float $time + * @param string $easing + */ + void ease_friction_x(float friction_x, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_friction_y"" property instead! + */ + float get_friction_y() const; + /** + * @scripting + * @deprecated Use the ""particle_friction_y"" property instead! + * @param float $friction_y + */ + void set_friction_y(float friction_y); + /** + * @scripting + * @param float $friction_y + * @param float $time + */ + void fade_friction_y(float friction_y, float time); + /** + * @scripting + * @param float $friction_y + * @param float $time + * @param string $easing + */ + void ease_friction_y(float friction_y, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_feather_factor"" property instead! + */ + float get_feather_factor() const; + /** + * @scripting + * @deprecated Use the ""particle_feather_factor"" property instead! + * @param float $feather_factor + */ + void set_feather_factor(float feather_factor); + /** + * @scripting + * @param float $feather_factor + * @param float $time + */ + void fade_feather_factor(float feather_factor, float time); + /** + * @scripting + * @param float $feather_factor + * @param float $time + * @param string $easing + */ + void ease_feather_factor(float feather_factor, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation"" property instead! + */ + float get_rotation() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation"" property instead! + * @param float $rotation + */ + void set_rotation(float rotation); + /** + * @scripting + * @param float $rotation + * @param float $time + */ + void fade_rotation(float rotation, float time); + /** + * @scripting + * @param float $rotation + * @param float $time + * @param string $easing + */ + void ease_rotation(float rotation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation_variation"" property instead! + */ + float get_rotation_variation() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation_variation"" property instead! + * @param float $rotation_variation + */ + void set_rotation_variation(float rotation_variation); + /** + * @scripting + * @param float $rotation_variation + * @param float $time + */ + void fade_rotation_variation(float rotation_variation, float time); + /** + * @scripting + * @param float $rotation_variation + * @param float $time + * @param string $easing + */ + void ease_rotation_variation(float rotation_variation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation_speed"" property instead! + */ + float get_rotation_speed() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation_speed"" property instead! + * @param float $rotation_speed + */ + void set_rotation_speed(float rotation_speed); + /** + * @scripting + * @param float $rotation_speed + * @param float $time + */ + void fade_rotation_speed(float rotation_speed, float time); + /** + * @scripting + * @param float $rotation_speed + * @param float $time + * @param string $easing + */ + void ease_rotation_speed(float rotation_speed, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation_speed_variation"" property instead! + */ + float get_rotation_speed_variation() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation_speed_variation"" property instead! + * @param float $rotation_speed_variation + */ + void set_rotation_speed_variation(float rotation_speed_variation); + /** + * @scripting + * @param float $rotation_speed_variation + * @param float $time + */ + void fade_rotation_speed_variation(float rotation_speed_variation, float time); + /** + * @scripting + * @param float $rotation_speed_variation + * @param float $time + * @param string $easing + */ + void ease_rotation_speed_variation(float rotation_speed_variation, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation_acceleration"" property instead! + */ + float get_rotation_acceleration() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation_acceleration"" property instead! + * @param float $rotation_acceleration + */ + void set_rotation_acceleration(float rotation_acceleration); + /** + * @scripting + * @param float $rotation_acceleration + * @param float $time + */ + void fade_rotation_acceleration(float rotation_acceleration, float time); + /** + * @scripting + * @param float $rotation_acceleration + * @param float $time + * @param string $easing + */ + void ease_rotation_acceleration(float rotation_acceleration, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""particle_rotation_decceleration"" property instead! + */ + float get_rotation_decceleration() const; + /** + * @scripting + * @deprecated Use the ""particle_rotation_decceleration"" property instead! + * @param float $rotation_decceleration + */ + void set_rotation_decceleration(float rotation_decceleration); + /** + * @scripting + * @param float $rotation_decceleration + * @param float $time + */ + void fade_rotation_decceleration(float rotation_decceleration, float time); + /** + * @scripting + * @param float $rotation_decceleration + * @param float $time + * @param string $easing + */ + void ease_rotation_decceleration(float rotation_decceleration, float time, const std::string& easing); + private: std::vector script_easings; @@ -179,7 +823,7 @@ class CustomParticleSystem : } }; - SpriteProperties get_random_texture(); + SpriteProperties get_random_texture() const; class CustomParticle : public Particle { @@ -241,36 +885,113 @@ class CustomParticleSystem : std::vector > custom_particles; std::string m_particle_main_texture; + + /** + * @scripting + */ int m_max_amount; + /** + * @scripting + */ float m_delay; + /** + * @scripting + */ float m_particle_lifetime; + /** + * @scripting + */ float m_particle_lifetime_variation; - float m_particle_birth_time, - m_particle_birth_time_variation, - m_particle_death_time, - m_particle_death_time_variation; + /** + * @scripting + */ + float m_particle_birth_time; + /** + * @scripting + */ + float m_particle_birth_time_variation; + /** + * @scripting + */ + float m_particle_death_time; + /** + * @scripting + */ + float m_particle_death_time_variation; + FadeMode m_particle_birth_mode, m_particle_death_mode; EasingMode m_particle_birth_easing, m_particle_death_easing; - float m_particle_speed_x, - m_particle_speed_y, - m_particle_speed_variation_x, - m_particle_speed_variation_y, - m_particle_acceleration_x, - m_particle_acceleration_y, - m_particle_friction_x, - m_particle_friction_y; + + /** + * @scripting + */ + float m_particle_speed_x; + /** + * @scripting + */ + float m_particle_speed_y; + /** + * @scripting + */ + float m_particle_speed_variation_x; + /** + * @scripting + */ + float m_particle_speed_variation_y; + /** + * @scripting + */ + float m_particle_acceleration_x; + /** + * @scripting + */ + float m_particle_acceleration_y; + /** + * @scripting + */ + float m_particle_friction_x; + /** + * @scripting + */ + float m_particle_friction_y; + /** + * @scripting + */ float m_particle_feather_factor; - float m_particle_rotation, - m_particle_rotation_variation, - m_particle_rotation_speed, - m_particle_rotation_speed_variation, - m_particle_rotation_acceleration, - m_particle_rotation_decceleration; + /** + * @scripting + */ + float m_particle_rotation; + /** + * @scripting + */ + float m_particle_rotation_variation; + /** + * @scripting + */ + float m_particle_rotation_speed; + /** + * @scripting + */ + float m_particle_rotation_speed_variation; + /** + * @scripting + */ + float m_particle_rotation_acceleration; + /** + * @scripting + */ + float m_particle_rotation_decceleration; + RotationMode m_particle_rotation_mode; CollisionMode m_particle_collision_mode; OffscreenMode m_particle_offscreen_mode; + + /** + * @scripting + */ bool m_cover_screen; public: diff --git a/src/object/custom_particle_system_file.hpp b/src/object/custom_particle_system_file.hpp index 5dc1b30c4c3..728852e5443 100644 --- a/src/object/custom_particle_system_file.hpp +++ b/src/object/custom_particle_system_file.hpp @@ -22,14 +22,13 @@ #include "object/custom_particle_system.hpp" #include "object/particlesystem_interactive.hpp" #include "object/particle_zone.hpp" -#include "scripting/custom_particles.hpp" #include "video/surface.hpp" #include "video/surface_ptr.hpp" -class CustomParticleSystemFile final : - public CustomParticleSystem +class CustomParticleSystemFile final : public CustomParticleSystem { friend class ParticleEditor; + public: CustomParticleSystemFile(); CustomParticleSystemFile(const ReaderMapping& reader); @@ -39,6 +38,7 @@ class CustomParticleSystemFile final : virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Custom Particles from file"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return CustomParticleSystem::get_class_types().add(typeid(CustomParticleSystemFile)); } virtual ObjectSettings get_settings() override; virtual const std::string get_icon_path() const override { diff --git a/src/object/decal.cpp b/src/object/decal.cpp index 13cb8a71cf0..ba8f4b73f0e 100644 --- a/src/object/decal.cpp +++ b/src/object/decal.cpp @@ -15,7 +15,10 @@ // along with this program. If not, see . #include "object/decal.hpp" -#include "scripting/decal.hpp" + +#include +#include + #include "supertux/flip_level_transformer.hpp" #include "sprite/sprite_manager.hpp" #include "util/reader.hpp" @@ -23,7 +26,6 @@ Decal::Decal(const ReaderMapping& reader) : MovingSprite(reader, "images/decal/explanations/billboard-bigtux.png", LAYER_OBJECTS, COLGROUP_DISABLED), - ExposedObject(this), m_default_action("default"), m_solid(), m_fade_sprite(m_sprite.get()->clone()), @@ -142,4 +144,16 @@ Decal::update(float) } } + +void +Decal::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Decal", vm.findClass("MovingSprite")); + + cls.addFunc("fade_sprite", &Decal::fade_sprite); + cls.addFunc("change_sprite", &MovingSprite::change_sprite); // Deprecated; for compatibility + cls.addFunc("fade_in", &Decal::fade_in); + cls.addFunc("fade_out", &Decal::fade_out); +} + /* EOF */ diff --git a/src/object/decal.hpp b/src/object/decal.hpp index 0d2008664a4..edff1bd404a 100644 --- a/src/object/decal.hpp +++ b/src/object/decal.hpp @@ -18,18 +18,25 @@ #define HEADER_SUPERTUX_OBJECT_DECAL_HPP #include "object/moving_sprite.hpp" -#include "scripting/decal.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/timer.hpp" class ReaderMapping; -/** A decorative image, perhaps part of the terrain */ -class Decal final : public MovingSprite, - public ExposedObject +/** + * A decorative image, perhaps part of the terrain. + + * @scripting + * @summary A ""Decal"" that was given a name can be controlled by scripts. + * @instances A ""Decal"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Decal final : public MovingSprite { friend class FlipLevelTransformer; +public: + static void register_class(ssq::VM& vm); + public: Decal(const ReaderMapping& reader); ~Decal() override; @@ -38,8 +45,10 @@ class Decal final : public MovingSprite, static std::string class_name() { return "decal"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Decal"; } static std::string display_name() { return _("Decal"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Decal)); } virtual ObjectSettings get_settings() override; @@ -48,9 +57,34 @@ class Decal final : public MovingSprite, virtual void on_flip(float height) override; - void fade_in(float fade_time); - void fade_out(float fade_time); - void fade_sprite(const std::string& new_sprite, float fade_time); + /** + * @scripting + * @description Fades the decal sprite to a new one in ""time"" seconds. + * @param string $sprite + * @param float $time + */ + void fade_sprite(const std::string& sprite, float time); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @deprecated Use ""set_sprite()"" instead! + * @description Changes the decal sprite. + * @param string $sprite + */ + void change_sprite(const std::string& sprite); +#endif + /** + * @scripting + * @description Fades in the decal in ""time"" seconds. + * @param float $time + */ + void fade_in(float time); + /** + * @scripting + * @description Fades out the decal in ""time"" seconds. + * @param float $time + */ + void fade_out(float time); void set_visible(bool v) { m_visible = v; } bool is_visible() const { return m_visible; } diff --git a/src/object/display_effect.cpp b/src/object/display_effect.cpp index 6813628530a..5981d7f0e85 100644 --- a/src/object/display_effect.cpp +++ b/src/object/display_effect.cpp @@ -16,6 +16,9 @@ #include "object/display_effect.hpp" +#include +#include + #include "supertux/globals.hpp" #include "video/drawing_context.hpp" @@ -23,7 +26,6 @@ static const float BORDER_SIZE = 75; DisplayEffect::DisplayEffect(const std::string& name) : GameObject(name), - ExposedObject(this), screen_fade(FadeType::NO_FADE), screen_fadetime(0), screen_fading(0), @@ -190,4 +192,18 @@ DisplayEffect::four_to_three(float fadetime) } } + +void +DisplayEffect::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("DisplayEffect", vm.findClass("GameObject")); + + cls.addFunc("fade_out", &DisplayEffect::fade_out); + cls.addFunc("fade_in", &DisplayEffect::fade_in); + cls.addFunc("set_black", &DisplayEffect::set_black); + cls.addFunc("is_black", &DisplayEffect::is_black); + cls.addFunc("sixteen_to_nine", &DisplayEffect::sixteen_to_nine); + cls.addFunc("four_to_three", &DisplayEffect::four_to_three); +} + /* EOF */ diff --git a/src/object/display_effect.hpp b/src/object/display_effect.hpp index f400dad722c..3822438cf94 100644 --- a/src/object/display_effect.hpp +++ b/src/object/display_effect.hpp @@ -18,30 +18,71 @@ #define HEADER_SUPERTUX_OBJECT_DISPLAY_EFFECT_HPP #include "supertux/game_object.hpp" -#include "scripting/display_effect.hpp" -#include "squirrel/exposed_object.hpp" -class DisplayEffect final : public GameObject, - public ExposedObject +/** + * @scripting + * @summary ""DisplayEffect"" is an interface for toying with the display. + * @instances SuperTux creates an instance named ""Effect"" when starting the scripting engine. + Its usage is preferred – creating another instance might have unexpected side effects and is strongly discouraged. + (Use ""sector.Effect"" in the console.) + */ +class DisplayEffect final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: DisplayEffect(const std::string& name = ""); ~DisplayEffect() override; + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(DisplayEffect)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; virtual bool is_singleton() const override { return true; } virtual bool is_saveable() const override { return false; } + virtual std::string get_exposed_class_name() const override { return "DisplayEffect"; } /** @name Scriptable Methods @{ */ - void fade_out(float fadetime); - void fade_in(float fadetime); - void set_black(bool enabled); + /** + * @scripting + * @description Gradually fades out the screen to black for the next ""time"" seconds. + * @param float $time + */ + void fade_out(float time); + /** + * @scripting + * @description Gradually fades in the screen from black for the next ""time"" seconds. + * @param float $time + */ + void fade_in(float time); + /** + * @scripting + * @description Blackens or un-blackens the screen (depending on the value of ""black""). + * @param bool $black + */ + void set_black(bool black); + /** + * @scripting + * @description Returns ""true"" if the screen has been blackened by ""set_black"". + Note: Calling ""fade_in"" or ""fade_out"" resets the return value to ""false"". + */ bool is_black() const; - void sixteen_to_nine(float fadetime); - void four_to_three(float fadetime); + /** + * @scripting + * @description Sets the display ratio to 16:9, effectively adding black bars at the top and bottom of the screen. + Should be used before cutscenes. Gradually fades to this state for the next ""time"" seconds. + * @param float $time + */ + void sixteen_to_nine(float time); + /** + * @scripting + * @description Sets the display ratio to 4:3, removing the black bars added by ""sixteen_to_nine()"". + Should be used after cutscenes. Gradually fades to this state for the next ""time"" seconds. + * @param float $time + */ + void four_to_three(float time); /** @} */ diff --git a/src/object/electrifier.hpp b/src/object/electrifier.hpp index 9bf3dd26f2f..574e253a70f 100644 --- a/src/object/electrifier.hpp +++ b/src/object/electrifier.hpp @@ -35,6 +35,7 @@ class Electrifier final : public GameObject public: Electrifier(TileChangeMap replacements, float seconds); Electrifier(uint32_t oldtile, uint32_t newtile, float seconds); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Electrifier)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/endsequence.hpp b/src/object/endsequence.hpp index 5ccb154d6c4..2ccfbd99ba4 100644 --- a/src/object/endsequence.hpp +++ b/src/object/endsequence.hpp @@ -27,6 +27,7 @@ class EndSequence : public GameObject public: EndSequence(); ~EndSequence() override; + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(EndSequence)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/endsequence_fireworks.hpp b/src/object/endsequence_fireworks.hpp index c459e791738..7e052277b3e 100644 --- a/src/object/endsequence_fireworks.hpp +++ b/src/object/endsequence_fireworks.hpp @@ -25,6 +25,7 @@ class EndSequenceFireworks final : public EndSequence public: EndSequenceFireworks(); ~EndSequenceFireworks() override; + virtual GameObjectClasses get_class_types() const override { return EndSequence::get_class_types().add(typeid(EndSequenceFireworks)); } virtual void draw(DrawingContext& context) override; protected: diff --git a/src/object/endsequence_walk.hpp b/src/object/endsequence_walk.hpp index 8f4836cbaff..ef22d244e5b 100644 --- a/src/object/endsequence_walk.hpp +++ b/src/object/endsequence_walk.hpp @@ -25,6 +25,7 @@ class EndSequenceWalk final : public EndSequence public: EndSequenceWalk(); ~EndSequenceWalk() override; + virtual GameObjectClasses get_class_types() const override { return EndSequence::get_class_types().add(typeid(EndSequenceWalk)); } virtual void draw(DrawingContext& context) override; protected: diff --git a/src/object/explosion.hpp b/src/object/explosion.hpp index 0b7146fef81..070d3b654c2 100644 --- a/src/object/explosion.hpp +++ b/src/object/explosion.hpp @@ -34,6 +34,7 @@ class Explosion final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Explosion"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Explosion)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/fallblock.hpp b/src/object/fallblock.hpp index e6f627f2c34..202b56e5d1e 100644 --- a/src/object/fallblock.hpp +++ b/src/object/fallblock.hpp @@ -40,6 +40,7 @@ class FallBlock : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Falling Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(FallBlock)); } virtual void on_flip(float height) override; diff --git a/src/object/falling_coin.hpp b/src/object/falling_coin.hpp index 5f942a33ee4..55ef3b3d3b8 100644 --- a/src/object/falling_coin.hpp +++ b/src/object/falling_coin.hpp @@ -26,6 +26,7 @@ class FallingCoin final : public GameObject { public: FallingCoin(const Vector& start_position, float x_vel); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(FallingCoin)); } virtual void draw(DrawingContext& context) override; virtual void update(float dt_sec) override; diff --git a/src/object/firefly.hpp b/src/object/firefly.hpp index 147cdb68195..55c820d6a1e 100644 --- a/src/object/firefly.hpp +++ b/src/object/firefly.hpp @@ -37,6 +37,7 @@ class Firefly final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Checkpoint"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Firefly)); } virtual ObjectSettings get_settings() override; virtual void on_flip(float height) override; diff --git a/src/object/fireworks.hpp b/src/object/fireworks.hpp index 23f45bf4263..e54bacb3ccf 100644 --- a/src/object/fireworks.hpp +++ b/src/object/fireworks.hpp @@ -26,6 +26,7 @@ class Fireworks final : public GameObject { public: Fireworks(); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Fireworks)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/floating_image.cpp b/src/object/floating_image.cpp index 64963c6a9a8..cebabe5df58 100644 --- a/src/object/floating_image.cpp +++ b/src/object/floating_image.cpp @@ -16,18 +16,22 @@ #include "object/floating_image.hpp" +#include +#include + #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" #include "supertux/globals.hpp" +#include "supertux/sector.hpp" FloatingImage::FloatingImage(const std::string& spritefile) : - sprite(SpriteManager::current()->create(spritefile)), - layer(LAYER_FOREGROUND1 + 1), - visible(false), - anchor(ANCHOR_MIDDLE), - pos(0.0f, 0.0f), - fading(0), - fadetime(0) + m_sprite(SpriteManager::current()->create(spritefile)), + m_layer(LAYER_FOREGROUND1 + 1), + m_visible(false), + m_anchor(ANCHOR_MIDDLE), + m_pos(0.0f, 0.0f), + m_fading(0), + m_fadetime(0) { } @@ -38,45 +42,104 @@ FloatingImage::~FloatingImage() void FloatingImage::update(float dt_sec) { - if (fading > 0) { - fading -= dt_sec; - if (fading <= 0) { - fading = 0; - visible = true; + if (m_fading > 0) + { + m_fading -= dt_sec; + if (m_fading <= 0) + { + m_fading = 0; + m_visible = true; } - } else if (fading < 0) { - fading += dt_sec; - if (fading >= 0) { - fading = 0; - visible = false; + } + else if (m_fading < 0) + { + m_fading += dt_sec; + if (m_fading >= 0) + { + m_fading = 0; + m_visible = false; } } } +void +FloatingImage::set_layer(int layer) +{ + m_layer = layer; +} + +int +FloatingImage::get_layer() const +{ + return m_layer; +} + +void +FloatingImage::set_pos(float x, float y) +{ + m_pos = Vector(x, y); +} + +float +FloatingImage::get_x() const +{ + return m_pos.x; +} + +float +FloatingImage::get_y() const +{ + return m_pos.y; +} + +void +FloatingImage::set_anchor_point(int anchor) +{ + m_anchor = static_cast(anchor); +} + +int +FloatingImage::get_anchor_point() const +{ + return static_cast(m_anchor); +} + +bool +FloatingImage::get_visible() const +{ + return m_visible; +} + +void +FloatingImage::set_visible(bool visible) +{ + m_visible = visible; +} + void FloatingImage::set_action(const std::string& action) { - sprite->set_action(action); + m_sprite->set_action(action); } std::string -FloatingImage::get_action() +FloatingImage::get_action() const { - return sprite->get_action(); + return m_sprite->get_action(); } void -FloatingImage::fade_in(float fadetime_) +FloatingImage::fade_in(float time) { - fadetime = fadetime_; - fading = fadetime_; + m_fadetime = time; + m_fading = time; } void -FloatingImage::fade_out(float fadetime_) +FloatingImage::fade_out(float time) { - fadetime = fadetime_; - fading = -fadetime_; + m_fadetime = time; + m_fading = -time; } void @@ -85,23 +148,57 @@ FloatingImage::draw(DrawingContext& context) context.push_transform(); context.set_translation(Vector(0, 0)); - if (fading > 0) { - context.set_alpha((fadetime-fading) / fadetime); - } else if (fading < 0) { - context.set_alpha(-fading / fadetime); - } else if (!visible) { + if (m_fading > 0) + context.set_alpha((m_fadetime - m_fading) / m_fadetime); + else if (m_fading < 0) + context.set_alpha(-m_fading / m_fadetime); + else if (!m_visible) + { context.pop_transform(); return; } - Vector spos = pos + get_anchor_pos(context.get_rect(), - static_cast(sprite->get_width()), - static_cast(sprite->get_height()), - anchor); - - sprite->draw(context.color(), spos, layer); + const Vector spos = m_pos + get_anchor_pos(context.get_rect(), + static_cast(m_sprite->get_width()), + static_cast(m_sprite->get_height()), + m_anchor); + m_sprite->draw(context.color(), spos, m_layer); context.pop_transform(); } + +void +FloatingImage::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addClass("FloatingImage", [](const std::string& spritefile) + { + if (!Sector::current()) + throw std::runtime_error("Tried to create 'FloatingImage' without an active sector."); + + return &Sector::get().add(spritefile); + }, + false /* Do not free pointer from Squirrel */, + vm.findClass("GameObject")); + + cls.addFunc("set_layer", &FloatingImage::set_layer); + cls.addFunc("get_layer", &FloatingImage::get_layer); + cls.addFunc("set_pos", &FloatingImage::set_pos); + cls.addFunc("get_x", &FloatingImage::get_x); + cls.addFunc("get_y", &FloatingImage::get_y); + cls.addFunc("get_pos_x", &FloatingImage::get_x); // Deprecated + cls.addFunc("get_pos_y", &FloatingImage::get_y); // Deprecated + cls.addFunc("set_anchor_point", &FloatingImage::set_anchor_point); + cls.addFunc("get_anchor_point", &FloatingImage::get_anchor_point); + cls.addFunc("set_visible", &FloatingImage::set_visible); + cls.addFunc("get_visible", &FloatingImage::get_visible); + cls.addFunc("set_action", &FloatingImage::set_action); + cls.addFunc("get_action", &FloatingImage::get_action); + cls.addFunc("fade_in", &FloatingImage::fade_in); + cls.addFunc("fade_out", &FloatingImage::fade_out); + + cls.addVar("layer", &FloatingImage::m_layer); + cls.addVar("visible", &FloatingImage::m_visible); +} + /* EOF */ diff --git a/src/object/floating_image.hpp b/src/object/floating_image.hpp index d34ebdf94b6..a4fbec4a997 100644 --- a/src/object/floating_image.hpp +++ b/src/object/floating_image.hpp @@ -21,61 +21,140 @@ #include "sprite/sprite_ptr.hpp" #include "supertux/game_object.hpp" +/** + * @scripting + * @summary This class provides the ability to create, edit, and remove images floating in midair on the screen. + It is implemented as a wrapper around a sprite, so any sprite actions are applicable. + * @instances Floating Images are created in a script or from the console. Constructor:${SRG_NEWPARAGRAPH} + """""" <- FloatingImage(string filename)""""""${SRG_NEWPARAGRAPH} + This creates a ""FloatingImage"" from ""filename"" (which is relative to the data directory root). + */ class FloatingImage final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: FloatingImage(const std::string& sprite); ~FloatingImage() override; - virtual bool is_saveable() const override { - return false; - } - - void set_layer(int layer_) { - layer = layer_; - } - - int get_layer() const { - return layer; - } - - void set_pos(const Vector& pos_) { - pos = pos_; - } - const Vector& get_pos() const { - return pos; - } - - void set_anchor_point(AnchorPoint anchor_) { - anchor = anchor_; - } - AnchorPoint get_anchor_point() const { - return anchor; - } - void set_visible(bool visible_) { - visible = visible_; - } - bool get_visible() const { - return visible; - } - - void set_action(const std::string& action); - std::string get_action(); - - void fade_in(float fadetime); - void fade_out(float fadetime); + virtual bool is_saveable() const override { return false; } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(FloatingImage)); } + virtual std::string get_exposed_class_name() const override { return "FloatingImage"; } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; + /** + * @scripting + * @deprecated Use the ""layer"" property instead! + * @description Sets the layer of the floating image. + * @param int $layer + */ + void set_layer(int layer); + /** + * @scripting + * @deprecated Use the ""layer"" property instead! + * @description Returns the layer the floating image is on. + */ + int get_layer() const; + /** + * @scripting + * @description Sets the location of the image in relation to the current anchor point. + * @param float $x + * @param float $y + */ + void set_pos(float x, float y); + /** + * @scripting + * @description Returns the image's X coordinate relative to the current anchor point. + */ + float get_x() const; + /** + * @scripting + * @description Returns the image's Y coordinate relative to the current anchor point. + */ + float get_y() const; +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @deprecated Use ""get_x()"" instead! + * @description Returns the image's X coordinate relative to the current anchor point. + */ + float get_pos_x() const; + /** + * @scripting + * @deprecated Use ""get_y()"" instead! + * @description Returns the image's Y coordinate relative to the current anchor point. + */ + float get_pos_y() const; +#endif + /** + * @scripting + * @description Sets the image's anchor point. + * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). + */ + void set_anchor_point(int anchor); + /** + * @scripting + * @description Returns the current anchor point. + */ + int get_anchor_point() const; + /** + * @scripting + * @deprecated Use the ""visible"" property instead! + * @description Sets the visibility of the floating image. + * @param bool $visible + */ + void set_visible(bool visible); + /** + * @scripting + * @deprecated Use the ""visible"" property instead! + * @description Returns the visibility state of the floating image. + */ + bool get_visible() const; + /** + * @scripting + * @description Sets the action of the image. + * This is only useful when the image is a sprite. + * @param string $action Name of the action, as defined in the sprite. + */ + void set_action(const std::string& action); + /** + * @scripting + * @description Returns the name of the action of the image, as defined in the sprite. + * This is only useful when the image is a sprite. + */ + std::string get_action() const; + /** + * @scripting + * @description Fades in the image for the next ""time"" seconds. + * @param float $time + */ + void fade_in(float time); + /** + * @scripting + * @description Fades out the image for the next ""time"" seconds. + * @param float $time + */ + void fade_out(float time); + private: - SpritePtr sprite; - int layer; - bool visible; - AnchorPoint anchor; - Vector pos; - float fading; - float fadetime; + SpritePtr m_sprite; + /** + * @scripting + * The layer the floating image is on. + */ + int m_layer; + /** + * @scripting + * Determines whether the floating image is visible. + */ + bool m_visible; + AnchorPoint m_anchor; + Vector m_pos; + float m_fading; + float m_fadetime; }; #endif diff --git a/src/object/floating_text.hpp b/src/object/floating_text.hpp index ca3c671a427..7b7d3214b13 100644 --- a/src/object/floating_text.hpp +++ b/src/object/floating_text.hpp @@ -28,6 +28,8 @@ class FloatingText final : public GameObject public: FloatingText(const Vector& pos, const std::string& text_); FloatingText(const Vector& pos, int s); // use this for score, for instance + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(FloatingText)); } + virtual bool is_saveable() const override { return false; } diff --git a/src/object/flower.hpp b/src/object/flower.hpp index 173a8d0c1e8..11427005be7 100644 --- a/src/object/flower.hpp +++ b/src/object/flower.hpp @@ -30,6 +30,7 @@ class Flower final : public MovingObject public: Flower(BonusType type, const std::string& custom_sprite = ""); + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(Flower)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/ghost_particle_system.hpp b/src/object/ghost_particle_system.hpp index 8610b5b8e1f..2bedbf2d2ec 100644 --- a/src/object/ghost_particle_system.hpp +++ b/src/object/ghost_particle_system.hpp @@ -36,6 +36,7 @@ class GhostParticleSystem final : public ParticleSystem virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Ghost Particles"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem::get_class_types().add(typeid(GhostParticleSystem)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/ghostparticles.png"; diff --git a/src/object/gradient.cpp b/src/object/gradient.cpp index ab130838a2e..e65e3774d01 100644 --- a/src/object/gradient.cpp +++ b/src/object/gradient.cpp @@ -14,9 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include "object/gradient.hpp" + #include -#include "object/gradient.hpp" +#include +#include #include "editor/editor.hpp" #include "object/camera.hpp" @@ -30,7 +33,6 @@ #include "video/viewport.hpp" Gradient::Gradient() : - ExposedObject(this), m_layer(LAYER_BACKGROUND0), m_gradient_top(), m_gradient_bottom(), @@ -48,7 +50,6 @@ Gradient::Gradient() : Gradient::Gradient(const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), m_layer(LAYER_BACKGROUND0), m_gradient_top(), m_gradient_bottom(), @@ -241,6 +242,48 @@ Gradient::set_direction(const std::string& direction) } } +void +Gradient::set_color1(float red, float green, float blue) +{ + set_gradient(Color(red, green, blue), m_gradient_bottom); +} + +void +Gradient::set_color2(float red, float green, float blue) +{ + set_gradient(m_gradient_top, Color(red, green, blue)); +} + +void +Gradient::set_colors(float red1, float green1, float blue1, float red2, float green2, float blue2) +{ + set_gradient(Color(red1, green1, blue1), Color(red2, green2, blue2)); +} + +void +Gradient::fade_color1(float red, float green, float blue, float time) +{ + fade_gradient(Color(red, green, blue), m_gradient_bottom, time); +} + +void +Gradient::fade_color2(float red, float green, float blue, float time) +{ + fade_gradient(m_gradient_top, Color(red, green, blue), time); +} + +void +Gradient::fade_colors(float red1, float green1, float blue1, float red2, float green2, float blue2, float time) +{ + fade_gradient(Color(red1, green1, blue1), Color(red2, green2, blue2), time); +} + +void +Gradient::swap_colors() +{ + set_gradient(m_gradient_bottom, m_gradient_top); +} + void Gradient::draw(DrawingContext& context) { @@ -283,4 +326,21 @@ Gradient::on_flip(float height) std::swap(m_gradient_top, m_gradient_bottom); } + +void +Gradient::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Gradient", vm.findClass("GameObject")); + + cls.addFunc("set_direction", &Gradient::set_direction); + cls.addFunc("get_direction", &Gradient::get_direction_string); + cls.addFunc("set_color1", &Gradient::set_color1); + cls.addFunc("set_color2", &Gradient::set_color2); + cls.addFunc("set_colors", &Gradient::set_colors); + cls.addFunc("fade_color1", &Gradient::fade_color1); + cls.addFunc("fade_color2", &Gradient::fade_color2); + cls.addFunc("fade_colors", &Gradient::fade_colors); + cls.addFunc("swap_colors", &Gradient::swap_colors); +} + /* EOF */ diff --git a/src/object/gradient.hpp b/src/object/gradient.hpp index bb654963dc6..7259b25ae88 100644 --- a/src/object/gradient.hpp +++ b/src/object/gradient.hpp @@ -17,17 +17,22 @@ #ifndef HEADER_SUPERTUX_OBJECT_GRADIENT_HPP #define HEADER_SUPERTUX_OBJECT_GRADIENT_HPP -#include "scripting/gradient.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/game_object.hpp" #include "video/drawing_context.hpp" class ReaderMapping; -class Gradient final : - public GameObject, - public ExposedObject +/** + * @scripting + * @summary A ""Gradient"" that was given a name can be controlled by scripts. + * @instances A ""Gradient"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Gradient final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: Gradient(); Gradient(const ReaderMapping& reader); @@ -40,8 +45,10 @@ class Gradient final : static std::string class_name() { return "gradient"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Gradient"; } static std::string display_name() { return _("Gradient"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Gradient)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/gradient.png"; @@ -59,11 +66,87 @@ class Gradient final : GradientDirection get_direction() const { return m_gradient_direction; } std::string get_direction_string() const; void set_direction(const GradientDirection& direction); - void set_direction(const std::string& direction); void set_layer(int layer) { m_layer = layer; } int get_layer() const { return m_layer; } + /** + * @scripting + * @description Sets the direction of the gradient. + * @param string $direction Can be "horizontal", "vertical", "horizontal_sector" or "vertical_sector". + */ + void set_direction(const std::string& direction); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @description Returns the direction of the gradient. + Possible values are "horizontal", "vertical", "horizontal_sector" or "vertical_sector". + */ + std::string get_direction() const; +#endif + /** + * @scripting + * @description Set top gradient color. + * @param float $red + * @param float $green + * @param float $blue + */ + void set_color1(float red, float green, float blue); + /** + * @scripting + * @description Set bottom gradient color. + * @param float $red + * @param float $green + * @param float $blue + */ + void set_color2(float red, float green, float blue); + /** + * @scripting + * @description Set both gradient colors. + * @param float $red1 + * @param float $green1 + * @param float $blue1 + * @param float $red2 + * @param float $green2 + * @param float $blue2 + */ + void set_colors(float red1, float green1, float blue1, float red2, float green2, float blue2); + /** + * @scripting + * @description Fade the top gradient color to a specified new color in ""time"" seconds. + * @param float $red + * @param float $green + * @param float $blue + * @param float $time + */ + void fade_color1(float red, float green, float blue, float time); + /** + * @scripting + * @description Fade the bottom gradient color to a specified new color in ""time"" seconds. + * @param float $red + * @param float $green + * @param float $blue + * @param float $time + */ + void fade_color2(float red, float green, float blue, float time); + /** + * @scripting + * @description Fade both gradient colors to specified new colors in ""time"" seconds. + * @param float $red1 + * @param float $green1 + * @param float $blue1 + * @param float $red2 + * @param float $green2 + * @param float $blue2 + * @param float $time + */ + void fade_colors(float red1, float green1, float blue1, float red2, float green2, float blue2, float time); + /** + * @scripting + * @description Swap top and bottom gradient colors. + */ + void swap_colors(); + private: int m_layer; Color m_gradient_top; @@ -72,16 +155,16 @@ class Gradient final : Blend m_blend; DrawingTarget m_target; -private: - Gradient(const Gradient&) = delete; - Gradient& operator=(const Gradient&) = delete; - Color m_start_gradient_top; Color m_start_gradient_bottom; Color m_fade_gradient_top; Color m_fade_gradient_bottom; float m_fade_total_time; - float m_fade_time = 0; + float m_fade_time; + +private: + Gradient(const Gradient&) = delete; + Gradient& operator=(const Gradient&) = delete; }; #endif diff --git a/src/object/growup.hpp b/src/object/growup.hpp index 8c743cd1cd4..d779a01132f 100644 --- a/src/object/growup.hpp +++ b/src/object/growup.hpp @@ -25,6 +25,7 @@ class GrowUp final : public MovingSprite { public: GrowUp(const Vector& pos, Direction direction = Direction::RIGHT, const std::string& custom_sprite = ""); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(GrowUp)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/hurting_platform.hpp b/src/object/hurting_platform.hpp index db034f4bb66..d1fc19b8db9 100644 --- a/src/object/hurting_platform.hpp +++ b/src/object/hurting_platform.hpp @@ -30,6 +30,7 @@ class HurtingPlatform final : public Platform virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Hurting Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Platform::get_class_types().add(typeid(HurtingPlatform)); } private: HurtingPlatform(const HurtingPlatform&) = delete; diff --git a/src/object/infoblock.hpp b/src/object/infoblock.hpp index a5351bfba72..9df49d85751 100644 --- a/src/object/infoblock.hpp +++ b/src/object/infoblock.hpp @@ -36,6 +36,7 @@ class InfoBlock final : public Block virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Info Block"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Block::get_class_types().add(typeid(InfoBlock)); } virtual ObjectSettings get_settings() override; diff --git a/src/object/invisible_block.hpp b/src/object/invisible_block.hpp index ad2b63a169f..3d3ccb6c8bc 100644 --- a/src/object/invisible_block.hpp +++ b/src/object/invisible_block.hpp @@ -29,6 +29,7 @@ class InvisibleBlock final : public Block virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Invisible Block"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Block::get_class_types().add(typeid(InvisibleBlock)); } virtual void draw(DrawingContext& context) override; virtual bool collides(GameObject& other, const CollisionHit& hit) const override; diff --git a/src/object/invisible_wall.hpp b/src/object/invisible_wall.hpp index 02bddb90440..3b5ba67cec8 100644 --- a/src/object/invisible_wall.hpp +++ b/src/object/invisible_wall.hpp @@ -36,6 +36,7 @@ class InvisibleWall final : public MovingObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Invisible Wall"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(InvisibleWall)); } virtual bool has_variable_size() const override { return true; } diff --git a/src/object/ispy.hpp b/src/object/ispy.hpp index 681b005a14e..dea8674b2ce 100644 --- a/src/object/ispy.hpp +++ b/src/object/ispy.hpp @@ -34,6 +34,7 @@ class Ispy final : public StickyObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Ispy"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyObject::get_class_types().add(typeid(Ispy)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/key.hpp b/src/object/key.hpp index d709020384b..81097fe9999 100644 --- a/src/object/key.hpp +++ b/src/object/key.hpp @@ -37,6 +37,7 @@ class Key final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Key"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Key)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/lantern.hpp b/src/object/lantern.hpp index 68d053cc5d4..435a1feaa02 100644 --- a/src/object/lantern.hpp +++ b/src/object/lantern.hpp @@ -37,6 +37,7 @@ class Lantern final : public Rock virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Lantern"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Rock::get_class_types().add(typeid(Lantern)); } virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override { return {}; } diff --git a/src/object/level_time.cpp b/src/object/level_time.cpp index a6cb0fb296d..e8857ce4ab6 100644 --- a/src/object/level_time.cpp +++ b/src/object/level_time.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "editor/editor.hpp" #include "object/player.hpp" #include "supertux/game_session.hpp" @@ -32,7 +35,6 @@ static const float TIME_WARNING = 20; LevelTime::LevelTime(const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), time_surface(Surface::from_file("images/engine/hud/time-0.png")), running(!Editor::is_active()), time_left() @@ -154,4 +156,16 @@ LevelTime::set_time(float time_left_) time_left = std::min(std::max(time_left_, 0.0f), 999.0f); } + +void +LevelTime::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("LevelTime", vm.findClass("GameObject")); + + cls.addFunc("start", &LevelTime::start); + cls.addFunc("stop", &LevelTime::stop); + cls.addFunc("get_time", &LevelTime::get_time); + cls.addFunc("set_time", &LevelTime::set_time); +} + /* EOF */ diff --git a/src/object/level_time.hpp b/src/object/level_time.hpp index 8df1d5b434b..f592bdea360 100644 --- a/src/object/level_time.hpp +++ b/src/object/level_time.hpp @@ -17,18 +17,25 @@ #ifndef HEADER_SUPERTUX_OBJECT_LEVEL_TIME_HPP #define HEADER_SUPERTUX_OBJECT_LEVEL_TIME_HPP -#include "squirrel/exposed_object.hpp" -#include "scripting/level_time.hpp" #include "supertux/game_object.hpp" #include "video/color.hpp" #include "video/surface_ptr.hpp" class ReaderMapping; -class LevelTime final : public GameObject, - public ExposedObject +/** + * @scripting + * @summary A ""LevelTime"" that was given a name can be controlled by scripts. + * @instances A ""LevelTime"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class LevelTime final : public GameObject { static Color text_color; + +public: + static void register_class(ssq::VM& vm); + public: LevelTime(const ReaderMapping& reader); @@ -38,23 +45,36 @@ class LevelTime final : public GameObject, /** @name Scriptable Methods @{ */ - /** Resumes the countdown */ + /** + * @scripting + * @description Resumes the countdown (assuming it isn't already started, in which case it does nothing). + */ void start(); - - /** Pauses the countdown */ + /** + * @scripting + * @description Pauses the countdown (assuming it isn't already stopped, in which case it does nothing). + */ void stop(); - - /** Returns the number of seconds left on the clock */ + /** + * @scripting + * @description Returns the number of seconds left on the clock. + */ float get_time() const; - - /** Changes the number of seconds left on the clock */ + /** + * @scripting + * @description Sets the number of seconds left on the clock. + * @param float $time_left + */ void set_time(float time_left); /** @} */ + static std::string class_name() { return "leveltime"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "LevelTime"; } static std::string display_name() { return _("Time Limit"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(LevelTime)); } virtual ObjectSettings get_settings() override; diff --git a/src/object/light.hpp b/src/object/light.hpp index ce03309b56a..88ee82425f5 100644 --- a/src/object/light.hpp +++ b/src/object/light.hpp @@ -31,6 +31,8 @@ class Light : public GameObject return false; } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Light)); } + virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/lit_object.cpp b/src/object/lit_object.cpp index 03390a03fec..1e04e8ed189 100644 --- a/src/object/lit_object.cpp +++ b/src/object/lit_object.cpp @@ -16,6 +16,9 @@ #include "object/lit_object.hpp" +#include +#include + #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" #include "supertux/flip_level_transformer.hpp" @@ -23,7 +26,6 @@ LitObject::LitObject(const ReaderMapping& reader) : MovingSprite(reader, "images/objects/lightflower/lightflower1.sprite"), - ExposedObject(this), m_light_offset(-6.f, -17.f), m_light_sprite_name("images/objects/lightflower/light/glow_light.sprite"), m_sprite_action("default"), @@ -96,13 +98,7 @@ LitObject::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } -const std::string& -LitObject::get_action() const -{ - return m_sprite->get_action(); -} - -const std::string& +std::string LitObject::get_light_action() const { return m_light_sprite->get_action(); @@ -114,4 +110,14 @@ LitObject::set_light_action(const std::string& action) m_light_sprite->set_action(action); } + +void +LitObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("LitObject", vm.findClass("MovingSprite")); + + cls.addFunc("get_light_action", &LitObject::get_light_action); + cls.addFunc("set_light_action", &LitObject::set_light_action); +} + /* EOF */ diff --git a/src/object/lit_object.hpp b/src/object/lit_object.hpp index b44baf1b18c..adddfe9d2c3 100644 --- a/src/object/lit_object.hpp +++ b/src/object/lit_object.hpp @@ -18,15 +18,20 @@ #define HEADER_SUPERTUX_OBJECT_LIT_OBJECT_HPP #include "object/moving_sprite.hpp" -#include "squirrel/exposed_object.hpp" - -#include "scripting/lit_object.hpp" class ReaderMapping; -class LitObject final : public MovingSprite, - public ExposedObject +/** + * @scripting + * @summary A ""LitObject"" that was given a name can be controlled by scripts. + * @instances A ""LitObject"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class LitObject final : public MovingSprite { +public: + static void register_class(ssq::VM& vm); + public: LitObject(const ReaderMapping& reader); @@ -37,8 +42,10 @@ class LitObject final : public MovingSprite, static std::string class_name() { return "lit-object"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "LitObject"; } static std::string display_name() { return _("Lit object"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(LitObject)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; @@ -47,8 +54,16 @@ class LitObject final : public MovingSprite, virtual void on_flip(float height) override; - const std::string& get_action() const; - const std::string& get_light_action() const; + /** + * @scripting + * @description Returns the current light sprite action. + */ + std::string get_light_action() const; + /** + * @scripting + * @description Sets the light sprite action. + * @param string $action + */ void set_light_action(const std::string& action); private: diff --git a/src/object/magicblock.hpp b/src/object/magicblock.hpp index 21b1ef87d8c..91261eec774 100644 --- a/src/object/magicblock.hpp +++ b/src/object/magicblock.hpp @@ -41,6 +41,7 @@ class MagicBlock final: public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Magic Tile"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(MagicBlock)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/moving_sprite.cpp b/src/object/moving_sprite.cpp index 968bedffb3e..ac3e75c3400 100644 --- a/src/object/moving_sprite.cpp +++ b/src/object/moving_sprite.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "editor/editor.hpp" #include "math/random.hpp" #include "math/util.hpp" @@ -120,6 +123,12 @@ MovingSprite::matches_sprite(const std::string& sprite_file) const return m_sprite_name == sprite_file || m_sprite_name == "/" + sprite_file; } +std::string +MovingSprite::get_action() const +{ + return m_sprite->get_action(); +} + void MovingSprite::update_hitbox() { @@ -127,6 +136,19 @@ MovingSprite::update_hitbox() m_col.set_unisolid(m_sprite->is_current_hitbox_unisolid()); } +void +MovingSprite::set_action(const std::string& name) +{ + m_sprite->set_action(name); + update_hitbox(); +} + +void +MovingSprite::set_action_loops(const std::string& name, int loops) +{ + set_action(name, loops); +} + void MovingSprite::set_action(const std::string& name, int loops) { @@ -231,4 +253,17 @@ MovingSprite::spawn_explosion_sprites(int count, const std::string& sprite_path) } } + +void +MovingSprite::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("MovingSprite", vm.findClass("MovingObject")); + + cls.addFunc("set_sprite", &MovingSprite::change_sprite); + cls.addFunc("get_sprite", &MovingSprite::get_sprite_name); + cls.addFunc("get_action", &MovingSprite::get_action); + cls.addFunc("set_action", &MovingSprite::set_action); + cls.addFunc("set_action_loops", &MovingSprite::set_action_loops); +} + /* EOF */ diff --git a/src/object/moving_sprite.hpp b/src/object/moving_sprite.hpp index bcec8a87ac2..b251e127587 100644 --- a/src/object/moving_sprite.hpp +++ b/src/object/moving_sprite.hpp @@ -26,9 +26,15 @@ class ReaderMapping; -/** Abstract base class for MovingObjects that are represented by a Sprite */ +/** + * @scripting + * @summary Abstract base class for ""MovingObject""s, that are represented by a sprite. + */ class MovingSprite : public MovingObject { +public: + static void register_class(ssq::VM& vm); + public: MovingSprite(const Vector& pos, const std::string& sprite_name, @@ -50,6 +56,8 @@ class MovingSprite : public MovingObject virtual void update(float dt_sec) override; static std::string class_name() { return "moving-sprite"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "MovingSprite"; } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(MovingSprite)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; @@ -67,11 +75,43 @@ class MovingSprite : public MovingObject /** Get various sprite properties. **/ Sprite* get_sprite() const { return m_sprite.get(); } - const std::string& get_action() const { return m_sprite->get_action(); } - /** Set new action for sprite and resize bounding box. use with - care as you can easily get stuck when resizing the bounding box. */ - void set_action(const std::string& name, int loops = -1); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @description Sets the sprite of the object. + * @param string $file + */ + void set_sprite(const std::string& file); + /** + * @scripting + * @description Returns the file of the object's sprite. + */ + std::string get_sprite() const; +#endif + /** + * @scripting + * @description Returns the name of the current action of the sprite. + */ + std::string get_action() const; + /** + * @scripting + * @description Sets the current action of the sprite and resizes the bounding box. + NOTE: Use with care as you can easily get stuck when resizing the bounding box. + * @param string $name + */ + void set_action(const std::string& name); + /** + * @scripting + * @description Sets the current action of the sprite, as well as the number of times it should loop, and resizes the bounding box. + NOTE: Use with care as you can easily get stuck when resizing the bounding box. + * @param string $name + * @param int $loops + */ + void set_action_loops(const std::string& name, int loops); + + /** Sets the action from an action name, as well as the number of times it should loop. */ + void set_action(const std::string& name, int loops); /** Sets the action from an action name and a particular direction in the form of "name-direction", eg. "walk-left". diff --git a/src/object/music_object.hpp b/src/object/music_object.hpp index aecd6ee4305..b9c6e4c0448 100644 --- a/src/object/music_object.hpp +++ b/src/object/music_object.hpp @@ -41,6 +41,7 @@ class MusicObject : public GameObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Music"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(MusicObject)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/music.png"; } virtual ObjectSettings get_settings() override; diff --git a/src/object/oneup.hpp b/src/object/oneup.hpp index 373168fc49c..51efe40a3cc 100644 --- a/src/object/oneup.hpp +++ b/src/object/oneup.hpp @@ -25,6 +25,7 @@ class OneUp final : public MovingSprite { public: OneUp(const Vector& pos, Direction direction = Direction::RIGHT); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(OneUp)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/particle_zone.cpp b/src/object/particle_zone.cpp index 1f74fc417a4..495bc7cc46c 100644 --- a/src/object/particle_zone.cpp +++ b/src/object/particle_zone.cpp @@ -23,7 +23,6 @@ ParticleZone::ParticleZone(const ReaderMapping& reader) : MovingObject(reader), - //ExposedObject(this), m_enabled(), m_particle_name() { diff --git a/src/object/particle_zone.hpp b/src/object/particle_zone.hpp index ecf2761e1b0..7504f30bd1c 100644 --- a/src/object/particle_zone.hpp +++ b/src/object/particle_zone.hpp @@ -17,18 +17,15 @@ #ifndef HEADER_SUPERTUX_OBJECT_PARTICLE_ZONE_HPP #define HEADER_SUPERTUX_OBJECT_PARTICLE_ZONE_HPP -#include "squirrel/exposed_object.hpp" -// TODO: #include "scripting/wind.hpp" #include "supertux/moving_object.hpp" -#include "video/layer.hpp" -class ReaderMapping; +#include "video/layer.hpp" /** Defines an area where a certain particle type can spawn */ -class ParticleZone final : - public MovingObject//, // TODO: Make this area actually moveable with Squirrel - //public ExposedObject // TODO: Scripting interface +class ParticleZone final : public MovingObject { + // TODO: Scripting interface + public: ParticleZone(const ReaderMapping& reader); @@ -40,6 +37,7 @@ class ParticleZone final : virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Particle zone"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(ParticleZone)); } virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; virtual ObjectSettings get_settings() override; diff --git a/src/object/particles.hpp b/src/object/particles.hpp index c92a2996326..1b090e82ff9 100644 --- a/src/object/particles.hpp +++ b/src/object/particles.hpp @@ -35,6 +35,7 @@ class Particles final : public GameObject const float min_initial_velocity, const float max_initial_velocity, const Vector& acceleration, int number, Color color, int size, float life_time, int drawing_layer); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Particles)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/particlesystem.cpp b/src/object/particlesystem.cpp index 3548380ebd1..9905180ddcf 100644 --- a/src/object/particlesystem.cpp +++ b/src/object/particlesystem.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "supertux/globals.hpp" #include "supertux/sector.hpp" #include "util/reader.hpp" @@ -32,7 +35,6 @@ ParticleSystem::ParticleSystem(const ReaderMapping& reader, float max_particle_size_) : GameObject(reader), - ExposedObject(this), max_particle_size(max_particle_size_), z_pos(LAYER_BACKGROUND1), particles(), @@ -46,7 +48,6 @@ ParticleSystem::ParticleSystem(const ReaderMapping& reader, float max_particle_s ParticleSystem::ParticleSystem(float max_particle_size_) : GameObject(), - ExposedObject(this), max_particle_size(max_particle_size_), z_pos(LAYER_BACKGROUND1), particles(), @@ -143,4 +144,16 @@ ParticleSystem::get_enabled() const return enabled; } + +void +ParticleSystem::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("ParticleSystem", vm.findClass("GameObject")); + + cls.addFunc("set_enabled", &ParticleSystem::set_enabled); + cls.addFunc("get_enabled", &ParticleSystem::get_enabled); + + cls.addVar("enabled", &ParticleSystem::enabled); +} + /* EOF */ diff --git a/src/object/particlesystem.hpp b/src/object/particlesystem.hpp index d3eb1e4dbd4..7f61f42c575 100644 --- a/src/object/particlesystem.hpp +++ b/src/object/particlesystem.hpp @@ -20,32 +20,37 @@ #include #include "math/vector.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/particlesystem.hpp" #include "supertux/game_object.hpp" #include "video/surface_ptr.hpp" class ReaderMapping; /** - This is the base class for particle systems. It is responsible for - storing a set of particles with each having an x- and y-coordinate - the number of the layer where it should be drawn and a texture. - - The coordinate system used here is a virtual one. It would be a bad - idea to populate whole levels with particles. So we're using a - virtual rectangle here that is tiled onto the level when drawing. - This rect.has the size (virtual_width, virtual_height). We're using - modulo on the particle coordinates, so when a particle leaves left, - it'll reenter at the right side. - - Classes that implement a particle system should subclass from this - class, initialize particles in the constructor and move them in the - simulate function. + * This is the base class for particle systems. It is responsible for + storing a set of particles with each having an x- and y-coordinate + the number of the layer where it should be drawn and a texture. + + The coordinate system used here is a virtual one. It would be a bad + idea to populate whole levels with particles. So we're using a + virtual rectangle here that is tiled onto the level when drawing. + This rect.has the size (virtual_width, virtual_height). We're using + modulo on the particle coordinates, so when a particle leaves left, + it'll reenter at the right side. + + Classes that implement a particle system should subclass from this + class, initialize particles in the constructor and move them in the + simulate function. + + * @scripting + * @summary A ""ParticleSystem"" that was given a name can be controlled by scripts. + * @instances A ""ParticleSystem"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. */ -class ParticleSystem : public GameObject, - public ExposedObject +class ParticleSystem : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: ParticleSystem(const ReaderMapping& reader, float max_particle_size = 60); ParticleSystem(float max_particle_size = 60); @@ -55,11 +60,24 @@ class ParticleSystem : public GameObject, static std::string class_name() { return "particle-system"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "ParticleSystem"; } static std::string display_name() { return _("Particle system"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(ParticleSystem)); } virtual ObjectSettings get_settings() override; - void set_enabled(bool enabled_); + /** + * @scripting + * @deprecated Use the ""enabled"" property instead! + * @description Enables/disables the system. + * @param bool $enable + */ + void set_enabled(bool enable); + /** + * @scripting + * @deprecated Use the ""enabled"" property instead! + * @description Returns ""true"" if the system is enabled. + */ bool get_enabled() const; int get_layer() const { return z_pos; } @@ -97,6 +115,11 @@ class ParticleSystem : public GameObject, std::vector > particles; float virtual_width; float virtual_height; + + /** + * @scripting + * @description Determines whether the system is enabled. + */ bool enabled; private: diff --git a/src/object/particlesystem_interactive.hpp b/src/object/particlesystem_interactive.hpp index abf37cfb843..c0233f796cf 100644 --- a/src/object/particlesystem_interactive.hpp +++ b/src/object/particlesystem_interactive.hpp @@ -47,6 +47,7 @@ class ParticleSystem_Interactive : public ParticleSystem virtual std::string get_display_name() const override { return _("Interactive particle system"); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem::get_class_types().add(typeid(ParticleSystem_Interactive)); } protected: virtual int collision(Particle* particle, const Vector& movement); diff --git a/src/object/path_gameobject.hpp b/src/object/path_gameobject.hpp index 732c6f0d933..cbb7c7984cb 100644 --- a/src/object/path_gameobject.hpp +++ b/src/object/path_gameobject.hpp @@ -44,6 +44,7 @@ class PathGameObject : public GameObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Path"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(PathGameObject)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/path.png"; diff --git a/src/object/path_object.cpp b/src/object/path_object.cpp index 29307ee625b..15fb9b6d4f5 100644 --- a/src/object/path_object.cpp +++ b/src/object/path_object.cpp @@ -18,8 +18,9 @@ #include +#include + #include "editor/editor.hpp" -#include "object/path_gameobject.hpp" #include "supertux/d_scope.hpp" #include "supertux/game_object_factory.hpp" #include "supertux/sector.hpp" @@ -78,6 +79,36 @@ PathObject::init_path_pos(const Vector& pos, bool running) m_walker.reset(new PathWalker(path_gameobject.get_uid(), running)); } +void +PathObject::goto_node(int node_idx) +{ + if (!m_walker) return; + BIND_SECTOR(Sector::get()); + m_walker->goto_node(node_idx); +} + +void +PathObject::set_node(int node_idx) +{ + if (!m_walker) return; + BIND_SECTOR(Sector::get()); + m_walker->jump_to_node(node_idx, true); +} + +void +PathObject::start_moving() +{ + if (!m_walker) return; + m_walker->start_moving(); +} + +void +PathObject::stop_moving() +{ + if (!m_walker) return; + m_walker->stop_moving(); +} + void PathObject::save_state() const { @@ -151,4 +182,14 @@ PathObject::on_flip() m_path_handle.m_pixel_offset.y = -m_path_handle.m_pixel_offset.y; } + +void +PathObject::register_members(ssq::Class& cls) +{ + cls.addFunc("goto_node", &PathObject::goto_node); + cls.addFunc("set_node", &PathObject::set_node); + cls.addFunc("start_moving", &PathObject::start_moving); + cls.addFunc("stop_moving", &PathObject::stop_moving); +} + /* EOF */ diff --git a/src/object/path_object.hpp b/src/object/path_object.hpp index a0704e4398a..18cf66b6acf 100644 --- a/src/object/path_object.hpp +++ b/src/object/path_object.hpp @@ -25,9 +25,19 @@ #include "object/path_walker.hpp" #include "util/uid.hpp" -/** A class for all objects that contain / make use of a path. */ +namespace ssq { +class Class; +} // namespace ssq + +/** + * @scripting + * @summary A base class for all objects that contain, or make use of a path. + */ class PathObject { +protected: + static void register_members(ssq::Class& cls); + public: PathObject(); virtual ~PathObject(); @@ -46,12 +56,36 @@ class PathObject std::string get_path_ref() const; void editor_set_path_by_ref(const std::string& new_ref); + /** + * @scripting + * @description Moves the path object until at given node, then stops. + * @param int $node_idx + */ + void goto_node(int node_idx); + /** + * @scripting + * @description Jumps instantly to the given node. + * @param int $node_idx + */ + void set_node(int node_idx); + /** + * @scripting + * @description Starts moving the path object automatically. + */ + void start_moving(); + /** + * @scripting + * @description Stops moving the path object. + */ + void stop_moving(); + protected: void save_state() const; void check_state() const; void on_flip(); +protected: PathWalker::Handle m_path_handle; private: diff --git a/src/object/platform.cpp b/src/object/platform.cpp index 2f3db61adb6..0ce8dcbc198 100644 --- a/src/object/platform.cpp +++ b/src/object/platform.cpp @@ -16,6 +16,8 @@ #include "object/platform.hpp" +#include + #include "editor/editor.hpp" #include "object/player.hpp" #include "supertux/sector.hpp" @@ -30,7 +32,6 @@ Platform::Platform(const ReaderMapping& reader) : Platform::Platform(const ReaderMapping& reader, const std::string& default_sprite) : MovingSprite(reader, default_sprite, LAYER_OBJECTS, COLGROUP_STATIC), - ExposedObject(this), PathObject(), m_speed(Vector(0,0)), m_movement(Vector(0, 0)), @@ -152,30 +153,12 @@ Platform::editor_update() } void -Platform::goto_node(int node_idx) -{ - get_walker()->goto_node(node_idx); -} - -void -Platform::jump_to_node(int node_idx, bool instantaneous) +Platform::jump_to_node(int node_idx) { - get_walker()->jump_to_node(node_idx, instantaneous); + set_node(node_idx); set_pos(m_path_handle.get_pos(m_col.m_bbox.get_size(), get_path()->get_nodes()[node_idx].position)); } -void -Platform::start_moving() -{ - get_walker()->start_moving(); -} - -void -Platform::stop_moving() -{ - get_walker()->stop_moving(); -} - void Platform::move_to(const Vector& pos) { @@ -208,4 +191,16 @@ Platform::check_state() PathObject::check_state(); } + +void +Platform::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Platform", vm.findClass("MovingSprite")); + + PathObject::register_members(cls); + + // Use Platform's implementation of "set_node". + cls.addFunc("set_node", &Platform::jump_to_node); +} + /* EOF */ diff --git a/src/object/platform.hpp b/src/object/platform.hpp index 7b208dd955d..7c852bc2008 100644 --- a/src/object/platform.hpp +++ b/src/object/platform.hpp @@ -19,15 +19,22 @@ #include "object/moving_sprite.hpp" #include "object/path_object.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/platform.hpp" -/** This class is the base class for platforms that tux can stand - on */ +/** + * This is the base class for platforms that Tux can stand on. + + * @scripting + * @summary A ""Platform"" that was given a name can be controlled by scripts. + It moves along a specified path. + * @instances A ""Platform"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. +*/ class Platform : public MovingSprite, - public ExposedObject, public PathObject { +public: + static void register_class(ssq::VM& vm); + public: Platform(const ReaderMapping& reader); Platform(const ReaderMapping& reader, const std::string& default_sprite); @@ -43,8 +50,10 @@ class Platform : public MovingSprite, static std::string class_name() { return "platform"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Platform"; } static std::string display_name() { return _("Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(PathObject)).add(typeid(Platform)); } virtual void editor_update() override; @@ -54,24 +63,11 @@ class Platform : public MovingSprite, void check_state() override; const Vector& get_speed() const { return m_speed; } - const Vector& get_movement() const { return m_movement; } - /** @name Scriptable Methods - @{ */ - - /** Move platform until at given node, then stop */ - void goto_node(int node_idx); - - /** Move platform instantly to given node */ - void jump_to_node(int node_idx, bool instantaneous = false); - - /** Start moving platform */ - void start_moving(); - - /** Stop platform at next node */ - void stop_moving(); - /** @} */ + /** Moves platform instantly to given node. + Replaces PathObject::set_node's implementation in scripting. */ + void jump_to_node(int node_idx); private: Vector m_speed; diff --git a/src/object/player.cpp b/src/object/player.cpp index 8d43352d2b3..5254fb2cf10 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -17,6 +17,9 @@ #include "object/player.hpp" +#include +#include + #include "audio/sound_manager.hpp" #include "badguy/badguy.hpp" #include "control/codecontroller.hpp" @@ -150,7 +153,6 @@ const float BUTTJUMP_SPEED = 800.f; } // namespace Player::Player(PlayerStatus& player_status, const std::string& name_, int player_id) : - ExposedObject(this), m_id(player_id), m_target(nullptr), m_deactivated(false), @@ -301,13 +303,15 @@ Player::set_winning() } void -Player::use_scripting_controller(bool use_or_release) +Player::use_scripting_controller(bool enable) { - if ((use_or_release == true) && (m_controller != m_scripting_controller.get())) { + if (enable && (m_controller != m_scripting_controller.get())) + { m_scripting_controller_old = &get_controller(); set_controller(m_scripting_controller.get()); } - if ((use_or_release == false) && (m_controller == m_scripting_controller.get())) { + else if (!enable && (m_controller == m_scripting_controller.get())) + { set_controller(m_scripting_controller_old); m_scripting_controller_old = nullptr; } @@ -356,11 +360,17 @@ Player::adjust_height(float new_height, float bottom_offset) // adjust bbox accordingly // note that we use members of moving_object for this, so we can run this during CD, too - set_pos(bbox2.p1()); + m_col.set_pos(bbox2.p1()); m_col.set_size(bbox2.get_width(), bbox2.get_height()); return true; } +void +Player::trigger_sequence(const std::string& sequence_name) +{ + trigger_sequence(string_to_sequence(sequence_name), nullptr); +} + void Player::trigger_sequence(const std::string& sequence_name, const SequenceData* data) { @@ -1263,7 +1273,15 @@ Player::do_duck() { } void -Player::do_standup(bool force_standup) { +Player::do_standup() +{ + // Scripting: Force standup for backwards compatibility. + do_standup(true); +} + +void +Player::do_standup(bool force_standup) +{ if (!m_duck || !is_big() || m_backflipping || m_stone) { m_crawl = false; @@ -2361,7 +2379,7 @@ Player::on_flip(float height) { Vector pos = get_pos(); pos.y = height - pos.y - get_bbox().get_height(); - move(pos); + set_pos_reset(pos); } void @@ -2470,9 +2488,20 @@ Player::kill(bool completely) } void -Player::move(const Vector& vector) +Player::set_pos(const Vector& vector) { - set_pos(vector); + MovingObject::set_pos(vector); + + // Make sure objects following Tux move directly with him + position_grabbed_object(true); + for (Key* key : m_collected_keys) + key->update_pos(); +} + +void +Player::set_pos_reset(const Vector& vector) +{ + m_col.set_pos(vector); // Reset size to get correct hitbox if Tux was eg. ducked before moving if (is_big()) @@ -2499,21 +2528,21 @@ Player::check_bounds() if (get_pos().x < 0) { // Lock Tux to the size of the level, so that he doesn't fall off // the left side - set_pos(Vector(0, get_pos().y)); + m_col.set_pos(Vector(0, get_pos().y)); } if (m_col.m_bbox.get_right() > Sector::get().get_width()) { // Lock Tux to the size of the level, so that he doesn't fall off // the right side - set_pos(Vector(Sector::get().get_width() - m_col.m_bbox.get_width(), - m_col.m_bbox.get_top())); + m_col.set_pos(Vector(Sector::get().get_width() - m_col.m_bbox.get_width(), + m_col.m_bbox.get_top())); } // If Tux is swimming, don't allow him to go below the sector if (m_swimming && !m_ghost_mode && !is_dying() && !is_dead() && m_col.m_bbox.get_bottom() > Sector::get().get_height()) { - set_pos(Vector(m_col.m_bbox.get_left(), - Sector::get().get_height() - m_col.m_bbox.get_height())); + m_col.set_pos(Vector(m_col.m_bbox.get_left(), + Sector::get().get_height() - m_col.m_bbox.get_height())); } /* fallen out of the level? */ @@ -2550,6 +2579,24 @@ Player::get_velocity() const return m_physic.get_velocity(); } +float +Player::get_velocity_x() const +{ + return m_physic.get_velocity_x(); +} + +float +Player::get_velocity_y() const +{ + return m_physic.get_velocity_y(); +} + +void +Player::set_velocity(float x, float y) +{ + m_physic.set_velocity(x, y); +} + void Player::bounce(BadGuy& ) { @@ -2562,6 +2609,14 @@ Player::bounce(BadGuy& ) //scripting Functions Below +void +Player::activate() +{ + if (!m_deactivated) + return; + m_deactivated = false; +} + void Player::deactivate() { @@ -2574,20 +2629,32 @@ Player::deactivate() if (m_climbing) stop_climbing(*m_climbing); } -void -Player::activate() +bool +Player::get_input_pressed(const std::string& input) { - if (!m_deactivated) - return; - m_deactivated = false; + return m_controller->pressed(Control_from_string(input).value()); +} + +bool +Player::get_input_held(const std::string& input) +{ + return m_controller->hold(Control_from_string(input).value()); +} + +bool +Player::get_input_released(const std::string& input) +{ + return m_controller->released(Control_from_string(input).value()); } -void Player::walk(float speed) +void +Player::walk(float speed) { m_physic.set_velocity_x(speed); } -void Player::set_dir(bool right) +void +Player::set_dir(bool right) { m_dir = right ? Direction::RIGHT : Direction::LEFT; } @@ -2615,6 +2682,12 @@ Player::set_ghost_mode(bool enable) } } +bool +Player::get_ghost_mode() const +{ + return m_ghost_mode; +} + void Player::start_climbing(Climbable& climbable) { @@ -2940,7 +3013,7 @@ Player::multiplayer_respawn() set_group(COLGROUP_MOVING); m_physic.reset(); - move(target->get_pos()); + set_pos_reset(target->get_pos()); m_target.reset(); } @@ -2987,4 +3060,44 @@ Player::remove_collected_key(Key* key) m_collected_keys.end()); } + +void +Player::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Player", vm.findClass("MovingObject")); + + cls.addFunc("add_bonus", &Player::add_bonus); + cls.addFunc("set_bonus", &Player::set_bonus); + cls.addFunc("get_bonus", &Player::bonus_to_string); + cls.addFunc("add_coins", &Player::add_coins); + cls.addFunc("get_coins", &Player::get_coins); + cls.addFunc("make_invincible", &Player::make_invincible); + cls.addFunc("deactivate", &Player::deactivate); + cls.addFunc("activate", &Player::activate); + cls.addFunc("walk", &Player::walk); + cls.addFunc("set_dir", &Player::set_dir); + cls.addFunc("set_visible", &Player::set_visible); + cls.addFunc("get_visible", &Player::get_visible); + cls.addFunc("kill", &Player::kill); + cls.addFunc("set_ghost_mode", &Player::set_ghost_mode); + cls.addFunc("get_ghost_mode", &Player::get_ghost_mode); + cls.addFunc("kick", &Player::kick); + cls.addFunc("do_cheer", &Player::do_cheer); + cls.addFunc("do_duck", &Player::do_duck); + cls.addFunc("do_standup", static_cast(&Player::do_standup)); + cls.addFunc("do_backflip", &Player::do_backflip); + cls.addFunc("do_jump", &Player::do_jump); + cls.addFunc("trigger_sequence", static_cast(&Player::trigger_sequence)); + cls.addFunc("use_scripting_controller", &Player::use_scripting_controller); + cls.addFunc("do_scripting_controller", &Player::do_scripting_controller); + cls.addFunc("has_grabbed", &Player::has_grabbed); + cls.addFunc("get_velocity_x", &Player::get_velocity_x); + cls.addFunc("get_velocity_y", &Player::get_velocity_y); + cls.addFunc("set_velocity", &Player::set_velocity); + cls.addFunc("get_action", &Player::get_action); + cls.addFunc("get_input_pressed", &Player::get_input_pressed); + cls.addFunc("get_input_held", &Player::get_input_held); + cls.addFunc("get_input_released", &Player::get_input_released); +} + /* EOF */ diff --git a/src/object/player.hpp b/src/object/player.hpp index 8a8f0c1025e..a0d901dd454 100644 --- a/src/object/player.hpp +++ b/src/object/player.hpp @@ -17,9 +17,7 @@ #ifndef HEADER_SUPERTUX_OBJECT_PLAYER_HPP #define HEADER_SUPERTUX_OBJECT_PLAYER_HPP -#include "scripting/player.hpp" #include "sprite/sprite_ptr.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/direction.hpp" #include "supertux/moving_object.hpp" #include "supertux/object_remove_listener.hpp" @@ -39,9 +37,18 @@ class Portable; extern const float TUX_INVINCIBLE_TIME_WARNING; -class Player final : public MovingObject, - public ExposedObject +/** + * @scripting + * @summary This module contains methods controlling the player. (No, SuperTux doesn't use mind control. ""Player"" refers to the type of the player object.) + * @instances The first player can be accessed using ""Tux"", or ""sector.Tux"" from the console. + All following players (2nd, 3rd, etc...) can be accessed by ""Tux{index}"". + For example, to access the 2nd player, use ""Tux1"" (or ""sector.Tux1"" from the console). + */ +class Player final : public MovingObject { +public: + static void register_class(ssq::VM& vm); + public: enum FallMode { ON_GROUND, JUMPING, TRAMPOLINE_JUMP, FALLING }; @@ -80,7 +87,9 @@ class Player final : public MovingObject, virtual bool is_saveable() const override { return false; } virtual bool is_singleton() const override { return false; } virtual bool has_object_manager_priority() const override { return true; } + virtual std::string get_exposed_class_name() const override { return "Player"; } virtual void remove_me() override; + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(Player)); } int get_id() const { return m_id; } void set_id(int id); @@ -98,12 +107,28 @@ class Player final : public MovingObject, const Controller& get_controller() const { return *m_controller; } - void use_scripting_controller(bool use_or_release); + /** + * @scripting + * @description Uses a scriptable controller for all user input (or restores controls). + * @param bool $enable + */ + void use_scripting_controller(bool enable); + /** + * @scripting + * @description Instructs the scriptable controller to press or release a button. + * @param string $control Can be “left”, “right”, “up”, “down”, “jump”, “action”, “start”, “escape”, + “menu-select”, “menu-select-space”, “menu-back”, “remove”, “cheat-menu”, “debug-menu”, “console”, + “peek-left”, “peek-right”, “peek-up” or “peek-down”. + * @param bool $pressed + */ void do_scripting_controller(const std::string& control, bool pressed); /** Move the player to a different sector, including any objects that it points to, or references. */ void move_to_sector(Sector& other); + /** + * Make Tux invincible for a short amount of time. + */ void make_invincible(); void make_temporarily_safe(float safe_time); @@ -113,12 +138,48 @@ class Player final : public MovingObject, Direction peeking_direction_x() const { return m_peekingX; } Direction peeking_direction_y() const { return m_peekingY; } + /** + * @scripting + * @description Hurts Tux. + * @param bool $completely If true, he will be killed even if he had "grow" or a superior bonus. + */ void kill(bool completely); - void move(const Vector& vector); + void set_pos(const Vector& vector) override; + + /** + * @scripting + * @description Gives Tux the specified bonus unless Tux’s current bonus is superior. + * @param string $bonus Can be "grow", "fireflower", "iceflower", "airflower" or "earthflower" at the moment. + */ bool add_bonus(const std::string& bonus); + /** + * @scripting + * @description Gives Tux the specified bonus. + * @param string $bonus Can be "grow", "fireflower", "iceflower", "airflower" or "earthflower" at the moment. + */ bool set_bonus(const std::string& bonus); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @description Returns Tux's current bonus. + */ + std::string get_bonus() const; +#endif + + /** + * @scripting + * @description Gives the player a number of coins.${SRG_TABLENEWPARAGRAPH} + If count is a negative amount of coins, that number of coins will be taken + from the player (until the number of coins the player has is 0, when it + will stop changing). + * @param int $count + */ void add_coins(int count); + /** + * @scripting + * @description Returns the number of coins the player currently has. + */ int get_coins() const; /** picks up a bonus, taking care not to pick up lesser bonus items than we already have @@ -135,30 +196,53 @@ class Player final : public MovingObject, PlayerStatus& get_status() const { return m_player_status; } - /** set kick animation */ + /** + * @scripting + * @description Start kick animation. + */ void kick(); - /** gets the players action */ + /** + * @scripting + * @description Gets the player's current action/animation. + */ std::string get_action() const; - /** play cheer animation. - This might need some space and behave in an unpredictable way. - Best to use this at level end. */ + /** + * @scripting + * @description Play cheer animation.${SRG_TABLENEWPARAGRAPH} + * This might need some space and behave in an unpredictable way. It's best to use this at level end. + */ void do_cheer(); - /** duck down if possible. - this won't last long as long as input is enabled. */ + /** + * @scripting + * @description Makes Tux duck down, if possible. Won't last long, as long as input is enabled. + */ void do_duck(); - /** stand back up if possible. */ + /** + * @scripting + * @description Makes Tux stand back up, if possible. + */ + void do_standup(); + /** + * @scripting + * @description Makes Tux stand back up, if possible. + */ void do_standup(bool force_standup); - /** do a backflip if possible. */ + /** + * @scripting + * @description Makes Tux do a backflip, if possible. + */ void do_backflip(); - /** jump in the air if possible - sensible values for yspeed are negative - unless we want to jump - into the ground of course */ + /** + * @scripting + * @description Makes Tux jump in the air, if possible. + * @param float $yspeed Sensible values are negative - unless we want to jump into the ground of course. + */ void do_jump(float yspeed); /** Adds velocity to the player (be careful when using this) */ @@ -169,6 +253,23 @@ class Player final : public MovingObject, /** Returns the current velocity of the player */ Vector get_velocity() const; + /** + * @scripting + * @description Returns Tux’s velocity in X direction. + */ + float get_velocity_x() const; + /** + * @scripting + * @description Returns Tux’s velocity in Y direction. + */ + float get_velocity_y() const; + /** + * @scripting + * @description Sets the velocity of the player to a programmable/variable speed. + * @param float $x The speed Tux will move on the x axis. + * @param float $y The speed Tux will move on the y axis. + */ + void set_velocity(float x, float y); void bounce(BadGuy& badguy); void override_velocity() { m_velocity_override = true; } @@ -183,7 +284,18 @@ class Player final : public MovingObject, bool is_skidding() const { return m_skidding_timer.started(); } float get_swimming_angle() const { return m_swimming_angle; } + /** + * @scripting + * @deprecated + * @description Set Tux visible or invisible. + * @param bool $visible + */ void set_visible(bool visible); + /** + * @scripting + * @deprecated + * @description Returns ""true"" if Tux is currently visible (has not been set invisible by the ""set_visible()"" method). + */ bool get_visible() const; bool on_ground() const; @@ -192,25 +304,40 @@ class Player final : public MovingObject, Portable* get_grabbed_object() const { return m_grabbed_object; } void stop_grabbing() { ungrab_object(); } - /** Checks whether the player has grabbed a certain object - @param name Name of the object to check */ - bool has_grabbed(const std::string& object_name) const; + /** + * @scripting + * @description Returns whether the player is carrying a certain object. + * @param string $name Name of the portable object to check for. + */ + bool has_grabbed(const std::string& name) const; - /** Switches ghost mode on/off. - Lets Tux float around and through solid objects. */ + /** + * @scripting + * @description Switches ghost mode on/off. Lets Tux float around and through solid objects. + * @param bool $enable + */ void set_ghost_mode(bool enable); - - /** Returns whether ghost mode is currently enabled */ - bool get_ghost_mode() const { return m_ghost_mode; } + /** + * @scripting + * @description Returns whether ghost mode is currently enabled. + */ + bool get_ghost_mode() const; /** Changes height of bounding box. Returns true if successful, false otherwise */ bool adjust_height(float new_height, float bottom_offset = 0); + /** + * @scripting + * @description Orders the current ""GameSession"" to start a sequence. + * @param string $sequence_name One of “stoptux”, “endsequence” or “fireworks”. + */ + void trigger_sequence(const std::string& sequence_name); + /** Orders the current GameSession to start a sequence @param sequence_name Name of the sequence to start @param data Custom additional sequence data */ - void trigger_sequence(const std::string& sequence_name, const SequenceData* data = nullptr); + void trigger_sequence(const std::string& sequence_name, const SequenceData* data); /** Orders the current GameSession to start a sequence @param sequence Sequence to start @@ -225,10 +352,50 @@ class Player final : public MovingObject, Physic& get_physic() { return m_physic; } + /** + * @scripting + * @description Give control back to user/scripting. + */ void activate(); + /** + * @scripting + * @description Deactivate user/scripting input for Tux. + Carried items like trampolines won't be dropped. + */ void deactivate(); + /** + * @scripting + * @description Gets whether the current input on the keyboard/controller/touchpad has been pressed. + * @param string $input Can be “left”, “right”, “up”, “down”, “jump”, “action”, “start”, “escape”, + “menu-select”, “menu-select-space”, “menu-back”, “remove”, “cheat-menu”, “debug-menu”, “console”, + “peek-left”, “peek-right”, “peek-up” or “peek-down”. + */ + bool get_input_pressed(const std::string& input); + /** + * @scripting + * @description Gets whether the current input on the keyboard/controller/touchpad is being held. + * @param string $input Valid values are listed above. + */ + bool get_input_held(const std::string& input); + /** + * @scripting + * @description Gets whether the current input on the keyboard/controller/touchpad has been released. + * @param string $input Valid values are listed above. + */ + bool get_input_released(const std::string& input); + + /** + * @scripting + * @description Makes Tux walk. + * @param float $speed + */ void walk(float speed); + /** + * @scripting + * @description Face Tux in the proper direction. + * @param bool $right Set to ""true"" to make Tux face right, ""false"" to face left. + */ void set_dir(bool right); void stop_backflipping(); @@ -260,6 +427,9 @@ class Player final : public MovingObject, void handle_horizontal_input(); void handle_vertical_input(); + /** Set Tux's position, reset state and velocity. */ + void set_pos_reset(const Vector& vector); + void do_jump_apex(); void early_jump_apex(); diff --git a/src/object/pneumatic_platform.hpp b/src/object/pneumatic_platform.hpp index e5859ec53e1..6af88c99d83 100644 --- a/src/object/pneumatic_platform.hpp +++ b/src/object/pneumatic_platform.hpp @@ -28,6 +28,7 @@ class PneumaticPlatformChild final : public MovingSprite public: PneumaticPlatformChild(const ReaderMapping& reader, bool left, PneumaticPlatform& parent); ~PneumaticPlatformChild() override; + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(PneumaticPlatformChild)); } virtual HitResponse collision(GameObject& other, const CollisionHit& hit) override; virtual void update(float dt_sec) override; @@ -64,6 +65,7 @@ class PneumaticPlatform final : public GameObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Pneumatic Platform"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(PneumaticPlatform)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/powerup.hpp b/src/object/powerup.hpp index b0b9b5f8f12..b9ad6d2fd58 100644 --- a/src/object/powerup.hpp +++ b/src/object/powerup.hpp @@ -39,6 +39,7 @@ class PowerUp final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Powerup"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(PowerUp)); } std::vector get_patches() const override; virtual ObjectSettings get_settings() override; diff --git a/src/object/pulsing_light.hpp b/src/object/pulsing_light.hpp index 8e9d60cf3e3..f453aa94313 100644 --- a/src/object/pulsing_light.hpp +++ b/src/object/pulsing_light.hpp @@ -27,6 +27,7 @@ class PulsingLight final : public Light public: PulsingLight(const Vector& center, float cycle_len = 5.0, float min_alpha = 0.0, float max_alpha = 1.0, const Color& color = Color(1.0, 1.0, 1.0, 1.0)); ~PulsingLight() override; + virtual GameObjectClasses get_class_types() const override { return Light::get_class_types().add(typeid(PulsingLight)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/pushbutton.cpp b/src/object/pushbutton.cpp index 9d50f9e5e13..c49d462c899 100644 --- a/src/object/pushbutton.cpp +++ b/src/object/pushbutton.cpp @@ -17,6 +17,7 @@ #include "object/pushbutton.hpp" #include "audio/sound_manager.hpp" +#include "object/bigsnowball.hpp" #include "object/player.hpp" #include "object/rock.hpp" #include "sprite/sprite.hpp" @@ -88,7 +89,9 @@ PushButton::collision(GameObject& other, const CollisionHit& hit) { auto player = dynamic_cast(&other); auto rock = dynamic_cast(&other); - if (!player && !rock) + auto bs = dynamic_cast(&other); + + if (!player && !rock && !bs) return FORCE_MOVE; if (player) { diff --git a/src/object/pushbutton.hpp b/src/object/pushbutton.hpp index dfc49e3d640..253a44a58e5 100644 --- a/src/object/pushbutton.hpp +++ b/src/object/pushbutton.hpp @@ -31,6 +31,7 @@ class PushButton final : public StickyObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Button"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyObject::get_class_types().add(typeid(PushButton)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/object/rain_particle_system.cpp b/src/object/rain_particle_system.cpp index 500d19cdedb..50263864edc 100644 --- a/src/object/rain_particle_system.cpp +++ b/src/object/rain_particle_system.cpp @@ -19,6 +19,9 @@ #include #include +#include +#include + #include "math/easing.hpp" #include "math/random.hpp" #include "object/camera.hpp" @@ -32,18 +35,15 @@ #include "video/viewport.hpp" RainParticleSystem::RainParticleSystem() : - ExposedObject(this), m_current_speed(1.f), m_target_speed(1.f), m_speed_fade_time_remaining(0.f), - m_begin_angle(45.f), m_current_angle(45.f), m_target_angle(45.f), m_angle_fade_time_remaining(0.f), m_angle_fade_time_total(0.f), m_angle_easing(getEasingByName(EaseNone)), - m_current_amount(1.f), m_target_amount(1.f), m_amount_fade_time_remaining(0.f), @@ -54,18 +54,15 @@ RainParticleSystem::RainParticleSystem() : RainParticleSystem::RainParticleSystem(const ReaderMapping& reader) : ParticleSystem_Interactive(reader), - ExposedObject(this), m_current_speed(1.f), m_target_speed(1.f), m_speed_fade_time_remaining(0.f), - m_begin_angle(45.f), m_current_angle(45.f), m_target_angle(45.f), m_angle_fade_time_remaining(0.f), m_angle_fade_time_total(0.f), m_angle_easing(getEasingByName(EaseNone)), - m_current_amount(1.f), m_target_amount(1.f), m_amount_fade_time_remaining(0.f), @@ -252,35 +249,41 @@ void RainParticleSystem::fade_speed(float new_speed, float fade_time) m_speed_fade_time_remaining = fade_time; } -void RainParticleSystem::fade_angle(float new_angle, float fade_time, easing ease_func) +void RainParticleSystem::fade_amount(float new_amount, float fade_time) { // No check to enabled; change the fading even if it's disabled // If time is 0 (or smaller?), then update() will never change m_current_amount if (fade_time <= 0.f) { - m_current_angle = new_angle - 45.f; + m_current_amount = new_amount; } - m_begin_angle = m_current_angle; - m_target_angle = new_angle - 45.f; - m_angle_fade_time_total = fade_time; - m_angle_fade_time_remaining = fade_time; - m_angle_easing = ease_func; + m_target_amount = new_amount; + m_amount_fade_time_remaining = fade_time; } -void RainParticleSystem::fade_amount(float new_amount, float fade_time) +void +RainParticleSystem::fade_angle(float angle, float time, const std::string& ease) +{ + fade_angle(angle, time, getEasingByName(EasingMode_from_string(ease))); +} + +void RainParticleSystem::fade_angle(float new_angle, float fade_time, easing ease_func) { // No check to enabled; change the fading even if it's disabled // If time is 0 (or smaller?), then update() will never change m_current_amount if (fade_time <= 0.f) { - m_current_amount = new_amount; + m_current_angle = new_angle - 45.f; } - m_target_amount = new_amount; - m_amount_fade_time_remaining = fade_time; + m_begin_angle = m_current_angle; + m_target_angle = new_angle - 45.f; + m_angle_fade_time_total = fade_time; + m_angle_fade_time_remaining = fade_time; + m_angle_easing = ease_func; } void RainParticleSystem::draw(DrawingContext& context) @@ -304,4 +307,15 @@ void RainParticleSystem::draw(DrawingContext& context) context.pop_transform(); } + +void +RainParticleSystem::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("RainParticleSystem", vm.findClass("ParticleSystem")); + + cls.addFunc("fade_speed", &RainParticleSystem::fade_speed); + cls.addFunc("fade_amount", &RainParticleSystem::fade_amount); + cls.addFunc("fade_angle", &RainParticleSystem::fade_angle); +} + /* EOF */ diff --git a/src/object/rain_particle_system.hpp b/src/object/rain_particle_system.hpp index 13613ea6bba..4a6b263858c 100644 --- a/src/object/rain_particle_system.hpp +++ b/src/object/rain_particle_system.hpp @@ -17,15 +17,22 @@ #ifndef HEADER_SUPERTUX_OBJECT_RAIN_PARTICLE_SYSTEM_HPP #define HEADER_SUPERTUX_OBJECT_RAIN_PARTICLE_SYSTEM_HPP -#include "math/easing.hpp" #include "object/particlesystem_interactive.hpp" -#include "scripting/rain.hpp" + +#include "math/easing.hpp" #include "video/surface_ptr.hpp" -class RainParticleSystem final : - public ParticleSystem_Interactive, - public ExposedObject +/** + * @scripting + * @summary A ""RainParticleSystem"" that was given a name can be controlled by scripts. + * @instances A ""RainParticleSystem"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class RainParticleSystem final : public ParticleSystem_Interactive { +public: + static void register_class(ssq::VM& vm); + public: RainParticleSystem(); RainParticleSystem(const ReaderMapping& reader); @@ -38,13 +45,37 @@ class RainParticleSystem final : static std::string class_name() { return "particles-rain"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "RainParticleSystem"; } static std::string display_name() { return _("Rain Particles"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem_Interactive::get_class_types().add(typeid(RainParticleSystem)); } virtual ObjectSettings get_settings() override; - void fade_speed(float new_speed, float fade_time); + /** + * @scripting + * @description Smoothly changes the rain speed to the given value in ""time"" seconds. + * @param float $speed + * @param float $time + */ + void fade_speed(float speed, float time); + /** + * @scripting + * @description Smoothly changes the amount of particles to the given value in ""time"" seconds. + * @param float $amount + * @param float $time + */ + void fade_amount(float amount, float time); + /** + * @scripting + * @description Smoothly changes the angle of the rain the given value in ""time"" seconds, according to the provided easing function. + * @param float $angle + * @param float $time + * @param string $ease + */ + void fade_angle(float angle, float time, const std::string& ease); + + /** Smoothly changes the angle of the rain the given value in ""time"" seconds, according to the provided easing function. */ void fade_angle(float new_angle, float fade_time, easing ease_func); - void fade_amount(float new_amount, float fade_time); virtual const std::string get_icon_path() const override { return "images/engine/editor/rain.png"; @@ -60,14 +91,6 @@ class RainParticleSystem final : // When m_current_amount == max_amount, fog is this value static float constexpr const fog_max_value = 0.6f; - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::expose(vm, table_idx); - } - - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override { - ExposedObject::unexpose(vm, table_idx); - } - private: void set_amount(float amount); void set_angle(float angle); diff --git a/src/object/rainsplash.hpp b/src/object/rainsplash.hpp index 86ca688d3dd..3b06bf4db6a 100644 --- a/src/object/rainsplash.hpp +++ b/src/object/rainsplash.hpp @@ -28,6 +28,7 @@ class RainSplash final : public GameObject public: RainSplash(const Vector& pos, bool vertical); ~RainSplash() override; + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(RainSplash)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/rock.cpp b/src/object/rock.cpp index 78e5282d9b0..2e200d4c91c 100644 --- a/src/object/rock.cpp +++ b/src/object/rock.cpp @@ -37,7 +37,6 @@ namespace { Rock::Rock(const ReaderMapping& reader, const std::string& spritename) : MovingSprite(reader, spritename), - ExposedObject(this), physic(), on_ground(false), on_ice(false), @@ -57,7 +56,6 @@ Rock::Rock(const ReaderMapping& reader, const std::string& spritename) : Rock::Rock(const Vector& pos, const std::string& spritename) : MovingSprite(pos, spritename), - ExposedObject(this), physic(), on_ground(false), on_ice(false), diff --git a/src/object/rock.hpp b/src/object/rock.hpp index 5b1535a09ba..f38b9cd7c90 100644 --- a/src/object/rock.hpp +++ b/src/object/rock.hpp @@ -19,13 +19,10 @@ #include "object/moving_sprite.hpp" #include "object/portable.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/rock.hpp" #include "supertux/physic.hpp" class Rock : public MovingSprite, - public Portable, - public ExposedObject + public Portable { public: Rock(const ReaderMapping& reader, const std::string& spritename = "images/objects/rock/rock.sprite"); @@ -42,6 +39,7 @@ class Rock : public MovingSprite, virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Rock"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Portable)).add(typeid(Rock)); } virtual ObjectSettings get_settings() override; virtual GameObjectTypes get_types() const override; diff --git a/src/object/rublight.hpp b/src/object/rublight.hpp index 0a218585745..9772dd2eda2 100644 --- a/src/object/rublight.hpp +++ b/src/object/rublight.hpp @@ -33,6 +33,7 @@ class RubLight final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Rublight"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(RubLight)); } virtual ObjectSettings get_settings() override; virtual void on_flip(float height) override; diff --git a/src/object/rusty_trampoline.hpp b/src/object/rusty_trampoline.hpp index 86e4ac4b074..590fc0d6a09 100644 --- a/src/object/rusty_trampoline.hpp +++ b/src/object/rusty_trampoline.hpp @@ -39,6 +39,7 @@ class RustyTrampoline final : public Rock virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Rusty Trampoline"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Rock::get_class_types().add(typeid(RustyTrampoline)); } virtual ObjectSettings get_settings() override; GameObjectTypes get_types() const override { return {}; } diff --git a/src/object/scripted_object.cpp b/src/object/scripted_object.cpp index 034fc572592..e55bb5c3021 100644 --- a/src/object/scripted_object.cpp +++ b/src/object/scripted_object.cpp @@ -16,6 +16,9 @@ #include "object/scripted_object.hpp" +#include +#include + #include "editor/editor.hpp" #include "math/random.hpp" #include "object/player.hpp" @@ -27,7 +30,6 @@ ScriptedObject::ScriptedObject(const ReaderMapping& mapping) : MovingSprite(mapping, "images/objects/bonus_block/brick.sprite", LAYER_OBJECTS, COLGROUP_MOVING_STATIC), - ExposedObject(this), physic(), solid(), physic_enabled(), @@ -77,24 +79,6 @@ ScriptedObject::get_settings() return result; } -void -ScriptedObject::move(float x, float y) -{ - m_col.m_bbox.move(Vector(x, y)); -} - -float -ScriptedObject::get_pos_x() const -{ - return get_pos().x; -} - -float -ScriptedObject::get_pos_y() const -{ - return get_pos().y; -} - void ScriptedObject::set_velocity(float x, float y) { @@ -213,4 +197,25 @@ ScriptedObject::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } + +void +ScriptedObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("ScriptedObject", vm.findClass("MovingSprite")); + + cls.addFunc("get_pos_x", &MovingObject::get_x); // Deprecated + cls.addFunc("get_pos_y", &MovingObject::get_y); // Deprecated + cls.addFunc("set_velocity", &ScriptedObject::set_velocity); + cls.addFunc("get_velocity_x", &ScriptedObject::get_velocity_x); + cls.addFunc("get_velocity_y", &ScriptedObject::get_velocity_y); + cls.addFunc("enable_gravity", &ScriptedObject::enable_gravity); + cls.addFunc("gravity_enabled", &ScriptedObject::gravity_enabled); + cls.addFunc("set_visible", &ScriptedObject::set_visible); + cls.addFunc("is_visible", &ScriptedObject::is_visible); + cls.addFunc("set_solid", &ScriptedObject::set_solid); + cls.addFunc("is_solid", &ScriptedObject::is_solid); + + cls.addVar("visible", &ScriptedObject::visible); +} + /* EOF */ diff --git a/src/object/scripted_object.hpp b/src/object/scripted_object.hpp index 57b3aada55d..920a09d9874 100644 --- a/src/object/scripted_object.hpp +++ b/src/object/scripted_object.hpp @@ -18,14 +18,19 @@ #define HEADER_SUPERTUX_OBJECT_SCRIPTED_OBJECT_HPP #include "object/moving_sprite.hpp" -#include "scripting/scripted_object.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/physic.hpp" -class ScriptedObject final : - public MovingSprite, - public ExposedObject +/** + * @scripting + * @summary A ""ScriptedObject"" that was given a name can be controlled by scripts. + * @instances A ""ScriptedObject"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class ScriptedObject final : public MovingSprite { +public: + static void register_class(ssq::VM& vm); + public: ScriptedObject(const ReaderMapping& mapping); @@ -37,30 +42,94 @@ class ScriptedObject final : static std::string class_name() { return "scriptedobject"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "ScriptedObject"; } static std::string display_name() { return _("Scripted Object"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(ScriptedObject)); } virtual ObjectSettings get_settings() override; virtual void on_flip(float height) override; - void move(float x, float y); +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @deprecated Use ""get_x()"" instead! + * @description Returns the X coordinate of the object's position. + */ float get_pos_x() const; + /** + * @scripting + * @deprecated Use ""get_y()"" instead! + * @description Returns the Y coordinate of the object's position. + */ float get_pos_y() const; +#endif + + /** + * @scripting + * @description Makes the object move in a certain ""x"" and ""y"" direction (with a certain speed). + * @param float $x + * @param float $y + */ void set_velocity(float x, float y); + /** + * @scripting + * @description Returns the X coordinate of the object's velocity. + */ float get_velocity_x() const; + /** + * @scripting + * @description Returns the Y coordinate of the object's velocity. + */ float get_velocity_y() const; + + /** + * @scripting + * @description Enables or disables gravity, according to the value of ""enabled"". + * @param bool $enabled + */ + void enable_gravity(bool enabled); + /** + * @scripting + * @description Returns ""true"" if the object's gravity is enabled. + */ + bool gravity_enabled() const; + + /** + * @scripting + * @deprecated Use the ""visible"" property instead! + * @description Shows or hides the object, according to the value of ""visible"". + * @param bool $visible + */ void set_visible(bool visible); + /** + * @scripting + * @deprecated Use the ""visible"" property instead! + * @description Returns ""true"" if the object is visible. + */ bool is_visible() const; + + /** + * @scripting + * @description Changes the solidity, according to the value of ""solid"". + * @param bool $solid + */ void set_solid(bool solid); + /** + * @scripting + * @description Returns ""true"" if the object is solid. + */ bool is_solid() const; - void enable_gravity(bool f); - bool gravity_enabled() const; private: Physic physic; bool solid; bool physic_enabled; + /** + * @scripting + * @description Determines whether the object is visible. + */ bool visible; std::string hit_script; bool new_vel_set; diff --git a/src/object/shard.hpp b/src/object/shard.hpp index 7d3c89579ff..57c461ae7a5 100644 --- a/src/object/shard.hpp +++ b/src/object/shard.hpp @@ -34,6 +34,7 @@ class Shard final : public StickyObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Shard"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyObject::get_class_types().add(typeid(Shard)); } protected: Physic m_physic; diff --git a/src/object/smoke_cloud.hpp b/src/object/smoke_cloud.hpp index 6c3b1ef47ea..4eedf2a7955 100644 --- a/src/object/smoke_cloud.hpp +++ b/src/object/smoke_cloud.hpp @@ -26,6 +26,7 @@ class SmokeCloud final : public GameObject { public: SmokeCloud(const Vector& pos); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(SmokeCloud)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/snow_particle_system.cpp b/src/object/snow_particle_system.cpp index dbfe4cb84de..f02ab14ec1a 100644 --- a/src/object/snow_particle_system.cpp +++ b/src/object/snow_particle_system.cpp @@ -35,7 +35,12 @@ SnowParticleSystem::SnowParticleSystem() : m_state(RELEASING), m_timer(), m_gust_onset(0), - m_gust_current_velocity(0) + m_gust_current_velocity(0), + m_wind_speed(), + m_epsilon(), + m_spin_speed(), + m_state_length(), + m_snowimages() { init(); } @@ -45,7 +50,12 @@ SnowParticleSystem::SnowParticleSystem(const ReaderMapping& reader) : m_state(RELEASING), m_timer(), m_gust_onset(0), - m_gust_current_velocity(0) + m_gust_current_velocity(0), + m_wind_speed(), + m_epsilon(), + m_spin_speed(), + m_state_length(), + m_snowimages() { reader.get("state_length", m_state_length, 5.0f); reader.get("wind_speed", m_wind_speed, 30.0f); diff --git a/src/object/snow_particle_system.hpp b/src/object/snow_particle_system.hpp index 6b608ab27fe..854962b8fd2 100644 --- a/src/object/snow_particle_system.hpp +++ b/src/object/snow_particle_system.hpp @@ -36,6 +36,7 @@ class SnowParticleSystem final : public ParticleSystem virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Snow Particles"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return ParticleSystem::get_class_types().add(typeid(SnowParticleSystem)); } virtual ObjectSettings get_settings() override; virtual const std::string get_icon_path() const override diff --git a/src/object/sound_object.cpp b/src/object/sound_object.cpp index 9b7e3ddfe7c..f883703cf12 100644 --- a/src/object/sound_object.cpp +++ b/src/object/sound_object.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "audio/sound_manager.hpp" #include "audio/sound_source.hpp" #include "editor/editor.hpp" @@ -25,7 +28,6 @@ SoundObject::SoundObject(const ReaderMapping& mapping) : GameObject(mapping), - ExposedObject(this), m_sample(), m_sound_source(), m_volume(), @@ -38,7 +40,6 @@ SoundObject::SoundObject(const ReaderMapping& mapping) : } SoundObject::SoundObject(float vol, const std::string& file) : - ExposedObject(this), m_sample(file), m_sound_source(), m_volume(vol), @@ -128,4 +129,22 @@ SoundObject::set_volume(float volume) m_sound_source->set_gain(volume); } +float +SoundObject::get_volume() const +{ + return m_volume; +} + + +void +SoundObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("SoundObject", vm.findClass("GameObject")); + + cls.addFunc("start_playing", &SoundObject::play_looping_sounds); + cls.addFunc("stop_playing", &SoundObject::stop_looping_sounds); + cls.addFunc("set_volume", &SoundObject::set_volume); + cls.addFunc("get_volume", &SoundObject::get_volume); +} + /* EOF */ diff --git a/src/object/sound_object.hpp b/src/object/sound_object.hpp index 36537687261..b636843a03a 100644 --- a/src/object/sound_object.hpp +++ b/src/object/sound_object.hpp @@ -18,17 +18,15 @@ #define HEADER_SUPERTUX_SOUND_OBJECT_HPP #include "supertux/game_object.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/sound_object.hpp" - -class ReaderMapping; class SoundSource; /** Plays sound at given interval with specified volume hearable in entire Sector */ -class SoundObject final : public GameObject, - public ExposedObject +class SoundObject final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: SoundObject(const ReaderMapping& mapping); SoundObject(float vol, const std::string& file); @@ -39,8 +37,10 @@ class SoundObject final : public GameObject, static std::string class_name() { return "sound-object"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "SoundObject"; } static std::string display_name() { return _("Sound"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(SoundObject)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/sound.png"; } virtual ObjectSettings get_settings() override; @@ -50,8 +50,28 @@ class SoundObject final : public GameObject, /** @name Scriptable methods @{ */ + +#ifdef DOXYGEN_SCRIPTING + /** + * Starts playing sound, if currently stopped. + */ + void start_playing(); + /** + * Stops playing sound. + */ + void stop_playing(); +#endif + + /** + * Sets the volume of sound played by SoundObject. + * @param float $volume + */ void set_volume(float volume); - float get_volume() const { return m_volume; } + /** + * Returns the volume of sound played by SoundObject. + */ + float get_volume() const; + /** @} */ private: diff --git a/src/object/spawnpoint.hpp b/src/object/spawnpoint.hpp index 6a6c22185d3..a2e12ba57a0 100644 --- a/src/object/spawnpoint.hpp +++ b/src/object/spawnpoint.hpp @@ -47,6 +47,7 @@ class SpawnPointMarker final : public MovingObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Spawnpoint"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(SpawnPointMarker)); } virtual ObjectSettings get_settings() override; virtual int get_layer() const override { return LAYER_FOREGROUND1; } diff --git a/src/object/specialriser.hpp b/src/object/specialriser.hpp index 2e4248708f7..7eb546f66b7 100644 --- a/src/object/specialriser.hpp +++ b/src/object/specialriser.hpp @@ -27,6 +27,7 @@ class SpecialRiser final : public MovingObject { public: SpecialRiser(const Vector& pos, std::unique_ptr child, bool is_solid = false); + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(SpecialRiser)); } virtual bool is_saveable() const override { return false; } diff --git a/src/object/spotlight.cpp b/src/object/spotlight.cpp index 4a446eb570b..9f06c3f89e4 100644 --- a/src/object/spotlight.cpp +++ b/src/object/spotlight.cpp @@ -16,6 +16,9 @@ #include "object/spotlight.hpp" +#include +#include + #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" #include "util/reader_mapping.hpp" @@ -51,15 +54,14 @@ Spotlight::Direction_to_string(Direction dir) Spotlight::Spotlight(const ReaderMapping& mapping) : MovingObject(mapping), - ExposedObject(this), - angle(), - center(SpriteManager::current()->create("images/objects/spotlight/spotlight_center.sprite")), - base(SpriteManager::current()->create("images/objects/spotlight/spotlight_base.sprite")), - lights(SpriteManager::current()->create("images/objects/spotlight/spotlight_lights.sprite")), - light(SpriteManager::current()->create("images/objects/spotlight/light.sprite")), - lightcone(SpriteManager::current()->create("images/objects/spotlight/lightcone.sprite")), - color(1.0f, 1.0f, 1.0f), - speed(50.0f), + m_angle(), + m_center(SpriteManager::current()->create("images/objects/spotlight/spotlight_center.sprite")), + m_base(SpriteManager::current()->create("images/objects/spotlight/spotlight_base.sprite")), + m_lights(SpriteManager::current()->create("images/objects/spotlight/spotlight_lights.sprite")), + m_light(SpriteManager::current()->create("images/objects/spotlight/light.sprite")), + m_lightcone(SpriteManager::current()->create("images/objects/spotlight/lightcone.sprite")), + m_color(1.0f, 1.0f, 1.0f), + m_speed(50.0f), m_direction(), m_layer(0), m_enabled(true) @@ -70,8 +72,8 @@ Spotlight::Spotlight(const ReaderMapping& mapping) : mapping.get("y", m_col.m_bbox.get_top(), 0.0f); m_col.m_bbox.set_size(32, 32); - mapping.get("angle", angle, 0.0f); - mapping.get("speed", speed, 50.0f); + mapping.get("angle", m_angle, 0.0f); + mapping.get("speed", m_speed, 50.0f); if (!mapping.get_custom("r-direction", m_direction, Direction_from_string)) { @@ -82,9 +84,8 @@ Spotlight::Spotlight(const ReaderMapping& mapping) : } std::vector vColor; - if ( mapping.get( "color", vColor ) ){ - color = Color( vColor ); - } + if (mapping.get("color", vColor)) + m_color = Color(vColor); mapping.get("layer", m_layer, 0); mapping.get("enabled", m_enabled, true); @@ -100,9 +101,9 @@ Spotlight::get_settings() ObjectSettings result = MovingObject::get_settings(); result.add_bool(_("Enabled"), &m_enabled, "enabled", true); - result.add_float(_("Angle"), &angle, "angle"); - result.add_color(_("Color"), &color, "color", Color::WHITE); - result.add_float(_("Speed"), &speed, "speed", 50.0f); + result.add_float(_("Angle"), &m_angle, "angle"); + result.add_color(_("Color"), &m_color, "color", Color::WHITE); + result.add_float(_("Speed"), &m_speed, "speed", 50.0f); result.add_enum(_("Direction"), reinterpret_cast(&m_direction), {_("Clockwise"), _("Counter-clockwise"), _("Stopped")}, {"clockwise", "counter-clockwise", "stopped"}, @@ -125,11 +126,11 @@ Spotlight::update(float dt_sec) switch (m_direction) { case Direction::CLOCKWISE: - angle += dt_sec * speed; + m_angle += dt_sec * m_speed; break; case Direction::COUNTERCLOCKWISE: - angle -= dt_sec * speed; + m_angle -= dt_sec * m_speed; break; case Direction::STOPPED: @@ -142,27 +143,27 @@ Spotlight::draw(DrawingContext& context) { if (m_enabled) { - light->set_color(color); - light->set_blend(Blend::ADD); - light->set_angle(angle); - light->draw(context.light(), m_col.m_bbox.p1(), m_layer); + m_light->set_color(m_color); + m_light->set_blend(Blend::ADD); + m_light->set_angle(m_angle); + m_light->draw(context.light(), m_col.m_bbox.p1(), m_layer); - //lightcone->set_angle(angle); - //lightcone->draw(context.color(), position, m_layer); + //m_lightcone->set_angle(angle); + //m_lightcone->draw(context.color(), position, m_layer); - lights->set_angle(angle); - lights->draw(context.color(), m_col.m_bbox.p1(), m_layer); + m_lights->set_angle(m_angle); + m_lights->draw(context.color(), m_col.m_bbox.p1(), m_layer); } - base->set_angle(angle); - base->draw(context.color(), m_col.m_bbox.p1(), m_layer); + m_base->set_angle(m_angle); + m_base->draw(context.color(), m_col.m_bbox.p1(), m_layer); - center->draw(context.color(), m_col.m_bbox.p1(), m_layer); + m_center->draw(context.color(), m_col.m_bbox.p1(), m_layer); if (m_enabled) { - lightcone->set_angle(angle); - lightcone->draw(context.color(), m_col.m_bbox.p1(), LAYER_FOREGROUND1 + 10); + m_lightcone->set_angle(m_angle); + m_lightcone->draw(context.color(), m_col.m_bbox.p1(), LAYER_FOREGROUND1 + 10); } } @@ -172,4 +173,121 @@ Spotlight::collision(GameObject& other, const CollisionHit& hit_) return FORCE_MOVE; } +void +Spotlight::set_enabled(bool enabled) +{ + m_enabled = enabled; +} + +bool +Spotlight::is_enabled() +{ + return m_enabled; +} + +void +Spotlight::set_direction(const std::string& direction) +{ + m_direction = Direction_from_string(direction); +} + +void +Spotlight::set_speed(float speed) +{ + m_speed = speed; +} + +void +Spotlight::fade_speed(float speed, float time) +{ + ease_speed(time, speed); +} + +void +Spotlight::ease_speed(float speed, float time, const std::string& easing_) +{ + ease_speed(time, speed, EasingMode_from_string(easing_)); +} + +void +Spotlight::set_angle(float angle) +{ + m_angle = angle; +} + +void +Spotlight::fade_angle(float angle, float time) +{ + ease_angle(time, angle); +} + +void +Spotlight::ease_angle(float angle, float time, const std::string& easing_) +{ + ease_angle(time, angle, EasingMode_from_string(easing_)); +} + +void +Spotlight::set_color_rgba(float r, float g, float b, float a) +{ + m_color = Color(r, g, b, a); +} + +void +Spotlight::fade_color_rgba(float r, float g, float b, float a, float time) +{ + ease_color(time, Color(r, g, b, a)); +} + +void +Spotlight::ease_color_rgba(float r, float g, float b, float a, float time, const std::string& easing_) +{ + ease_color(time, Color(r, g, b, a), EasingMode_from_string(easing_)); +} + +void +Spotlight::ease_angle(float time, float target, EasingMode ease) +{ + m_fade_helpers.push_back(std::make_unique(&m_angle, time, target, getEasingByName(ease))); +} + +void +Spotlight::ease_speed(float time, float target, EasingMode ease) +{ + m_fade_helpers.push_back(std::make_unique(&m_speed, time, target, getEasingByName(ease))); +} + +void +Spotlight::ease_color(float time, Color target, EasingMode ease) +{ + m_fade_helpers.push_back(std::make_unique(&m_color.red, time, target.red, getEasingByName(ease))); + m_fade_helpers.push_back(std::make_unique(&m_color.green, time, target.green, getEasingByName(ease))); + m_fade_helpers.push_back(std::make_unique(&m_color.blue, time, target.blue, getEasingByName(ease))); + m_fade_helpers.push_back(std::make_unique(&m_color.alpha, time, target.alpha, getEasingByName(ease))); +} + + +void +Spotlight::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Spotlight", vm.findClass("MovingObject")); + + cls.addFunc("set_enabled", &Spotlight::set_enabled); + cls.addFunc("is_enabled", &Spotlight::is_enabled); + cls.addFunc("set_direction", &Spotlight::set_direction); + cls.addFunc("set_angle", &Spotlight::set_angle); + cls.addFunc("fade_angle", &Spotlight::fade_angle); + cls.addFunc("ease_angle", &Spotlight::ease_angle); + cls.addFunc("set_speed", &Spotlight::set_speed); + cls.addFunc("fade_speed", &Spotlight::fade_speed); + cls.addFunc("ease_speed", &Spotlight::ease_speed); + cls.addFunc("set_color_rgba", &Spotlight::set_color_rgba); + cls.addFunc("fade_color_rgba", &Spotlight::fade_color_rgba); + cls.addFunc("ease_color_rgba", &Spotlight::ease_color_rgba); + + cls.addVar("enabled", &Spotlight::m_enabled); + cls.addVar("angle", &Spotlight::m_angle); + cls.addVar("speed", &Spotlight::m_speed); +} + /* EOF */ diff --git a/src/object/spotlight.hpp b/src/object/spotlight.hpp index 94fbcf8e3bd..c214080c4b5 100644 --- a/src/object/spotlight.hpp +++ b/src/object/spotlight.hpp @@ -17,17 +17,23 @@ #ifndef HEADER_SUPERTUX_OBJECT_SPOTLIGHT_HPP #define HEADER_SUPERTUX_OBJECT_SPOTLIGHT_HPP -#include "scripting/spotlight.hpp" #include "sprite/sprite_ptr.hpp" -#include "squirrel/exposed_object.hpp" #include "supertux/moving_object.hpp" #include "video/color.hpp" class ReaderMapping; -class Spotlight final : public MovingObject, - public ExposedObject +/** + * @scripting + * @summary A ""Spotlight"" that was given a name can be controlled by scripts. + * @instances A ""Spotlight"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Spotlight final : public MovingObject { +public: + static void register_class(ssq::VM& vm); + public: enum class Direction { CLOCKWISE, @@ -49,51 +55,136 @@ class Spotlight final : public MovingObject, static std::string class_name() { return "spotlight"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Spotlight"; } static std::string display_name() { return _("Spotlight"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(Spotlight)); } virtual ObjectSettings get_settings() override; virtual int get_layer() const override { return m_layer; } - void set_enabled(bool enabled) { m_enabled = enabled; } - bool is_enabled() const { return m_enabled; } - - void set_angle(float angle_) { angle = angle_; } - void set_speed(float speed_) { speed = speed_; } - void set_color(Color color_) { color = color_; } - void set_direction(Direction dir) { m_direction = dir; } - - void ease_angle(float time, float target, EasingMode ease = EasingMode::EaseNone) - { - m_fade_helpers.push_back(std::make_unique(&angle, time, target, getEasingByName(ease))); - } - - void ease_speed(float time, float target, EasingMode ease = EasingMode::EaseNone) - { - m_fade_helpers.push_back(std::make_unique(&speed, time, target, getEasingByName(ease))); - } - - void ease_color(float time, Color target, EasingMode ease = EasingMode::EaseNone) - { - m_fade_helpers.push_back(std::make_unique(&color.red, time, target.red, getEasingByName(ease))); - m_fade_helpers.push_back(std::make_unique(&color.green, time, target.green, getEasingByName(ease))); - m_fade_helpers.push_back(std::make_unique(&color.blue, time, target.blue, getEasingByName(ease))); - m_fade_helpers.push_back(std::make_unique(&color.alpha, time, target.alpha, getEasingByName(ease))); - } + /** + * @scripting + * @deprecated Use the ""enabled"" property instead! + * @description Enables/disables the spotlight. + * @param bool $enabled + */ + void set_enabled(bool enabled); + /** + * @scripting + * @deprecated Use the ""enabled"" property instead! + * @description Returns ""true"" if the spotlight is enabled. + */ + bool is_enabled(); + + /** + * @scripting + * @description Sets the direction of the spotlight. + * @param string $direction + */ + void set_direction(const std::string& direction); + + /** + * @scripting + * @deprecated Use the ""angle"" property instead! + * @description Sets the angle of the spotlight. + * @param float $angle + */ + void set_angle(float angle); + /** + * @scripting + * @description Fades the angle of the spotlight in ""time"" seconds. + * @param float $angle + * @param float $time + */ + void fade_angle(float angle, float time); + /** + * @scripting + * @description Fades the angle of the spotlight in ""time"" seconds, with easing. + * @param float $angle + * @param float $time + * @param string $easing + */ + void ease_angle(float angle, float time, const std::string& easing); + + /** + * @scripting + * @deprecated Use the ""speed"" property instead! + * @description Sets the speed of the spotlight. + * @param float $speed + */ + void set_speed(float speed); + /** + * @scripting + * @description Fades the speed of the spotlight in ""time"" seconds. + * @param float $speed + * @param float $time + */ + void fade_speed(float speed, float time); + /** + * @scripting + * @description Fades the speed of the spotlight in ""time"" seconds, with easing. + * @param float $speed + * @param float $time + * @param string $easing + */ + void ease_speed(float speed, float time, const std::string& easing); + + /** + * @scripting + * @description Sets the RGBA color of the spotlight. + * @param float $r + * @param float $g + * @param float $b + * @param float $a + */ + void set_color_rgba(float r, float g, float b, float a); + /** + * @scripting + * @description Fades the spotlight to a new RGBA color in ""time"" seconds. + * @param float $r + * @param float $g + * @param float $b + * @param float $a + * @param float $time + */ + void fade_color_rgba(float r, float g, float b, float a, float time); + /** + * @scripting + * @description Fades the spotlight to a new RGBA color in ""time"" seconds, with easing. + * @param float $r + * @param float $g + * @param float $b + * @param float $a + * @param float $time + * @param string $easing + */ + void ease_color_rgba(float r, float g, float b, float a, float time, const std::string& easing); + + void ease_angle(float time, float target, EasingMode ease = EasingMode::EaseNone); + void ease_speed(float time, float target, EasingMode ease = EasingMode::EaseNone); + void ease_color(float time, Color target, EasingMode ease = EasingMode::EaseNone); private: - float angle; - SpritePtr center; - SpritePtr base; - SpritePtr lights; - SpritePtr light; - SpritePtr lightcone; - - Color color; - - /** Speed that the spotlight is rotating with */ - float speed; + /** + * @scripting + * @description The angle of the spotlight. + */ + float m_angle; + SpritePtr m_center; + SpritePtr m_base; + SpritePtr m_lights; + SpritePtr m_light; + SpritePtr m_lightcone; + + Color m_color; + + /** + * @scripting + * @description Speed that the spotlight is rotating with. + */ + float m_speed; /** The direction of the spotlight */ Direction m_direction; @@ -101,6 +192,10 @@ class Spotlight final : public MovingObject, /** The layer (z-pos) of the spotlight. */ int m_layer; + /** + * @scripting + * @description Determines whether the spotlight is enabled. + */ bool m_enabled; private: diff --git a/src/object/sprite_particle.hpp b/src/object/sprite_particle.hpp index 44bd77c841b..ae5dad30dfc 100644 --- a/src/object/sprite_particle.hpp +++ b/src/object/sprite_particle.hpp @@ -37,6 +37,7 @@ class SpriteParticle final : public GameObject const Vector& position, AnchorPoint anchor, const Vector& velocity, const Vector& acceleration, int drawing_layer = LAYER_OBJECTS-1, bool notimeout = false, Color color = Color::WHITE); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(SpriteParticle)); } ~SpriteParticle() override; protected: diff --git a/src/object/star.hpp b/src/object/star.hpp index 808ddf8052a..f019757707b 100644 --- a/src/object/star.hpp +++ b/src/object/star.hpp @@ -26,6 +26,7 @@ class Star final : public MovingSprite { public: Star(const Vector& pos, Direction direction = Direction::RIGHT, const std::string& custom_sprite = ""); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Star)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/object/sticky_object.hpp b/src/object/sticky_object.hpp index b276dfa5a36..13c7ed61316 100644 --- a/src/object/sticky_object.hpp +++ b/src/object/sticky_object.hpp @@ -31,6 +31,7 @@ class StickyObject : public MovingSprite int layer = LAYER_OBJECTS, CollisionGroup collision_group = COLGROUP_MOVING); StickyObject(const ReaderMapping& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS, CollisionGroup collision_group = COLGROUP_MOVING); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(StickyObject)); } virtual void update(float dt_sec) override; @@ -80,6 +81,7 @@ class StickyBadguy : public BadGuy int layer = LAYER_OBJECTS, CollisionGroup collision_group = COLGROUP_MOVING); StickyBadguy(const ReaderMapping& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS, CollisionGroup collision_group = COLGROUP_MOVING); + virtual GameObjectClasses get_class_types() const override { return BadGuy::get_class_types().add(typeid(StickyBadguy)); } virtual void sticky_update(float dt_sec); diff --git a/src/object/text_array_object.cpp b/src/object/text_array_object.cpp index 87bda134ff6..def73cbb4a0 100644 --- a/src/object/text_array_object.cpp +++ b/src/object/text_array_object.cpp @@ -15,14 +15,18 @@ // along with this program. If not, see . #include "object/text_array_object.hpp" + +#include +#include + #include "control/input_manager.hpp" +#include "supertux/sector.hpp" TextArrayObject::TextArrayObject(const std::string& name) : - ExposedObject(this), - m_isDone(false), - m_isAuto(false), - m_keepVisible(false), - m_fadeTransition(true), + m_finished(false), + m_is_auto(false), + m_keep_visible(false), + m_fade_transition(true), m_fadetime(1.0), m_texts(), m_curTextIndex(0), @@ -40,7 +44,13 @@ TextArrayObject::clear() } void -TextArrayObject::add_text(const std::string& text, float duration) +TextArrayObject::add_text(const std::string& text) +{ + add_text_duration(text, 3.f); +} + +void +TextArrayObject::add_text_duration(const std::string& text, float duration) { auto pText = std::make_unique(); assert(pText); @@ -51,7 +61,8 @@ TextArrayObject::add_text(const std::string& text, float duration) m_texts.push_back(std::move(pText)); } -void TextArrayObject::set_text_index(ta_index index) +void +TextArrayObject::set_text_index(ta_index index) { if (index < m_texts.size()) m_curTextIndex = index; @@ -66,11 +77,11 @@ TextArrayObject::set_fade_time(float fadetime) void TextArrayObject::next_text() { - if (m_isDone) + if (m_finished) return; if (m_curTextIndex + 1 >= m_texts.size()) { - m_isDone = true; + m_finished = true; return; } @@ -83,7 +94,7 @@ TextArrayObject::next_text() void TextArrayObject::prev_text() { - if (m_isDone) + if (m_finished) return; if (m_curTextIndex == 0) @@ -98,13 +109,13 @@ TextArrayObject::prev_text() void TextArrayObject::set_keep_visible(bool keep_visible) { - m_keepVisible = keep_visible; + m_keep_visible = keep_visible; } void TextArrayObject::set_fade_transition(bool fade_transition) { - m_fadeTransition = fade_transition; + m_fade_transition = fade_transition; } TextArrayItem* @@ -133,20 +144,20 @@ TextArrayObject::get_last_text_item() const void TextArrayObject::set_done(bool done) { - m_isDone = done; + m_finished = done; } void TextArrayObject::set_auto(bool is_auto) { - m_isAuto = is_auto; + m_is_auto = is_auto; reset_automation(); } void TextArrayObject::update(float dt_sec) { - if (m_isDone) + if (m_finished) return; // make sure there's anything to update @@ -157,7 +168,7 @@ TextArrayObject::update(float dt_sec) handle_input_requests(); // check if if should update auto narration - if (m_isAuto && m_waiting.check()) { + if (m_is_auto && m_waiting.check()) { next_text(); } @@ -178,7 +189,7 @@ TextArrayObject::update(float dt_sec) void TextArrayObject::draw(DrawingContext& context) { - if (m_isDone) + if (m_finished) return; auto* curTextItem = get_current_text_item(); @@ -199,7 +210,7 @@ TextArrayObject::draw(DrawingContext& context) void TextArrayObject::override_properties() { - if (!(should_fade() || m_keepVisible)) + if (!(should_fade() || m_keep_visible)) return; auto* curTextItem = get_current_text_item(); @@ -213,7 +224,7 @@ TextArrayObject::override_properties() lastTextItem->text_object.fade_out(m_fadetime); curTextItem->text_object.fade_in(m_fadetime); } - } else if (m_keepVisible) { // keep visible + } else if (m_keep_visible) { // keep visible curTextItem->text_object.set_visible(true); } } @@ -223,7 +234,7 @@ TextArrayObject::reset_automation() { m_waiting.stop(); - if (m_isAuto) { + if (m_is_auto) { auto* text = get_current_text_item(); if (text) m_waiting.start(text->duration); @@ -236,19 +247,223 @@ TextArrayObject::handle_input_requests() const Controller& controller = InputManager::current()->get_controller(); if (controller.pressed(Control::MENU_SELECT)) { - m_isAuto = false; + m_is_auto = false; next_text(); } else if (controller.pressed(Control::REMOVE)) { - m_isAuto = false; + m_is_auto = false; prev_text(); } - } bool TextArrayObject::should_fade() const { - return m_fadeTransition && (m_curTextIndex != m_lastTextIndex); + return m_fade_transition && (m_curTextIndex != m_lastTextIndex); +} + + +/** TextObject functions */ + +#define TEXT_OBJECT_FUNCTION_VOID(F) \ + TextArrayItem* item = get_current_text_item(); \ + if (item) { \ + item->text_object.F; \ + return; \ + } + +#define TEXT_OBJECT_FUNCTION_RETURN(F) \ + TextArrayItem* item = get_current_text_item(); \ + if (item) \ + return item->text_object.F; + +void +TextArrayObject::set_text(const std::string& text) +{ + TEXT_OBJECT_FUNCTION_VOID(set_text(text)) + + add_text(text); +} + +void +TextArrayObject::set_font(const std::string& fontname) +{ + TEXT_OBJECT_FUNCTION_VOID(set_font(fontname)) +} + +void +TextArrayObject::fade_in(float fadetime) +{ + TEXT_OBJECT_FUNCTION_VOID(fade_in(fadetime)) +} + +void +TextArrayObject::fade_out(float fadetime) +{ + TEXT_OBJECT_FUNCTION_VOID(fade_out(fadetime)) +} + +void +TextArrayObject::grow_in(float fadetime) +{ + TEXT_OBJECT_FUNCTION_VOID(grow_in(fadetime)) +} + +void +TextArrayObject::grow_out(float fadetime) +{ + TEXT_OBJECT_FUNCTION_VOID(grow_out(fadetime)) +} + +void +TextArrayObject::set_visible(bool visible) +{ + TEXT_OBJECT_FUNCTION_VOID(set_visible(visible)) +} + +void +TextArrayObject::set_centered(bool centered) +{ + TEXT_OBJECT_FUNCTION_VOID(set_centered(centered)) +} + +void +TextArrayObject::set_pos(float x, float y) +{ + TEXT_OBJECT_FUNCTION_VOID(set_pos(Vector(x, y))) +} + +float +TextArrayObject::get_x() const +{ + TEXT_OBJECT_FUNCTION_RETURN(get_pos().x) + + log_warning << "'TextArrayObject' position is not set. Assuming (0,0)." << std::endl; + return 0; +} + +float +TextArrayObject::get_y() const +{ + TEXT_OBJECT_FUNCTION_RETURN(get_pos().y) + + log_warning << "'TextArrayObject' position is not set. Assuming (0,0)." << std::endl; + return 0; +} + +void +TextArrayObject::set_anchor_point(int anchor) +{ + TEXT_OBJECT_FUNCTION_VOID(set_anchor_point(static_cast(anchor))) +} + +int +TextArrayObject::get_anchor_point() const +{ + TEXT_OBJECT_FUNCTION_RETURN(get_anchor_point()) + + return -1; +} + +void +TextArrayObject::set_anchor_offset(float x, float y) +{ + TEXT_OBJECT_FUNCTION_VOID(set_anchor_offset(x, y)) +} + +float +TextArrayObject::get_wrap_width() const +{ + TEXT_OBJECT_FUNCTION_RETURN(get_wrap_width()) + + return 0; +} + +void +TextArrayObject::set_wrap_width(float width) +{ + TEXT_OBJECT_FUNCTION_VOID(set_wrap_width(width)) +} + +void +TextArrayObject::set_front_fill_color(float red, float green, float blue, float alpha) +{ + TEXT_OBJECT_FUNCTION_VOID(set_front_fill_color(red, green, blue, alpha)) +} + +void +TextArrayObject::set_back_fill_color(float red, float green, float blue, float alpha) +{ + TEXT_OBJECT_FUNCTION_VOID(set_back_fill_color(red, green, blue, alpha)) +} + +void +TextArrayObject::set_text_color(float red, float green, float blue, float alpha) +{ + TEXT_OBJECT_FUNCTION_VOID(set_text_color(red, green, blue, alpha)) +} + +void +TextArrayObject::set_roundness(float roundness) +{ + TEXT_OBJECT_FUNCTION_VOID(set_roundness(roundness)) +} + +#undef TEXT_OBJECT_FUNCTION_VOID +#undef TEXT_OBJECT_FUNCTION_RETURN + + +void +TextArrayObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addClass("TextArrayObject", []() + { + if (!Sector::current()) + throw std::runtime_error("Tried to create 'TextArrayObject' without an active sector."); + + return &Sector::get().add(); + }, + false /* Do not free pointer from Squirrel */, + vm.findClass("GameObject")); + + cls.addFunc("clear", &TextArrayObject::clear); + cls.addFunc("add_text", &TextArrayObject::add_text); + cls.addFunc("add_text_duration", &TextArrayObject::add_text_duration); + cls.addFunc("set_text_index", &TextArrayObject::set_text_index); + cls.addFunc("set_keep_visible", &TextArrayObject::set_keep_visible); + cls.addFunc("set_fade_transition", &TextArrayObject::set_fade_transition); + cls.addFunc("set_fade_time", &TextArrayObject::set_fade_time); + cls.addFunc("set_done", &TextArrayObject::set_done); + cls.addFunc("set_auto", &TextArrayObject::set_auto); + cls.addFunc("next_text", &TextArrayObject::next_text); + cls.addFunc("prev_text", &TextArrayObject::prev_text); + + /* TextObject API related */ + cls.addFunc("set_text", &TextArrayObject::set_text); + cls.addFunc("set_font", &TextArrayObject::set_font); + cls.addFunc("fade_in", &TextArrayObject::fade_in); + cls.addFunc("fade_out", &TextArrayObject::fade_out); + cls.addFunc("grow_in", &TextArrayObject::grow_in); + cls.addFunc("grow_out", &TextArrayObject::grow_out); + cls.addFunc("set_visible", &TextArrayObject::set_visible); + cls.addFunc("set_centered", &TextArrayObject::set_centered); + cls.addFunc("set_pos", &TextArrayObject::set_pos); + cls.addFunc("get_x", &TextArrayObject::get_x); + cls.addFunc("get_y", &TextArrayObject::get_y); + cls.addFunc("get_pos_x", &TextArrayObject::get_x); // Deprecated + cls.addFunc("get_pos_y", &TextArrayObject::get_y); // Deprecated + cls.addFunc("set_anchor_point", &TextArrayObject::set_anchor_point); + cls.addFunc("get_anchor_point", &TextArrayObject::get_anchor_point); + cls.addFunc("set_anchor_offset", &TextArrayObject::set_anchor_offset); + cls.addFunc("get_wrap_width", &TextArrayObject::get_wrap_width); + cls.addFunc("set_wrap_width", &TextArrayObject::set_wrap_width); + cls.addFunc("set_front_fill_color", &TextArrayObject::set_front_fill_color); + cls.addFunc("set_back_fill_color", &TextArrayObject::set_back_fill_color); + cls.addFunc("set_text_color", &TextArrayObject::set_text_color); + cls.addFunc("set_roundness", &TextArrayObject::set_roundness); + + cls.addVar("keep_visible", &TextArrayObject::m_keep_visible); + cls.addVar("fade_transition", &TextArrayObject::m_fade_transition); + cls.addVar("finished", &TextArrayObject::m_finished); } /* EOF */ diff --git a/src/object/text_array_object.hpp b/src/object/text_array_object.hpp index 141184e2e27..81f49a68750 100644 --- a/src/object/text_array_object.hpp +++ b/src/object/text_array_object.hpp @@ -17,22 +17,31 @@ #ifndef HEADER_SUPERTUX_OBJECT_TEXT_ARRAY_OBJECT_HPP #define HEADER_SUPERTUX_OBJECT_TEXT_ARRAY_OBJECT_HPP -#include - -#include "squirrel/exposed_object.hpp" #include "supertux/game_object.hpp" -#include "scripting/text_array_object.hpp" +#include + #include "supertux/timer.hpp" #include "object/text_object.hpp" #include "object/text_array_item.hpp" typedef size_t ta_index; -/** A text array object intended for narration */ -class TextArrayObject final : public GameObject, - public ExposedObject +/** + * An array of text objects, intended for narration. + + * @scripting + * @summary A ""TextArrayObject"" that was given a name can be controlled by scripts. + Supports all functions of ${SRG_REF_Text}, applying them to the current text item.${SRG_NEWPARAGRAPH} + Intended for scripts with narration. + * @instances A ""TextArrayObject"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class TextArrayObject final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: TextArrayObject(const std::string& name = ""); ~TextArrayObject() override = default; @@ -44,64 +53,107 @@ class TextArrayObject final : public GameObject, static std::string class_name() { return "text-array"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "TextArrayObject"; } static std::string display_name() { return _("Text array"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(TextArrayObject)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/textarray.png"; } - /////////// TextArray api related /////////// - - /** Empties the text array. */ + /** + * @scripting + * @description Clears all text objects from the stack. + */ void clear(); - - /** Adds a text with duration. - @param: text the text itself (can be multiline & formatted). - @param: duration (optional) the text display time in seconds, defaults to 3. */ - void add_text(const std::string& text, float duration = 3.0f); - - /** Sets the current text index. - @param: index the index to set to. */ + /** + * @scripting + * @description Adds a text object with a specific text at the end of the stack. + * @param string $text + */ + void add_text(const std::string& text); + /** + * @scripting + * @description Adds a text object with a specific text and duration at the end of the stack. + * @param string $text + * @param float $duration + */ + void add_text_duration(const std::string& text, float duration); + /** + * @scripting + * @description Sets the current text object by its index. + * @param int $index + */ void set_text_index(ta_index index); - - /** Sets the keep visible flag. - This flag overrides all texts to be visible. - @note: fade_transition overrides this - @param: keep_visible true to enable keep_visible; false to disable the flag. */ + /** + * @scripting + * @deprecated Use the ""keep_visible"" property instead! + * @description If set, keeps the current text object visible. + * @param bool $keep_visible + */ void set_keep_visible(bool keep_visible); - - /** Sets the fade transition flag. - This flag overrides all texts to be visible and fading. - @note: overrides keep_visible flag */ + /** + * @scripting + * @deprecated Use the ""fade_transition"" property instead! + * @description If set, allows for a fade-in and fade-out transition. + * @param bool $fade_transition + */ void set_fade_transition(bool fade_transition); - - /** Sets fadetime for fade_transition. - @param: fadetime the fade time. - @note: does NOT override the TextArray::fade_in() method. */ + /** + * @scripting + * @description Sets the fade-in and fade-out time. + * @param float $fadetime + */ void set_fade_time(float fadetime); - - /** Sets the done flag as on. This disables the text array. - @note: the text array is not cleared. - @param: done true for on; false for off. */ + /** + * @scripting + * @deprecated Use the ""finished"" property instead! + * @description If set, sets the text array as finished going through all text objects. + * @param bool $done + */ void set_done(bool done); - - /** Sets the auto flag on & starts the auto narration. - @note: this starts the auto narration immediately! - this is disabled once the user inputs a skip! */ + /** + * @scripting + * @description If set, lets the text array automatically go through all text objects. + * @param bool $is_auto + */ void set_auto(bool is_auto); - - /** Sets the current text to the next one. - @note: if the text is the last on the array, - the done flag is set, and the text array is disabled. */ + /** + * @scripting + * @description If available, goes to the next text object in the stack. + */ void next_text(); - - /** Sets the current text to the previous. - @note: if the current text is the first on the array, - it stays that way. */ + /** + * @scripting + * @description If available, goes to the previous text object in the stack. + */ void prev_text(); - /////////// TextArrayObject access /////////// + /* + * TextObject API related + * @see: text_object.hpp + */ + void set_text(const std::string& text); + void set_font(const std::string& fontname); + void fade_in(float fadetime); + void fade_out(float fadetime); + void grow_in(float fadetime); + void grow_out(float fadetime); + void set_visible(bool visible); + void set_centered(bool centered); + void set_pos(float x, float y); + float get_x() const; + float get_y() const; + void set_anchor_point(int anchor); + int get_anchor_point() const; + void set_anchor_offset(float x, float y); + float get_wrap_width() const; + void set_wrap_width(float width); + void set_front_fill_color(float red, float green, float blue, float alpha); + void set_back_fill_color(float red, float green, float blue, float alpha); + void set_text_color(float red, float green, float blue, float alpha); + void set_roundness(float roundness); /** Gets the text item at a certain index. @param: index the index of the text item to get. @@ -133,10 +185,23 @@ class TextArrayObject final : public GameObject, bool should_fade() const; private: - bool m_isDone; - bool m_isAuto; - bool m_keepVisible; - bool m_fadeTransition; + /** + * @scripting + * @description Determines whether the text array has finished going through all text objects. + */ + bool m_finished; + bool m_is_auto; + + /** + * @scripting + * @description Determines whether the current text object should be kept visible. + */ + bool m_keep_visible; + /** + * @scripting + * @description Allows for a fade-in and fade-out transition. + */ + bool m_fade_transition; float m_fadetime; diff --git a/src/object/text_object.cpp b/src/object/text_object.cpp index f68a1ceae90..ea7a31cc31b 100644 --- a/src/object/text_object.cpp +++ b/src/object/text_object.cpp @@ -16,17 +16,20 @@ #include "object/text_object.hpp" +#include +#include + #include "editor/editor.hpp" #include "supertux/sector.hpp" #include "util/reader.hpp" #include "util/reader_mapping.hpp" #include "supertux/globals.hpp" #include "supertux/resources.hpp" +#include "supertux/sector.hpp" #include "video/drawing_context.hpp" TextObject::TextObject(const std::string& name) : GameObject(name), - ExposedObject(this), m_font(Resources::normal_font), m_text(), m_wrapped_text(), @@ -151,21 +154,69 @@ TextObject::set_centered(bool centered) } void -TextObject::set_front_fill_color(Color frontfill) +TextObject::set_pos(float x, float y) +{ + m_pos = Vector(x, y); +} + +float +TextObject::get_x() const +{ + return m_pos.x; +} + +float +TextObject::get_y() const +{ + return m_pos.y; +} + +void +TextObject::set_anchor_point(int anchor) +{ + m_anchor = static_cast(anchor); +} + +int +TextObject::get_anchor_point() const { - m_front_fill_color = frontfill; + return static_cast(m_anchor); } void -TextObject::set_back_fill_color(Color backfill) +TextObject::set_anchor_offset(float x, float y) { - m_back_fill_color = backfill; + m_anchor_offset = Vector(x, y); +} + +float +TextObject::get_wrap_width() const +{ + return m_wrap_width; } void -TextObject::set_text_color(Color textcolor) +TextObject::set_wrap_width(float width) { - m_text_color = textcolor; + m_wrap_width = width; +} + +void +TextObject::set_front_fill_color(float red, float green, float blue, float alpha) +{ + m_front_fill_color = Color(red, green, blue, alpha); +} + +void +TextObject::set_back_fill_color(float red, float green, float blue, float alpha) +{ + m_back_fill_color = Color(red, green, blue, alpha); +} + +void +TextObject::set_text_color(float red, float green, float blue, float alpha) +{ + m_text_color = Color(red, green, blue, alpha); } void @@ -243,4 +294,48 @@ TextObject::update(float dt_sec) } } + +void +TextObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addClass("TextObject", []() + { + if (!Sector::current()) + throw std::runtime_error("Tried to create 'TextObject' without an active sector."); + + return &Sector::get().add(); + }, + false /* Do not free pointer from Squirrel */, + vm.findClass("GameObject")); + + /* NOTE: Any functions exposed here should also be exposed in TextArrayObject. */ + cls.addFunc("set_text", &TextObject::set_text); + cls.addFunc("set_font", &TextObject::set_font); + cls.addFunc("fade_in", &TextObject::fade_in); + cls.addFunc("fade_out", &TextObject::fade_out); + cls.addFunc("grow_in", &TextObject::grow_in); + cls.addFunc("grow_out", &TextObject::grow_out); + cls.addFunc("set_visible", &TextObject::set_visible); + cls.addFunc("set_centered", &TextObject::set_centered); + cls.addFunc("set_pos", &TextObject::set_pos); + cls.addFunc("get_x", &TextObject::get_x); + cls.addFunc("get_y", &TextObject::get_y); + cls.addFunc("get_pos_x", &TextObject::get_x); // Deprecated + cls.addFunc("get_pos_y", &TextObject::get_y); // Deprecated + cls.addFunc("set_anchor_point", &TextObject::set_anchor_point); + cls.addFunc("get_anchor_point", &TextObject::get_anchor_point); + cls.addFunc("set_anchor_offset", &TextObject::set_anchor_offset); + cls.addFunc("get_wrap_width", &TextObject::get_wrap_width); + cls.addFunc("set_wrap_width", &TextObject::set_wrap_width); + cls.addFunc("set_front_fill_color", &TextObject::set_front_fill_color); + cls.addFunc("set_back_fill_color", &TextObject::set_back_fill_color); + cls.addFunc("set_text_color", &TextObject::set_text_color); + cls.addFunc("set_roundness", &TextObject::set_roundness); + + cls.addVar("visible", &TextObject::m_visible); + cls.addVar("centered", &TextObject::m_centered); + cls.addVar("wrap_width", &TextObject::m_wrap_width); + cls.addVar("roundness", &TextObject::m_roundness); +} + /* EOF */ diff --git a/src/object/text_object.hpp b/src/object/text_object.hpp index 1b5a9c06747..70184ea3a56 100644 --- a/src/object/text_object.hpp +++ b/src/object/text_object.hpp @@ -17,11 +17,9 @@ #ifndef HEADER_SUPERTUX_OBJECT_TEXT_OBJECT_HPP #define HEADER_SUPERTUX_OBJECT_TEXT_OBJECT_HPP -#include "squirrel/exposed_object.hpp" #include "supertux/game_object.hpp" #include "math/anchor_point.hpp" -#include "scripting/text_object.hpp" #include "video/color.hpp" #include "video/drawing_context.hpp" #include "video/font_ptr.hpp" @@ -29,20 +27,31 @@ class DrawingContext; class ReaderMapping; -/** A text object intended for scripts that want to tell a story */ -class TextObject final : public GameObject, - public ExposedObject +/** + * A text object intended for scripts that want to tell a story. + + * @scripting + * @summary A ""TextObject"" that was given a name can be controlled by scripts. + * @instances A ""TextObject"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class TextObject final : public GameObject { static Color default_color; +public: + static void register_class(ssq::VM& vm); + public: TextObject(const std::string& name = ""); ~TextObject() override; static std::string class_name() { return "textobject"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "TextObject"; } static std::string display_name() { return _("Text"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(TextObject)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/textarray.png"; } @@ -50,27 +59,156 @@ class TextObject final : public GameObject, virtual void update(float dt_sec) override; virtual bool is_saveable() const override { return false; } + /** + * @scripting + * @description Sets the text string to be displayed. + * @param string $text + */ void set_text(const std::string& text); - void set_font(const std::string& name); - void grow_in(float fadetime); - void grow_out(float fadetime); + /** + * @scripting + * @description Sets the font of the text to be displayed. + * @param string $fontname Valid values are normal, big and small. + */ + void set_font(const std::string& fontname); + /** + * @scripting + * @description Fades in the specified text for the next ""fadetime"" seconds. + * @param float $fadetime + */ void fade_in(float fadetime); + /** + * @scripting + * @description Fades out the specified text for the next ""fadetime"" seconds. + * @param float $fadetime + */ void fade_out(float fadetime); + /** + * @scripting + * @description Grows in the specified text for the next ""fadetime"" seconds. + * @param float $fadetime + */ + void grow_in(float fadetime); + /** + * @scripting + * @description Grows out the specified text for the next ""fadetime"" seconds. + * @param float $fadetime + */ + void grow_out(float fadetime); + /** + * @scripting + * @deprecated Use the ""visible"" property instead! (Does not apply for usage from a ""TextArray"".) + * @description Shows or hides the text abruptly (drastic counterpart to ""fade_in()"" and ""fade_out()""). + * @param bool $visible + */ void set_visible(bool visible); + /** + * @scripting + * @deprecated Use the ""centered"" property instead! (Does not apply for usage from a ""TextArray"".) + * @description If ""centered"" is ""true"", the text will be centered on the screen. Otherwise, it will be left-aligned. + * @param bool $centered + */ void set_centered(bool centered); - void set_front_fill_color(Color frontfill); - void set_back_fill_color(Color backfill); - void set_text_color(Color textcolor); + /** + * @scripting + * @description Sets the offset of the text, relative to the anchor point. + * @param float $x + * @param float $y + */ + void set_pos(float x, float y); + /** + * @scripting + * @description Returns the X offset of the text, relative to the anchor point. + */ + float get_x() const; + /** + * @scripting + * @description Returns the Y offset of the text, relative to the anchor point. + */ + float get_y() const; +#ifdef DOXYGEN_SCRIPTING + /** + * @scripting + * @deprecated Use ""get_x()"" instead! + * @description Returns the X offset of the text, relative to the anchor point. + */ + float get_pos_x() const; + /** + * @scripting + * @deprecated Use ""get_y()"" instead! + * @description Returns the Y offset of the text, relative to the anchor point. + */ + float get_pos_y() const; +#endif + /** + * @scripting + * @description Sets the anchor point of the text. + * @param int $anchor One of the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). + */ + void set_anchor_point(int anchor); + /** + * @scripting + * @description Returns the current anchor point of the text (one of the ""ANCHOR_*"" constants; see ${SRG_REF_AnchorPoints}). + */ + int get_anchor_point() const; + /** + * @scripting + * @description Sets the anchor offset of the text. + * @param float $x + * @param float $y + */ + void set_anchor_offset(float x, float y); + /** + * @scripting + * @deprecated Use the ""wrap_width"" property instead! (Does not apply for usage from a ""TextArray"".) + * @description Gets the text wrap width of the text. + */ + float get_wrap_width() const; + /** + * @scripting + * @deprecated Use the ""wrap_width"" property instead! (Does not apply for usage from a ""TextArray"".) + * @description Sets the text wrap width of the text. + * @param float $width + */ + void set_wrap_width(float width); + /** + * @scripting + * @description Sets the front fill color of the text. + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + */ + void set_front_fill_color(float red, float green, float blue, float alpha); + /** + * @scripting + * @description Sets the back fill color of the text. + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + */ + void set_back_fill_color(float red, float green, float blue, float alpha); + /** + * @scripting + * @description Sets the text color. + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + */ + void set_text_color(float red, float green, float blue, float alpha); + /** + * @scripting + * @deprecated Use the ""roundness"" property instead! (Does not apply for usage from a ""TextArray"".) + * @description Sets the frame's roundness. + * @param float $roundness + */ void set_roundness(float roundness); - bool is_visible(); void set_anchor_point(AnchorPoint anchor) { m_anchor = anchor; } - AnchorPoint get_anchor_point() const { return m_anchor; } void set_anchor_offset(const Vector& offset) { m_anchor_offset = offset; } - float get_wrap_width() const { return m_wrap_width; } - void set_wrap_width(float width) { m_wrap_width = width; } - void set_pos(const Vector& pos) { m_pos = pos; } const Vector& get_pos() const { return m_pos; } @@ -83,15 +221,31 @@ class TextObject final : public GameObject, std::string m_wrapped_text; float m_fade_progress; float m_fadetime; + /** + * @scripting + * @description Determines whether the text is visible. + */ bool m_visible; + /** + * @scripting + * @description Determines whether the text is centered. + */ bool m_centered; AnchorPoint m_anchor; Vector m_anchor_offset; Vector m_pos; + /** + * @scripting + * @description Determines the maximum wrap width of the text. + */ float m_wrap_width; Color m_front_fill_color; Color m_back_fill_color; Color m_text_color; + /** + * @scripting + * @description Determines the roundness of the text frame. + */ float m_roundness; bool m_growing_in; bool m_growing_out; diff --git a/src/object/textscroller.hpp b/src/object/textscroller.hpp index 1a15e5ae30c..d484c4fe78b 100644 --- a/src/object/textscroller.hpp +++ b/src/object/textscroller.hpp @@ -44,6 +44,7 @@ class TextScroller : public GameObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Text Scroller"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(TextScroller)); } virtual const std::string get_icon_path() const override { return "images/engine/editor/textscroller.png"; } void set_default_speed(float default_speed); diff --git a/src/object/thunderstorm.cpp b/src/object/thunderstorm.cpp index 88f12181a9f..05b1836d76e 100644 --- a/src/object/thunderstorm.cpp +++ b/src/object/thunderstorm.cpp @@ -16,6 +16,9 @@ #include "object/thunderstorm.hpp" +#include +#include + #include "audio/sound_manager.hpp" #include "editor/editor.hpp" #include "object/background.hpp" @@ -38,7 +41,6 @@ const float RESTORE_BACKGROUND_COLOR_TIME = 0.1f; Thunderstorm::Thunderstorm(const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), running(true), interval(10.0f), layer(LAYER_BACKGROUNDTILES-1), @@ -112,6 +114,7 @@ Thunderstorm::update(float ) return; } + alpha *= static_cast(g_config->flash_intensity) / 100.0f; m_flash_color = Color(alpha, alpha, alpha, 1.0); } @@ -122,7 +125,7 @@ Thunderstorm::update(float ) time_to_lightning.start(LIGHTNING_DELAY); } if (time_to_lightning.check()) { - lightning_in_sequence(); + lightning_general(); time_to_thunder.start(interval); } } @@ -139,6 +142,18 @@ Thunderstorm::draw(DrawingContext& context) context.pop_transform(); } +void +Thunderstorm::lightning_general(bool is_scripted) +{ + flash(); + electrify(); + if (!m_strike_script.empty()) { + Sector::get().run_script(m_strike_script, "strike-script"); + } + + change_background_colors(true, is_scripted); +} + void Thunderstorm::start() { @@ -164,28 +179,10 @@ Thunderstorm::thunder() change_background_colors(false); } -void -Thunderstorm::lightning_general() -{ - flash(); - electrify(); - if (!m_strike_script.empty()) { - Sector::get().run_script(m_strike_script, "strike-script"); - } -} - void Thunderstorm::lightning() { - lightning_general(); - change_background_colors(true, true); -} - -void -Thunderstorm::lightning_in_sequence() -{ - lightning_general(); - change_background_colors(true, false); + lightning_general(true); } void @@ -233,4 +230,18 @@ Thunderstorm::restore_background_colors() } } + +void +Thunderstorm::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Thunderstorm", vm.findClass("GameObject")); + + cls.addFunc("start", &Thunderstorm::start); + cls.addFunc("stop", &Thunderstorm::stop); + cls.addFunc("thunder", &Thunderstorm::thunder); + cls.addFunc("lightning", &Thunderstorm::lightning); + cls.addFunc("flash", &Thunderstorm::flash); + cls.addFunc("electrify", &Thunderstorm::electrify); +} + /* EOF */ diff --git a/src/object/thunderstorm.hpp b/src/object/thunderstorm.hpp index a285e65bfa4..50b71184a71 100644 --- a/src/object/thunderstorm.hpp +++ b/src/object/thunderstorm.hpp @@ -20,19 +20,26 @@ #include #include -#include "squirrel/exposed_object.hpp" -#include "scripting/thunderstorm.hpp" #include "supertux/game_object.hpp" #include "supertux/timer.hpp" class DrawingContext; class ReaderMapping; -/** Thunderstorm scriptable GameObject; plays thunder, lightning and - electrifies water at regular interval */ -class Thunderstorm final : public GameObject, - public ExposedObject +/** + * Thunderstorm scriptable GameObject: Plays thunder, lightning and + electrifies water at regular interval. + + * @scripting + * @summary A ""Thunderstorm"" that was given a name can be controlled by scripts. + * @instances A ""Thunderstorm"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Thunderstorm final : public GameObject { +public: + static void register_class(ssq::VM& vm); + public: Thunderstorm(const ReaderMapping& reader); @@ -41,8 +48,10 @@ class Thunderstorm final : public GameObject, static std::string class_name() { return "thunderstorm"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Thunderstorm"; } static std::string display_name() { return _("Thunderstorm"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Thunderstorm)); } virtual ObjectSettings get_settings() override; @@ -51,29 +60,44 @@ class Thunderstorm final : public GameObject, /** @name Scriptable Methods @{ */ - /** Start playing thunder and lightning at configured interval */ + /** + * @scripting + * @description Starts playing thunder and lightning at a configured interval. + */ void start(); - - /** Stop playing thunder and lightning at configured interval */ + /** + * @scripting + * @description Stops playing thunder and lightning at a configured interval. + */ void stop(); - /** Play thunder */ + /** + * @scripting + * @description Plays thunder. + */ void thunder(); - - /** Methods for doing lightning by different methods. Necessary for the future implementation of SimpleSquirrel. */ - void lightning_general(); + /** + * @scripting + * @description Plays lightning, i.e. calls ""flash()"" and ""electrify()"". + */ void lightning(); - void lightning_in_sequence(); - /** Display a nice flash */ + /** + * @scripting + * @description Displays a flash. + */ void flash(); - - /** Electrify water throughout the whole sector for a short time */ + /** + * @scripting + * @description Electrifies water throughout the whole sector for a short time. + */ void electrify(); /** @} */ private: + void lightning_general(bool is_scripted = false); + void change_background_colors(bool is_lightning, bool is_scripted = false); void restore_background_colors(); diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index ab0d23f87bb..1c457abc4f0 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "editor/editor.hpp" #include "supertux/autotile.hpp" #include "supertux/debug.hpp" @@ -38,7 +41,6 @@ #include "video/surface.hpp" TileMap::TileMap(const TileSet *new_tileset) : - ExposedObject(this), PathObject(), m_editor_active(true), m_tileset(new_tileset), @@ -73,7 +75,6 @@ TileMap::TileMap(const TileSet *new_tileset) : TileMap::TileMap(const TileSet *tileset_, const ReaderMapping& reader) : GameObject(reader), - ExposedObject(this), PathObject(), m_editor_active(true), m_tileset(tileset_), @@ -441,6 +442,15 @@ TileMap::draw(DrawingContext& context) context.push_transform(); + const bool normal_speed = m_editor_active && Editor::is_active(); + const float speed_x = normal_speed ? 1.0f : m_speed_x; + const float speed_y = normal_speed ? 1.0f : m_speed_y; + if (!context.perspective_scale(speed_x, speed_y)) { + //The tilemap is placed behind the camera. + context.pop_transform(); + return; + } + if (m_flip != NO_FLIP) context.set_flip(m_flip); if (m_editor_active) { @@ -453,9 +463,7 @@ TileMap::draw(DrawingContext& context) const float trans_x = context.get_translation().x; const float trans_y = context.get_translation().y; - const bool normal_speed = m_editor_active && Editor::is_active(); - context.set_translation(Vector(trans_x * (normal_speed ? 1.0f : m_speed_x), - trans_y * (normal_speed ? 1.0f : m_speed_y))); + context.set_translation(Vector(trans_x * speed_x, trans_y * speed_y)); Rectf draw_rect = context.get_cliprect(); Rect t_draw_rect = get_tiles_overlapping(draw_rect); @@ -515,34 +523,6 @@ TileMap::draw(DrawingContext& context) context.pop_transform(); } -void -TileMap::goto_node(int node_idx) -{ - if (!get_walker()) return; - get_walker()->goto_node(node_idx); -} - -void -TileMap::jump_to_node(int node_idx, bool instantaneous) -{ - if (!get_walker()) return; - get_walker()->jump_to_node(node_idx, instantaneous); -} - -void -TileMap::start_moving() -{ - if (!get_walker()) return; - get_walker()->start_moving(); -} - -void -TileMap::stop_moving() -{ - if (!get_walker()) return; - get_walker()->stop_moving(); -} - void TileMap::set(int newwidth, int newheight, const std::vector&newt, int new_z_pos, bool newsolid) @@ -688,7 +668,13 @@ uint32_t TileMap::get_tile_id_at(const Vector& pos) const { Vector xy = (pos - m_offset) / 32.0f; - return get_tile_id(int(xy.x), int(xy.y)); + return get_tile_id(static_cast(xy.x), static_cast(xy.y)); +} + +uint32_t +TileMap::get_tile_id_at(float x, float y) const +{ + return get_tile_id_at(Vector(x, y)); } const Tile& @@ -714,6 +700,12 @@ TileMap::change_at(const Vector& pos, uint32_t newtile) change(int(xy.x), int(xy.y), newtile); } +void +TileMap::change_at(float x, float y, uint32_t newtile) +{ + change_at(Vector(x, y), newtile); +} + void TileMap::change_all(uint32_t oldtile, uint32_t newtile) { @@ -918,23 +910,29 @@ TileMap::get_autotileset(uint32_t tile) const } void -TileMap::fade(float alpha_, float seconds) +TileMap::fade(float alpha_, float time) { m_alpha = alpha_; - m_remaining_fade_time = seconds; + m_remaining_fade_time = time; } void -TileMap::tint_fade(const Color& new_tint, float seconds) +TileMap::tint_fade(const Color& new_tint, float time) { m_tint = new_tint; - m_remaining_tint_fade_time = seconds; + m_remaining_tint_fade_time = time; } void -TileMap::set_alpha(float alpha_) +TileMap::tint_fade(float time, float red, float green, float blue, float alpha) { - m_alpha = alpha_; + tint_fade(Color(red, green, blue, alpha), time); +} + +void +TileMap::set_alpha(float alpha) +{ + m_alpha = alpha; m_current_alpha = m_alpha; m_remaining_fade_time = 0; update_effective_solid (); @@ -977,4 +975,24 @@ TileMap::set_tileset(const TileSet* new_tileset) m_tileset = new_tileset; } + +void +TileMap::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("TileMap", vm.findClass("GameObject")); + + PathObject::register_members(cls); + + cls.addFunc("get_tile_id", &TileMap::get_tile_id); + cls.addFunc("get_tile_id_at", &TileMap::get_tile_id_at); + cls.addFunc("change", &TileMap::change); + cls.addFunc("change_at", &TileMap::change_at); + cls.addFunc("change_all", &TileMap::change_all); + cls.addFunc("fade", &TileMap::fade); + cls.addFunc("tint_fade", &TileMap::tint_fade); + cls.addFunc("set_alpha", &TileMap::set_alpha); + cls.addFunc("get_alpha", &TileMap::get_alpha); + cls.addFunc("set_solid", &TileMap::set_solid); +} + /* EOF */ diff --git a/src/object/tilemap.hpp b/src/object/tilemap.hpp index faf0db746d0..29e000c3b14 100644 --- a/src/object/tilemap.hpp +++ b/src/object/tilemap.hpp @@ -25,26 +25,33 @@ #include "math/size.hpp" #include "object/path_object.hpp" #include "object/path_walker.hpp" -#include "squirrel/exposed_object.hpp" -#include "scripting/tilemap.hpp" #include "supertux/autotile.hpp" #include "supertux/game_object.hpp" #include "video/color.hpp" #include "video/flip.hpp" #include "video/drawing_target.hpp" -class DrawingContext; class CollisionObject; class CollisionGroundMovementManager; +class DrawingContext; class Tile; class TileSet; -/** This class is responsible for drawing the level tiles */ -class TileMap final : - public GameObject, - public ExposedObject, - public PathObject +/** + * This class is responsible for managing an array of tiles. + + * @scripting + * @summary A ""TileMap"" that was given a name can be controlled by scripts. + The tilemap can be moved by specifying a path for it. + * @instances A ""TileMap"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class TileMap final : public GameObject, + public PathObject { +public: + static void register_class(ssq::VM& vm); + public: TileMap(const TileSet *tileset); TileMap(const TileSet *tileset, const ReaderMapping& reader); @@ -54,9 +61,11 @@ class TileMap final : static std::string class_name() { return "tilemap"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "TileMap"; } virtual const std::string get_icon_path() const override { return "images/engine/editor/tilemap.png"; } static std::string display_name() { return _("Tilemap"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(PathObject)).add(typeid(TileMap)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; @@ -71,18 +80,6 @@ class TileMap final : virtual void on_flip(float height) override; - /** Move tilemap until at given node, then stop */ - void goto_node(int node_idx); - - /** Instantly jump to the given node */ - void jump_to_node(int node_idx, bool instantaneous = false); - - /** Start moving tilemap */ - void start_moving(); - - /** Stop tilemap at next node */ - void stop_moving(); - void set(int width, int height, const std::vector& vec, int z_pos, bool solid); @@ -148,21 +145,58 @@ class TileMap final : bool is_solid() const { return m_real_solid && m_effective_solid; } - /** Changes Tilemap's solidity, i.e. whether to consider it when - doing collision detection. */ + /** + * @scripting + * @description Switches the tilemap's real solidity to ""solid"".${SRG_TABLENEWPARAGRAPH} + Note: The effective solidity is also influenced by the alpha of the tilemap. + * @param bool $solid + */ void set_solid(bool solid = true); bool is_outside_bounds(const Vector& pos) const; const Tile& get_tile(int x, int y) const; const Tile& get_tile_at(const Vector& pos) const; + /** + * @scripting + * @description Returns the ID of the tile at the given coordinates or 0 if out of bounds. + The origin is at the top left. + * @param int $x + * @param int $y + */ uint32_t get_tile_id(int x, int y) const; + /** + * @scripting + * @description Returns the ID of the tile at the given position (in world coordinates). + * @param float $x + * @param float $y + */ + uint32_t get_tile_id_at(float x, float y) const; uint32_t get_tile_id_at(const Vector& pos) const; + /** + * @scripting + * @description Changes the tile at the given coordinates to ""newtile"". + The origin is at the top left. + * @param int $x + * @param int $y + * @param int $newtile + */ void change(int x, int y, uint32_t newtile); - + /** + * @scripting + * @description Changes the tile at the given position (in-world coordinates) to ""newtile"". + * @param float $x + * @param float $y + * @param int $newtile + */ + void change_at(float x, float y, uint32_t newtile); void change_at(const Vector& pos, uint32_t newtile); - - /** changes all tiles with the given ID */ + /** + * @scripting + * @description Changes all tiles with the given ID. + * @param int $oldtile + * @param int $newtile + */ void change_all(uint32_t oldtile, uint32_t newtile); /** Puts the correct autotile block at the given position */ @@ -191,23 +225,43 @@ class TileMap final : void set_flip(Flip flip) { m_flip = flip; } Flip get_flip() const { return m_flip; } - /** Start fading the tilemap to opacity given by @c alpha. - Destination opacity will be reached after @c seconds seconds. - Also influences solidity. */ - void fade(float alpha, float seconds = 0); + /** + * @scripting + * @description Starts fading the tilemap to the opacity given by ""alpha"". + Destination opacity will be reached after ""time"" seconds. Also influences solidity. + * @param float $alpha + * @param float $time + */ + void fade(float alpha, float time); /** Start fading the tilemap to tint given by RGBA. Destination opacity will be reached after @c seconds seconds. Doesn't influence solidity. */ - void tint_fade(const Color& new_tint, float seconds = 0); + void tint_fade(const Color& new_tint, float time = 0.f); + /** + * @scripting + * @description Starts fading the tilemap to tint given by RGBA. + Destination opacity will be reached after ""time"" seconds. Doesn't influence solidity. + * @param float $time + * @param float $red + * @param float $green + * @param float $blue + * @param float $alpha + */ + void tint_fade(float time, float red, float green, float blue, float alpha); Color get_current_tint() const { return m_current_tint; } - /** Instantly switch tilemap's opacity to @c alpha. Also influences solidity. */ + /** + * @scripting + * @description Instantly switches the tilemap's opacity to ""alpha"". Also influences solidity. + * @param float $alpha + */ void set_alpha(float alpha); - - /** Return tilemap's opacity. Note that while the tilemap is fading - in or out, this will return the current alpha value, not the - target alpha. */ + /** + * @scripting + * @description Returns the tilemap's opacity.${SRG_TABLENEWPARAGRAPH} + Note: While the tilemap is fading in or out, this will return the current alpha value, not the target alpha. + */ float get_alpha() const; float get_target_alpha() const { return m_alpha; } diff --git a/src/object/torch.cpp b/src/object/torch.cpp index 07acd062aca..b10359034d3 100644 --- a/src/object/torch.cpp +++ b/src/object/torch.cpp @@ -17,6 +17,9 @@ #include "object/torch.hpp" +#include +#include + #include "object/player.hpp" #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" @@ -25,7 +28,6 @@ Torch::Torch(const ReaderMapping& reader) : MovingSprite(reader, "images/objects/torch/torch1.sprite"), - ExposedObject(this), m_light_color(1.f, 1.f, 1.f), m_flame(SpriteManager::current()->create("images/objects/torch/flame.sprite")), m_flame_glow(SpriteManager::current()->create("images/objects/torch/flame_glow.sprite")), @@ -117,9 +119,9 @@ Torch::get_burning() const } void -Torch::set_burning(bool burning_) +Torch::set_burning(bool burning) { - m_burning = burning_; + m_burning = burning; } void @@ -129,4 +131,16 @@ Torch::on_flip(float height) FlipLevelTransformer::transform_flip(m_flip); } + +void +Torch::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Torch", vm.findClass("MovingSprite")); + + cls.addFunc("get_burning", &Torch::get_burning); + cls.addFunc("set_burning", &Torch::set_burning); + + cls.addVar("burning", &Torch::m_burning); +} + /* EOF */ diff --git a/src/object/torch.hpp b/src/object/torch.hpp index 029542a1ea9..377f5ae6d38 100644 --- a/src/object/torch.hpp +++ b/src/object/torch.hpp @@ -19,15 +19,20 @@ #define HEADER_SUPERTUX_OBJECT_TORCH_HPP #include "object/moving_sprite.hpp" -#include "squirrel/exposed_object.hpp" - -#include "scripting/torch.hpp" class ReaderMapping; -class Torch final : public MovingSprite, - public ExposedObject +/** + * @scripting + * @summary A ""Torch"" that was given a name can be controlled by scripts. + * @instances A ""Torch"" is instantiated by placing a definition inside a level. + It can then be accessed by its name from a script or via ""sector.name"" from the console. + */ +class Torch final : public MovingSprite { +public: + static void register_class(ssq::VM& vm); + public: Torch(const ReaderMapping& reader); @@ -38,8 +43,10 @@ class Torch final : public MovingSprite, static std::string class_name() { return "torch"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Torch"; } static std::string display_name() { return _("Torch"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(Torch)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; @@ -48,18 +55,30 @@ class Torch final : public MovingSprite, virtual void on_flip(float height) override; - /** @name Scriptable Methods - @{ */ - bool get_burning() const; /**< returns true if torch is lighted */ - void set_burning(bool burning_); /**< true: light torch, false: extinguish - torch */ - /** @} */ + /** + * @scripting + * @deprecated Use the ""burning"" property instead! + * @description Returns ""true"" if the torch is burning. + */ + bool get_burning() const; + /** + * @scripting + * @deprecated Use the ""burning"" property instead! + * @description Switches the burning state of the torch. + * @param bool $burning + */ + void set_burning(bool burning); private: Color m_light_color; SpritePtr m_flame; SpritePtr m_flame_glow; SpritePtr m_flame_light; + + /** + * @scripting + * @description Determines whether the torch is burning. + */ bool m_burning; private: diff --git a/src/object/trampoline.hpp b/src/object/trampoline.hpp index 910fa118258..29b6cfebfb5 100644 --- a/src/object/trampoline.hpp +++ b/src/object/trampoline.hpp @@ -36,6 +36,7 @@ class Trampoline final : public Rock virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Trampoline"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return Rock::get_class_types().add(typeid(Trampoline)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/object/unstable_tile.hpp b/src/object/unstable_tile.hpp index b5af23dd308..313a226ece1 100644 --- a/src/object/unstable_tile.hpp +++ b/src/object/unstable_tile.hpp @@ -41,6 +41,7 @@ class UnstableTile final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Unstable Tile"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(UnstableTile)); } GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; diff --git a/src/object/vertical_stripes.hpp b/src/object/vertical_stripes.hpp index 79535fda9ac..b789d754af3 100644 --- a/src/object/vertical_stripes.hpp +++ b/src/object/vertical_stripes.hpp @@ -28,6 +28,8 @@ class VerticalStripes final : public GameObject VerticalStripes(); ~VerticalStripes() override; + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(VerticalStripes)); } + virtual bool is_singleton() const override { return true; } virtual bool is_saveable() const override { return false; } virtual void update(float dt_sec) override; diff --git a/src/object/water_drop.hpp b/src/object/water_drop.hpp index 5f7cd70eedd..0949b7f83fd 100644 --- a/src/object/water_drop.hpp +++ b/src/object/water_drop.hpp @@ -27,6 +27,8 @@ class WaterDrop final : public MovingSprite public: WaterDrop(const Vector& pos, const std::string& sprite_path_, const Vector& velocity); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(WaterDrop)); } + virtual void update(float dt_sec) override; virtual void collision_solid(const CollisionHit& hit) override; virtual HitResponse collision(GameObject& other, const CollisionHit& ) override; diff --git a/src/object/weak_block.hpp b/src/object/weak_block.hpp index 865c97e9a99..8c9f5724f54 100644 --- a/src/object/weak_block.hpp +++ b/src/object/weak_block.hpp @@ -35,6 +35,7 @@ class WeakBlock final : public MovingSprite virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Weak Tile"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(WeakBlock)); } std::vector get_patches() const override; void update_version() override; diff --git a/src/object/wind.cpp b/src/object/wind.cpp index 1a5d5da7ec8..f69c71be5fd 100644 --- a/src/object/wind.cpp +++ b/src/object/wind.cpp @@ -16,6 +16,9 @@ #include "object/wind.hpp" +#include +#include + #include "badguy/badguy.hpp" #include "editor/editor.hpp" #include "math/random.hpp" @@ -31,7 +34,6 @@ Wind::Wind(const ReaderMapping& reader) : MovingObject(reader), - ExposedObject(this), blowing(), speed(0.0f, 0.0f), acceleration(), @@ -40,7 +42,8 @@ Wind::Wind(const ReaderMapping& reader) : affects_badguys(), affects_objects(), affects_player(), - fancy_wind() + fancy_wind(true), + particles_enabled(true) { float w,h; reader.get("x", m_col.m_bbox.get_left(), 0.0f); @@ -60,7 +63,8 @@ Wind::Wind(const ReaderMapping& reader) : reader.get("affects-objects", affects_objects, false); reader.get("affects-player", affects_player, true); - reader.get("fancy-wind", fancy_wind, false); + reader.get("fancy-wind", fancy_wind, true); + reader.get("particles-enabled", particles_enabled, true); set_group(COLGROUP_TOUCHABLE); } @@ -73,8 +77,6 @@ Wind::get_settings() ObjectSettings result = MovingObject::get_settings(); - //result.add_float("width", &new_size.x, "width", OPTION_HIDDEN); - //result.add_float("height", &new_size.y, "height", OPTION_HIDDEN); result.add_float(_("Speed X"), &speed.x, "speed-x"); result.add_float(_("Speed Y"), &speed.y, "speed-y"); result.add_float(_("Acceleration"), &acceleration, "acceleration"); @@ -82,9 +84,10 @@ Wind::get_settings() result.add_bool(_("Affects Badguys"), &affects_badguys, "affects-badguys", false); result.add_bool(_("Affects Objects"), &affects_objects, "affects-objects", false); result.add_bool(_("Affects Player"), &affects_player, "affects-player"); - result.add_bool(_("Fancy Particles"), &fancy_wind, "fancy-wind", false); + result.add_bool(_("Fancy Particles"), &fancy_wind, "fancy-wind", true); + result.add_bool(_("Particles Enabled"), &particles_enabled, "particles-enabled", true); - result.reorder({"blowing", "speed-x", "speed-y", "acceleration", "affects-badguys", "affects-objects", "affects-player", "fancy-wind", "region", "name", "x", "y"}); + result.reorder({ "blowing", "speed-x", "speed-y", "acceleration", "affects-badguys", "affects-objects", "affects-player", "fancy-wind", "particles-enabled", "region", "name", "x", "y" }); return result; } @@ -94,17 +97,17 @@ Wind::update(float dt_sec_) { dt_sec = dt_sec_; - if (!blowing) return; + if (!blowing || !particles_enabled) return; if (m_col.m_bbox.get_width() <= 16 || m_col.m_bbox.get_height() <= 16) return; - Vector ppos = Vector(graphicsRandom.randf(m_col.m_bbox.get_left()+8, m_col.m_bbox.get_right()-8), graphicsRandom.randf(m_col.m_bbox.get_top()+8, m_col.m_bbox.get_bottom()-8)); - Vector pspeed = Vector(graphicsRandom.randf(speed.x-20, speed.x+20), graphicsRandom.randf(speed.y-20, speed.y+20)); + Vector ppos = Vector(graphicsRandom.randf(m_col.m_bbox.get_left() + 8, m_col.m_bbox.get_right() - 8), graphicsRandom.randf(m_col.m_bbox.get_top() + 8, m_col.m_bbox.get_bottom() - 8)); + Vector pspeed = Vector(graphicsRandom.randf(speed.x - 20, speed.x + 20), graphicsRandom.randf(speed.y - 20, speed.y + 20)); // TODO: Rotate sprite rather than just use 2 different actions // Approx. 1 particle per tile if (graphicsRandom.randf(0.f, 100.f) < (m_col.m_bbox.get_width() / 32.f) * (m_col.m_bbox.get_height() / 32.f)) { - // emit a particle + // Emit a particle if (fancy_wind) { Sector::get().add("images/particles/wind.sprite", (std::abs(speed.x) > std::abs(speed.y)) ? "default" : "flip", ppos, ANCHOR_MIDDLE, pspeed, Vector(0, 0), LAYER_BACKGROUNDTILES + 1); @@ -146,7 +149,7 @@ Wind::collision(GameObject& other, const CollisionHit& ) } else { - //When on ground, get blown slightly differently, but the max speed is less than it would be otherwise seen as we take "friction" into account + // When on ground, get blown slightly differently, but the max speed is less than it would be otherwise seen as we take "friction" into account player->add_velocity((Vector(speed.x, 0) * 0.1f) * (acceleration+1), (Vector(speed.x, speed.y) * 0.5f)); } } @@ -186,4 +189,14 @@ Wind::on_flip(float height) speed.y = -speed.y; } + +void +Wind::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Wind", vm.findClass("MovingObject")); + + cls.addFunc("start", &Wind::start); + cls.addFunc("stop", &Wind::stop); +} + /* EOF */ diff --git a/src/object/wind.hpp b/src/object/wind.hpp index f9bdde1df96..787850a70cb 100644 --- a/src/object/wind.hpp +++ b/src/object/wind.hpp @@ -17,8 +17,6 @@ #ifndef HEADER_SUPERTUX_OBJECT_WIND_HPP #define HEADER_SUPERTUX_OBJECT_WIND_HPP -#include "squirrel/exposed_object.hpp" -#include "scripting/wind.hpp" #include "supertux/moving_object.hpp" #include "video/layer.hpp" @@ -26,10 +24,11 @@ class ReaderMapping; /** Defines an area that will gently push Players in one direction */ -class Wind final : - public MovingObject, - public ExposedObject +class Wind final : public MovingObject { +public: + static void register_class(ssq::VM& vm); + public: Wind(const ReaderMapping& reader); @@ -40,8 +39,10 @@ class Wind final : virtual bool has_variable_size() const override { return true; } static std::string class_name() { return "wind"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "Wind"; } static std::string display_name() { return _("Wind"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(Wind)); } virtual ObjectSettings get_settings() override; @@ -49,17 +50,15 @@ class Wind final : virtual void on_flip(float height) override; - /** @name Scriptable Methods - @{ */ - - /** start blowing */ + /** + * Starts blowing. + */ void start(); - - /** stop blowing */ + /** + * Stops blowing. + */ void stop(); - /** @} */ - private: bool blowing; /**< true if wind is currently switched on */ Vector speed; @@ -72,6 +71,7 @@ class Wind final : bool affects_objects; /**< whether the wind can affect objects */ bool affects_player; /**< whether the wind can affect the player: useful for cinematic wind */ bool fancy_wind; + bool particles_enabled; private: Wind(const Wind&) = delete; diff --git a/src/scripting/ambient_sound.cpp b/src/scripting/ambient_sound.cpp deleted file mode 100644 index 98722887c14..00000000000 --- a/src/scripting/ambient_sound.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/ambient_sound.hpp" - -#include "object/ambient_sound.hpp" - -namespace scripting { - -void -AmbientSound::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_pos(x, y); -} - -float -AmbientSound::get_pos_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos_x(); -} - -float -AmbientSound::get_pos_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos_y(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/ambient_sound.hpp b/src/scripting/ambient_sound.hpp deleted file mode 100644 index cfde50c5b4d..00000000000 --- a/src/scripting/ambient_sound.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_AMBIENT_SOUND_HPP -#define HEADER_SUPERTUX_SCRIPTING_AMBIENT_SOUND_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class AmbientSound; -#endif - -namespace scripting { - -/** - * @summary An ""AmbientSound"" that was given a name can be controlled by scripts. - * @instances An ""AmbientSound"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class AmbientSound final -#ifndef SCRIPTING_API - : public GameObject<::AmbientSound> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - AmbientSound(const AmbientSound&) = delete; - AmbientSound& operator=(const AmbientSound&) = delete; -#endif - -public: - /** - * Sets the position of the ambient sound. - * @param float $x - * @param float $y - */ - void set_pos(float x, float y); - /** - * Returns the ambient sound's X coordinate. - */ - float get_pos_x() const; - /** - * Returns the ambient sound's Y coordinate. - */ - float get_pos_y() const; -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/anchor_points.hpp b/src/scripting/anchor_points.hpp deleted file mode 100644 index a7f31780e6c..00000000000 --- a/src/scripting/anchor_points.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_ANCHOR_POINTS_HPP -#define HEADER_SUPERTUX_SCRIPTING_ANCHOR_POINTS_HPP - -namespace scripting { - -#ifdef DOXYGEN_SCRIPTING -/** - * @summary This module contains global anchor constants. - */ -class AnchorPoints -{ -public: -#endif - -// TODO get these from the definitions in anchor.h (needs miniswig update) -static const int ANCHOR_TOP_LEFT = 0; /**< Top-left anchor point. */ -static const int ANCHOR_TOP = 1; /**< Top anchor point. */ -static const int ANCHOR_TOP_RIGHT = 2; /**< Top-right anchor point. */ -static const int ANCHOR_LEFT = 3; /**< Left anchor point. */ -static const int ANCHOR_MIDDLE = 4; /**< Middle anchor point. */ -static const int ANCHOR_RIGHT = 5; /**< Right anchor point. */ -static const int ANCHOR_BOTTOM_LEFT = 6; /**< Bottom-left anchor point. */ -static const int ANCHOR_BOTTOM = 7; /**< Bottom anchor point. */ -static const int ANCHOR_BOTTOM_RIGHT = 8; /**< Bottom-right anchor point. */ - -#ifdef DOXYGEN_SCRIPTING -} -#endif - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/background.cpp b/src/scripting/background.cpp deleted file mode 100644 index 62b89f9206c..00000000000 --- a/src/scripting/background.cpp +++ /dev/null @@ -1,125 +0,0 @@ -// SuperTux -// Copyright (C) 2016 Hume2 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/background.hpp" - -#include - -#include "object/background.hpp" - -namespace scripting { - -void -Background::set_image(const std::string& image) -{ - SCRIPT_GUARD_VOID; - - if (image.empty()) - { - log_info << "No filename / path for background image specified" << std::endl; - return; - } - - const std::string& default_dir = "images/background/"; - bool path_valid = true; - - if (!PHYSFS_exists(image.c_str())) - path_valid = false; - - object.set_image(path_valid ? image : default_dir + image); -} - -void -Background::set_images(const std::string& top_image, const std::string& middle_image, - const std::string& bottom_image) -{ - SCRIPT_GUARD_VOID; - - if (top_image.empty() || middle_image.empty() || bottom_image.empty()) - { - log_info << "No filename / path for background image specified" << std::endl; - return; - } - - const std::string& default_dir = "images/background/"; - bool top_image_valid = true, middle_image_valid = true, bottom_image_valid = true; - - if (!PHYSFS_exists(top_image.c_str())) - top_image_valid = false; - - if (!PHYSFS_exists(middle_image.c_str())) - middle_image_valid = false; - - if (!PHYSFS_exists(bottom_image.c_str())) - bottom_image_valid = false; - - object.set_images(top_image_valid ? top_image : default_dir + top_image, - middle_image_valid ? middle_image : default_dir + middle_image, - bottom_image_valid ? bottom_image : default_dir + bottom_image); -} - -void -Background::set_speed(float speed) -{ - SCRIPT_GUARD_VOID; - object.set_speed(speed); -} - -float -Background::get_color_red() -{ - SCRIPT_GUARD_RETURN(-1.f); - return object.get_color().red; -} - -float -Background::get_color_green() -{ - SCRIPT_GUARD_RETURN(-1.f); - return object.get_color().green; -} - -float -Background::get_color_blue() -{ - SCRIPT_GUARD_RETURN(-1.f); - return object.get_color().blue; -} - -float -Background::get_color_alpha() -{ - SCRIPT_GUARD_RETURN(-1.f); - return object.get_color().alpha; -} - -void -Background::set_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - object.set_color(Color(red, green, blue, alpha)); -} - -void -Background::fade_color(float red, float green, float blue, float alpha, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_color(Color(red, green, blue, alpha), time); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/background.hpp b/src/scripting/background.hpp deleted file mode 100644 index b1c868c415a..00000000000 --- a/src/scripting/background.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// SuperTux - Sector scripting -// Copyright (C) 2016 Hume2 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_BACKGROUND_HPP -#define HEADER_SUPERTUX_SCRIPTING_BACKGROUND_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class Background; -#endif - -namespace scripting { - -/** - * @summary A ""Background"" that was given a name can be manipulated by scripts. - * @instances A ""Background"" can be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Background final -#ifndef SCRIPTING_API - : public GameObject<::Background> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Background(const Background&) = delete; - Background& operator=(const Background&) = delete; -#endif - -public: - /** - * Sets the background's image. - * @param string $image - */ - void set_image(const std::string& image); - /** - * Sets the top, middle and bottom background images. - * @param string $top_image - * @param string $middle_image - * @param string $bottom_image - */ - void set_images(const std::string& top_image, const std::string& middle_image, - const std::string& bottom_image); - /** - * Sets the background speed. - * @param float $speed - */ - void set_speed(float speed); - - /** - * Returns the red color value. - */ - float get_color_red(); - /** - * Returns the green color value. - */ - float get_color_green(); - /** - * Returns the blue color value. - */ - float get_color_blue(); - /** - * Returns the alpha color value. - */ - float get_color_alpha(); - /** - * Sets the background color. - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - */ - void set_color(float red, float green, float blue, float alpha); - /** - * Fades to specified background color in ""time"" seconds. - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - * @param float $time - */ - void fade_color(float red, float green, float blue, float alpha, float time); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/badguy.cpp b/src/scripting/badguy.cpp deleted file mode 100644 index 68a872a0c78..00000000000 --- a/src/scripting/badguy.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// SuperTux -// Copyright (C) 2020 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/badguy.hpp" - -#include - -#include "badguy/badguy.hpp" - -namespace scripting { - -void -BadGuy::kill() -{ - SCRIPT_GUARD_VOID; - object.kill_fall(); -} - -void -BadGuy::ignite() -{ - SCRIPT_GUARD_VOID; - if(!object.is_flammable() || object.is_ignited()) - { - return; - } - - object.ignite(); -} - -void -BadGuy::set_action(const std::string& action, int loops) -{ - SCRIPT_GUARD_VOID; - object.set_action(action, loops); -} - -void -BadGuy::set_sprite(const std::string& sprite) -{ - SCRIPT_GUARD_VOID; - object.change_sprite(sprite); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/badguy.hpp b/src/scripting/badguy.hpp deleted file mode 100644 index c33a0a7b197..00000000000 --- a/src/scripting/badguy.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// SuperTux - Sector scripting -// Copyright (C) 2020 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_BADGUY_HPP -#define HEADER_SUPERTUX_SCRIPTING_BADGUY_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class BadGuy; -#endif - -namespace scripting { - -/** - * @summary A ""BadGuy"" that was given a name can be controlled by scripts. - * @instances A ""BadGuy"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class BadGuy -#ifndef SCRIPTING_API - : virtual public GameObject<::BadGuy> -#endif -{ -#ifndef SCRIPTING_API -public: - BadGuy(const ::GameObject& object) : - GameObject<::BadGuy>(object) - {} - -private: - BadGuy(const BadGuy&) = delete; - BadGuy& operator=(const BadGuy&) = delete; -#endif - -public: - /** - * Kills the badguy. - */ - void kill(); - /** - * Kills the badguy by igniting it. - */ - void ignite(); - /** - * Sets the badguy's sprite action. - * @param string $action The sprite action name. - * @param int $loops The amount of loops the action should repeat for. - */ - void set_action(const std::string& action, int loops); - /** - * Sets the badguy's sprite. - * @param string $sprite - */ - void set_sprite(const std::string& sprite); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/camera.cpp b/src/scripting/camera.cpp deleted file mode 100644 index 1244b200aa8..00000000000 --- a/src/scripting/camera.cpp +++ /dev/null @@ -1,176 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/camera.hpp" - -#include "scripting/camera.hpp" -#include "supertux/sector.hpp" -#include "util/dynamic_scoped_ref.hpp" -#include "util/log.hpp" - -namespace scripting { - -void -Camera::shake(float duration, float x, float y) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.shake(duration, x, y); -} - -void -Camera::start_earthquake(float strength, float delay) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.start_earthquake(strength, delay); -} - -void -Camera::stop_earthquake() -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.stop_earthquake(); -} - -void -Camera::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.scroll_to(Vector(x, y), 0.0f); -} - -void -Camera::move(float x, float y) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.scroll_to(Vector(object.get_position().x + x,object.get_position().y + y), 0.0f); -} - -void -Camera::set_mode(const std::string& mode) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - - if (mode == "normal") { - object.set_mode(::Camera::Mode::NORMAL); - } else if (mode == "manual") { - object.set_mode(::Camera::Mode::MANUAL); - } else { - log_fatal << "Camera mode '" << mode << "' unknown."; - } -} - -void -Camera::scroll_to(float x, float y, float scrolltime) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.scroll_to(Vector(x, y), scrolltime); -} - -float -Camera::get_current_scale() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_current_scale(); -} - -float -Camera::get_target_scale() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_target_scale(); -} - -void -Camera::set_scale(float scale) -{ - ease_scale(scale, 0, ""); -} - -void -Camera::set_scale_anchor(float scale, int anchor) -{ - ease_scale_anchor(scale, 0, anchor, ""); -} - -void -Camera::scale(float scale, float time) -{ - ease_scale(scale, time, ""); -} - -void -Camera::scale_anchor(float scale, float time, int anchor) -{ - ease_scale_anchor(scale, time, anchor, ""); -} - -void -Camera::ease_scale(float scale, float time, const std::string& ease) -{ - ease_scale_anchor(scale, time, AnchorPoint::ANCHOR_MIDDLE, ease); -} - -void -Camera::ease_scale_anchor(float scale, float time, int anchor, const std::string& ease) -{ - SCRIPT_GUARD_VOID; - BIND_SECTOR(::Sector::get()); - object.ease_scale(scale, time, getEasingByName(EasingMode_from_string(ease)), static_cast(anchor)); -} - -float -Camera::get_screen_width() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_screen_size().width; -} - -float -Camera::get_screen_height() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_screen_size().height; -} - -float -Camera::get_x() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_position().x; -} - -float -Camera::get_y() -{ - SCRIPT_GUARD_DEFAULT; - BIND_SECTOR(::Sector::get()); - return object.get_position().y; -} -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/camera.hpp b/src/scripting/camera.hpp deleted file mode 100644 index ab0555549e7..00000000000 --- a/src/scripting/camera.hpp +++ /dev/null @@ -1,162 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_CAMERA_HPP -#define HEADER_SUPERTUX_SCRIPTING_CAMERA_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Camera; -#endif - -namespace scripting { - -/** - * @summary A ""Camera"" that was given a name can be manipulated by scripts. - * @instances An instance named ""Camera"" (""sector.Camera"" in the console) is available.${SRG_NEWPARAGRAPH} - The mode of the camera is either normal (the camera is following the player) or autoscroll. In the latter mode the camera is forced along a specified ${SRG_REF_Path}. - */ -class Camera final -#ifndef SCRIPTING_API - : public GameObject<::Camera> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Camera(const Camera&) = delete; - Camera& operator=(const Camera&) = delete; -#endif - -public: - /** - * Shakes the camera in a certain direction only 1 time. - * @param float $duration - * @param float $x - * @param float $y - */ - void shake(float duration, float x, float y); - /** - * Starts "earthquake" mode, which shakes the camera vertically with a specified average ""strength"", at a certain minimal ""delay"", until stopped. - * @param float $strength - * @param float $delay - */ - void start_earthquake(float strength, float delay); - /** - * Stops "earthquake" mode. - */ - void stop_earthquake(); - /** - * Moves the camera to the specified absolute position. The origin is at the top left. - * @param float $x - * @param float $y - */ - void set_pos(float x, float y); - /** - * Moves the camera ""x"" to the left and ""y"" down. - * @param float $x - * @param float $y - */ - void move(float x, float y); - /** - * Sets the camera mode. - * @param string $mode The mode can be "normal" or "manual". - */ - void set_mode(const std::string& mode); - /** - * Scrolls the camera to specific coordinates in ""scrolltime"" seconds. - * @param float $x - * @param float $y - * @param float $scrolltime - */ - void scroll_to(float x, float y, float scrolltime); - /** - * Returns the current scale factor of the camera. - */ - float get_current_scale(); - /** - * Returns the scale factor the camera is fading towards. - */ - float get_target_scale(); - /** - * Sets the scale factor. - * @param float $scale - */ - void set_scale(float scale); - /** - * Sets the scale factor and the target position anchor. - NOTE: Target position anchor is only applied, if the camera is in "manual" mode. - * @param float $scale - * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). - */ - void set_scale_anchor(float scale, int anchor); - /** - * Fades to a specified scale factor in ""time"" seconds. - * @param float $scale - * @param float $time - */ - void scale(float scale, float time); - /** - * Fades to a specified scale factor and target position anchor in ""time"" seconds. - NOTE: Target position anchor is only applied, if the camera is in "manual" mode. - * @param float $scale - * @param float $time - * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). - */ - void scale_anchor(float scale, float time, int anchor); - /** - * Fades to a specified scale factor in ""time"" seconds with easing (smooth movement). - * @param float $scale - * @param float $time - * @param string $ease - */ - void ease_scale(float scale, float time, const std::string& ease); - /** - * Fades to a specified scale factor and target position anchor in ""time"" seconds with easing (smooth movement). - NOTE: Target position anchor is only applied, if the camera is in "manual" mode. - * @param float $scale - * @param float $time - * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). - * @param string $ease - */ - void ease_scale_anchor(float scale, float time, int anchor, const std::string& ease); - /** - * Gets the current width of the screen. - */ - float get_screen_width(); - /** - * Gets the current height of the screen. - */ - float get_screen_height(); - /** - * Gets the X coordinate of the top-left corner of the screen. - */ - float get_x(); - /** - * Gets the Y coordinate of the top-left corner of the screen. - */ - float get_y(); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/candle.cpp b/src/scripting/candle.cpp deleted file mode 100644 index 6eef051d723..00000000000 --- a/src/scripting/candle.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/candle.hpp" -#include "scripting/candle.hpp" - -namespace scripting { - -bool -Candle::get_burning() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_burning(); -} - -void Candle::set_burning(bool burning) -{ - SCRIPT_GUARD_VOID; - object.set_burning(burning); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/candle.hpp b/src/scripting/candle.hpp deleted file mode 100644 index db565baaecc..00000000000 --- a/src/scripting/candle.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_CANDLE_HPP -#define HEADER_SUPERTUX_SCRIPTING_CANDLE_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Candle; -#endif - -namespace scripting { - -/** - * @summary A ""Candle"" that was given a name can be controlled by scripts. - * @instances A ""Candle"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Candle final -#ifndef SCRIPTING_API - : public GameObject<::Candle> -#endif -{ -public: -#ifndef SCRIPTING_API - using GameObject::GameObject; - -private: - Candle(const Candle&) = delete; - Candle& operator=(const Candle&) = delete; -#endif - -public: - /** - * Returns ""true"" if the candle is lit up. - */ - bool get_burning() const; - /** - * Sets the burning state of the candle. - * @param bool $burning If ""true"", the candle is lit up. If ""false"", it's extinguished. - */ - void set_burning(bool burning); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/clouds.cpp b/src/scripting/clouds.cpp deleted file mode 100644 index 167c7e32b7f..00000000000 --- a/src/scripting/clouds.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// SuperTux -// Copyright (C) 2020 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/cloud_particle_system.hpp" -#include "scripting/clouds.hpp" - -namespace scripting { - -void Clouds::set_enabled(bool enable) -{ - SCRIPT_GUARD_VOID; - object.set_enabled(enable); -} - -bool Clouds::get_enabled() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_enabled(); -} - -void Clouds::fade_speed(float speed, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_speed(speed, time); -} - -void Clouds::fade_amount(int amount, float time, float time_between) -{ - SCRIPT_GUARD_VOID; - object.fade_amount(amount, time, time_between); -} - -void Clouds::set_amount(int amount, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_amount(amount, time); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/clouds.hpp b/src/scripting/clouds.hpp deleted file mode 100644 index 56c8480ed0c..00000000000 --- a/src/scripting/clouds.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// SuperTux -// Copyright (C) 2020 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_CLOUDS_HPP -#define HEADER_SUPERTUX_SCRIPTING_CLOUDS_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class CloudParticleSystem; -#endif - -namespace scripting { - -/** - * @summary A ""CloudParticleSystem"" that was given a name can be controlled by scripts. - * @instances A ""CloudParticleSystem"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Clouds final -#ifndef SCRIPTING_API - : public GameObject<::CloudParticleSystem> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Clouds(const Clouds&) = delete; - Clouds& operator=(const Clouds&) = delete; -#endif - -public: - /** - * Enables/disables the system. - * @param bool $enable - */ - void set_enabled(bool enable); - /** - * Returns ""true"" if the system is enabled. - */ - bool get_enabled() const; - - /** - * Smoothly changes the rain speed to the given value in ""time"" seconds. - * @param float $speed - * @param float $time - */ - void fade_speed(float speed, float time); - - /** - * Smoothly changes the amount of particles to the given value in ""time"" seconds. - * @param int $amount - * @param float $time - * @param float $time_between - */ - void fade_amount(int amount, float time, float time_between); - - /** - * Smoothly changes the amount of particles to the given value in ""time"" seconds. - * @param int $amount - * @param float $time - */ - void set_amount(int amount, float time); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/conveyor_belt.cpp b/src/scripting/conveyor_belt.cpp deleted file mode 100644 index 9ef69806e51..00000000000 --- a/src/scripting/conveyor_belt.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// SuperTux -// Copyright (C) 2022 Raoul1808 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/conveyor_belt.hpp" -#include "scripting/conveyor_belt.hpp" - -namespace scripting -{ - -void -ConveyorBelt::start() -{ - SCRIPT_GUARD_VOID; - object.start(); -} - -void -ConveyorBelt::stop() -{ - SCRIPT_GUARD_VOID; - object.stop(); -} - -void -ConveyorBelt::move_left() -{ - SCRIPT_GUARD_VOID; - object.move_left(); -} - -void -ConveyorBelt::move_right() -{ - SCRIPT_GUARD_VOID; - object.move_right(); -} - -void -ConveyorBelt::set_speed(float target_speed) -{ - SCRIPT_GUARD_VOID; - object.set_speed(target_speed); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/conveyor_belt.hpp b/src/scripting/conveyor_belt.hpp deleted file mode 100644 index eb6338ec57f..00000000000 --- a/src/scripting/conveyor_belt.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// SuperTux -// Copyright (C) 2022 Raoul1808 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_CONVEYOR_BELT_HPP -#define HEADER_SUPERTUX_SCRIPTING_CONVEYOR_BELT_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class ConveyorBelt; -#endif - -namespace scripting -{ - -/** - * @summary A ""ConveyorBelt"" that was given a name can be controlled by scripts. - * @instances A ""ConveyorBelt"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class ConveyorBelt final -#ifndef SCRIPTING_API - : public GameObject<::ConveyorBelt> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - ConveyorBelt(const ConveyorBelt&) = delete; - ConveyorBelt& operator=(const ConveyorBelt&) = delete; -#endif - -public: - /** - * Starts the conveyor belt. - */ - void start(); - - /** - * Stops the conveyor belt. - */ - void stop(); - - /** - * Makes the conveyor shift objects to the left. - */ - void move_left(); - - /** - * Makes the conveyor shift objects to the right. - */ - void move_right(); - - /** - * Change the shifting speed of the conveyor. - * @param float $target_speed - */ - void set_speed(float target_speed); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/custom_particles.cpp b/src/scripting/custom_particles.cpp deleted file mode 100644 index 5507c02b411..00000000000 --- a/src/scripting/custom_particles.cpp +++ /dev/null @@ -1,925 +0,0 @@ -// SuperTux -// Copyright (C) 2020 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/custom_particle_system.hpp" -#include "scripting/custom_particles.hpp" - -namespace scripting { - -void CustomParticles::set_enabled(bool enable) -{ - SCRIPT_GUARD_VOID; - object.set_enabled(enable); -} - -bool CustomParticles::get_enabled() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_enabled(); -} - -void CustomParticles::clear() -{ - SCRIPT_GUARD_VOID; - object.clear(); -} - -void CustomParticles::spawn_particles(int amount, bool instantly) -{ - SCRIPT_GUARD_VOID; - if (instantly) - { - for (int i = 0; i < amount; i++) - { - object.spawn_particles(0.f); - } - } - else - { - // TODO: Implement delayed spawn mode for scripting. - log_warning << "Delayed spawn mode is not yet implemented for scripting." << std::endl; - } -} - -// ============================================================================= -// ============================ ATTRIBUTES ================================= -// ============================================================================= - -int CustomParticles::get_max_amount() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_max_amount; -} - -void CustomParticles::set_max_amount(int amount) -{ - SCRIPT_GUARD_VOID; - object.m_max_amount = amount; -} - -bool CustomParticles::get_cover_screen() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_cover_screen; -} - -void CustomParticles::set_cover_screen(bool cover) -{ - SCRIPT_GUARD_VOID; - object.m_cover_screen = cover; -} - -std::string CustomParticles::get_birth_mode() -{ - SCRIPT_GUARD_DEFAULT; - switch (object.m_particle_birth_mode) - { - case CustomParticleSystem::FadeMode::None: - return "None"; - - case CustomParticleSystem::FadeMode::Fade: - return "Fade"; - - case CustomParticleSystem::FadeMode::Shrink: - return "Shrink"; - - default: - return ""; - } -} - -void CustomParticles::set_birth_mode(std::string mode) -{ - SCRIPT_GUARD_VOID; - if (mode == "None") - { - object.m_particle_birth_mode = CustomParticleSystem::FadeMode::None; - } - else if (mode == "Fade") - { - object.m_particle_birth_mode = CustomParticleSystem::FadeMode::Fade; - } - else if (mode == "Shrink") - { - object.m_particle_birth_mode = CustomParticleSystem::FadeMode::Shrink; - } - else - { - log_warning << "Invalid option " + mode + "; valid options are: None, Fade, Shrink." << std::endl; - } -} - -std::string CustomParticles::get_death_mode() -{ - SCRIPT_GUARD_DEFAULT; - switch (object.m_particle_death_mode) - { - case CustomParticleSystem::FadeMode::None: - return "None"; - - case CustomParticleSystem::FadeMode::Fade: - return "Fade"; - - case CustomParticleSystem::FadeMode::Shrink: - return "Shrink"; - - default: - return ""; - } -} - -void CustomParticles::set_death_mode(std::string mode) -{ - SCRIPT_GUARD_VOID; - if (mode == "None") - { - object.m_particle_death_mode = CustomParticleSystem::FadeMode::None; - } - else if (mode == "Fade") - { - object.m_particle_death_mode = CustomParticleSystem::FadeMode::Fade; - } - else if (mode == "Shrink") - { - object.m_particle_death_mode = CustomParticleSystem::FadeMode::Shrink; - } - else - { - log_warning << "Invalid option " + mode + "; valid options are: None, Fade, Shrink." << std::endl; - } -} - -std::string CustomParticles::get_rotation_mode() -{ - SCRIPT_GUARD_DEFAULT; - switch (object.m_particle_rotation_mode) - { - case CustomParticleSystem::RotationMode::Fixed: - return "Fixed"; - - case CustomParticleSystem::RotationMode::Facing: - return "Facing"; - - case CustomParticleSystem::RotationMode::Wiggling: - return "Wiggling"; - - default: - return ""; - } -} - -void CustomParticles::set_rotation_mode(std::string mode) -{ - SCRIPT_GUARD_VOID; - if (mode == "Fixed") - { - object.m_particle_rotation_mode = CustomParticleSystem::RotationMode::Fixed; - } - else if (mode == "Facing") - { - object.m_particle_rotation_mode = CustomParticleSystem::RotationMode::Facing; - } - else if (mode == "Wiggling") - { - object.m_particle_rotation_mode = CustomParticleSystem::RotationMode::Wiggling; - } - else - { - log_warning << "Invalid option " + mode + "; valid options are: Fixed, Facing, Wiggling." << std::endl; - } -} - -std::string CustomParticles::get_collision_mode() -{ - SCRIPT_GUARD_DEFAULT; - switch (object.m_particle_collision_mode) - { - case CustomParticleSystem::CollisionMode::Ignore: - return "Ignore"; - - case CustomParticleSystem::CollisionMode::Stick: - return "Stick"; - - case CustomParticleSystem::CollisionMode::StickForever: - return "StickForever"; - - case CustomParticleSystem::CollisionMode::BounceHeavy: - return "BounceHeavy"; - - case CustomParticleSystem::CollisionMode::BounceLight: - return "BounceLight"; - - case CustomParticleSystem::CollisionMode::Destroy: - return "Destroy"; - - default: - return ""; - } -} - -void CustomParticles::set_collision_mode(std::string mode) -{ - SCRIPT_GUARD_VOID; - if (mode == "Ignore") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::Ignore; - } - else if (mode == "Stick") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::Stick; - } - else if (mode == "StickForever") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::StickForever; - } - else if (mode == "BounceHeavy") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::BounceHeavy; - } - else if (mode == "BounceLight") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::BounceLight; - } - else if (mode == "Destroy") - { - object.m_particle_collision_mode = CustomParticleSystem::CollisionMode::Destroy; - } - else - { - log_warning << "Invalid option " + mode + "; valid options are: Ignore, Stick, StickForever, BounceHeavy, BounceLight, Destroy." << std::endl; - } -} - -std::string CustomParticles::get_offscreen_mode() -{ - SCRIPT_GUARD_DEFAULT; - switch (object.m_particle_offscreen_mode) - { - case CustomParticleSystem::OffscreenMode::Never: - return "Never"; - - case CustomParticleSystem::OffscreenMode::OnlyOnExit: - return "OnlyOnExit"; - - case CustomParticleSystem::OffscreenMode::Always: - return "Always"; - - default: - return ""; - } -} - -void CustomParticles::set_offscreen_mode(std::string mode) -{ - SCRIPT_GUARD_VOID; - if (mode == "Never") - { - object.m_particle_offscreen_mode = CustomParticleSystem::OffscreenMode::Never; - } - else if (mode == "OnlyOnExit") - { - object.m_particle_offscreen_mode = CustomParticleSystem::OffscreenMode::OnlyOnExit; - } - else if (mode == "Always") - { - object.m_particle_offscreen_mode = CustomParticleSystem::OffscreenMode::Always; - } - else - { - log_warning << "Invalid option " + mode + "; valid options are: Never, OnlyOnExit, Always." << std::endl; - } -} - -// ============================================================================= -// Delay -// ----------------------------------------------------------------------------- - -float CustomParticles::get_delay() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_delay; -} - -void CustomParticles::set_delay(float delay) -{ - SCRIPT_GUARD_VOID; - object.m_delay = delay; -} - -void CustomParticles::fade_delay(float delay, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_delay, delay, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_delay(float delay, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_delay, delay, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Lifetime -// ----------------------------------------------------------------------------- - -float CustomParticles::get_lifetime() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_lifetime; -} - -void CustomParticles::set_lifetime(float lifetime) -{ - SCRIPT_GUARD_VOID; - object.m_particle_lifetime = lifetime; -} - -void CustomParticles::fade_lifetime(float lifetime, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_lifetime, lifetime, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_lifetime(float lifetime, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_lifetime, lifetime, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Lifetime variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_lifetime_variation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_lifetime_variation; -} - -void CustomParticles::set_lifetime_variation(float lifetime_variation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_lifetime_variation = lifetime_variation; -} - -void CustomParticles::fade_lifetime_variation(float lifetime_variation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_lifetime_variation, lifetime_variation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_lifetime_variation(float lifetime_variation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_lifetime_variation, lifetime_variation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Birth time -// ----------------------------------------------------------------------------- - -float CustomParticles::get_birth_time() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_birth_time; -} - -void CustomParticles::set_birth_time(float birth_time) -{ - SCRIPT_GUARD_VOID; - object.m_particle_birth_time = birth_time; -} - -void CustomParticles::fade_birth_time(float birth_time, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_birth_time, birth_time, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_birth_time(float birth_time, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_birth_time, birth_time, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Birth time variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_birth_time_variation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_birth_time_variation; -} - -void CustomParticles::set_birth_time_variation(float birth_time_variation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_birth_time_variation = birth_time_variation; -} - -void CustomParticles::fade_birth_time_variation(float birth_time_variation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_birth_time_variation, birth_time_variation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_birth_time_variation(float birth_time_variation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_birth_time_variation, birth_time_variation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Death time -// ----------------------------------------------------------------------------- - -float CustomParticles::get_death_time() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_death_time; -} - -void CustomParticles::set_death_time(float death_time) -{ - SCRIPT_GUARD_VOID; - object.m_particle_death_time = death_time; -} - -void CustomParticles::fade_death_time(float death_time, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_death_time, death_time, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_death_time(float death_time, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_death_time, death_time, time, getEasingByName(EasingMode_from_string(easing))); -} - - - -// ============================================================================= -// Death time variation -// ----------------------------------------------------------------------------- -float CustomParticles::get_death_time_variation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_death_time_variation; -} - -void CustomParticles::set_death_time_variation(float death_time_variation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_death_time_variation = death_time_variation; -} - -void CustomParticles::fade_death_time_variation(float death_time_variation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_death_time_variation, death_time_variation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_death_time_variation(float death_time_variation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_death_time_variation, death_time_variation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// X speed -// ----------------------------------------------------------------------------- - -float CustomParticles::get_speed_x() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_speed_x; -} - -void CustomParticles::set_speed_x(float speed_x) -{ - SCRIPT_GUARD_VOID; - object.m_particle_speed_x = speed_x; -} - -void CustomParticles::fade_speed_x(float speed_x, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_x, speed_x, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_speed_x(float speed_x, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_x, speed_x, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Y speed -// ----------------------------------------------------------------------------- - -float CustomParticles::get_speed_y() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_speed_y; -} - -void CustomParticles::set_speed_y(float speed_y) -{ - SCRIPT_GUARD_VOID; - object.m_particle_speed_y = speed_y; -} - -void CustomParticles::fade_speed_y(float speed_y, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_y, speed_y, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_speed_y(float speed_y, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_y, speed_y, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// X speed variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_speed_variation_x() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_speed_variation_x; -} - -void CustomParticles::set_speed_variation_x(float speed_variation_x) -{ - SCRIPT_GUARD_VOID; - object.m_particle_speed_variation_x = speed_variation_x; -} - -void CustomParticles::fade_speed_variation_x(float speed_variation_x, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_variation_x, speed_variation_x, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_speed_variation_x(float speed_variation_x, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_variation_x, speed_variation_x, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Y speed variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_speed_variation_y() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_speed_variation_y; -} - -void CustomParticles::set_speed_variation_y(float speed_variation_y) -{ - SCRIPT_GUARD_VOID; - object.m_particle_speed_variation_y = speed_variation_y; -} - -void CustomParticles::fade_speed_variation_y(float speed_variation_y, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_variation_y, speed_variation_y, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_speed_variation_y(float speed_variation_y, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_speed_variation_y, speed_variation_y, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// X acceleration -// ----------------------------------------------------------------------------- - -float CustomParticles::get_acceleration_x() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_acceleration_x; -} - -void CustomParticles::set_acceleration_x(float acceleration_x) -{ - SCRIPT_GUARD_VOID; - object.m_particle_acceleration_x = acceleration_x; -} - -void CustomParticles::fade_acceleration_x(float acceleration_x, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_acceleration_x, acceleration_x, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_acceleration_x(float acceleration_x, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_acceleration_x, acceleration_x, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Y acceleration -// ----------------------------------------------------------------------------- - -float CustomParticles::get_acceleration_y() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_acceleration_y; -} - -void CustomParticles::set_acceleration_y(float acceleration_y) -{ - SCRIPT_GUARD_VOID; - object.m_particle_acceleration_y = acceleration_y; -} - -void CustomParticles::fade_acceleration_y(float acceleration_y, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_acceleration_y, acceleration_y, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_acceleration_y(float acceleration_y, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_acceleration_y, acceleration_y, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// X friction -// ----------------------------------------------------------------------------- - -float CustomParticles::get_friction_x() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_friction_x; -} - -void CustomParticles::set_friction_x(float friction_x) -{ - SCRIPT_GUARD_VOID; - object.m_particle_friction_x = friction_x; -} - -void CustomParticles::fade_friction_x(float friction_x, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_friction_x, friction_x, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_friction_x(float friction_x, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_friction_x, friction_x, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Y friction -// ----------------------------------------------------------------------------- - -float CustomParticles::get_friction_y() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_friction_y; -} - -void CustomParticles::set_friction_y(float friction_y) -{ - SCRIPT_GUARD_VOID; - object.m_particle_friction_y = friction_y; -} - -void CustomParticles::fade_friction_y(float friction_y, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_friction_y, friction_y, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_friction_y(float friction_y, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_friction_y, friction_y, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Feather factor -// ----------------------------------------------------------------------------- - -float CustomParticles::get_feather_factor() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_feather_factor; -} - -void CustomParticles::set_feather_factor(float feather_factor) -{ - SCRIPT_GUARD_VOID; - object.m_particle_feather_factor = feather_factor; -} - -void CustomParticles::fade_feather_factor(float feather_factor, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_feather_factor, feather_factor, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_feather_factor(float feather_factor, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_feather_factor, feather_factor, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation; -} - -void CustomParticles::set_rotation(float rotation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation = rotation; -} - -void CustomParticles::fade_rotation(float rotation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation, rotation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation(float rotation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation, rotation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation_variation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation_variation; -} - -void CustomParticles::set_rotation_variation(float rotation_variation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation_variation = rotation_variation; -} - -void CustomParticles::fade_rotation_variation(float rotation_variation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_variation, rotation_variation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation_variation(float rotation_variation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_variation, rotation_variation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation speed -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation_speed() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation_speed; -} - -void CustomParticles::set_rotation_speed(float rotation_speed) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation_speed = rotation_speed; -} - -void CustomParticles::fade_rotation_speed(float rotation_speed, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_speed, rotation_speed, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation_speed(float rotation_speed, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_speed, rotation_speed, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation speed variation -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation_speed_variation() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation_speed_variation; -} - -void CustomParticles::set_rotation_speed_variation(float rotation_speed_variation) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation_speed_variation = rotation_speed_variation; -} - -void CustomParticles::fade_rotation_speed_variation(float rotation_speed_variation, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_speed_variation, rotation_speed_variation, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation_speed_variation(float rotation_speed_variation, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_speed_variation, rotation_speed_variation, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation acceleration -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation_acceleration() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation_acceleration; -} - -void CustomParticles::set_rotation_acceleration(float rotation_acceleration) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation_acceleration = rotation_acceleration; -} - -void CustomParticles::fade_rotation_acceleration(float rotation_acceleration, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_acceleration, rotation_acceleration, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation_acceleration(float rotation_acceleration, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_acceleration, rotation_acceleration, time, getEasingByName(EasingMode_from_string(easing))); -} - -// ============================================================================= -// Rotation decceleration -// ----------------------------------------------------------------------------- - -float CustomParticles::get_rotation_decceleration() -{ - SCRIPT_GUARD_DEFAULT; - return object.m_particle_rotation_decceleration; -} - -void CustomParticles::set_rotation_decceleration(float rotation_decceleration) -{ - SCRIPT_GUARD_VOID; - object.m_particle_rotation_decceleration = rotation_decceleration; -} - -void CustomParticles::fade_rotation_decceleration(float rotation_decceleration, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_decceleration, rotation_decceleration, time, getEasingByName(EasingMode::EaseNone)); -} - -void CustomParticles::ease_rotation_decceleration(float rotation_decceleration, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_value(&object.m_particle_rotation_decceleration, rotation_decceleration, time, getEasingByName(EasingMode_from_string(easing))); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/custom_particles.hpp b/src/scripting/custom_particles.hpp deleted file mode 100644 index 640f95ee45c..00000000000 --- a/src/scripting/custom_particles.hpp +++ /dev/null @@ -1,493 +0,0 @@ -// SuperTux -// Copyright (C) 2020 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_CUSTOM_PARTICLES_HPP -#define HEADER_SUPERTUX_SCRIPTING_CUSTOM_PARTICLES_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class CustomParticleSystem; -#endif - -namespace scripting { - -/** - * @summary A ""CustomParticleSystem"" that was given a name can be controlled by scripts. - * @instances A ""CustomParticleSystem"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class CustomParticles final -#ifndef SCRIPTING_API - : public GameObject<::CustomParticleSystem> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - CustomParticles(const CustomParticles&) = delete; - CustomParticles& operator=(const CustomParticles&) = delete; -#endif - -public: - /** - * Enables/disables the system. - * @param bool $enable - */ - void set_enabled(bool enable); - /** - * Returns ""true"" if the system is enabled. - */ - bool get_enabled() const; - - /** - * Instantly removes all particles of that type on the screen - */ - void clear(); - - /** - * Spawns particles regardless of whether or not the particles are enabled. - * @param int $amount - * @param bool $instantly If ""true"", disregard the delay settings. - */ - void spawn_particles(int amount, bool instantly); - - - int get_max_amount(); - /** - * @param int $amount - */ - void set_max_amount(int amount); - - std::string get_birth_mode(); - /** - * @param string $mode - */ - void set_birth_mode(std::string mode); - - std::string get_death_mode(); - /** - * @param string $mode - */ - void set_death_mode(std::string mode); - - std::string get_rotation_mode(); - /** - * @param string $mode - */ - void set_rotation_mode(std::string mode); - - std::string get_collision_mode(); - /** - * @param string $mode - */ - void set_collision_mode(std::string mode); - - std::string get_offscreen_mode(); - /** - * @param string $mode - */ - void set_offscreen_mode(std::string mode); - - bool get_cover_screen(); - /** - * @param bool $cover - */ - void set_cover_screen(bool cover); - - float get_delay(); - /** - * @param float $delay - */ - void set_delay(float delay); - /** - * @param float $delay - * @param float $time - */ - void fade_delay(float delay, float time); - /** - * @param float $delay - * @param float $time - * @param string $easing - */ - void ease_delay(float delay, float time, std::string easing); - - float get_lifetime(); - /** - * @param float $lifetime - */ - void set_lifetime(float lifetime); - /** - * @param float $lifetime - * @param float $time - */ - void fade_lifetime(float lifetime, float time); - /** - * @param float $lifetime - * @param float $time - * @param string $easing - */ - void ease_lifetime(float lifetime, float time, std::string easing); - - float get_lifetime_variation(); - /** - * @param float $lifetime_variation - */ - void set_lifetime_variation(float lifetime_variation); - /** - * @param float $lifetime_variation - * @param float $time - */ - void fade_lifetime_variation(float lifetime_variation, float time); - /** - * @param float $lifetime_variation - * @param float $time - * @param string $easing - */ - void ease_lifetime_variation(float lifetime_variation, float time, std::string easing); - - float get_birth_time(); - /** - * @param float $birth_time - */ - void set_birth_time(float birth_time); - /** - * @param float $birth_time - * @param float $time - */ - void fade_birth_time(float birth_time, float time); - /** - * @param float $birth_time - * @param float $time - * @param string $easing - */ - void ease_birth_time(float birth_time, float time, std::string easing); - - float get_birth_time_variation(); - /** - * @param float $birth_time_variation - */ - void set_birth_time_variation(float birth_time_variation); - /** - * @param float $birth_time_variation - * @param float $time - */ - void fade_birth_time_variation(float birth_time_variation, float time); - /** - * @param float $birth_time_variation - * @param float $time - * @param string $easing - */ - void ease_birth_time_variation(float birth_time_variation, float time, std::string easing); - - float get_death_time(); - /** - * @param float $death_time - */ - void set_death_time(float death_time); - /** - * @param float $death_time - * @param float $time - */ - void fade_death_time(float death_time, float time); - /** - * @param float $death_time - * @param float $time - * @param string $easing - */ - void ease_death_time(float death_time, float time, std::string easing); - - float get_death_time_variation(); - /** - * @param float $death_time_variation - */ - void set_death_time_variation(float death_time_variation); - /** - * @param float $death_time_variation - * @param float $time - */ - void fade_death_time_variation(float death_time_variation, float time); - /** - * @param float $death_time_variation - * @param float $time - * @param string $easing - */ - void ease_death_time_variation(float death_time_variation, float time, std::string easing); - - float get_speed_x(); - /** - * @param float $speed_x - */ - void set_speed_x(float speed_x); - /** - * @param float $speed_x - * @param float $time - */ - void fade_speed_x(float speed_x, float time); - /** - * @param float $speed_x - * @param float $time - * @param string $easing - */ - void ease_speed_x(float speed_x, float time, std::string easing); - - float get_speed_y(); - /** - * @param float $speed_y - */ - void set_speed_y(float speed_y); - /** - * @param float $speed_y - * @param float $time - */ - void fade_speed_y(float speed_y, float time); - /** - * @param float $speed_y - * @param float $time - * @param string $easing - */ - void ease_speed_y(float speed_y, float time, std::string easing); - - float get_speed_variation_x(); - /** - * @param float $speed_variation_x - */ - void set_speed_variation_x(float speed_variation_x); - /** - * @param float $speed_variation_x - * @param float $time - */ - void fade_speed_variation_x(float speed_variation_x, float time); - /** - * @param float $speed_variation_x - * @param float $time - * @param string $easing - */ - void ease_speed_variation_x(float speed_variation_x, float time, std::string easing); - - float get_speed_variation_y(); - /** - * @param float $speed_variation_y - */ - void set_speed_variation_y(float speed_variation_y); - /** - * @param float $speed_variation_y - * @param float $time - */ - void fade_speed_variation_y(float speed_variation_y, float time); - /** - * @param float $speed_variation_y - * @param float $time - * @param string $easing - */ - void ease_speed_variation_y(float speed_variation_y, float time, std::string easing); - - float get_acceleration_x(); - /** - * @param float $acceleration_x - */ - void set_acceleration_x(float acceleration_x); - /** - * @param float $acceleration_x - * @param float $time - */ - void fade_acceleration_x(float acceleration_x, float time); - /** - * @param float $acceleration_x - * @param float $time - * @param string $easing - */ - void ease_acceleration_x(float acceleration_x, float time, std::string easing); - - float get_acceleration_y(); - /** - * @param float $acceleration_y - */ - void set_acceleration_y(float acceleration_y); - /** - * @param float $acceleration_y - * @param float $time - */ - void fade_acceleration_y(float acceleration_y, float time); - /** - * @param float $acceleration_y - * @param float $time - * @param string $easing - */ - void ease_acceleration_y(float acceleration_y, float time, std::string easing); - - float get_friction_x(); - /** - * @param float $friction_x - */ - void set_friction_x(float friction_x); - /** - * @param float $friction_x - * @param float $time - */ - void fade_friction_x(float friction_x, float time); - /** - * @param float $friction_x - * @param float $time - * @param string $easing - */ - void ease_friction_x(float friction_x, float time, std::string easing); - - float get_friction_y(); - /** - * @param float $friction_y - */ - void set_friction_y(float friction_y); - /** - * @param float $friction_y - * @param float $time - */ - void fade_friction_y(float friction_y, float time); - /** - * @param float $friction_y - * @param float $time - * @param string $easing - */ - void ease_friction_y(float friction_y, float time, std::string easing); - - float get_feather_factor(); - /** - * @param float $feather_factor - */ - void set_feather_factor(float feather_factor); - /** - * @param float $feather_factor - * @param float $time - */ - void fade_feather_factor(float feather_factor, float time); - /** - * @param float $feather_factor - * @param float $time - * @param string $easing - */ - void ease_feather_factor(float feather_factor, float time, std::string easing); - - float get_rotation(); - /** - * @param float $rotation - */ - void set_rotation(float rotation); - /** - * @param float $rotation - * @param float $time - */ - void fade_rotation(float rotation, float time); - /** - * @param float $rotation - * @param float $time - * @param string $easing - */ - void ease_rotation(float rotation, float time, std::string easing); - - float get_rotation_variation(); - /** - * @param float $rotation_variation - */ - void set_rotation_variation(float rotation_variation); - /** - * @param float $rotation_variation - * @param float $time - */ - void fade_rotation_variation(float rotation_variation, float time); - /** - * @param float $rotation_variation - * @param float $time - * @param string $easing - */ - void ease_rotation_variation(float rotation_variation, float time, std::string easing); - - float get_rotation_speed(); - /** - * @param float $rotation_speed - */ - void set_rotation_speed(float rotation_speed); - /** - * @param float $rotation_speed - * @param float $time - */ - void fade_rotation_speed(float rotation_speed, float time); - /** - * @param float $rotation_speed - * @param float $time - * @param string $easing - */ - void ease_rotation_speed(float rotation_speed, float time, std::string easing); - - float get_rotation_speed_variation(); - /** - * @param float $rotation_speed_variation - */ - void set_rotation_speed_variation(float rotation_speed_variation); - /** - * @param float $rotation_speed_variation - * @param float $time - */ - void fade_rotation_speed_variation(float rotation_speed_variation, float time); - /** - * @param float $rotation_speed_variation - * @param float $time - * @param string $easing - */ - void ease_rotation_speed_variation(float rotation_speed_variation, float time, std::string easing); - - float get_rotation_acceleration(); - /** - * @param float $rotation_acceleration - */ - void set_rotation_acceleration(float rotation_acceleration); - /** - * @param float $rotation_acceleration - * @param float $time - */ - void fade_rotation_acceleration(float rotation_acceleration, float time); - /** - * @param float $rotation_acceleration - * @param float $time - * @param string $easing - */ - void ease_rotation_acceleration(float rotation_acceleration, float time, std::string easing); - - float get_rotation_decceleration(); - /** - * @param float $rotation_decceleration - */ - void set_rotation_decceleration(float rotation_decceleration); - /** - * @param float $rotation_decceleration - * @param float $time - */ - void fade_rotation_decceleration(float rotation_decceleration, float time); - /** - * @param float $rotation_decceleration - * @param float $time - * @param string $easing - */ - void ease_rotation_decceleration(float rotation_decceleration, float time, std::string easing); - -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/decal.cpp b/src/scripting/decal.cpp deleted file mode 100644 index 472ea2221d2..00000000000 --- a/src/scripting/decal.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// SuperTux -// Copyright (C) 2020 Grzegorz Przybylski -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/decal.hpp" -#include "scripting/decal.hpp" - -namespace scripting { - -void -Decal::change_sprite(const std::string& sprite) -{ - SCRIPT_GUARD_VOID; - object.change_sprite(sprite); -} - -void -Decal::fade_sprite(const std::string& sprite, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_sprite(sprite, time); -} - -void -Decal::fade_in(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_in(time); -} - -void -Decal::fade_out(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_out(time); -} - -void -Decal::set_action(const std::string& action) -{ - SCRIPT_GUARD_VOID; - object.set_action(action); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/decal.hpp b/src/scripting/decal.hpp deleted file mode 100644 index d14a1a4693d..00000000000 --- a/src/scripting/decal.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// SuperTux -// Copyright (C) 2020 Grzegorz Przybylski -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_DECAL_HPP -#define HEADER_SUPERTUX_SCRIPTING_DECAL_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Decal; -#endif - -namespace scripting { - -/** - * @summary A ""Decal"" that was given a name can be controlled by scripts. - * @instances A ""Decal"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Decal final -#ifndef SCRIPTING_API - : public GameObject<::Decal> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - Decal(const Decal&) = delete; - Decal& operator=(const Decal&) = delete; -#endif - -public: - /** - * Fades the decal sprite to a new one in ""time"" seconds. - * @param string $sprite - * @param float $time - */ - void fade_sprite(const std::string& sprite, float time); - /** - * Changes the decal sprite. - * @param string $sprite - */ - void change_sprite(const std::string& sprite); - /** - * Fades in the decal in ""time"" seconds. - * @param float $time - */ - void fade_in(float time); - /** - * Fades out the decal in ""time"" seconds. - * @param float $time - */ - void fade_out(float time); - /** - * Sets the action for the decal's sprite. - * @param string $action - */ - void set_action(const std::string& action); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/dispenser.cpp b/src/scripting/dispenser.cpp deleted file mode 100644 index 2a8d5f9ac23..00000000000 --- a/src/scripting/dispenser.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Ashish Bhattarai -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "badguy/dispenser.hpp" -#include "scripting/dispenser.hpp" - -namespace scripting { - -void Dispenser::activate() -{ - SCRIPT_GUARD_VOID_T(Dispenser); - object.activate(); -} - -void Dispenser::deactivate() -{ - SCRIPT_GUARD_VOID_T(Dispenser); - object.deactivate(); -} - -} - -/* EOF */ diff --git a/src/scripting/dispenser.hpp b/src/scripting/dispenser.hpp deleted file mode 100644 index c3c63456df7..00000000000 --- a/src/scripting/dispenser.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Ashish Bhattarai -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_DISPENSER_HPP -#define HEADER_SUPERTUX_SCRIPTING_DISPENSER_HPP - -#ifndef SCRIPTING_API - -#include "scripting/badguy.hpp" - -class Dispenser; -#endif - -namespace scripting { - -/** - * @summary A ""Dispenser"" that was given a name can be controlled by scripts. - * @instances A ""Dispenser"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Dispenser final : public scripting::BadGuy -#ifndef SCRIPTING_API - , virtual public GameObject<::Dispenser> -#endif -{ -#ifndef SCRIPTING_API -public: - Dispenser(const ::GameObject& object) : - GameObject<::BadGuy>(object), - GameObject<::Dispenser>(object), - BadGuy(object) - {} - -private: - Dispenser(const Dispenser&) = delete; - Dispenser& operator=(const Dispenser&) = delete; -#endif - -public: - /** - * Makes the dispenser start dispensing badguys. - */ - void activate(); - /** - * Stops the dispenser from dispensing badguys. - */ - void deactivate(); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/display_effect.cpp b/src/scripting/display_effect.cpp deleted file mode 100644 index c134e2f9abf..00000000000 --- a/src/scripting/display_effect.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/display_effect.hpp" - -#include "object/display_effect.hpp" - -namespace scripting { - -void -DisplayEffect::fade_out(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_out(time); -} - -void -DisplayEffect::fade_in(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_in(time); -} - -void -DisplayEffect::set_black(bool black) -{ - SCRIPT_GUARD_VOID; - object.set_black(black); -} - -bool -DisplayEffect::is_black() const -{ - SCRIPT_GUARD_DEFAULT; - return object.is_black(); -} - -void -DisplayEffect::sixteen_to_nine(float time) -{ - SCRIPT_GUARD_VOID; - object.sixteen_to_nine(time); -} - -void -DisplayEffect::four_to_three(float time) -{ - SCRIPT_GUARD_VOID; - object.four_to_three(time); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/display_effect.hpp b/src/scripting/display_effect.hpp deleted file mode 100644 index 40e605f1bf4..00000000000 --- a/src/scripting/display_effect.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_DISPLAY_EFFECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_DISPLAY_EFFECT_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class DisplayEffect; -#endif - -namespace scripting { - -/** - * @summary ""DisplayEffect"" is an interface for toying with the display. - * @instances SuperTux creates an instance named ""Effect"" when starting the scripting engine. - Its usage is preferred – creating another instance might have unexpected side effects and is strongly discouraged. - (Use ""sector.Effect"" in the console.) - */ -class DisplayEffect final -#ifndef SCRIPTING_API - : public GameObject<::DisplayEffect> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - DisplayEffect(const DisplayEffect&) = delete; - DisplayEffect& operator=(const DisplayEffect&) = delete; -#endif - -public: - /** - * Gradually fades out the screen to black for the next ""time"" seconds. - * @param float $time - */ - void fade_out(float time); - /** - * Gradually fades in the screen from black for the next ""time"" seconds. - * @param float $time - */ - void fade_in(float time); - /** - * Blackens or un-blackens the screen (depending on the value of ""black""). - * @param bool $black - */ - void set_black(bool black); - /** - * Returns ""true"" if the screen has been blackened by ""set_black"". - Note: Calling ""fade_in"" or ""fade_out"" resets the return value to ""false"". - */ - bool is_black() const; - /** - * Sets the display ratio to 16:9, effectively adding black bars at the top and bottom of the screen. - Should be used before cutscenes. Gradually fades to this state for the next ""time"" seconds. - * @param float $time - */ - void sixteen_to_nine(float time); - /** - * Sets the display ratio to 4:3, removing the black bars added by ""sixteen_to_nine()"". - Should be used after cutscenes. Gradually fades to this state for the next ""time"" seconds. - * @param float $time - */ - void four_to_three(float time); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/floating_image.cpp b/src/scripting/floating_image.cpp deleted file mode 100644 index 6eedf572489..00000000000 --- a/src/scripting/floating_image.cpp +++ /dev/null @@ -1,124 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include - -#include "object/floating_image.hpp" -#include "scripting/floating_image.hpp" -#include "supertux/sector.hpp" -#include "worldmap/worldmap.hpp" - -namespace scripting { - -FloatingImage::FloatingImage(const std::string& spritefile) : - GameObject(get_sector().add<::FloatingImage>(spritefile)) -{ -} - -void -FloatingImage::set_layer(int layer) -{ - SCRIPT_GUARD_VOID; - object.set_layer(layer); -} - -int -FloatingImage::get_layer() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_layer(); -} - -void -FloatingImage::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_pos(Vector(x, y)); -} - -float -FloatingImage::get_pos_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos().x; -} - -float -FloatingImage::get_pos_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos().y; -} - -void -FloatingImage::set_anchor_point(int anchor) -{ - SCRIPT_GUARD_VOID; - object.set_anchor_point(static_cast(anchor)); -} - -int -FloatingImage::get_anchor_point() const -{ - SCRIPT_GUARD_DEFAULT; - return static_cast(object.get_anchor_point()); -} - -bool -FloatingImage::get_visible() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_visible(); -} - -void -FloatingImage::set_visible(bool visible) -{ - SCRIPT_GUARD_VOID; - object.set_visible(visible); -} - -void -FloatingImage::set_action(const std::string& action) -{ - SCRIPT_GUARD_VOID; - object.set_action(action); -} - -std::string -FloatingImage::get_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_action(); -} - -void -FloatingImage::fade_in(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_in(time); -} - -void -FloatingImage::fade_out(float time) -{ - SCRIPT_GUARD_VOID; - object.fade_out(time); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/floating_image.hpp b/src/scripting/floating_image.hpp deleted file mode 100644 index 21188fad88c..00000000000 --- a/src/scripting/floating_image.hpp +++ /dev/null @@ -1,119 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_FLOATING_IMAGE_HPP -#define HEADER_SUPERTUX_SCRIPTING_FLOATING_IMAGE_HPP - -#ifndef SCRIPTING_API -#include - -class FloatingImage; - -#include "scripting/game_object.hpp" -#endif - -namespace scripting { - -/** - * @summary This class provides the ability to create, edit, and remove images floating in midair on the screen, such as the SuperTux logo. - It is implemented as a wrapper around a sprite, so any sprite actions are applicable. - * @instances Floating Images are created in a script or from the console. Constructor:${SRG_NEWPARAGRAPH} - """""" <- FloatingImage(string filename)""""""${SRG_NEWPARAGRAPH} - This creates a ""FloatingImage"" from ""filename"" (which is relative to the data directory root). - */ -class FloatingImage final -#ifndef SCRIPTING_API - : public GameObject<::FloatingImage> -#endif -{ -public: - FloatingImage(const std::string& spritefile); - - /** - * Sets the layer of the floating image. - * @param int $layer - */ - void set_layer(int layer); - /** - * Returns the layer the floating image is on. - */ - int get_layer() const; - /** - * Sets the location of the image in relation to the current anchor point. - * @param float $x - * @param float $y - */ - void set_pos(float x, float y); - /** - * Returns the image's X coordinate relative to the current anchor point. - */ - float get_pos_x() const; - /** - * Returns the image's Y coordinate relative to the current anchor point. - */ - float get_pos_y() const; - /** - * Sets the image's anchor point. - * @param int $anchor Anchor point as represented by the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). - */ - void set_anchor_point(int anchor); - /** - * Returns the current anchor point. - */ - int get_anchor_point() const; - /** - * Sets the visibility of the floating image. - * @param bool $visible - */ - void set_visible(bool visible); - /** - * Returns the visibility state of the floating image. - */ - bool get_visible() const; - /** - * Sets the action of the image. - * This is only useful when the image is a sprite. - * @param string $action Name of the action, as defined in the sprite. - */ - void set_action(const std::string& action); - /** - * Returns the name of the action of the image, as defined in the sprite. - * This is only useful when the image is a sprite. - */ - std::string get_action() const; - /** - * Fades in the image for the next ""time"" seconds. - * @param float $time - */ - void fade_in(float time); - /** - * Fades out the image for the next ""time"" seconds. - * @param float $time - */ - void fade_out(float time); - -#ifndef SCRIPTING_API -private: - FloatingImage(const FloatingImage&) = delete; - FloatingImage& operator=(const FloatingImage&) = delete; -#endif -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp deleted file mode 100644 index 115cc0abc20..00000000000 --- a/src/scripting/functions.cpp +++ /dev/null @@ -1,475 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/functions.hpp" - -#include "audio/sound_manager.hpp" -#include "math/random.hpp" -#include "object/camera.hpp" -#include "object/player.hpp" -#include "physfs/ifile_stream.hpp" -#include "supertux/console.hpp" -#include "supertux/debug.hpp" -#include "supertux/game_manager.hpp" -#include "supertux/game_session.hpp" -#include "supertux/gameconfig.hpp" -#include "supertux/level.hpp" -#include "supertux/screen_manager.hpp" -#include "supertux/sector.hpp" -#include "supertux/shrinkfade.hpp" -#include "supertux/textscroller_screen.hpp" -#include "supertux/tile.hpp" -#include "supertux/title_screen.hpp" -#include "video/renderer.hpp" -#include "video/video_system.hpp" -#include "video/viewport.hpp" -#include "worldmap/tux.hpp" -#include "worldmap/worldmap.hpp" - -namespace { - -// Not added to header, function to only be used by others -// in this file. -bool validate_sector_player() -{ - if (::Sector::current() == nullptr) - { - log_info << "No current sector." << std::endl; - return false; - } - - return true; -} - -} // namespace - -namespace scripting { - -SQInteger display(HSQUIRRELVM vm) -{ - ConsoleBuffer::output << squirrel2string(vm, -1) << std::endl; - return 0; -} - -void print_stacktrace(HSQUIRRELVM vm) -{ - print_squirrel_stack(vm); -} - -SQInteger get_current_thread(HSQUIRRELVM vm) -{ - sq_pushthread(vm, vm); - return 1; -} - -bool is_christmas() -{ - return g_config->christmas_mode; -} - -void start_cutscene() -{ - auto session = GameSession::current(); - if (session == nullptr) - { - log_info << "No game session" << std::endl; - return; - } - - if (session->get_current_level().m_is_in_cutscene) - { - log_warning << "start_cutscene(): starting a new cutscene above another one, ending preceding cutscene (use end_cutscene() in scripts!)" << std::endl; - - // Remove all sounds that started playing while skipping. - if (session->get_current_level().m_skip_cutscene) - SoundManager::current()->stop_sounds(); - } - - session->get_current_level().m_is_in_cutscene = true; - session->get_current_level().m_skip_cutscene = false; -} - -void end_cutscene() -{ - auto session = GameSession::current(); - if (session == nullptr) - { - log_info << "No game session." << std::endl; - return; - } - - if (!session->get_current_level().m_is_in_cutscene) - { - log_warning << "end_cutscene(): no cutscene to end, resetting status anyways." << std::endl; - } - - // Remove all sounds that started playing while skipping. - if (session->get_current_level().m_skip_cutscene) - SoundManager::current()->stop_sounds(); - - session->get_current_level().m_is_in_cutscene = false; - session->get_current_level().m_skip_cutscene = false; -} - -bool check_cutscene() -{ - auto session = GameSession::current(); - if (session == nullptr) - { - log_info << "No game session" << std::endl; - return false; - } - - return session->get_current_level().m_is_in_cutscene; -} - -void wait(HSQUIRRELVM vm, float seconds) -{ - auto session = GameSession::current(); - - if(session && session->get_current_level().m_skip_cutscene) - { - if (auto squirrelenv = static_cast(sq_getforeignptr(vm))) - { - // Wait anyways, to prevent scripts like `while (true) {wait(0.1); ...}`. - squirrelenv->wait_for_seconds(vm, 0); - } - else if (auto squirrelvm = static_cast(sq_getsharedforeignptr(vm))) - { - squirrelvm->wait_for_seconds(vm, 0); - } - else - { - log_warning << "wait(): no VM or environment available\n"; - } - } - else if(session && session->get_current_level().m_is_in_cutscene) - { - if (auto squirrelenv = static_cast(sq_getforeignptr(vm))) - { - // Wait anyways, to prevent scripts like `while (true) {wait(0.1); ...}` from freezing the game. - squirrelenv->skippable_wait_for_seconds(vm, seconds); - //session->set_scheduler(squirrelenv->get_scheduler()); - } - else if (auto squirrelvm = static_cast(sq_getsharedforeignptr(vm))) - { - squirrelvm->skippable_wait_for_seconds(vm, seconds); - //session->set_scheduler(squirrelvm->get_scheduler()); - } - else - { - log_warning << "wait(): no VM or environment available\n"; - } - } - else - { - if (auto squirrelenv = static_cast(sq_getforeignptr(vm))) - { - squirrelenv->wait_for_seconds(vm, seconds); - } - else if (auto squirrelvm = static_cast(sq_getsharedforeignptr(vm))) - { - squirrelvm->wait_for_seconds(vm, seconds); - } - else - { - log_warning << "wait(): no VM or environment available\n"; - } - } -} - -void wait_for_screenswitch(HSQUIRRELVM vm) -{ - auto squirrelvm = static_cast(sq_getsharedforeignptr(vm)); - //auto squirrelenv = static_cast(sq_getforeignptr(vm)); - squirrelvm->wait_for_screenswitch(vm); -} - -void exit_screen() -{ - ScreenManager::current()->pop_screen(); -} - -std::string translate(const std::string& text) -{ - return g_dictionary_manager->get_dictionary().translate(text); -} - -std::string _(const std::string& text) -{ - return translate(text); -} - -std::string translate_plural(const std::string& text, const std::string& text_plural, int num) -{ - return g_dictionary_manager->get_dictionary().translate_plural(text, text_plural, num); -} - -std::string __(const std::string& text, const std::string& text_plural, int num) -{ - return translate_plural(text, text_plural, num); -} - -void display_text_file(const std::string& filename) -{ - ScreenManager::current()->push_screen(std::make_unique(filename)); -} - -void load_worldmap(const std::string& filename, const std::string& sector, const std::string& spawnpoint) -{ - using namespace worldmap; - - if (!WorldMap::current()) - { - throw std::runtime_error("Can't start Worldmap without active WorldMap"); - } - else - { - WorldMap::current()->change(filename, sector, spawnpoint); - } -} - -void set_next_worldmap(const std::string& dirname, const std::string& sector, const std::string& spawnpoint) -{ - GameManager::current()->set_next_worldmap(dirname, sector, spawnpoint); -} - -void load_level(const std::string& filename) -{ - if (!GameSession::current()) - { - throw std::runtime_error("Can't start level without active level."); - } - else - { - ScreenManager::current()->push_screen(std::make_unique(filename, GameSession::current()->get_savegame())); - } -} - -void import(HSQUIRRELVM vm, const std::string& filename) -{ - IFileStream in(filename); - compile_and_run(vm, in, filename); -} - -void debug_collrects(bool enable) -{ - g_debug.show_collision_rects = enable; -} - -void debug_show_fps(bool enable) -{ - g_config->show_fps = enable; -} - -void debug_draw_solids_only(bool enable) -{ - ::Sector::s_draw_solids_only = enable; -} - -void debug_draw_editor_images(bool enable) -{ - Tile::draw_editor_images = enable; -} - -void debug_worldmap_ghost(bool enable) -{ - auto worldmap_sector = worldmap::WorldMapSector::current(); - - if (worldmap_sector == nullptr) - throw std::runtime_error("Can't change ghost mode without active WorldMapSector."); - - auto& tux = worldmap_sector->get_singleton_by_type(); - tux.set_ghost_mode(enable); -} - -void save_state() -{ - auto worldmap = worldmap::WorldMap::current(); - - if (!worldmap) - { - throw std::runtime_error("Can't save state without active Worldmap."); - } - else - { - worldmap->save_state(); - } -} - -void load_state() -{ - auto worldmap = worldmap::WorldMap::current(); - - if (!worldmap) - { - throw std::runtime_error("Can't save state without active Worldmap."); - } - else - { - worldmap->load_state(); - } -} - -void play_music(const std::string& filename) -{ - SoundManager::current()->play_music(filename); -} - -void stop_music(float fadetime) -{ - SoundManager::current()->stop_music(fadetime); -} - -void fade_in_music(const std::string& filename, float fadetime) -{ - SoundManager::current()->play_music(filename, fadetime); -} - -void resume_music(float fadetime) -{ - SoundManager::current()->resume_music(fadetime); -} - -void pause_music(float fadetime) -{ - SoundManager::current()->pause_music(fadetime); -} - -void play_sound(const std::string& filename) -{ - SoundManager::current()->play(filename); -} - -void grease() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); // scripting::Player != ::Player - tux.get_physic().set_velocity_x(tux.get_physic().get_velocity_x()*3); -} - -void invincible() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - tux.m_invincible_timer.start(10000); -} - -void ghost() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - tux.set_ghost_mode(true); -} - -void mortal() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - tux.m_invincible_timer.stop(); - tux.set_ghost_mode(false); -} - -void restart() -{ - auto session = GameSession::current(); - if (session == nullptr) - { - log_info << "No game session." << std::endl; - return; - } - session->reset_button = true; -} - -void whereami() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - log_info << "You are at x " << (static_cast(tux.get_pos().x)) << ", y " << (static_cast(tux.get_pos().y)) << std::endl; -} - -void gotoend() -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - tux.move(Vector( - (::Sector::get().get_width()) - (static_cast(SCREEN_WIDTH) * 2.0f), 0)); - ::Sector::get().get_camera().reset( - Vector(tux.get_pos().x, tux.get_pos().y)); -} - -void warp(float offset_x, float offset_y) -{ - if (!validate_sector_player()) return; - // FIXME: This only has effect on the first player. - ::Player& tux = *(::Sector::get().get_players()[0]); - tux.move(Vector( - tux.get_pos().x + (offset_x*32), tux.get_pos().y - (offset_y*32))); - ::Sector::get().get_camera().reset( - Vector(tux.get_pos().x, tux.get_pos().y)); -} - -void camera() -{ - if (!validate_sector_player()) return; - const auto& cam_pos = ::Sector::get().get_camera().get_translation(); - log_info << "Camera is at " << cam_pos.x << "," << cam_pos.y << std::endl; -} - -void set_gamma(float gamma) -{ - VideoSystem::current()->set_gamma(gamma); -} - -int rand() -{ - return gameRandom.rand(); -} - -void set_game_speed(float speed) -{ - if (speed < 0.05f) - { - // Always put a minimum speed above 0 - if the user enabled transitions, - // executing transitions would take an unreaonably long time if we allow - // game speeds like 0.00001. - log_warning << "Cannot set game speed to less than 0.05" << std::endl; - throw std::runtime_error("Cannot set game speed to less than 0.05"); - } - - ::g_debug.set_game_speed_multiplier(speed); -} - -void set_title_frame(const std::string& image) -{ - auto title_screen = TitleScreen::current(); - if (!title_screen) - { - log_info << "No title screen loaded." << std::endl; - return; - } - title_screen->set_frame(image); -} - -} - -/* EOF */ diff --git a/src/scripting/functions.hpp b/src/scripting/functions.hpp deleted file mode 100644 index 84322943390..00000000000 --- a/src/scripting/functions.hpp +++ /dev/null @@ -1,306 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_FUNCTIONS_HPP -#define HEADER_SUPERTUX_SCRIPTING_FUNCTIONS_HPP - -#ifndef SCRIPTING_API -#include -#include - -#define __suspend -#define __custom(x) -#endif - -namespace scripting { - -#ifdef DOXYGEN_SCRIPTING -/** - * @summary This module contains global methods. - */ -class Globals -{ -public: -#endif - -/** - * Displays the value of an argument. This is useful for inspecting tables. - * @param ANY $object - */ -SQInteger display(HSQUIRRELVM vm) __custom("t."); - -/** - * Displays the contents of the current stack. - */ -void print_stacktrace(HSQUIRRELVM vm); - -/** - * Returns the currently running thread. - */ -SQInteger get_current_thread(HSQUIRRELVM vm) __custom("t"); - -/** - * Returns whether the game is in christmas mode. - */ -bool is_christmas(); - -/** - * Displays a text file and scrolls it over the screen (on next screenswitch). - * @param string $filename - */ -void display_text_file(const std::string& filename); - -/** - * Loads and displays a worldmap (on next screenswitch), using the savegame of the current worldmap. - * @param string $filename - * @param string $sector Forced sector to spawn in the worldmap on. Leave empty to use last sector from savegame. - * @param string $spawnpoint Forced spawnpoint to spawn in the worldmap on. Leave empty to use last position from savegame. - */ -void load_worldmap(const std::string& filename, const std::string& sector, const std::string& spawnpoint); - -/** - * Switches to a different worldmap after unloading the current one, after ""exit_screen()"" is called. - * @param string $dirname The world directory, where the "worldmap.stwm" file is located. - * @param string $sector Forced sector to spawn in the worldmap on. Leave empty to use last sector from savegame. - * @param string $spawnpoint Forced spawnpoint to spawn in the worldmap on. Leave empty to use last position from savegame. - */ -void set_next_worldmap(const std::string& dirname, const std::string& sector, const std::string& spawnpoint); - -/** - * Loads and displays a level (on next screenswitch), using the savegame of the current level. - * @param string $filename - */ -void load_level(const std::string& filename); - -/** - * Starts a skippable cutscene. - */ -void start_cutscene(); -/** - * Ends a skippable cutscene. - */ -void end_cutscene(); -/** - * Checks if a skippable cutscene is currently running. - */ -bool check_cutscene(); - -/** - * Suspends the script execution for a specified number of seconds. - * @param float $seconds - */ -void wait(HSQUIRRELVM vm, float seconds) __suspend; - -/** - * Suspends the script execution until the current screen has been changed. - */ -void wait_for_screenswitch(HSQUIRRELVM vm) __suspend; - -/** - * Exits the currently running screen (for example, force exits from worldmap or scrolling text). - */ -void exit_screen(); - -/** - * Translates a text into the user's language (by looking in the "".po"" files). - * @param string $text - */ -std::string translate(const std::string& text); -/** - * Same function as ""translate()"". - * @param string $text - */ -std::string _(const std::string& text); - -/** - * Translates a text into the user's language (by looking in the "".po"" files). - Returns ""text"" or ""text_plural"", depending on ""num"" and the locale. - * @param string $text - * @param string $text_plural - * @param int $num - */ -std::string translate_plural(const std::string& text, const std::string& - text_plural, int num); -/** - * Same function as ""translate_plural()"". - * @param string $text - * @param string $text_plural - * @param int $num - */ -std::string __(const std::string& text, const std::string& text_plural, int num); - -/** - * Loads a script file and executes it. This is typically used to import functions from external files. - * @param string $filename - */ -void import(HSQUIRRELVM v, const std::string& filename); - -/** - * Saves world state to scripting table. - */ -void save_state(); - -/** - * Loads world state from scripting table. - */ -void load_state(); - -/** - * Enables/disables drawing of collision rectangles. - * @param bool $enable - */ -void debug_collrects(bool enable); - -/** - * Enables/disables drawing of FPS. - * @param bool $enable - */ -void debug_show_fps(bool enable); - -/** - * Enables/disables drawing of non-solid layers. - * @param bool $enable - */ -void debug_draw_solids_only(bool enable); - -/** - * Enables/disables drawing of editor images. - * @param bool $enable - */ -void debug_draw_editor_images(bool enable); - -/** - * Enables/disables worldmap ghost mode. - * @param bool $enable - */ -void debug_worldmap_ghost(bool enable); - -/** - * Changes the music to ""musicfile"". - * @param string $musicfile - */ -void play_music(const std::string& musicfile); - -/** - * Fades in the music from ""musicfile"" for ""fadetime"" seconds. - * @param string $musicfile - * @param float $fadetime - */ -void fade_in_music(const std::string& musicfile, float fadetime); - -/** - * Fades out the music for ""fadetime"" seconds. - * @param float $fadetime Set to "0" for no fade-out. - */ -void stop_music(float fadetime); - -/** - * Resumes and fades in the music for ""fadetime"" seconds. - * @param float $fadetime Set to "0" for no fade-in. - */ -void resume_music(float fadetime); - -/** - * Pauses the music with a fade-out for ""fadetime"" seconds. - * @param float $fadetime Set to "0" for no fade-out. - */ -void pause_music(float fadetime); - -/** - * Plays ""soundfile"" as a sound. - * @param string $soundfile - */ -void play_sound(const std::string& soundfile); - -/** - * Sets the game speed to ""speed"". - * @param float $speed - */ -void set_game_speed(float speed); - -/** - * Speeds Tux up. - */ -void grease(); - -/** - * Makes Tux invincible for 10000 units of time. - */ -void invincible(); - -/** - * Makes Tux a ghost, i.e. lets him float around and through solid objects. - */ -void ghost(); - -/** - * Recalls Tux's invincibility and ghost status. - */ -void mortal(); - -/** - * Re-initializes and respawns Tux at the beginning of the current level. - */ -void restart(); - -/** - * Prints Tux's current coordinates in the current level. - */ -void whereami(); - -/** - * Moves Tux near the end of the current level. - */ -void gotoend(); - -/** - * Moves Tux to the X and Y blocks, relative to his position. - * @param float $offset_x - * @param float $offset_y - */ -void warp(float offset_x, float offset_y); - -/** - * Shows the camera's coordinates. - */ -void camera(); - -/** - * Adjusts the gamma. - * @param float $gamma - */ -void set_gamma(float gamma); - -/** - * Returns a random integer. - */ -int rand(); - -/** - * Sets the frame, displayed on the title screen. - * @param string $image - */ -void set_title_frame(const std::string& image); - -#ifdef DOXYGEN_SCRIPTING -} -#endif - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/game_object.cpp b/src/scripting/game_object.cpp deleted file mode 100644 index 05ff99ac6d4..00000000000 --- a/src/scripting/game_object.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Ingo Ruhnke -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/game_object.hpp" - -#include "supertux/sector.hpp" - -namespace scripting { - -::Sector& get_sector() -{ - if (::Sector::current()) - return ::Sector::get(); - - throw std::runtime_error("Unable to perform scripting action: No active Sector."); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/game_object.hpp b/src/scripting/game_object.hpp deleted file mode 100644 index 3c17b0342f6..00000000000 --- a/src/scripting/game_object.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Ingo Ruhnke -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_GAME_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_GAME_OBJECT_HPP - -#include "supertux/game_object_manager.hpp" -#include "util/log.hpp" -#include "util/uid.hpp" - -#ifndef SCRIPTING_API - -#define SCRIPT_GUARD_VOID \ - auto object_ptr = get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << m_uid << std::endl; \ - return; \ - } \ - auto& object = *object_ptr - -#define SCRIPT_GUARD_DEFAULT \ - auto object_ptr = get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << m_uid << std::endl; \ - return {}; \ - } \ - auto& object = *object_ptr - -#define SCRIPT_GUARD_RETURN(x) \ - auto object_ptr = get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << m_uid << std::endl; \ - return x; \ - } \ - auto& object = *object_ptr - -#define SCRIPT_GUARD_VOID_T(OBJECT) \ - auto object_ptr = GameObject<::OBJECT>::get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << GameObject<::OBJECT>::m_uid << std::endl; \ - return; \ - } \ - auto& object = *object_ptr - -#define SCRIPT_GUARD_DEFAULT_T(OBJECT) \ - auto object_ptr = GameObject<::OBJECT>::get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << GameObject<::OBJECT>::m_uid << std::endl; \ - return {}; \ - } \ - auto& object = *object_ptr - -#define SCRIPT_GUARD_RETURN_T(OBJECT, x) \ - auto object_ptr = GameObject<::OBJECT>::get_object_ptr(); \ - if (object_ptr == nullptr) { \ - log_fatal << "error: script is accessing a dead object: " \ - << GameObject<::OBJECT>::m_uid << std::endl; \ - return x; \ - } \ - auto& object = *object_ptr - -class Sector; - -namespace scripting { - -::Sector& get_sector(); - -template -class GameObject -{ -public: - GameObject(const ::GameObject& object) : - m_uid(object.get_uid()), - m_parent(*object.get_parent()) - {} - - T* get_object_ptr() const - { - return m_parent.get_object_by_uid(m_uid); - } - -protected: - UID m_uid; - ::GameObjectManager& m_parent; - -private: - GameObject(const GameObject&) = delete; - GameObject& operator=(const GameObject&) = delete; -}; - -} // namespace scripting - -#endif - -#endif - -/* EOF */ diff --git a/src/scripting/game_object_manager.cpp b/src/scripting/game_object_manager.cpp deleted file mode 100644 index 3b1f4d9dc0d..00000000000 --- a/src/scripting/game_object_manager.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/game_object_manager.hpp" - -#include "object/ambient_light.hpp" -#include "object/music_object.hpp" -#include "supertux/game_object_manager.hpp" -#include "video/color.hpp" - -namespace scripting { - -GameObjectManager::GameObjectManager(::GameObjectManager* parent) : - m_gom_parent(parent) -{ -} - -void -GameObjectManager::fade_to_ambient_light(float red, float green, float blue, float fadetime) -{ - auto& ambient_light = m_gom_parent->get_singleton_by_type(); - ambient_light.fade_to_ambient_light(red, green, blue, fadetime); -} - -void -GameObjectManager::set_ambient_light(float red, float green, float blue) -{ - auto& ambient_light = m_gom_parent->get_singleton_by_type(); - ambient_light.set_ambient_light(Color(red, green, blue)); -} - -float -GameObjectManager::get_ambient_red() const -{ - auto& ambient_light = m_gom_parent->get_singleton_by_type(); - return ambient_light.get_ambient_light().red; -} - -float -GameObjectManager::get_ambient_green() const -{ - auto& ambient_light = m_gom_parent->get_singleton_by_type(); - return ambient_light.get_ambient_light().green; -} - -float -GameObjectManager::get_ambient_blue() const -{ - auto& ambient_light = m_gom_parent->get_singleton_by_type(); - return ambient_light.get_ambient_light().blue; -} - -void -GameObjectManager::set_music(const std::string& filename) -{ - auto& music = m_gom_parent->get_singleton_by_type(); - music.set_music(filename); -} - -void -GameObjectManager::add_object(const std::string& class_name, const std::string& name, - int posX, int posY, const std::string& direction, - const std::string& data) -{ - m_gom_parent->add_object_scripting(class_name, name, Vector(posX, posY), direction, data); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/game_object_manager.hpp b/src/scripting/game_object_manager.hpp deleted file mode 100644 index 55047a65e48..00000000000 --- a/src/scripting/game_object_manager.hpp +++ /dev/null @@ -1,100 +0,0 @@ -// SuperTux -// Copyright (C) 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_GAME_OBJECT_MANAGER_HPP -#define HEADER_SUPERTUX_SCRIPTING_GAME_OBJECT_MANAGER_HPP - -#ifndef SCRIPTING_API -#include -class GameObjectManager; -#endif - -namespace scripting { - -/** - * @summary This class provides basic controlling functions for a sector. Applies for both worldmap and in-level sectors. - * @instances For in-level sectors, an instance under ""sector.settings"" is available from scripts and the console.${SRG_NEWPARAGRAPH} - For worldmap sectors, such instance is available under ""worldmap.settings"". - */ -class GameObjectManager -{ -#ifndef SCRIPTING_API -private: - ::GameObjectManager* m_gom_parent; - -public: - GameObjectManager(::GameObjectManager* parent); - -private: - GameObjectManager(const GameObjectManager&) = delete; - GameObjectManager& operator=(const GameObjectManager&) = delete; -#endif - -public: - /** - * Sets the sector's ambient light to the specified color. - * @param float $red - * @param float $green - * @param float $blue - */ - void set_ambient_light(float red, float green, float blue); - /** - * Fades to a specified ambient light color in ""fadetime"" seconds. - * @param float $red - * @param float $green - * @param float $blue - * @param float $fadetime - */ - void fade_to_ambient_light(float red, float green, float blue, float fadetime); - /** - * Returns the red channel of the ambient light color. - */ - float get_ambient_red() const; - /** - * Returns the green channel of the ambient light color. - */ - float get_ambient_green() const; - /** - * Returns the blue channel of the ambient light color. - */ - float get_ambient_blue() const; - - /** - * Sets the sector's music. - * @param string $music Full filename, relative to the "music" folder. - */ - void set_music(const std::string& music); - - /** - * Adds a ""MovingObject"" to the manager. - Note: If adding objects to a worldmap sector, ""posX"" and ""posY"" have to be tile positions (sector position / 32). - * @param string $class_name GameObject's class. - * @param string $name Name of the created object. - * @param int $posX X position inside the current sector. - * @param int $posY Y position inside the current sector. - * @param string $direction Direction. - * @param string $data Additional data in S-Expression format (check object definitions in level files). - */ - void add_object(const std::string& class_name, const std::string& name, - int posX, int posY, const std::string& direction, - const std::string& data); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/gradient.cpp b/src/scripting/gradient.cpp deleted file mode 100644 index 0df9839a2f8..00000000000 --- a/src/scripting/gradient.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// SuperTux -// Copyright (C) 2016 Hume2 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/gradient.hpp" - -#include "object/gradient.hpp" - -namespace scripting { - -void -Gradient::set_direction(const std::string& direction) -{ - SCRIPT_GUARD_VOID; - object.set_direction(direction); -} - -std::string -Gradient::get_direction() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_direction_string(); -} - -void -Gradient::set_color1(float red, float green, float blue) -{ - SCRIPT_GUARD_VOID; - object.set_gradient(Color(red, green, blue), object.get_gradient_bottom()); -} - -void -Gradient::set_color2(float red, float green, float blue) -{ - SCRIPT_GUARD_VOID; - object.set_gradient(object.get_gradient_top(), Color(red, green, blue)); -} - -void -Gradient::set_colors(float red1, float green1, float blue1, float red2, float green2, float blue2) -{ - SCRIPT_GUARD_VOID; - object.set_gradient(Color(red1, green1, blue1), Color(red2, green2, blue2)); -} - -void -Gradient::fade_color1(float red, float green, float blue, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_gradient(Color(red, green, blue), object.get_gradient_bottom(), time); -} - -void -Gradient::fade_color2(float red, float green, float blue, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_gradient(object.get_gradient_top(), Color(red, green, blue), time); -} - -void -Gradient::fade_colors(float red1, float green1, float blue1, float red2, float green2, float blue2, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_gradient(Color(red1, green1, blue1), Color(red2, green2, blue2), time); -} - -void -Gradient::swap_colors() -{ - SCRIPT_GUARD_VOID; - object.set_gradient(object.get_gradient_bottom(), object.get_gradient_top()); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/gradient.hpp b/src/scripting/gradient.hpp deleted file mode 100644 index 2215d58e54b..00000000000 --- a/src/scripting/gradient.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// SuperTux - Sector scripting -// Copyright (C) 2016 Hume2 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_GRADIENT_HPP -#define HEADER_SUPERTUX_SCRIPTING_GRADIENT_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class Gradient; -#endif - -namespace scripting { - -/** - * @summary A ""Gradient"" that was given a name can be controlled by scripts. - * @instances A ""Gradient"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Gradient final -#ifndef SCRIPTING_API - : public GameObject<::Gradient> -#endif -{ -#ifndef SCRIPTING_API -private: - using GameObject::GameObject; - -private: - Gradient(const Gradient&) = delete; - Gradient& operator=(const Gradient&) = delete; -#endif - -public: - /** - * Sets the direction of the gradient. - * @param string $direction Can be "horizontal", "vertical", "horizontal_sector" or "vertical_sector". - */ - void set_direction(const std::string& direction); - /** - * Returns the direction of the gradient. - Possible values are "horizontal", "vertical", "horizontal_sector" or "vertical_sector". - */ - std::string get_direction() const; - - /** - * Set top gradient color. - * @param float $red - * @param float $green - * @param float $blue - */ - void set_color1(float red, float green, float blue); - /** - * Set bottom gradient color. - * @param float $red - * @param float $green - * @param float $blue - */ - void set_color2(float red, float green, float blue); - /** - * Set both gradient colors. - * @param float $red1 - * @param float $green1 - * @param float $blue1 - * @param float $red2 - * @param float $green2 - * @param float $blue2 - */ - void set_colors(float red1, float green1, float blue1, float red2, float green2, float blue2); - /** - * Fade the top gradient color to a specified new color in ""time"" seconds. - * @param float $red - * @param float $green - * @param float $blue - * @param float $time - */ - void fade_color1(float red, float green, float blue, float time); - /** - * Fade the bottom gradient color to a specified new color in ""time"" seconds. - * @param float $red - * @param float $green - * @param float $blue - * @param float $time - */ - void fade_color2(float red, float green, float blue, float time); - /** - * Fade both gradient colors to specified new colors in ""time"" seconds. - * @param float $red1 - * @param float $green1 - * @param float $blue1 - * @param float $red2 - * @param float $green2 - * @param float $blue2 - * @param float $time - */ - void fade_colors(float red1, float green1, float blue1, float red2, float green2, float blue2, float time); - - /** - * Swap top and bottom gradient colors. - */ - void swap_colors(); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/level.cpp b/src/scripting/level.cpp deleted file mode 100644 index 8efaa9d4758..00000000000 --- a/src/scripting/level.cpp +++ /dev/null @@ -1,126 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/level.hpp" - -#include "supertux/d_scope.hpp" -#include "supertux/flip_level_transformer.hpp" -#include "supertux/game_session.hpp" -#include "supertux/sector.hpp" -#include "util/log.hpp" - -namespace scripting { - -void -Level_finish(bool win) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.finish(win); -} - -bool -Level_has_active_sequence() -{ - SCRIPT_GUARD_GAMESESSION(false); - return game_session.has_active_sequence(); -} - -void -Level_spawn(const std::string& sector, const std::string& spawnpoint) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.respawn(sector, spawnpoint); -} - -void -Level_spawn_transition(const std::string& sector, const std::string& spawnpoint, const std::string& transition) -{ - SCRIPT_GUARD_GAMESESSION(); - - ScreenFade::FadeType fade_type = ScreenFade::FadeType::NONE; - - if (transition == "fade") - fade_type = ScreenFade::FadeType::FADE; - else if (transition == "circle") - fade_type = ScreenFade::FadeType::CIRCLE; - else - log_warning << "Invalid transition type '" << transition << "'." << std::endl; - - game_session.respawn_with_fade(sector, spawnpoint, fade_type, {0.0f, 0.0f}, true); -} - -void -Level_set_start_point(const std::string& sector, const std::string& spawnpoint) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_start_point(sector, spawnpoint); -} - -void -Level_set_start_pos(const std::string& sector, float x, float y) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_start_pos(sector, Vector(x, y)); -} - -void -Level_set_respawn_point(const std::string& sector, const std::string& spawnpoint) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_respawn_point(sector, spawnpoint); -} - -void -Level_set_respawn_pos(const std::string& sector, float x, float y) -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_respawn_pos(sector, Vector(x, y)); -} - -void -Level_flip_vertically() -{ - SCRIPT_GUARD_GAMESESSION(); - BIND_SECTOR(::Sector::get()); - FlipLevelTransformer flip_transformer; - flip_transformer.transform(game_session.get_current_level()); -} - -void -Level_toggle_pause() -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.toggle_pause(); -} - -void -Level_pause_target_timer() -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_target_timer_paused(true); -} - -void -Level_resume_target_timer() -{ - SCRIPT_GUARD_GAMESESSION(); - game_session.set_target_timer_paused(false); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/level.hpp b/src/scripting/level.hpp deleted file mode 100644 index 2ed2b534b41..00000000000 --- a/src/scripting/level.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_LEVEL_HPP -#define HEADER_SUPERTUX_SCRIPTING_LEVEL_HPP - -#ifndef SCRIPTING_API - -#include - -/** Macro to help easily check if there is a current GameSession and define it, if so. **/ -#define SCRIPT_GUARD_GAMESESSION(returnvalue) \ - if (!GameSession::current()) return returnvalue; \ - GameSession& game_session = *GameSession::current() - -#endif - -namespace scripting { - -/** - NOTE: For Level functions to be binded to the Level class in the Squirrel root VM, - they must be added to the Level class definition in "data/scripts/default.nut". -**/ - -#ifdef DOXYGEN_SCRIPTING -/** - * @summary The ""Level"" class provides basic controlling functions for the current level. - * @instances An instance named ""Level"" is available from scripts and the console. - */ -class Level -{ -public: -#endif - -/** - * Ends the current level. - * @param bool $win If ""true"", the level is marked as completed if launched from a worldmap. - */ -void Level_finish(bool win); -/** - * Gets whether an end sequence has started. (AKA when the stats at the end are visible) - */ -bool Level_has_active_sequence(); - -/** - * Respawns Tux in sector named ""sector"" at spawnpoint named ""spawnpoint"".${SRG_TABLENEWPARAGRAPH} - Exceptions: If ""sector"" or ""spawnpoint"" are empty, or the specified sector does not exist, the function will bail out the first chance it gets. - If the specified spawnpoint doesn't exist, Tux will be spawned at the spawnpoint named “main”. - If that spawnpoint doesn't exist either, Tux will simply end up at the origin (top-left 0, 0). - * @param string $sector - * @param string $spawnpoint - */ -void Level_spawn(const std::string& sector, const std::string& spawnpoint); - - -/** - * Respawns Tux in sector named ""sector"" at spawnpoint named ""spawnpoint"" with the given transition ""transition"".${SRG_TABLENEWPARAGRAPH} - Exceptions: If ""sector"" or ""spawnpoint"" are empty, or the specified sector does not exist, the function will bail out the first chance it gets. - If the specified spawnpoint doesn't exist, Tux will be spawned at the spawnpoint named “main”. - If that spawnpoint doesn't exist either, Tux will simply end up at the origin (top-left 0, 0). - * @param string $sector - * @param string $spawnpoint - * @param string $transition Valid transitions are ""circle"" and ""fade"". If any other value is specified, no transition effect is drawn. - */ -void Level_spawn_transition(const std::string& sector, const std::string& spawnpoint, const std::string& transition); - - -/** - * Sets the default start spawnpoint of the level. - * @param string $sector - * @param string $spawnpoint - */ -void Level_set_start_point(const std::string& sector, const std::string& spawnpoint); - -/** - * Sets the default start spawn position of the level. - * @param string $sector - * @param float $x - * @param float $y - */ -void Level_set_start_pos(const std::string& sector, float x, float y); - -/** - * Sets the default respawn spawnpoint of the level. - * @param string $sector - * @param string $spawnpoint - */ -void Level_set_respawn_point(const std::string& sector, const std::string& spawnpoint); - -/** - * Sets the default respawn position of the level. - * @param string $sector - * @param float $x - * @param float $y - */ -void Level_set_respawn_pos(const std::string& sector, float x, float y); - -/** - * Flips the level vertically (i.e. top is now bottom and vice versa). - Call again to revert the effect. Make sure the player can land on something after the level is flipped! - */ -void Level_flip_vertically(); - -/** - * Toggle pause. - */ -void Level_toggle_pause(); - -/** - * Pauses the target timer. - */ -void Level_pause_target_timer(); - -/** - * Resumes the target timer. - */ -void Level_resume_target_timer(); - -#ifdef DOXYGEN_SCRIPTING -} -#endif - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/level_time.cpp b/src/scripting/level_time.cpp deleted file mode 100644 index c00dc756544..00000000000 --- a/src/scripting/level_time.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/level_time.hpp" -#include "scripting/level_time.hpp" - -namespace scripting { - -void LevelTime::start() -{ - SCRIPT_GUARD_VOID; - object.start(); -} - -void LevelTime::stop() -{ - SCRIPT_GUARD_VOID; - object.stop(); -} - -float LevelTime::get_time() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_time(); -} - -void LevelTime::set_time(float time_left) -{ - SCRIPT_GUARD_VOID; - object.set_time(time_left); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/level_time.hpp b/src/scripting/level_time.hpp deleted file mode 100644 index d2a968730c1..00000000000 --- a/src/scripting/level_time.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_LEVEL_TIME_HPP -#define HEADER_SUPERTUX_SCRIPTING_LEVEL_TIME_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class LevelTime; -#endif - -namespace scripting { - -/** - * @summary A ""LevelTime"" that was given a name can be controlled by scripts. - * @instances A ""LevelTime"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class LevelTime final -#ifndef SCRIPTING_API - : public GameObject<::LevelTime> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - LevelTime(const LevelTime&) = delete; - LevelTime& operator=(const LevelTime&) = delete; -#endif - -public: - /** - * Resumes the countdown (assuming it isn't already started, in which case it does nothing). - */ - void start(); - - /** - * Pauses the countdown (assuming it isn't already stopped, in which case it does nothing). - */ - void stop(); - - /** - * Returns the number of seconds left on the clock. - */ - float get_time() const; - - /** - * Sets the number of seconds left on the clock. - * @param float $time_left - */ - void set_time(float time_left); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/lit_object.cpp b/src/scripting/lit_object.cpp deleted file mode 100644 index e1168ed25bb..00000000000 --- a/src/scripting/lit_object.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// Copyright (C) 2017 M. Teufel -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/lit_object.hpp" -#include "scripting/lit_object.hpp" - -namespace scripting { - -std::string -LitObject::get_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_action(); -} - -void -LitObject::set_action(const std::string& action) -{ - SCRIPT_GUARD_VOID; - object.set_action(action); -} - -std::string -LitObject::get_light_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_light_action(); -} - -void -LitObject::set_light_action(const std::string& action) -{ - SCRIPT_GUARD_VOID; - object.set_light_action(action); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/lit_object.hpp b/src/scripting/lit_object.hpp deleted file mode 100644 index 557a3497fcc..00000000000 --- a/src/scripting/lit_object.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// Copyright (C) 2017 M. Teufel -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_LIT_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_LIT_OBJECT_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class LitObject; -#endif - -namespace scripting { - -/** - * @summary A ""LitObject"" that was given a name can be controlled by scripts. - * @instances A ""LitObject"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class LitObject final -#ifndef SCRIPTING_API - : public GameObject<::LitObject> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - LitObject(const LitObject&) = delete; - LitObject& operator=(const LitObject&) = delete; -#endif - -public: - /** - * Returns the current sprite action. - */ - std::string get_action() const; - /** - * Sets the sprite action. - * @param string $action - */ - void set_action(const std::string& action); - - /** - * Returns the current light sprite action. - */ - std::string get_light_action() const; - /** - * Sets the light sprite action. - * @param string $action - */ - void set_light_action(const std::string& action); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/particlesystem.cpp b/src/scripting/particlesystem.cpp deleted file mode 100644 index 4986d26ed82..00000000000 --- a/src/scripting/particlesystem.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// SuperTux -// Copyright (C) 2016 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/particlesystem.hpp" - -#include "object/particlesystem.hpp" - -namespace scripting { - -void ParticleSystem::set_enabled(bool enable) -{ - SCRIPT_GUARD_VOID; - object.set_enabled(enable); -} - -bool ParticleSystem::get_enabled() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_enabled(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/particlesystem.hpp b/src/scripting/particlesystem.hpp deleted file mode 100644 index b1cd32412d2..00000000000 --- a/src/scripting/particlesystem.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// SuperTux - Sector scripting -// Copyright (C) 2016 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_PARTICLESYSTEM_HPP -#define HEADER_SUPERTUX_SCRIPTING_PARTICLESYSTEM_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class ParticleSystem; -#endif - -namespace scripting { - -/** - * @summary A ""ParticleSystem"" that was given a name can be controlled by scripts. - * @instances A ""ParticleSystem"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class ParticleSystem final -#ifndef SCRIPTING_API - : public GameObject<::ParticleSystem> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - ParticleSystem(const ParticleSystem&) = delete; - ParticleSystem& operator=(const ParticleSystem&) = delete; -#endif - -public: - /** - * Enables/disables the system. - * @param bool $enable - */ - void set_enabled(bool enable); - /** - * Returns whether the system is enabled. - */ - bool get_enabled() const; -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/platform.cpp b/src/scripting/platform.cpp deleted file mode 100644 index ddae013f0dd..00000000000 --- a/src/scripting/platform.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/platform.hpp" -#include "scripting/platform.hpp" - -namespace scripting { - -void -Platform::goto_node(int node_idx) -{ - SCRIPT_GUARD_VOID; - object.goto_node(node_idx); -} - -void -Platform::set_node(int node_idx) -{ - SCRIPT_GUARD_VOID; - object.jump_to_node(node_idx, /* instantaneous = */ true); -} - -void -Platform::start_moving() -{ - SCRIPT_GUARD_VOID; - object.start_moving(); -} - -void -Platform::stop_moving() -{ - SCRIPT_GUARD_VOID; - object.stop_moving(); -} - -std::string -Platform::get_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_action(); -} - -void -Platform::set_action(const std::string& action, int loops) -{ - SCRIPT_GUARD_VOID; - object.set_action(action, loops); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/platform.hpp b/src/scripting/platform.hpp deleted file mode 100644 index cb822c45ee0..00000000000 --- a/src/scripting/platform.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_PLATFORM_HPP -#define HEADER_SUPERTUX_SCRIPTING_PLATFORM_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Platform; -#endif - -namespace scripting { - -/** - * @summary A ""Platform"" that was given a name can be controlled by scripts. - It moves along a specified path. - * @instances A ""Platform"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Platform final -#ifndef SCRIPTING_API - : public GameObject<::Platform> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - Platform(const Platform&) = delete; - Platform& operator=(const Platform&) = delete; -#endif - -public: - /** - * Moves the platform until at given node, then stops. - * @param int $node_idx - */ - void goto_node(int node_idx); - - /** - * Jumps instantly to the given node. - * @param int $node_idx - */ - void set_node(int node_idx); - - /** - * Starts moving the platform automatically. - */ - void start_moving(); - - /** - * Stops moving the platform. - */ - void stop_moving(); - - /** - * Returns the current sprite action. - */ - std::string get_action() const; - /** - * Sets the sprite action. - * @param string $action - * @param int $loops - */ - void set_action(const std::string& action, int loops); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/player.cpp b/src/scripting/player.cpp deleted file mode 100644 index 49bbf425831..00000000000 --- a/src/scripting/player.cpp +++ /dev/null @@ -1,272 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/player.hpp" - -#include "control/controller.hpp" -#include "object/player.hpp" - -namespace scripting { - -bool -Player::add_bonus(const std::string& bonus) -{ - SCRIPT_GUARD_DEFAULT; - return object.add_bonus(bonus); -} - -bool -Player::set_bonus(const std::string& bonus) -{ - SCRIPT_GUARD_DEFAULT; - return object.set_bonus(bonus); -} - -std::string -Player::get_bonus() const -{ - SCRIPT_GUARD_DEFAULT; - return object.bonus_to_string(); -} - -void -Player::add_coins(int count) -{ - SCRIPT_GUARD_VOID; - object.add_coins(count); -} - -int -Player::get_coins() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_coins(); -} - -void -Player::make_invincible() -{ - SCRIPT_GUARD_VOID; - object.make_invincible(); -} - -void -Player::deactivate() -{ - SCRIPT_GUARD_VOID; - object.deactivate(); -} - -void -Player::activate() -{ - SCRIPT_GUARD_VOID; - object.activate(); -} - -void -Player::walk(float speed) -{ - SCRIPT_GUARD_VOID; - object.walk(speed); -} - -void -Player::set_dir(bool right) -{ - SCRIPT_GUARD_VOID; - object.set_dir(right); -} - -void -Player::set_visible(bool visible) -{ - SCRIPT_GUARD_VOID; - object.set_visible(visible); -} - -bool -Player::get_visible() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_visible(); -} - -void -Player::kill(bool completely) -{ - SCRIPT_GUARD_VOID; - object.kill(completely); -} - -void -Player::set_ghost_mode(bool enable) -{ - SCRIPT_GUARD_VOID; - object.set_ghost_mode(enable); -} - -bool -Player::get_ghost_mode() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_ghost_mode(); -} - -void -Player::kick() -{ - SCRIPT_GUARD_VOID; - object.kick(); -} - -void -Player::do_cheer() -{ - SCRIPT_GUARD_VOID; - object.do_cheer(); -} - -void -Player::do_duck() -{ - SCRIPT_GUARD_VOID; - object.do_duck(); -} - -void -Player::do_standup() -{ - SCRIPT_GUARD_VOID; - // Force standup for backwards compatibility - object.do_standup(true); -} - -void -Player::do_backflip() -{ - SCRIPT_GUARD_VOID; - object.do_backflip(); -} - -void -Player::do_jump(float yspeed) -{ - SCRIPT_GUARD_VOID; - object.do_jump(yspeed); -} - -void -Player::trigger_sequence(const std::string& sequence_name) -{ - SCRIPT_GUARD_VOID; - object.trigger_sequence(sequence_name); -} - -void -Player::use_scripting_controller(bool enable) -{ - SCRIPT_GUARD_VOID; - object.use_scripting_controller(enable); -} - -void -Player::do_scripting_controller(const std::string& control, bool pressed) -{ - SCRIPT_GUARD_VOID; - object.do_scripting_controller(control, pressed); -} - -float -Player::get_velocity_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_physic().get_velocity_x(); -} - -float -Player::get_velocity_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_physic().get_velocity_y(); -} - -void -Player::set_velocity(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.get_physic().set_velocity(x, y); -} - -bool -Player::has_grabbed(const std::string& name) const -{ - SCRIPT_GUARD_DEFAULT; - return object.has_grabbed(name); -} - -float -Player::get_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_bbox().get_left(); -} - -float -Player::get_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_bbox().get_top(); -} - -void -Player::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_pos(Vector(x, y)); -} - -std::string -Player::get_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_action(); -} - -bool -Player::get_input_pressed(const std::string& input) -{ - SCRIPT_GUARD_DEFAULT; - return object.get_controller().pressed(Control_from_string(input).value()); -} - -bool -Player::get_input_held(const std::string& input) -{ - SCRIPT_GUARD_DEFAULT; - return object.get_controller().hold(Control_from_string(input).value()); -} - -bool -Player::get_input_released(const std::string& input) -{ - SCRIPT_GUARD_DEFAULT; - return object.get_controller().released(Control_from_string(input).value()); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/player.hpp b/src/scripting/player.hpp deleted file mode 100644 index 653d9187142..00000000000 --- a/src/scripting/player.hpp +++ /dev/null @@ -1,248 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_PLAYER_HPP -#define HEADER_SUPERTUX_SCRIPTING_PLAYER_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class Player; -#endif - -namespace scripting { - -/** - * @summary This module contains methods controlling the player. (No, SuperTux doesn't use mind control. ""Player"" refers to the type of the player object.) - * @instances The first player can be accessed using ""Tux"", or ""sector.Tux"" from the console. - All following players (2nd, 3rd, etc...) can be accessed by ""Tux{index}"". - For example, to access the 2nd player, use ""Tux1"" (or ""sector.Tux1"" from the console). - */ -class Player final -#ifndef SCRIPTING_API - : public GameObject<::Player> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Player(const Player&) = delete; - Player& operator=(const Player&) = delete; -#endif - -public: - /** - * Gives Tux the specified bonus unless Tux’s current bonus is superior. - * @param string $bonus Can be "grow", "fireflower", "iceflower", "airflower" or "earthflower" at the moment. - */ - bool add_bonus(const std::string& bonus); - /** - * Gives Tux the specified bonus. - * @param string $bonus Can be "grow", "fireflower", "iceflower", "airflower" or "earthflower" at the moment. - */ - bool set_bonus(const std::string& bonus); - /** - * Gets Tux's current bonus. - */ - std::string get_bonus() const; - - /** - * Gives the player a number of coins.${SRG_TABLENEWPARAGRAPH} - * If count is a negative amount of coins, that number of coins will be taken - * from the player (until the number of coins the player has is 0, when it - * will stop changing). - * @param int $count - */ - void add_coins(int count); - /** - * Returns the number of coins the player currently has. - */ - int get_coins() const; - /** - * Make Tux invincible for a short amount of time. - */ - void make_invincible(); - /** - * Deactivate user/scripting input for Tux. - Carried items like trampolines won't be dropped. - */ - void deactivate(); - /** - * Give control back to user/scripting. - */ - void activate(); - /** - * Makes Tux walk. - * @param float $speed - */ - void walk(float speed); - /** - * Face Tux in the proper direction. - * @param bool $right Set to ""true"" to make Tux face right, ""false"" to face left. - */ - void set_dir(bool right); - /** - * Set Tux visible or invisible. - * @param bool $visible - */ - void set_visible(bool visible); - /** - * Returns ""true"" if Tux is currently visible (has not been set invisible by the ""set_visible()"" method). - */ - bool get_visible() const; - - /** - * Hurts Tux. - * @param bool $completely If true, he will be killed even if he had "grow" or a superior bonus. - */ - void kill(bool completely); - - /** - * Switches ghost mode on/off. Lets Tux float around and through solid objects. - * @param bool $enable - */ - void set_ghost_mode(bool enable); - - /** - * Returns whether ghost mode is currently enabled. - */ - bool get_ghost_mode() const; - - /** - * Start kick animation. - */ - void kick(); - - /** - * Play cheer animation.${SRG_TABLENEWPARAGRAPH} - * This might need some space and behave in an unpredictable way. It's best to use this at level end. - */ - void do_cheer(); - - /** - * Makes Tux duck down, if possible. Won't last long, as long as input is enabled. - */ - void do_duck(); - - /** - * Makes Tux stand back up, if possible. - */ - void do_standup(); - - /** - * Makes Tux do a backflip, if possible. - */ - void do_backflip(); - - /** - * Makes Tux jump in the air, if possible. - * @param float $yspeed - */ - void do_jump(float yspeed); - - /** - * Orders the current ""GameSession"" to start a sequence. - * @param string $sequence_name One of “stoptux”, “endsequence” or “fireworks”. - */ - void trigger_sequence(const std::string& sequence_name); - - /** - * Uses a scriptable controller for all user input (or restores controls). - * @param bool $enable - */ - void use_scripting_controller(bool enable); - - /** - * Instructs the scriptable controller to press or release a button. - * @param string $control Can be “left”, “right”, “up”, “down”, “jump”, “action”, “start”, “escape”, - “menu-select”, “menu-select-space”, “menu-back”, “remove”, “cheat-menu”, “debug-menu”, “console”, - “peek-left”, “peek-right”, “peek-up” or “peek-down”. - * @param bool $pressed - */ - void do_scripting_controller(const std::string& control, bool pressed); - - /** - * Returns whether the player is carrying a certain object. - * @param string $name Name of the portable object to check for. - */ - bool has_grabbed(const std::string& name) const; - - /** - * Returns Tux’s velocity in X direction. - */ - float get_velocity_x() const; - /** - * Returns Tux’s velocity in Y direction. - */ - float get_velocity_y() const; - - /** - * Sets the velocity of the player to a programmable/variable speed. - * @param float $x The speed Tux will move on the x axis. - * @param float $y The speed Tux will move on the y axis. - */ - void set_velocity(float x, float y); - - /** - * Gets the X coordinate of the player. - */ - float get_x() const; - /** - * Gets the Y coordinate of the player. - */ - float get_y() const; - - /** - * Sets the position of the player to a programmable/variable position. - * @param float $x X position. - * @param float $y Y position. - */ - void set_pos(float x, float y); - - /** - * Gets the player's current action/animation. - */ - std::string get_action() const; - - /** - * Gets whether the current input on the keyboard/controller/touchpad has been pressed. - * @param string $input Can be “left”, “right”, “up”, “down”, “jump”, “action”, “start”, “escape”, - “menu-select”, “menu-select-space”, “menu-back”, “remove”, “cheat-menu”, “debug-menu”, “console”, - “peek-left”, “peek-right”, “peek-up” or “peek-down”. - */ - bool get_input_pressed(const std::string& input); - - /** - * Gets whether the current input on the keyboard/controller/touchpad is being held. - * @param string $input Valid values are listed above. - */ - bool get_input_held(const std::string& input); - /** - * Gets whether the current input on the keyboard/controller/touchpad has been released. - * @param string $input Valid values are listed above. - */ - bool get_input_released(const std::string& input); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/rain.cpp b/src/scripting/rain.cpp deleted file mode 100644 index e5db4c3c35e..00000000000 --- a/src/scripting/rain.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "math/easing.hpp" -#include "object/rain_particle_system.hpp" -#include "scripting/rain.hpp" - -namespace scripting { - -void Rain::set_enabled(bool enable) -{ - SCRIPT_GUARD_VOID; - object.set_enabled(enable); -} - -bool Rain::get_enabled() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_enabled(); -} - -void Rain::fade_speed(float speed, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_speed(speed, time); -} - -void Rain::fade_amount(float amount, float time) -{ - SCRIPT_GUARD_VOID; - object.fade_amount(amount, time); -} - -void Rain::fade_angle(float angle, float time, const std::string& ease) -{ - SCRIPT_GUARD_VOID; - object.fade_angle(angle, time, getEasingByName(EasingMode_from_string(ease))); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/rain.hpp b/src/scripting/rain.hpp deleted file mode 100644 index dabe44c31b6..00000000000 --- a/src/scripting/rain.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_RAIN_HPP -#define HEADER_SUPERTUX_SCRIPTING_RAIN_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class RainParticleSystem; -#endif - -namespace scripting { - -/** - * @summary A ""RainParticleSystem"" that was given a name can be controlled by scripts. - * @instances A ""RainParticleSystem"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Rain final -#ifndef SCRIPTING_API - : public GameObject<::RainParticleSystem> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Rain(const Rain&) = delete; - Rain& operator=(const Rain&) = delete; -#endif - -public: - /** - * Enables/disables the system. - * @param bool $enable - */ - void set_enabled(bool enable); - /** - * Returns ""true"" if the system is enabled. - */ - bool get_enabled() const; - - /** - * Smoothly changes the rain speed to the given value in ""time"" seconds. - * @param float $speed - * @param float $time - */ - void fade_speed(float speed, float time); - - /** - * Smoothly changes the amount of particles to the given value in ""time"" seconds. - * @param float $amount - * @param float $time - */ - void fade_amount(float amount, float time); - - /** - * Smoothly changes the angle of the rain the given value in ""time"" seconds, according to the provided easing function. - * @param float $angle - * @param float $time - * @param string $ease - */ - /** */ - void fade_angle(float angle, float time, const std::string& ease); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/rock.hpp b/src/scripting/rock.hpp deleted file mode 100644 index 0fdce8a1bb6..00000000000 --- a/src/scripting/rock.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// SuperTux -// Copyright (C) 2016 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_ROCK_HPP -#define HEADER_SUPERTUX_SCRIPTING_ROCK_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Rock; -#endif - -namespace scripting { - -/** - * @summary A ""Rock"" that was given a name can be controlled by scripts. - * @instances A ""Rock"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Rock final -#ifndef SCRIPTING_API - : public GameObject<::Rock> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - Rock(const Rock&) = delete; - Rock& operator=(const Rock&) = delete; -#endif -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/scripted_object.cpp b/src/scripting/scripted_object.cpp deleted file mode 100644 index fe2baafd98e..00000000000 --- a/src/scripting/scripted_object.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// SuperTux -// Copyright (C) 2016 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/scripted_object.hpp" - -#include "object/scripted_object.hpp" - -namespace scripting { - -void -ScriptedObject::set_action(const std::string& animation) -{ - SCRIPT_GUARD_VOID; - object.set_action(animation); -} - -std::string -ScriptedObject::get_action() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_action(); -} - -std::string -ScriptedObject::get_name() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_name(); -} - -void -ScriptedObject::move(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.move(x, y); -} - -void -ScriptedObject::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_pos(Vector(x, y)); -} - -float -ScriptedObject::get_pos_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos_x(); -} - -float -ScriptedObject::get_pos_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos_y(); -} - -void -ScriptedObject::set_velocity(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_velocity(x, y); -} - -float -ScriptedObject::get_velocity_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_velocity_x(); -} - -float -ScriptedObject::get_velocity_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_velocity_y(); -} - -void -ScriptedObject::enable_gravity(bool enabled) -{ - SCRIPT_GUARD_VOID; - object.enable_gravity(enabled); -} - -bool -ScriptedObject::gravity_enabled() const -{ - SCRIPT_GUARD_DEFAULT; - return object.gravity_enabled(); -} - -void -ScriptedObject::set_visible(bool visible) -{ - SCRIPT_GUARD_VOID; - object.set_visible(visible); -} - -bool -ScriptedObject::is_visible() const -{ - SCRIPT_GUARD_DEFAULT; - return object.is_visible(); -} - -void -ScriptedObject::set_solid(bool solid) -{ - SCRIPT_GUARD_VOID; - return object.set_solid(solid); -} - -bool -ScriptedObject::is_solid() const -{ - SCRIPT_GUARD_DEFAULT; - return object.is_solid(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/scripted_object.hpp b/src/scripting/scripted_object.hpp deleted file mode 100644 index 4b3199bc210..00000000000 --- a/src/scripting/scripted_object.hpp +++ /dev/null @@ -1,135 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_SCRIPTED_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_SCRIPTED_OBJECT_HPP - -#ifndef SCRIPTING_API -#include -#include "scripting/game_object.hpp" - -class ScriptedObject; -#endif - -namespace scripting { - -/** - * @summary A ""ScriptedObject"" that was given a name can be controlled by scripts. - * @instances A ""ScriptedObject"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class ScriptedObject final -#ifndef SCRIPTING_API - : public GameObject<::ScriptedObject> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - ScriptedObject(const ScriptedObject&) = delete; - ScriptedObject& operator=(const ScriptedObject&) = delete; -#endif - -public: - /** - * Sets the sprite action/animation. - * @param string $animation - */ - void set_action(const std::string& animation); - /** - * Returns the current sprite action. - */ - std::string get_action() const; - - /** - * Returns the name of the object. - */ - std::string get_name() const; - - /** - * Moves the object by ""x"" units to the right and ""y"" down, relative to its current position. - * @param float $x - * @param float $y - */ - void move(float x, float y); - /** - * Identical to ""move()"", except it's relative to the sector origin. - * @param float $x - * @param float $y - */ - void set_pos(float x, float y); - /** - * Returns the X coordinate of the object's position. - */ - float get_pos_x() const; - /** - * Returns the Y coordinate of the object's position. - */ - float get_pos_y() const; - - /** - * Makes the object move in a certain ""x"" and ""y"" direction (with a certain speed). - * @param float $x - * @param float $y - */ - void set_velocity(float x, float y); - /** - * Returns the X coordinate of the object's velocity. - */ - float get_velocity_x() const; - /** - * Returns the Y coordinate of the object's velocity. - */ - float get_velocity_y() const; - - /** - * Enables or disables gravity, according to the value of ""enabled"". - * @param bool $enabled - */ - void enable_gravity(bool enabled); - /** - * Returns ""true"" if the object's gravity is enabled. - */ - bool gravity_enabled() const; - - /** - * Shows or hides the object, according to the value of ""visible"". - * @param bool $visible - */ - void set_visible(bool visible); - /** - * Returns ""true"" if the object is visible. - */ - bool is_visible() const; - - /** - * Changes the solidity, according to the value of ""solid"". - * @param bool $solid - */ - void set_solid(bool solid); - /** - * Returns ""true"" if the object is solid. - */ - bool is_solid() const; -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/sector.cpp b/src/scripting/sector.cpp deleted file mode 100644 index 7c2a0bff808..00000000000 --- a/src/scripting/sector.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/sector.hpp" - -#include "supertux/sector.hpp" - -namespace scripting { - -Sector::Sector(::Sector* parent) : - GameObjectManager(parent), - m_parent(parent) -{ -} - -void -Sector::set_gravity(float gravity) -{ - m_parent->set_gravity(gravity); -} - -bool -Sector::is_free_of_solid_tiles(float left, float top, float right, float bottom, - bool ignore_unisolid) const -{ - return m_parent->is_free_of_tiles(Rectf(Vector(left, top), Vector(right, bottom)), - ignore_unisolid, Tile::SOLID); -} - -bool -Sector::is_free_of_statics(float left, float top, float right, float bottom, - bool ignore_unisolid) const -{ - return m_parent->is_free_of_statics(Rectf(Vector(left, top), Vector(right, bottom)), - nullptr, ignore_unisolid); -} - -bool -Sector::is_free_of_movingstatics(float left, float top, float right, float bottom) const -{ - return m_parent->is_free_of_movingstatics(Rectf(Vector(left, top), Vector(right, bottom))); -} - -bool -Sector::is_free_of_specifically_movingstatics(float left, float top, float right, float bottom) const -{ - return m_parent->is_free_of_specifically_movingstatics(Rectf(Vector(left, top), Vector(right, bottom))); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/sector.hpp b/src/scripting/sector.hpp deleted file mode 100644 index bd3b8ed1b96..00000000000 --- a/src/scripting/sector.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// SuperTux - Sector scripting -// Copyright (C) 2006 Wolfgang Becker -// 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_SECTOR_HPP -#define HEADER_SUPERTUX_SCRIPTING_SECTOR_HPP - -#ifndef SCRIPTING_API -#include -#include "scripting/game_object_manager.hpp" -class Sector; -#endif - -namespace scripting { - -/** - * @summary This class provides additional controlling functions for a sector, other than the ones listed at ${SRG_REF_GameObjectManager}. - * @instances An instance under ""sector.settings"" is available from scripts and the console. - */ -class Sector final : public GameObjectManager -{ -#ifndef SCRIPTING_API -private: - ::Sector* m_parent; - -public: - Sector(::Sector* parent); - -private: - Sector(const Sector&) = delete; - Sector& operator=(const Sector&) = delete; -#endif - -public: - /** - * Sets the sector's gravity. - * @param float $gravity - */ - void set_gravity(float gravity); - - /** - * Checks if the specified sector-relative rectangle is free of solid tiles. - * @param float $left - * @param float $top - * @param float $right - * @param float $bottom - * @param bool $ignore_unisolid If ""true"", unisolid tiles will be ignored. - */ - bool is_free_of_solid_tiles(float left, float top, float right, float bottom, - bool ignore_unisolid) const; - /** - * Checks if the specified sector-relative rectangle is free of both: - 1) Solid tiles. - 2) ""MovingObject""s in ""COLGROUP_STATIC"". - Note that this does not include badguys or players. - * @param float $left - * @param float $top - * @param float $right - * @param float $bottom - * @param bool $ignore_unisolid If ""true"", unisolid tiles will be ignored. - */ - bool is_free_of_statics(float left, float top, float right, float bottom, - bool ignore_unisolid) const; - /** - * Checks if the specified sector-relative rectangle is free of both: - 1) Solid tiles. - 2) ""MovingObject""s in ""COLGROUP_STATIC"", ""COLGROUP_MOVINGSTATIC"" or ""COLGROUP_MOVING"". - This includes badguys and players. - * @param float $left - * @param float $top - * @param float $right - * @param float $bottom - */ - bool is_free_of_movingstatics(float left, float top, float right, float bottom) const; - /** - * Checks if the specified sector-relative rectangle is free of ""MovingObject""s in ""COLGROUP_MOVINGSTATIC"". - Note that this does not include moving badguys or players. - * @param float $left - * @param float $top - * @param float $right - * @param float $bottom - */ - bool is_free_of_specifically_movingstatics(float left, float top, float right, float bottom) const; -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/sound_object.cpp b/src/scripting/sound_object.cpp deleted file mode 100644 index d43442696f8..00000000000 --- a/src/scripting/sound_object.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// SuperTux -// Copyright (C) 2023 mrkubax10 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/sound_object.hpp" - -#include "object/sound_object.hpp" - -namespace scripting { - -void -SoundObject::start_playing() -{ - SCRIPT_GUARD_VOID; - object.play_looping_sounds(); -} - -void -SoundObject::stop_playing() -{ - SCRIPT_GUARD_VOID; - object.stop_looping_sounds(); -} - -void -SoundObject::set_volume(float volume) -{ - SCRIPT_GUARD_VOID; - object.set_volume(volume); -} - -float -SoundObject::get_volume() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_volume(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/sound_object.hpp b/src/scripting/sound_object.hpp deleted file mode 100644 index a6df79b9f5b..00000000000 --- a/src/scripting/sound_object.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// SuperTux -// Copyright (C) 2023 mrkubax10 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_SOUND_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_SOUND_OBJECT_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class SoundObject; -#endif - -namespace scripting { - -/** - * @summary A ""SoundObject"" that was given a name can be controlled by scripts. - * @instances A ""SoundObject"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class SoundObject final -#ifndef SCRIPTING_API - : public GameObject<::SoundObject> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - SoundObject(const SoundObject&) = delete; - SoundObject& operator=(const SoundObject&) = delete; -#endif - -public: - /** - * Starts playing sound if it was stopped previously. - */ - void start_playing(); - - /** - * Stops playing sound. - */ - void stop_playing(); - - /** - * Sets the volume of sound played by SoundObject. - * @param float $volume - */ - void set_volume(float volume); - - /** - * Returns the volume of sound played by SoundObject. - */ - float get_volume() const; -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/spotlight.cpp b/src/scripting/spotlight.cpp deleted file mode 100644 index 26d4c3c060a..00000000000 --- a/src/scripting/spotlight.cpp +++ /dev/null @@ -1,111 +0,0 @@ -// SuperTux -// Copyright (C) 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/spotlight.hpp" - -#include "object/spotlight.hpp" - -namespace scripting { - - -void -Spotlight::set_enabled(bool enabled) -{ - SCRIPT_GUARD_VOID; - object.set_enabled(enabled); -} - -bool -Spotlight::is_enabled() -{ - SCRIPT_GUARD_DEFAULT; - return object.is_enabled(); -} - -void -Spotlight::set_direction(const std::string& direction) -{ - SCRIPT_GUARD_VOID; - object.set_direction(::Spotlight::Direction_from_string(direction)); -} - -void -Spotlight::set_speed(float speed) -{ - SCRIPT_GUARD_VOID; - object.set_speed(speed); -} - -void -Spotlight::fade_speed(float speed, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_speed(time, speed); -} - -void -Spotlight::ease_speed(float speed, float time, const std::string& easing) -{ - SCRIPT_GUARD_VOID; - object.ease_speed(time, speed, EasingMode_from_string(easing)); -} - -void -Spotlight::set_angle(float angle) -{ - SCRIPT_GUARD_VOID; - object.set_angle(angle); -} - -void -Spotlight::fade_angle(float angle, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_angle(time, angle); -} - -void -Spotlight::ease_angle(float angle, float time, const std::string& easing) -{ - SCRIPT_GUARD_VOID; - object.ease_angle(time, angle, EasingMode_from_string(easing)); -} - -void -Spotlight::set_color_rgba(float r, float g, float b, float a) -{ - SCRIPT_GUARD_VOID; - object.set_color(Color(r, g, b, a)); -} - -void -Spotlight::fade_color_rgba(float r, float g, float b, float a, float time) -{ - SCRIPT_GUARD_VOID; - object.ease_color(time, Color(r, g, b, a)); -} - -void -Spotlight::ease_color_rgba(float r, float g, float b, float a, float time, std::string easing) -{ - SCRIPT_GUARD_VOID; - object.ease_color(time, Color(r, g, b, a), EasingMode_from_string(easing)); -} - - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/spotlight.hpp b/src/scripting/spotlight.hpp deleted file mode 100644 index a9db34a4d88..00000000000 --- a/src/scripting/spotlight.hpp +++ /dev/null @@ -1,137 +0,0 @@ -// SuperTux -// Copyright (C) 2021 A. Semphris -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_SPOTLIGHT_HPP -#define HEADER_SUPERTUX_SCRIPTING_SPOTLIGHT_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class Spotlight; -#endif - -namespace scripting { - -/** - * @summary A ""Spotlight"" that was given a name can be controlled by scripts. - * @instances A ""Spotlight"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Spotlight final -#ifndef SCRIPTING_API - : public GameObject<::Spotlight> -#endif -{ -#ifndef SCRIPTING_API -private: - using GameObject::GameObject; - -private: - Spotlight(const Spotlight&) = delete; - Spotlight& operator=(const Spotlight&) = delete; -#endif - -public: - /** - * Enables/disables the spotlight. - * @param bool $enabled - */ - void set_enabled(bool enabled); - /** - * Returns ""true"" if the spotlight is enabled. - */ - bool is_enabled(); - - /** - * Sets the direction of the spotlight. - * @param string $direction - */ - void set_direction(const std::string& direction); - - /** - * Sets the angle of the spotlight. - * @param float $angle - */ - void set_angle(float angle); - /** - * Fades the angle of the spotlight in ""time"" seconds. - * @param float $angle - * @param float $time - */ - void fade_angle(float angle, float time); - /** - * Fades the angle of the spotlight in ""time"" seconds, with easing. - * @param float $angle - * @param float $time - * @param string $easing - */ - void ease_angle(float angle, float time, const std::string& easing); - - /** - * Sets the speed of the spotlight. - * @param float $speed - */ - void set_speed(float speed); - /** - * Fades the speed of the spotlight in ""time"" seconds. - * @param float $speed - * @param float $time - */ - void fade_speed(float speed, float time); - /** - * Fades the speed of the spotlight in ""time"" seconds, with easing. - * @param float $speed - * @param float $time - * @param string $easing - */ - void ease_speed(float speed, float time, const std::string& easing); - - /** - * Sets the RGBA color of the spotlight. - * @param float $r - * @param float $g - * @param float $b - * @param float $a - */ - void set_color_rgba(float r, float g, float b, float a); - /** - * Fades the spotlight to a new RGBA color in ""time"" seconds. - * @param float $r - * @param float $g - * @param float $b - * @param float $a - * @param float $time - */ - void fade_color_rgba(float r, float g, float b, float a, float time); - /** - * Fades the spotlight to a new RGBA color in ""time"" seconds, with easing. - * @param float $r - * @param float $g - * @param float $b - * @param float $a - * @param float $time - * @param string $easing - */ - void ease_color_rgba(float r, float g, float b, float a, float time, std::string easing); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/text_array_object.cpp b/src/scripting/text_array_object.cpp deleted file mode 100644 index 23b88aa37b6..00000000000 --- a/src/scripting/text_array_object.cpp +++ /dev/null @@ -1,320 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Nir -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/text_array_object.hpp" - -#include "object/text_array_object.hpp" -#include "object/text_object.hpp" -#include "supertux/sector.hpp" - -namespace scripting { - -TextArrayObject::TextArrayObject() : - GameObject(get_sector().add<::TextArrayObject>()) -{ -} - -void -TextArrayObject::add_text_duration(const std::string& text, float duration) -{ - SCRIPT_GUARD_VOID; - object.add_text(text, duration); -} - -void -TextArrayObject::add_text(const std::string& text) -{ - SCRIPT_GUARD_VOID; - object.add_text(text); -} - -void -TextArrayObject::clear() -{ - SCRIPT_GUARD_VOID; - object.clear(); -} - -void -TextArrayObject::set_fade_transition(bool fade_transition) -{ - SCRIPT_GUARD_VOID; - object.set_fade_transition(fade_transition); -} - -void -TextArrayObject::set_fade_time(float fadetime) -{ - SCRIPT_GUARD_VOID; - object.set_fade_time(fadetime); -} - -void -TextArrayObject::set_text_index(int index) -{ - SCRIPT_GUARD_VOID; - object.set_text_index(index); -} - -void -TextArrayObject::next_text() -{ - SCRIPT_GUARD_VOID; - object.next_text(); -} - -void -TextArrayObject::prev_text() -{ - SCRIPT_GUARD_VOID; - object.prev_text(); -} - -void -TextArrayObject::set_keep_visible(bool keep_visible) -{ - SCRIPT_GUARD_VOID; - object.set_keep_visible(keep_visible); -} - -void -TextArrayObject::set_done(bool done) -{ - SCRIPT_GUARD_VOID; - object.set_done(done); -} - -void -TextArrayObject::set_auto(bool is_auto) -{ - SCRIPT_GUARD_VOID; - object.set_auto(is_auto); -} - -/////////// text api - -void -TextArrayObject::set_text(const std::string& text) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_text(text); - } - else { - object.add_text(text); - } -} - -void -TextArrayObject::set_font(const std::string& fontname) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_font(fontname); - } -} - -void -TextArrayObject::fade_in(float fadetime) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.fade_in(fadetime); - } -} - -void -TextArrayObject::fade_out(float fadetime) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.fade_out(fadetime); - } -} - -void -TextArrayObject::grow_in(float fadetime) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.grow_in(fadetime); - } -} - -void -TextArrayObject::grow_out(float fadetime) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.grow_out(fadetime); - } -} - -void -TextArrayObject::set_visible(bool visible) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_visible(visible); - } -} - -void -TextArrayObject::set_centered(bool centered) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_centered(centered); - } -} - -void -TextArrayObject::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_pos(Vector(x, y)); - } -} - -float -TextArrayObject::get_pos_x() const -{ - SCRIPT_GUARD_DEFAULT; - - if (auto* textItem = object.get_current_text_item()) { - return textItem->text_object.get_pos().x; - } else { - log_warning << "TextArrayObject position is not set. Assuming (0,0)" << std::endl; - return 0; - } -} - -float -TextArrayObject::get_pos_y() const -{ - SCRIPT_GUARD_DEFAULT; - - if (auto* textItem = object.get_current_text_item()) { - return textItem->text_object.get_pos().y; - } else { - log_warning << "TextArrayObject position is not set. Assuming (0,0)" << std::endl; - return 0; - } -} - -void -TextArrayObject::set_anchor_point(int anchor) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_anchor_point(static_cast(anchor)); - } -} - -int -TextArrayObject::get_anchor_point() const -{ - SCRIPT_GUARD_DEFAULT; - - if (auto* textItem = object.get_current_text_item()) { - return textItem->text_object.get_anchor_point(); - } else { - return -1; - } -} - -void -TextArrayObject::set_anchor_offset(float x, float y) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_anchor_offset(Vector(x, y)); - } -} - -float -TextArrayObject::get_wrap_width() const -{ - SCRIPT_GUARD_DEFAULT; - - if (auto* textItem = object.get_current_text_item()) { - return textItem->text_object.get_wrap_width(); - } else { - return 0; - } -} - -void -TextArrayObject::set_wrap_width(float width) -{ - SCRIPT_GUARD_VOID; - - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_wrap_width(width); - } -} - -void -TextArrayObject::set_front_fill_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_front_fill_color(Color(red, green, blue, alpha)); - } -} - -void -TextArrayObject::set_back_fill_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_back_fill_color(Color(red, green, blue, alpha)); - } -} - -void -TextArrayObject::set_text_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_text_color(Color(red, green, blue, alpha)); - } -} - -void -TextArrayObject::set_roundness(float roundness) -{ - SCRIPT_GUARD_VOID; - if (auto* textItem = object.get_current_text_item()) { - textItem->text_object.set_roundness(roundness); - } -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/text_array_object.hpp b/src/scripting/text_array_object.hpp deleted file mode 100644 index 880254f0077..00000000000 --- a/src/scripting/text_array_object.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// SuperTux -// Copyright (C) 2018 Nir -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_TEXT_ARRAY_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_TEXT_ARRAY_OBJECT_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/game_object.hpp" - -class TextArrayObject; -#endif - - -namespace scripting { - -/** - * @summary A ""TextArrayObject"" that was given a name (or manually instantiated) can be controlled by scripts. - Supports all functions of ${SRG_REF_Text}, applying them to the current text item.${SRG_NEWPARAGRAPH} - Intended for scripts with narration. - * @instances A ""TextArrayObject"" instance is already provided in sectors under ""sector.TextArray"".${SRG_NEWPARAGRAPH} - A ""TextArrayObject"" can also be created in a script or from the console. Constructor:${SRG_NEWPARAGRAPH} - """""" <- TextArrayObject()"""""" - */ -class TextArrayObject final -#ifndef SCRIPTING_API - : public GameObject<::TextArrayObject> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - TextArrayObject(const TextArrayObject&) = delete; - TextArrayObject& operator=(const TextArrayObject&) = delete; -#endif - -public: - TextArrayObject(); - - /* - * The text array api. - * @see: text_array_object.hpp - */ - /** - * Clears all text objects from the stack. - */ - void clear(); - /** - * Adds a text object with a specific text at the end of the stack. - * @param string $text - */ - void add_text(const std::string& text); - /** - * Adds a text object with a specific text and duration at the end of the stack. - * @param string $text - * @param float $duration - */ - void add_text_duration(const std::string& text, float duration); - /** - * Sets the current text object by its index. - * @param int $index - */ - void set_text_index(int index); - /** - * If set, keeps the current text object visible. - * @param bool $keep_visible - */ - void set_keep_visible(bool keep_visible); - /** - * If set, allows for a fade-in and fade-out transition. - * @param bool $fade_transition - */ - void set_fade_transition(bool fade_transition); - /** - * Sets the fade-in and fade-out time. - * @param float $fadetime - */ - void set_fade_time(float fadetime); - /** - * If set, sets the text array as finished going through all text objects. - * @param bool $done - */ - void set_done(bool done); - /** - * If set, lets the text array automatically go through all text objects. - * @param bool $is_auto - */ - void set_auto(bool is_auto); - /** - * If available, goes to the next text object in the stack. - */ - void next_text(); - /** - * If available, goes to the previous text object in the stack. - */ - void prev_text(); - -#ifndef DOXYGEN_SCRIPTING - /* - * Text object api related - * @see: text_object.hpp - */ - void set_text(const std::string& text); - void set_font(const std::string& fontname); - void fade_in(float fadetime); - void fade_out(float fadetime); - void grow_in(float fadetime); - void grow_out(float fadetime); - void set_visible(bool visible); - void set_centered(bool centered); - void set_pos(float x, float y); - float get_pos_x() const; - float get_pos_y() const; - void set_anchor_point(int anchor); - int get_anchor_point() const; - void set_anchor_offset(float x, float y); - float get_wrap_width() const; - void set_wrap_width(float width); - void set_front_fill_color(float red, float green, float blue, float alpha); - void set_back_fill_color(float red, float green, float blue, float alpha); - void set_text_color(float red, float green, float blue, float alpha); - void set_roundness(float roundness); -#endif -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/text_object.cpp b/src/scripting/text_object.cpp deleted file mode 100644 index 4639710dd42..00000000000 --- a/src/scripting/text_object.cpp +++ /dev/null @@ -1,172 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/text_object.hpp" - -#include "object/text_object.hpp" -#include "supertux/sector.hpp" -#include "worldmap/worldmap.hpp" - -namespace scripting { - -TextObject::TextObject() : - GameObject(get_sector().add<::TextObject>()) -{ -} - -void -TextObject::set_text(const std::string& text) -{ - SCRIPT_GUARD_VOID; - object.set_text(text); -} - -void -TextObject::set_font(const std::string& fontname) -{ - SCRIPT_GUARD_VOID; - object.set_font(fontname); -} - -void -TextObject::fade_in(float fadetime) -{ - SCRIPT_GUARD_VOID; - object.fade_in(fadetime); -} - -void -TextObject::fade_out(float fadetime) -{ - SCRIPT_GUARD_VOID; - object.fade_out(fadetime); -} - -void -TextObject::grow_in(float fadetime) -{ - SCRIPT_GUARD_VOID; - object.grow_in(fadetime); -} - -void -TextObject::grow_out(float fadetime) -{ - SCRIPT_GUARD_VOID; - object.grow_out(fadetime); -} - -void -TextObject::set_visible(bool visible) -{ - SCRIPT_GUARD_VOID; - object.set_visible(visible); -} - -void -TextObject::set_centered(bool centered) -{ - SCRIPT_GUARD_VOID; - object.set_centered(centered); -} - -void -TextObject::set_pos(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_pos(Vector(x, y)); -} - -float -TextObject::get_pos_x() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos().x; -} - -float -TextObject::get_pos_y() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_pos().y; -} - -void -TextObject::set_anchor_point(int anchor) -{ - SCRIPT_GUARD_VOID; - object.set_anchor_point(static_cast(anchor)); -} - -int -TextObject::get_anchor_point() const -{ - SCRIPT_GUARD_DEFAULT; - return static_cast(object.get_anchor_point()); -} - -void -TextObject::set_anchor_offset(float x, float y) -{ - SCRIPT_GUARD_VOID; - object.set_anchor_offset(Vector(x, y)); -} - -float -TextObject::get_wrap_width() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_wrap_width(); -} - -void -TextObject::set_wrap_width(float width) -{ - SCRIPT_GUARD_VOID; - object.set_wrap_width(width); -} - -void -TextObject::set_front_fill_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - object.set_front_fill_color(Color(red, green, blue, alpha)); -} - -void -TextObject::set_back_fill_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - object.set_back_fill_color(Color(red, green, blue, alpha)); -} - -void -TextObject::set_text_color(float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - object.set_text_color(Color(red, green, blue, alpha)); -} - -void -TextObject::set_roundness(float roundness) -{ - SCRIPT_GUARD_VOID; - object.set_roundness(roundness); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/text_object.hpp b/src/scripting/text_object.hpp deleted file mode 100644 index 2c80c05f8d6..00000000000 --- a/src/scripting/text_object.hpp +++ /dev/null @@ -1,165 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_TEXT_OBJECT_HPP -#define HEADER_SUPERTUX_SCRIPTING_TEXT_OBJECT_HPP - -#ifndef SCRIPTING_API -#include -#include "scripting/game_object.hpp" - -class TextObject; -#endif - -namespace scripting { - -/** - * @summary A ""TextObject"" that was given a name (or manually instantiated) can be controlled by scripts. - * @instances A ""TextObject"" instance is already provided in sectors under ""sector.Text"".${SRG_NEWPARAGRAPH} - A ""TextObject"" can also be created in a script or from the console. Constructor:${SRG_NEWPARAGRAPH} - """""" <- TextObject()"""""" - */ -class TextObject final -#ifndef SCRIPTING_API - : public GameObject<::TextObject> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; - -private: - TextObject(const TextObject&) = delete; - TextObject& operator=(const TextObject&) = delete; -#endif - -public: - TextObject(); - - /** - * Sets the text string to be displayed. - * @param string $text - */ - void set_text(const std::string& text); - /** - * Sets the font of the text to be displayed. - * @param string $fontname Valid values are normal, big and small. - */ - void set_font(const std::string& fontname); - /** - * Fades in the specified text for the next ""fadetime"" seconds. - * @param float $fadetime - */ - void fade_in(float fadetime); - /** - * Fades out the specified text for the next ""fadetime"" seconds. - * @param float $fadetime - */ - void fade_out(float fadetime); - /** - * Grows in the specified text for the next ""fadetime"" seconds. - * @param float $fadetime - */ - void grow_in(float fadetime); - /** - * Grows out the specified text for the next ""fadetime"" seconds. - * @param float $fadetime - */ - void grow_out(float fadetime); - /** - * Shows or hides the text abruptly (drastic counterpart to ""fade_in()"" and ""fade_out()""). - * @param bool $visible - */ - void set_visible(bool visible); - /** - * If ""centered"" is ""true"", the text will be centered on the screen. Otherwise, it will be left-aligned. - * @param bool $centered - */ - void set_centered(bool centered); - /** - * Sets the offset of the text, relative to the anchor point. - * @param float $x - * @param float $y - */ - void set_pos(float x, float y); - /** - * Returns the X offset of the text, relative to the anchor point. - */ - float get_pos_x() const; - /** - * Returns the Y offset of the text, relative to the anchor point. - */ - float get_pos_y() const; - /** - * Sets the anchor point of the text. - * @param int $anchor One of the ""ANCHOR_*"" constants (see ${SRG_REF_AnchorPoints}). - */ - void set_anchor_point(int anchor); - /** - * Returns the current anchor point of the text (one of the ""ANCHOR_*"" constants; see ${SRG_REF_AnchorPoints}). - */ - int get_anchor_point() const; - /** - * Sets the anchor offset of the text. - * @param float $x - * @param float $y - */ - void set_anchor_offset(float x, float y); - /** - * Gets the text wrap width of the text. - */ - float get_wrap_width() const; - /** - * Sets the text wrap width of the text. - * @param float $width - */ - void set_wrap_width(float width); - /** - * Sets the front fill color of the text. - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - */ - void set_front_fill_color(float red, float green, float blue, float alpha); - /** - * Sets the back fill color of the text. - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - */ - void set_back_fill_color(float red, float green, float blue, float alpha); - /** - * Sets the text color. - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - */ - void set_text_color(float red, float green, float blue, float alpha); - /** - * Sets the frame's roundness. - * @param float $roundness - */ - void set_roundness(float roundness); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/thunderstorm.cpp b/src/scripting/thunderstorm.cpp deleted file mode 100644 index 3eb5ac873e7..00000000000 --- a/src/scripting/thunderstorm.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/thunderstorm.hpp" - -namespace scripting { - -void Thunderstorm::start() -{ - SCRIPT_GUARD_VOID; - object.start(); -} - -void Thunderstorm::stop() -{ - SCRIPT_GUARD_VOID; - object.stop(); -} - -void Thunderstorm::thunder() -{ - SCRIPT_GUARD_VOID; - object.thunder(); -} - -void Thunderstorm::lightning() -{ - SCRIPT_GUARD_VOID; - object.lightning(); -} - -void Thunderstorm::flash() -{ - SCRIPT_GUARD_VOID; - object.flash(); -} - -void Thunderstorm::electrify() -{ - SCRIPT_GUARD_VOID; - object.electrify(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/thunderstorm.hpp b/src/scripting/thunderstorm.hpp deleted file mode 100644 index 1e2ca560865..00000000000 --- a/src/scripting/thunderstorm.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_THUNDERSTORM_HPP -#define HEADER_SUPERTUX_SCRIPTING_THUNDERSTORM_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Thunderstorm; -#endif - -namespace scripting { - -/** - * @summary A ""Thunderstorm"" that was given a name can be controlled by scripts. - * @instances A ""Thunderstorm"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Thunderstorm final -#ifndef SCRIPTING_API - : public GameObject<::Thunderstorm> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - Thunderstorm(const Thunderstorm&) = delete; - Thunderstorm& operator=(const Thunderstorm&) = delete; -#endif - -public: - /** - * Starts playing thunder and lightning at a configured interval. - */ - void start(); - - /** - * Stops playing thunder and lightning at a configured interval. - */ - void stop(); - - /** - * Plays thunder. - */ - void thunder(); - - /** - * Plays lightning, i.e. calls ""flash()"" and ""electrify()"". - */ - void lightning(); - - /** - * Displays a flash. - */ - void flash(); - - /** - * Electrifies water throughout the whole sector for a short time. - */ - void electrify(); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/tilemap.cpp b/src/scripting/tilemap.cpp deleted file mode 100644 index b78dc5fa7c9..00000000000 --- a/src/scripting/tilemap.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/tilemap.hpp" -#include "scripting/tilemap.hpp" - -namespace scripting { - -void -TileMap::goto_node(int node_idx) -{ - SCRIPT_GUARD_VOID; - object.goto_node(node_idx); -} - -void -TileMap::set_node(int node_idx) -{ - SCRIPT_GUARD_VOID; - object.jump_to_node(node_idx, /* instantaneous = */ true); -} - -void -TileMap::start_moving() -{ - SCRIPT_GUARD_VOID; - object.start_moving(); -} - -void -TileMap::stop_moving() -{ - SCRIPT_GUARD_VOID; - object.stop_moving(); -} - -int -TileMap::get_tile_id(int x, int y) const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_tile_id(x, y); -} - -int -TileMap::get_tile_id_at(float x, float y) const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_tile_id_at( Vector(x, y) ); -} - -void -TileMap::change(int x, int y, int newtile) -{ - SCRIPT_GUARD_VOID; - object.change(x, y, newtile); -} - -void -TileMap::change_at(float x, float y, int newtile) -{ - SCRIPT_GUARD_VOID; - object.change_at(Vector(x, y), newtile); -} - -void -TileMap::fade(float alpha, float time) -{ - SCRIPT_GUARD_VOID; - object.fade(alpha, time); -} - -void -TileMap::tint_fade(float time, float red, float green, float blue, float alpha) -{ - SCRIPT_GUARD_VOID; - object.tint_fade(Color(red, green, blue, alpha), time); -} - -void -TileMap::set_alpha(float alpha) -{ - SCRIPT_GUARD_VOID; - object.set_alpha(alpha); -} - -float -TileMap::get_alpha() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_alpha(); -} - -void -TileMap::set_solid(bool solid) -{ - SCRIPT_GUARD_VOID; - object.set_solid(solid); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/tilemap.hpp b/src/scripting/tilemap.hpp deleted file mode 100644 index bb3943ff96a..00000000000 --- a/src/scripting/tilemap.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_TILEMAP_HPP -#define HEADER_SUPERTUX_SCRIPTING_TILEMAP_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class TileMap; -#endif - -namespace scripting { - -/** - * @summary A ""TileMap"" that was given a name can be controlled by scripts. - The tilemap can be moved by specifying a path for it. - * @instances A ""TileMap"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class TileMap final -#ifndef SCRIPTING_API - : public GameObject<::TileMap> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - TileMap(const TileMap&) = delete; - TileMap& operator=(const TileMap&) = delete; -#endif - -public: - /** - * Moves the tilemap along a path until at given node, then stops. - * @param int $node_idx - */ - void goto_node(int node_idx); - - /** - * Jumps instantly to the given node. - * @param int $node_idx - */ - void set_node(int node_idx); - - /** - * Starts moving the tilemap. - */ - void start_moving(); - - /** - * Stops the tilemap at the next node. - */ - void stop_moving(); - - /** - * Returns the ID of the tile at the given coordinates or 0 if out of bounds. - The origin is at the top left. - * @param int $x - * @param int $y - */ - int get_tile_id(int x, int y) const; - - /** - * Returns the ID of the tile at the given position (in-world coordinates). - * @param float $x - * @param float $y - */ - int get_tile_id_at(float x, float y) const; - - /** - * Changes the tile at the given coordinates to ""newtile"". - The origin is at the top left. - * @param int $x - * @param int $y - * @param int $newtile - */ - void change(int x, int y, int newtile); - - /** - * Changes the tile at the given position (in-world coordinates) to ""newtile"". - * @param float $x - * @param float $y - * @param int $newtile - */ - void change_at(float x, float y, int newtile); - - /** - * Starts fading the tilemap to the opacity given by ""alpha"". - * Destination opacity will be reached after ""time"" seconds. Also influences solidity. - * @param float $alpha - * @param float $time - */ - void fade(float alpha, float time); - - /** - * Starts fading the tilemap to tint given by RGBA. - * Destination opacity will be reached after ""time"" seconds. Doesn't influence solidity. - * @param float $time - * @param float $red - * @param float $green - * @param float $blue - * @param float $alpha - */ - void tint_fade(float time, float red, float green, float blue, float alpha); - - /** - * Instantly switches the tilemap's opacity to ""alpha"". Also influences solidity. - * @param float $alpha - */ - void set_alpha(float alpha); - - /** - * Returns the tilemap's opacity.${SRG_TABLENEWPARAGRAPH} - Note that while the tilemap is fading in or out, this will return the current alpha value, not the target alpha. - */ - float get_alpha() const; - - /** - * Switches the tilemap's real solidity to ""solid"".${SRG_TABLENEWPARAGRAPH} - Note that the effective solidity is also influenced by the alpha of the tilemap. - * @param bool $solid - */ - void set_solid(bool solid); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/torch.cpp b/src/scripting/torch.cpp deleted file mode 100644 index 3ce0098ceb0..00000000000 --- a/src/scripting/torch.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// Copyright (C) 2017 M. Teufel -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "object/torch.hpp" -#include "scripting/torch.hpp" - -namespace scripting { - -bool -Torch::get_burning() const -{ - SCRIPT_GUARD_DEFAULT; - return object.get_burning(); -} - -void -Torch::set_burning(bool burning) -{ - SCRIPT_GUARD_VOID; - object.set_burning(burning); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/torch.hpp b/src/scripting/torch.hpp deleted file mode 100644 index ae80c5f4624..00000000000 --- a/src/scripting/torch.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// Copyright (C) 2017 M. Teufel -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_TORCH_HPP -#define HEADER_SUPERTUX_SCRIPTING_TORCH_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Torch; -#endif - -namespace scripting { - -/** - * @summary A ""Torch"" that was given a name can be controlled by scripts. - * @instances A ""Torch"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Torch final -#ifndef SCRIPTING_API - : public GameObject<::Torch> -#endif -{ -public: -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - Torch(const Torch&) = delete; - Torch& operator=(const Torch&) = delete; -#endif - -public: - /** - * Returns ""true"" if the torch is burning. - */ - bool get_burning() const; - /** - * Switches the burning state of the torch. - * @param bool $burning - */ - void set_burning(bool burning); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/willowisp.cpp b/src/scripting/willowisp.cpp deleted file mode 100644 index fe749b5b603..00000000000 --- a/src/scripting/willowisp.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// SuperTux -// Copyright (C) 2015 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/willowisp.hpp" - -#include "badguy/willowisp.hpp" - -namespace scripting { - -void -WillOWisp::goto_node(int node_idx) -{ - SCRIPT_GUARD_VOID_T(WillOWisp); - object.goto_node(node_idx); -} - -void -WillOWisp::set_state(const std::string& state) -{ - SCRIPT_GUARD_VOID_T(WillOWisp); - object.set_state(state); -} - -void -WillOWisp::start_moving() -{ - SCRIPT_GUARD_VOID_T(WillOWisp); - object.start_moving(); -} - -void -WillOWisp::stop_moving() -{ - SCRIPT_GUARD_VOID_T(WillOWisp); - object.stop_moving(); -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/willowisp.hpp b/src/scripting/willowisp.hpp deleted file mode 100644 index fac13883c4a..00000000000 --- a/src/scripting/willowisp.hpp +++ /dev/null @@ -1,84 +0,0 @@ -// SuperTux -// Copyright (C) 2007 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_WILLOWISP_HPP -#define HEADER_SUPERTUX_SCRIPTING_WILLOWISP_HPP - -#ifndef SCRIPTING_API -#include - -#include "scripting/badguy.hpp" - -class WillOWisp; -#endif - -namespace scripting { - -/** - * @summary A ""WillOWisp"" that was given a name can be controlled by scripts. - The WillOWisp can be moved by specifying a path for it. - * @instances A ""WillOWisp"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class WillOWisp final : public scripting::BadGuy -#ifndef SCRIPTING_API - , virtual public GameObject<::WillOWisp> -#endif -{ -#ifndef SCRIPTING_API -public: - WillOWisp(const ::GameObject& object) : - GameObject<::BadGuy>(object), - GameObject<::WillOWisp>(object), - BadGuy(object) - {} - -private: - WillOWisp(const WillOWisp&) = delete; - WillOWisp& operator=(const WillOWisp&) = delete; -#endif - -public: - /** - * Moves the WillOWisp along a path until at given node, then stops. - * @param int $node_idx - */ - void goto_node(int node_idx); - - /** - * Sets the state of the WillOWisp. - * @param string $state One of the following: "stopped", "move_path" (moves along a path), - "move_path_track" (moves along a path but catches Tux when he is near), "normal" (starts tracking Tux when he is near enough), - "vanish". - */ - void set_state(const std::string& state); - - /** - * Starts following a path. - */ - void start_moving(); - /** - * Stops following a path. - */ - void stop_moving(); -}; - -} // namespace scripting - -#endif - -/* EOF - */ diff --git a/src/scripting/wind.hpp b/src/scripting/wind.hpp deleted file mode 100644 index 4f4e12aacca..00000000000 --- a/src/scripting/wind.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_WIND_HPP -#define HEADER_SUPERTUX_SCRIPTING_WIND_HPP - -#ifndef SCRIPTING_API -#include "scripting/game_object.hpp" - -class Wind; -#endif - -namespace scripting { - -/** - * @summary A ""Wind"" that was given a name can be controlled by scripts. - * @instances A ""Wind"" is instantiated by placing a definition inside a level. - It can then be accessed by its name from a script or via ""sector.name"" from the console. - */ -class Wind final -#ifndef SCRIPTING_API - : public GameObject<::Wind> -#endif -{ -#ifndef SCRIPTING_API -public: - using GameObject::GameObject; -private: - Wind(const Wind&) = delete; - Wind& operator=(const Wind&) = delete; -#endif - -public: - /** - * Starts blowing. - */ - void start(); - - /** - * Stops blowing. - */ - void stop(); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/worldmap_sector.cpp b/src/scripting/worldmap_sector.cpp deleted file mode 100644 index 9230317c8d6..00000000000 --- a/src/scripting/worldmap_sector.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// SuperTux -// Copyright (C) 2021 A. Semphris -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "scripting/worldmap_sector.hpp" - -#include "worldmap/worldmap.hpp" - -namespace scripting { - -WorldMapSector::WorldMapSector(::worldmap::WorldMapSector* parent) : - GameObjectManager(parent), - m_parent(parent) -{ -} - -float -WorldMapSector::get_tux_x() const -{ - return m_parent->get_tux_pos().x; -} - -float -WorldMapSector::get_tux_y() const -{ - return m_parent->get_tux_pos().y; -} - -void -WorldMapSector::set_sector(const std::string& sector) -{ - SCRIPT_GUARD_WORLDMAP; - worldmap.set_sector(sector); -} - -void -WorldMapSector::spawn(const std::string& sector, const std::string& spawnpoint) -{ - SCRIPT_GUARD_WORLDMAP; - worldmap.set_sector(sector, spawnpoint); -} - -void -WorldMapSector::move_to_spawnpoint(const std::string& spawnpoint) -{ - m_parent->move_to_spawnpoint(spawnpoint); -} - -std::string -WorldMapSector::get_filename() const -{ - SCRIPT_GUARD_WORLDMAP; - return worldmap.get_filename(); -} - -void -WorldMapSector::set_title_level(const std::string& filename) -{ - SCRIPT_GUARD_WORLDMAP; - worldmap.get_savegame().get_player_status().title_level = filename; -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/worldmap_sector.hpp b/src/scripting/worldmap_sector.hpp deleted file mode 100644 index 4f01e0830de..00000000000 --- a/src/scripting/worldmap_sector.hpp +++ /dev/null @@ -1,104 +0,0 @@ -// SuperTux -// Copyright (C) 2021 A. Semphris -// 2023 Vankata453 -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SCRIPTING_WORLDMAP_SECTOR_HPP -#define HEADER_SUPERTUX_SCRIPTING_WORLDMAP_SECTOR_HPP - -#ifndef SCRIPTING_API - -#include - -#include "scripting/game_object_manager.hpp" - -namespace worldmap { - class WorldMapSector; -} - -/** Macro to allow quick and easy access to the parent worldmap. **/ -#define SCRIPT_GUARD_WORLDMAP \ - auto& worldmap = m_parent->get_worldmap() - -#endif - -namespace scripting { - -/** - * @summary This class provides additional controlling functions for a worldmap sector, other than the ones listed at ${SRG_REF_GameObjectManager}. - * @instances An instance under ""worldmap.settings"" is available from scripts and the console. - */ -class WorldMapSector final : public GameObjectManager -{ -#ifndef SCRIPTING_API -private: - ::worldmap::WorldMapSector* m_parent; - -public: - WorldMapSector(::worldmap::WorldMapSector* parent); - -private: - WorldMapSector(const WorldMapSector&) = delete; - WorldMapSector& operator=(const WorldMapSector&) = delete; -#endif - -public: - /** - * Gets Tux's X position on the worldmap. - */ - float get_tux_x() const; - /** - * Gets Tux's Y position on the worldmap. - */ - float get_tux_y() const; - - /** - * Changes the current sector of the worldmap to a specified new sector. - * @param string $sector - */ - void set_sector(const std::string& sector); - - /** - * Changes the current sector of the worldmap to a specified new sector, - moving Tux to the specified spawnpoint. - * @param string $sector - * @param string $spawnpoint - */ - void spawn(const std::string& sector, const std::string& spawnpoint); - - /** - * Moves Tux to a specified spawnpoint. - * @param string $spawnpoint - */ - void move_to_spawnpoint(const std::string& spawnpoint); - - /** - * Gets the path to the worldmap file. Useful for saving worldmap specific data. - */ - std::string get_filename() const; - - /** - * Overrides the "Title Screen Level" property for the world with ""filename"". - The newly set level will be used for the title screen, after exiting the world. - * @param string $filename - */ - void set_title_level(const std::string& filename); -}; - -} // namespace scripting - -#endif - -/* EOF */ diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp deleted file mode 100644 index 7ba6b422615..00000000000 --- a/src/scripting/wrapper.cpp +++ /dev/null @@ -1,17624 +0,0 @@ -/** - * WARNING: This file is automatically generated from: - * 'src/scripting/wrapper.interface.hpp' - * DO NOT CHANGE - */ - -#include "scripting/wrapper.hpp" - -#include -#include -#include -#include - -#include "scripting/wrapper.interface.hpp" - -#include "squirrel/squirrel_error.hpp" - -namespace scripting { -namespace wrapper { - -static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::AmbientSound* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::AmbientSound* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_x' called without instance")); - return SQ_ERROR; - } - scripting::AmbientSound* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); - return SQ_ERROR; - } - -} - -static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_y' called without instance")); - return SQ_ERROR; - } - scripting::AmbientSound* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Background* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Background_set_image_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_image' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_image(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_image'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_set_images_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_images' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->set_images(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_images'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_set_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_get_color_red_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_color_red' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_color_red(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_red'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_get_color_green_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_color_green' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_color_green(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_green'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_get_color_blue_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_color_blue' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_color_blue(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_blue'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_get_color_alpha_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_color_alpha' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_color_alpha(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_alpha'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_set_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_color' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color'")); - return SQ_ERROR; - } - -} - -static SQInteger Background_fade_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_color' called without instance")); - return SQ_ERROR; - } - scripting::Background* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_color(arg0, arg1, arg2, arg3, arg4); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color'")); - return SQ_ERROR; - } - -} - -static SQInteger BadGuy_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::BadGuy* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger BadGuy_kill_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'kill' called without instance")); - return SQ_ERROR; - } - scripting::BadGuy* _this = reinterpret_cast (data); - - - try { - _this->kill(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'")); - return SQ_ERROR; - } - -} - -static SQInteger BadGuy_ignite_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ignite' called without instance")); - return SQ_ERROR; - } - scripting::BadGuy* _this = reinterpret_cast (data); - - - try { - _this->ignite(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ignite'")); - return SQ_ERROR; - } - -} - -static SQInteger BadGuy_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::BadGuy* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQInteger arg1; - if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0, static_cast (arg1)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger BadGuy_set_sprite_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_sprite' called without instance")); - return SQ_ERROR; - } - scripting::BadGuy* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_sprite(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_sprite'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Camera* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'shake' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->shake(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_start_earthquake_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start_earthquake' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->start_earthquake(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_earthquake'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_stop_earthquake_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop_earthquake' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - _this->stop_earthquake(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_earthquake'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_move_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'move' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->move(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_mode' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'scroll_to' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->scroll_to(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_current_scale_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_current_scale' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_current_scale(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_current_scale'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_target_scale_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_target_scale' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_target_scale(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_target_scale'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_set_scale_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_scale' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_scale(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_scale'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_set_scale_anchor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_scale_anchor' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQInteger arg1; - if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_scale_anchor(arg0, static_cast (arg1)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_scale_anchor'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_scale_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'scale' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->scale(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'scale'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_scale_anchor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'scale_anchor' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - - try { - _this->scale_anchor(arg0, arg1, static_cast (arg2)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'scale_anchor'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_ease_scale_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_scale' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_scale(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_scale'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_ease_scale_anchor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_scale_anchor' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - const SQChar* arg3; - if(SQ_FAILED(sq_getstring(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_scale_anchor(arg0, arg1, static_cast (arg2), arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_scale_anchor'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_screen_width_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_screen_width' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_screen_width(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_screen_width'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_screen_height_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_screen_height' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_screen_height(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_screen_height'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_x' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_x'")); - return SQ_ERROR; - } - -} - -static SQInteger Camera_get_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_y' called without instance")); - return SQ_ERROR; - } - scripting::Camera* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_y'")); - return SQ_ERROR; - } - -} - -static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Candle* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_burning' called without instance")); - return SQ_ERROR; - } - scripting::Candle* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_burning(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'")); - return SQ_ERROR; - } - -} - -static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_burning' called without instance")); - return SQ_ERROR; - } - scripting::Candle* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_burning(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'")); - return SQ_ERROR; - } - -} - -static SQInteger Clouds_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Clouds* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Clouds_set_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Clouds* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_enabled(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Clouds_get_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Clouds* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Clouds_fade_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed' called without instance")); - return SQ_ERROR; - } - scripting::Clouds* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Clouds_fade_amount_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_amount' called without instance")); - return SQ_ERROR; - } - scripting::Clouds* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_amount(static_cast (arg0), arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_amount'")); - return SQ_ERROR; - } - -} - -static SQInteger Clouds_set_amount_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_amount' called without instance")); - return SQ_ERROR; - } - scripting::Clouds* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_amount(static_cast (arg0), arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_amount'")); - return SQ_ERROR; - } - -} - -static SQInteger ConveyorBelt_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::ConveyorBelt* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger ConveyorBelt_start_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start' called without instance")); - return SQ_ERROR; - } - scripting::ConveyorBelt* _this = reinterpret_cast (data); - - - try { - _this->start(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); - return SQ_ERROR; - } - -} - -static SQInteger ConveyorBelt_stop_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop' called without instance")); - return SQ_ERROR; - } - scripting::ConveyorBelt* _this = reinterpret_cast (data); - - - try { - _this->stop(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); - return SQ_ERROR; - } - -} - -static SQInteger ConveyorBelt_move_left_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'move_left' called without instance")); - return SQ_ERROR; - } - scripting::ConveyorBelt* _this = reinterpret_cast (data); - - - try { - _this->move_left(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'move_left'")); - return SQ_ERROR; - } - -} - -static SQInteger ConveyorBelt_move_right_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'move_right' called without instance")); - return SQ_ERROR; - } - scripting::ConveyorBelt* _this = reinterpret_cast (data); - - - try { - _this->move_right(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'move_right'")); - return SQ_ERROR; - } - -} - -static SQInteger ConveyorBelt_set_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed' called without instance")); - return SQ_ERROR; - } - scripting::ConveyorBelt* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::CustomParticles* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger CustomParticles_set_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_enabled' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_enabled(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_enabled' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_clear_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'clear' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - _this->clear(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'clear'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_spawn_particles_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'spawn_particles' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - SQBool arg1; - if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a bool")); - return SQ_ERROR; - } - - try { - _this->spawn_particles(static_cast (arg0), arg1 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn_particles'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_max_amount_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_max_amount' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_max_amount(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_max_amount'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_max_amount_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_max_amount' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_max_amount(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_max_amount'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_birth_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_birth_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_birth_mode(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_birth_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_birth_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_birth_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_death_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_death_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_death_mode(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_death_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_death_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_death_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_rotation_mode(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_rotation_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_collision_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_collision_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_collision_mode(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_collision_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_collision_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_collision_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_collision_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_collision_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_offscreen_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_offscreen_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_offscreen_mode(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_offscreen_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_offscreen_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_offscreen_mode' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_offscreen_mode(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_offscreen_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_cover_screen_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_cover_screen' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_cover_screen(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_cover_screen'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_cover_screen_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_cover_screen' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_cover_screen(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_cover_screen'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_delay_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_delay' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_delay(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_delay'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_delay_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_delay' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_delay(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_delay'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_delay_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_delay' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_delay(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_delay'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_delay_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_delay' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_delay(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_delay'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_lifetime_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_lifetime' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_lifetime(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_lifetime'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_lifetime_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_lifetime' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_lifetime(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_lifetime'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_lifetime_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_lifetime' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_lifetime(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_lifetime'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_lifetime_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_lifetime' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_lifetime(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_lifetime'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_lifetime_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_lifetime_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_lifetime_variation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_lifetime_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_lifetime_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_lifetime_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_lifetime_variation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_lifetime_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_lifetime_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_lifetime_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_lifetime_variation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_lifetime_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_lifetime_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_lifetime_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_lifetime_variation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_lifetime_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_birth_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_birth_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_birth_time(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_birth_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_birth_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_birth_time(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_birth_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_birth_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_birth_time(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_birth_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_birth_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_birth_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_birth_time(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_birth_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_birth_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_birth_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_birth_time_variation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_birth_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_birth_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_birth_time_variation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_birth_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_birth_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_birth_time_variation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_birth_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_birth_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_birth_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_birth_time_variation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_birth_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_death_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_death_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_death_time(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_death_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_death_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_death_time(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_death_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_death_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_death_time(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_death_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_death_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_death_time' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_death_time(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_death_time'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_death_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_death_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_death_time_variation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_death_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_death_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_death_time_variation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_death_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_death_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_death_time_variation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_death_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_death_time_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_death_time_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_death_time_variation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_death_time_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_speed_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_speed_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_speed_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_speed_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed_x(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_speed_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed_x(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_speed_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_speed_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_speed_x(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_speed_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_speed_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_speed_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_speed_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed_y(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_speed_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed_y(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_speed_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_speed_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_speed_y(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_speed_variation_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_speed_variation_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_speed_variation_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_variation_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_speed_variation_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed_variation_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed_variation_x(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_variation_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_speed_variation_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed_variation_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed_variation_x(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_variation_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_speed_variation_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_speed_variation_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_speed_variation_x(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_variation_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_speed_variation_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_speed_variation_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_speed_variation_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_variation_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_speed_variation_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed_variation_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed_variation_y(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_variation_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_speed_variation_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed_variation_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed_variation_y(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_variation_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_speed_variation_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_speed_variation_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_speed_variation_y(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_variation_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_acceleration_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_acceleration_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_acceleration_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_acceleration_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_acceleration_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_acceleration_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_acceleration_x(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_acceleration_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_acceleration_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_acceleration_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_acceleration_x(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_acceleration_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_acceleration_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_acceleration_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_acceleration_x(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_acceleration_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_acceleration_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_acceleration_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_acceleration_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_acceleration_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_acceleration_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_acceleration_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_acceleration_y(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_acceleration_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_acceleration_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_acceleration_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_acceleration_y(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_acceleration_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_acceleration_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_acceleration_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_acceleration_y(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_acceleration_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_friction_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_friction_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_friction_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_friction_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_friction_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_friction_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_friction_x(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_friction_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_friction_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_friction_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_friction_x(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_friction_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_friction_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_friction_x' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_friction_x(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_friction_x'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_friction_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_friction_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_friction_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_friction_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_friction_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_friction_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_friction_y(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_friction_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_friction_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_friction_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_friction_y(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_friction_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_friction_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_friction_y' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_friction_y(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_friction_y'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_feather_factor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_feather_factor' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_feather_factor(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_feather_factor'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_feather_factor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_feather_factor' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_feather_factor(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_feather_factor'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_feather_factor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_feather_factor' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_feather_factor(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_feather_factor'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_feather_factor_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_feather_factor' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_feather_factor(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_feather_factor'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation_variation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation_variation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation_variation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation_variation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_speed' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation_speed(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_speed' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation_speed(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation_speed' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation_speed(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation_speed' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation_speed(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_speed_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_speed_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation_speed_variation(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_speed_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_speed_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_speed_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation_speed_variation(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_speed_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_speed_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation_speed_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation_speed_variation(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_speed_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_speed_variation_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation_speed_variation' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation_speed_variation(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_speed_variation'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_acceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_acceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation_acceleration(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_acceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_acceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_acceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation_acceleration(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_acceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_acceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation_acceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation_acceleration(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_acceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_acceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation_acceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation_acceleration(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_acceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_get_rotation_decceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_rotation_decceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_rotation_decceleration(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_decceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_set_rotation_decceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_rotation_decceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_rotation_decceleration(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_decceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_fade_rotation_decceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_rotation_decceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_rotation_decceleration(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_decceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger CustomParticles_ease_rotation_decceleration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_rotation_decceleration' called without instance")); - return SQ_ERROR; - } - scripting::CustomParticles* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_rotation_decceleration(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_decceleration'")); - return SQ_ERROR; - } - -} - -static SQInteger Decal_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Decal* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Decal_fade_sprite_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_sprite' called without instance")); - return SQ_ERROR; - } - scripting::Decal* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_sprite(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_sprite'")); - return SQ_ERROR; - } - -} - -static SQInteger Decal_change_sprite_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'change_sprite' called without instance")); - return SQ_ERROR; - } - scripting::Decal* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->change_sprite(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'change_sprite'")); - return SQ_ERROR; - } - -} - -static SQInteger Decal_fade_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_in' called without instance")); - return SQ_ERROR; - } - scripting::Decal* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); - return SQ_ERROR; - } - -} - -static SQInteger Decal_fade_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_out' called without instance")); - return SQ_ERROR; - } - scripting::Decal* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); - return SQ_ERROR; - } - -} - -static SQInteger Decal_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::Decal* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger Dispenser_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Dispenser* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Dispenser_activate_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'activate' called without instance")); - return SQ_ERROR; - } - scripting::Dispenser* _this = reinterpret_cast (data); - - - try { - _this->activate(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'")); - return SQ_ERROR; - } - -} - -static SQInteger Dispenser_deactivate_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'deactivate' called without instance")); - return SQ_ERROR; - } - scripting::Dispenser* _this = reinterpret_cast (data); - - - try { - _this->deactivate(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::DisplayEffect* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_out' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_in' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_black' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_black(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_black' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->is_black(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->sixteen_to_nine(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'")); - return SQ_ERROR; - } - -} - -static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'four_to_three' called without instance")); - return SQ_ERROR; - } - scripting::DisplayEffect* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->four_to_three(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::FloatingImage* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - auto _this = new scripting::FloatingImage(arg0); - if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) { - sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class")); - return SQ_ERROR; - } - sq_setreleasehook(vm, 1, FloatingImage_release_hook); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_layer' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_layer(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_layer' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_layer(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_x' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_y' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_anchor_point(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_anchor_point(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_visible' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_visible' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_visible(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_action' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_in' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); - return SQ_ERROR; - } - -} - -static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_out' called without instance")); - return SQ_ERROR; - } - scripting::FloatingImage* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::GameObjectManager* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger GameObjectManager_set_ambient_light_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_ambient_light' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->set_ambient_light(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_fade_to_ambient_light_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_to_ambient_light' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_to_ambient_light(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_to_ambient_light'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_get_ambient_red_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_ambient_red' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_ambient_red(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_get_ambient_green_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_ambient_green' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_ambient_green(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_get_ambient_blue_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_ambient_blue' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_ambient_blue(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_set_music_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_music' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_music(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_music'")); - return SQ_ERROR; - } - -} - -static SQInteger GameObjectManager_add_object_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'add_object' called without instance")); - return SQ_ERROR; - } - scripting::GameObjectManager* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - SQInteger arg3; - if(SQ_FAILED(sq_getinteger(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not an integer")); - return SQ_ERROR; - } - const SQChar* arg4; - if(SQ_FAILED(sq_getstring(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a string")); - return SQ_ERROR; - } - const SQChar* arg5; - if(SQ_FAILED(sq_getstring(vm, 7, &arg5))) { - sq_throwerror(vm, _SC("Argument 6 not a string")); - return SQ_ERROR; - } - - try { - _this->add_object(arg0, arg1, static_cast (arg2), static_cast (arg3), arg4, arg5); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_object'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Gradient* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Gradient_set_direction_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_direction' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_direction(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_direction'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_get_direction_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_direction' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_direction(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_direction'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_set_color1_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_color1' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->set_color1(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color1'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_set_color2_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_color2' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - _this->set_color2(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color2'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_set_colors_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_colors' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - SQFloat arg5; - if(SQ_FAILED(sq_getfloat(vm, 7, &arg5))) { - sq_throwerror(vm, _SC("Argument 6 not a float")); - return SQ_ERROR; - } - - try { - _this->set_colors(arg0, arg1, arg2, arg3, arg4, arg5); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_colors'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_fade_color1_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_color1' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_color1(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color1'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_fade_color2_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_color2' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_color2(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color2'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_fade_colors_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_colors' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - SQFloat arg5; - if(SQ_FAILED(sq_getfloat(vm, 7, &arg5))) { - sq_throwerror(vm, _SC("Argument 6 not a float")); - return SQ_ERROR; - } - SQFloat arg6; - if(SQ_FAILED(sq_getfloat(vm, 8, &arg6))) { - sq_throwerror(vm, _SC("Argument 7 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_colors(arg0, arg1, arg2, arg3, arg4, arg5, arg6); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_colors'")); - return SQ_ERROR; - } - -} - -static SQInteger Gradient_swap_colors_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'swap_colors' called without instance")); - return SQ_ERROR; - } - scripting::Gradient* _this = reinterpret_cast (data); - - - try { - _this->swap_colors(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'swap_colors'")); - return SQ_ERROR; - } - -} - -static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::LevelTime* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start' called without instance")); - return SQ_ERROR; - } - scripting::LevelTime* _this = reinterpret_cast (data); - - - try { - _this->start(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); - return SQ_ERROR; - } - -} - -static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop' called without instance")); - return SQ_ERROR; - } - scripting::LevelTime* _this = reinterpret_cast (data); - - - try { - _this->stop(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); - return SQ_ERROR; - } - -} - -static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_time' called without instance")); - return SQ_ERROR; - } - scripting::LevelTime* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_time(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'")); - return SQ_ERROR; - } - -} - -static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_time' called without instance")); - return SQ_ERROR; - } - scripting::LevelTime* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_time(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'")); - return SQ_ERROR; - } - -} - -static SQInteger LitObject_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::LitObject* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger LitObject_get_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_action' called without instance")); - return SQ_ERROR; - } - scripting::LitObject* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); - return SQ_ERROR; - } - -} - -static SQInteger LitObject_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::LitObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger LitObject_get_light_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_light_action' called without instance")); - return SQ_ERROR; - } - scripting::LitObject* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_light_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_light_action'")); - return SQ_ERROR; - } - -} - -static SQInteger LitObject_set_light_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_light_action' called without instance")); - return SQ_ERROR; - } - scripting::LitObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_light_action(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_light_action'")); - return SQ_ERROR; - } - -} - -static SQInteger ParticleSystem_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::ParticleSystem* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger ParticleSystem_set_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_enabled' called without instance")); - return SQ_ERROR; - } - scripting::ParticleSystem* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_enabled(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger ParticleSystem_get_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_enabled' called without instance")); - return SQ_ERROR; - } - scripting::ParticleSystem* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Platform* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'goto_node' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->goto_node(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_set_node_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_node' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_node(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_node'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start_moving' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - - try { - _this->start_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop_moving' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - - try { - _this->stop_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_get_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_action' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); - return SQ_ERROR; - } - -} - -static SQInteger Platform_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::Platform* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQInteger arg1; - if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0, static_cast (arg1)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Player* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'add_bonus' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->add_bonus(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_bonus_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_bonus' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->set_bonus(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_bonus'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_bonus_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_bonus' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_bonus(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_bonus'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'add_coins' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->add_coins(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_coins_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_coins' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_coins(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_coins'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'make_invincible' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->make_invincible(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'deactivate' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->deactivate(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_activate_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'activate' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->activate(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_walk_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'walk' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->walk(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_dir_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_dir' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_dir(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_dir'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_visible' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_visible' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_visible(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_kill_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'kill' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->kill(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_ghost_mode' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_ghost_mode(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_ghost_mode' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_ghost_mode(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_kick_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'kick' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->kick(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'kick'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_cheer' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->do_cheer(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_duck' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->do_duck(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_standup' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->do_standup(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_backflip' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - _this->do_backflip(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_jump' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->do_jump(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'trigger_sequence' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->trigger_sequence(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'use_scripting_controller' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->use_scripting_controller(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'do_scripting_controller' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQBool arg1; - if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a bool")); - return SQ_ERROR; - } - - try { - _this->do_scripting_controller(arg0, arg1 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_has_grabbed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'has_grabbed' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->has_grabbed(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'has_grabbed'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_velocity_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_velocity_x' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_velocity_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_velocity_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_velocity_y' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_velocity_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_velocity_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_velocity' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_velocity(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_x' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_x'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_y' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_y'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_action' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_input_pressed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_input_pressed' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->get_input_pressed(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_input_pressed'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_input_held_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_input_held' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->get_input_held(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_input_held'")); - return SQ_ERROR; - } - -} - -static SQInteger Player_get_input_released_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_input_released' called without instance")); - return SQ_ERROR; - } - scripting::Player* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - bool return_value = _this->get_input_released(arg0); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_input_released'")); - return SQ_ERROR; - } - -} - -static SQInteger Rain_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Rain* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Rain_set_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Rain* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_enabled(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Rain_get_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Rain* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Rain_fade_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed' called without instance")); - return SQ_ERROR; - } - scripting::Rain* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Rain_fade_amount_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_amount' called without instance")); - return SQ_ERROR; - } - scripting::Rain* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_amount(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_amount'")); - return SQ_ERROR; - } - -} - -static SQInteger Rain_fade_angle_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_angle' called without instance")); - return SQ_ERROR; - } - scripting::Rain* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->fade_angle(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_angle'")); - return SQ_ERROR; - } - -} - -static SQInteger Rock_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Rock* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::ScriptedObject* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_action' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_action(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_action' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_action(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_name' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_name(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'move' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->move(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_x' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_y' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_velocity' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_velocity(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_velocity_x' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_velocity_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_velocity_y' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_velocity_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'enable_gravity' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->enable_gravity(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'enable_gravity'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'gravity_enabled' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->gravity_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'gravity_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_visible' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_visible' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->is_visible(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_solid' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_solid(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'")); - return SQ_ERROR; - } - -} - -static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_solid' called without instance")); - return SQ_ERROR; - } - scripting::ScriptedObject* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->is_solid(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'")); - return SQ_ERROR; - } - -} - -static SQInteger Sector_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Sector* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Sector_set_gravity_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_gravity' called without instance")); - return SQ_ERROR; - } - scripting::Sector* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_gravity(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'")); - return SQ_ERROR; - } - -} - -static SQInteger Sector_is_free_of_solid_tiles_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_free_of_solid_tiles' called without instance")); - return SQ_ERROR; - } - scripting::Sector* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQBool arg4; - if(SQ_FAILED(sq_getbool(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a bool")); - return SQ_ERROR; - } - - try { - bool return_value = _this->is_free_of_solid_tiles(arg0, arg1, arg2, arg3, arg4 == SQTrue); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_free_of_solid_tiles'")); - return SQ_ERROR; - } - -} - -static SQInteger Sector_is_free_of_statics_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_free_of_statics' called without instance")); - return SQ_ERROR; - } - scripting::Sector* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQBool arg4; - if(SQ_FAILED(sq_getbool(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a bool")); - return SQ_ERROR; - } - - try { - bool return_value = _this->is_free_of_statics(arg0, arg1, arg2, arg3, arg4 == SQTrue); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_free_of_statics'")); - return SQ_ERROR; - } - -} - -static SQInteger Sector_is_free_of_movingstatics_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_free_of_movingstatics' called without instance")); - return SQ_ERROR; - } - scripting::Sector* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - bool return_value = _this->is_free_of_movingstatics(arg0, arg1, arg2, arg3); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_free_of_movingstatics'")); - return SQ_ERROR; - } - -} - -static SQInteger Sector_is_free_of_specifically_movingstatics_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_free_of_specifically_movingstatics' called without instance")); - return SQ_ERROR; - } - scripting::Sector* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - bool return_value = _this->is_free_of_specifically_movingstatics(arg0, arg1, arg2, arg3); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_free_of_specifically_movingstatics'")); - return SQ_ERROR; - } - -} - -static SQInteger SoundObject_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::SoundObject* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger SoundObject_start_playing_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start_playing' called without instance")); - return SQ_ERROR; - } - scripting::SoundObject* _this = reinterpret_cast (data); - - - try { - _this->start_playing(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_playing'")); - return SQ_ERROR; - } - -} - -static SQInteger SoundObject_stop_playing_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop_playing' called without instance")); - return SQ_ERROR; - } - scripting::SoundObject* _this = reinterpret_cast (data); - - - try { - _this->stop_playing(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_playing'")); - return SQ_ERROR; - } - -} - -static SQInteger SoundObject_set_volume_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_volume' called without instance")); - return SQ_ERROR; - } - scripting::SoundObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_volume(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_volume'")); - return SQ_ERROR; - } - -} - -static SQInteger SoundObject_get_volume_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_volume' called without instance")); - return SQ_ERROR; - } - scripting::SoundObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_volume(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_volume'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Spotlight* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Spotlight_set_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_enabled(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_is_enabled_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'is_enabled' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->is_enabled(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_enabled'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_set_direction_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_direction' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_direction(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_direction'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_set_angle_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_angle' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_angle(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_angle'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_fade_angle_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_angle' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_angle(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_angle'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_ease_angle_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_angle' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_angle(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_angle'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_set_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_speed' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_speed(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_fade_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_speed' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_speed(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_ease_speed_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_speed' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_speed(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_set_color_rgba_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_color_rgba' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_color_rgba(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color_rgba'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_fade_color_rgba_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_color_rgba' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_color_rgba(arg0, arg1, arg2, arg3, arg4); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color_rgba'")); - return SQ_ERROR; - } - -} - -static SQInteger Spotlight_ease_color_rgba_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'ease_color_rgba' called without instance")); - return SQ_ERROR; - } - scripting::Spotlight* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - const SQChar* arg5; - if(SQ_FAILED(sq_getstring(vm, 7, &arg5))) { - sq_throwerror(vm, _SC("Argument 6 not a string")); - return SQ_ERROR; - } - - try { - _this->ease_color_rgba(arg0, arg1, arg2, arg3, arg4, arg5); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_color_rgba'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::TextObject* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger TextObject_constructor_wrapper(HSQUIRRELVM vm) -{ - - try { - auto _this = new scripting::TextObject(); - if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) { - sq_throwerror(vm, _SC("Couldn't setup instance of 'TextObject' class")); - return SQ_ERROR; - } - sq_setreleasehook(vm, 1, TextObject_release_hook); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_text_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_text' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_text(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_font_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_font' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_font(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_fade_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_in' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_fade_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_out' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_grow_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'grow_in' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->grow_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'grow_in'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_grow_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'grow_out' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->grow_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'grow_out'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_visible' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_centered_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_centered' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_centered(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_get_pos_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_x' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_get_pos_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_y' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_anchor_point(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_get_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_anchor_point(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_anchor_offset_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_anchor_offset' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_anchor_offset(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_offset'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_get_wrap_width_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_wrap_width' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_wrap_width(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_wrap_width'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_wrap_width_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_wrap_width' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_wrap_width(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_wrap_width'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_front_fill_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_front_fill_color' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_front_fill_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_front_fill_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_back_fill_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_back_fill_color' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_back_fill_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_back_fill_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_text_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_text_color' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_text_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextObject_set_roundness_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_roundness' called without instance")); - return SQ_ERROR; - } - scripting::TextObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_roundness(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_roundness'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::TextArrayObject* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger TextArrayObject_constructor_wrapper(HSQUIRRELVM vm) -{ - - try { - auto _this = new scripting::TextArrayObject(); - if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) { - sq_throwerror(vm, _SC("Couldn't setup instance of 'TextArrayObject' class")); - return SQ_ERROR; - } - sq_setreleasehook(vm, 1, TextArrayObject_release_hook); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_clear_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'clear' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - _this->clear(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'clear'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_add_text_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'add_text' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->add_text(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_add_text_duration_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'add_text_duration' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->add_text_duration(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text_duration'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_text_index_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_text_index' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_text_index(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text_index'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_keep_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_keep_visible' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_keep_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_keep_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_fade_transition_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_fade_transition' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_fade_transition(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_transition'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_fade_time_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_fade_time' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_fade_time(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_time'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_done_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_done' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_done(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_done'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_auto_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_auto' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_auto(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_auto'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_next_text_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'next_text' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - _this->next_text(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'next_text'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_prev_text_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'prev_text' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - _this->prev_text(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'prev_text'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_text_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_text' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_text(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_font_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_font' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_font(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_fade_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_in' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_fade_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade_out' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->fade_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_grow_in_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'grow_in' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->grow_in(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'grow_in'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_grow_out_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'grow_out' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->grow_out(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'grow_out'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_visible_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_visible' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_visible(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_centered_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_centered' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_centered(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_pos_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_pos' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_pos(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_get_pos_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_x' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_get_pos_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_pos_y' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_pos_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_anchor_point(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_get_anchor_point_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_anchor_point' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - int return_value = _this->get_anchor_point(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_anchor_offset_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_anchor_offset' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->set_anchor_offset(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_offset'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_get_wrap_width_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_wrap_width' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_wrap_width(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_wrap_width'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_wrap_width_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_wrap_width' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_wrap_width(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_wrap_width'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_front_fill_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_front_fill_color' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_front_fill_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_front_fill_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_back_fill_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_back_fill_color' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_back_fill_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_back_fill_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_text_color_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_text_color' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - - try { - _this->set_text_color(arg0, arg1, arg2, arg3); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text_color'")); - return SQ_ERROR; - } - -} - -static SQInteger TextArrayObject_set_roundness_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_roundness' called without instance")); - return SQ_ERROR; - } - scripting::TextArrayObject* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_roundness(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_roundness'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Thunderstorm* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->start(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->stop(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'thunder' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->thunder(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'lightning' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->lightning(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'flash' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->flash(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'")); - return SQ_ERROR; - } - -} - -static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'electrify' called without instance")); - return SQ_ERROR; - } - scripting::Thunderstorm* _this = reinterpret_cast (data); - - - try { - _this->electrify(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::TileMap* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'goto_node' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->goto_node(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_set_node_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_node' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->set_node(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_node'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start_moving' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - - try { - _this->start_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop_moving' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - - try { - _this->stop_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_get_tile_id_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_tile_id' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - SQInteger arg1; - if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not an integer")); - return SQ_ERROR; - } - - try { - int return_value = _this->get_tile_id(static_cast (arg0), static_cast (arg1)); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_get_tile_id_at_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_tile_id_at' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - int return_value = _this->get_tile_id_at(arg0, arg1); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id_at'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_change_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'change' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - SQInteger arg1; - if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not an integer")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - - try { - _this->change(static_cast (arg0), static_cast (arg1), static_cast (arg2)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'change'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_change_at_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'change_at' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - - try { - _this->change_at(arg0, arg1, static_cast (arg2)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'change_at'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'fade' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - _this->fade(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_tint_fade_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'tint_fade' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - SQFloat arg3; - if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) { - sq_throwerror(vm, _SC("Argument 4 not a float")); - return SQ_ERROR; - } - SQFloat arg4; - if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) { - sq_throwerror(vm, _SC("Argument 5 not a float")); - return SQ_ERROR; - } - - try { - _this->tint_fade(arg0, arg1, arg2, arg3, arg4); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'tint_fade'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_alpha' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - _this->set_alpha(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_alpha' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_alpha(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'")); - return SQ_ERROR; - } - -} - -static SQInteger TileMap_set_solid_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_solid' called without instance")); - return SQ_ERROR; - } - scripting::TileMap* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_solid(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'")); - return SQ_ERROR; - } - -} - -static SQInteger Torch_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Torch* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Torch_get_burning_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_burning' called without instance")); - return SQ_ERROR; - } - scripting::Torch* _this = reinterpret_cast (data); - - - try { - bool return_value = _this->get_burning(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'")); - return SQ_ERROR; - } - -} - -static SQInteger Torch_set_burning_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_burning' called without instance")); - return SQ_ERROR; - } - scripting::Torch* _this = reinterpret_cast (data); - - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - _this->set_burning(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'")); - return SQ_ERROR; - } - -} - -static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::WillOWisp* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'goto_node' called without instance")); - return SQ_ERROR; - } - scripting::WillOWisp* _this = reinterpret_cast (data); - - SQInteger arg0; - if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not an integer")); - return SQ_ERROR; - } - - try { - _this->goto_node(static_cast (arg0)); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'")); - return SQ_ERROR; - } - -} - -static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_state' called without instance")); - return SQ_ERROR; - } - scripting::WillOWisp* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_state(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'")); - return SQ_ERROR; - } - -} - -static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start_moving' called without instance")); - return SQ_ERROR; - } - scripting::WillOWisp* _this = reinterpret_cast (data); - - - try { - _this->start_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop_moving' called without instance")); - return SQ_ERROR; - } - scripting::WillOWisp* _this = reinterpret_cast (data); - - - try { - _this->stop_moving(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'")); - return SQ_ERROR; - } - -} - -static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::Wind* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger Wind_start_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'start' called without instance")); - return SQ_ERROR; - } - scripting::Wind* _this = reinterpret_cast (data); - - - try { - _this->start(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); - return SQ_ERROR; - } - -} - -static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'stop' called without instance")); - return SQ_ERROR; - } - scripting::Wind* _this = reinterpret_cast (data); - - - try { - _this->stop(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_release_hook(SQUserPointer ptr, SQInteger ) -{ - scripting::WorldMapSector* _this = reinterpret_cast (ptr); - delete _this; - return 0; -} - -static SQInteger WorldMapSector_get_tux_x_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_tux_x' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_tux_x(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tux_x'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_get_tux_y_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_tux_y' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - - try { - float return_value = _this->get_tux_y(); - - sq_pushfloat(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tux_y'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_set_sector_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_sector' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_sector(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_sector'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_spawn_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'spawn' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - - try { - _this->spawn(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_move_to_spawnpoint_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'move_to_spawnpoint' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->move_to_spawnpoint(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'move_to_spawnpoint'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_get_filename_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'get_filename' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - - try { - std::string return_value = _this->get_filename(); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_filename'")); - return SQ_ERROR; - } - -} - -static SQInteger WorldMapSector_set_title_level_wrapper(HSQUIRRELVM vm) -{ - SQUserPointer data; - if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr, SQTrue)) || !data) { - sq_throwerror(vm, _SC("'set_title_level' called without instance")); - return SQ_ERROR; - } - scripting::WorldMapSector* _this = reinterpret_cast (data); - - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - _this->set_title_level(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_title_level'")); - return SQ_ERROR; - } - -} - -static SQInteger display_wrapper(HSQUIRRELVM vm) -{ - return scripting::display(vm); -} - -static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) -{ - HSQUIRRELVM arg0 = vm; - - try { - scripting::print_stacktrace(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'")); - return SQ_ERROR; - } - -} - -static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm) -{ - return scripting::get_current_thread(vm); -} - -static SQInteger is_christmas_wrapper(HSQUIRRELVM vm) -{ - - try { - bool return_value = scripting::is_christmas(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_christmas'")); - return SQ_ERROR; - } - -} - -static SQInteger display_text_file_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::display_text_file(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'")); - return SQ_ERROR; - } - -} - -static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - scripting::load_worldmap(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'")); - return SQ_ERROR; - } - -} - -static SQInteger set_next_worldmap_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - scripting::set_next_worldmap(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_next_worldmap'")); - return SQ_ERROR; - } - -} - -static SQInteger load_level_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::load_level(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'")); - return SQ_ERROR; - } - -} - -static SQInteger start_cutscene_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::start_cutscene(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_cutscene'")); - return SQ_ERROR; - } - -} - -static SQInteger end_cutscene_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::end_cutscene(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'end_cutscene'")); - return SQ_ERROR; - } - -} - -static SQInteger check_cutscene_wrapper(HSQUIRRELVM vm) -{ - - try { - bool return_value = scripting::check_cutscene(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'check_cutscene'")); - return SQ_ERROR; - } - -} - -static SQInteger wait_wrapper(HSQUIRRELVM vm) -{ - HSQUIRRELVM arg0 = vm; - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::wait(arg0, arg1); - - return sq_suspendvm(vm); - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'")); - return SQ_ERROR; - } - -} - -static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm) -{ - HSQUIRRELVM arg0 = vm; - - try { - scripting::wait_for_screenswitch(arg0); - - return sq_suspendvm(vm); - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'")); - return SQ_ERROR; - } - -} - -static SQInteger exit_screen_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::exit_screen(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'")); - return SQ_ERROR; - } - -} - -static SQInteger translate_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - std::string return_value = scripting::translate(arg0); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'")); - return SQ_ERROR; - } - -} - -static SQInteger __wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - std::string return_value = scripting::_(arg0); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function '_'")); - return SQ_ERROR; - } - -} - -static SQInteger translate_plural_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - - try { - std::string return_value = scripting::translate_plural(arg0, arg1, static_cast (arg2)); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate_plural'")); - return SQ_ERROR; - } - -} - -static SQInteger ___wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - SQInteger arg2; - if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not an integer")); - return SQ_ERROR; - } - - try { - std::string return_value = scripting::__(arg0, arg1, static_cast (arg2)); - - assert(return_value.size() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, return_value.c_str(), static_cast(return_value.size())); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function '__'")); - return SQ_ERROR; - } - -} - -static SQInteger import_wrapper(HSQUIRRELVM vm) -{ - HSQUIRRELVM arg0 = vm; - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::import(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'")); - return SQ_ERROR; - } - -} - -static SQInteger save_state_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::save_state(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'")); - return SQ_ERROR; - } - -} - -static SQInteger load_state_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::load_state(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_state'")); - return SQ_ERROR; - } - -} - -static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::debug_collrects(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'")); - return SQ_ERROR; - } - -} - -static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::debug_show_fps(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'")); - return SQ_ERROR; - } - -} - -static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::debug_draw_solids_only(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'")); - return SQ_ERROR; - } - -} - -static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::debug_draw_editor_images(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'")); - return SQ_ERROR; - } - -} - -static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::debug_worldmap_ghost(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_worldmap_ghost'")); - return SQ_ERROR; - } - -} - -static SQInteger play_music_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::play_music(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'")); - return SQ_ERROR; - } - -} - -static SQInteger fade_in_music_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - scripting::fade_in_music(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in_music'")); - return SQ_ERROR; - } - -} - -static SQInteger stop_music_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::stop_music(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_music'")); - return SQ_ERROR; - } - -} - -static SQInteger resume_music_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::resume_music(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'resume_music'")); - return SQ_ERROR; - } - -} - -static SQInteger pause_music_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::pause_music(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'pause_music'")); - return SQ_ERROR; - } - -} - -static SQInteger play_sound_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::play_sound(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'")); - return SQ_ERROR; - } - -} - -static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::set_game_speed(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'")); - return SQ_ERROR; - } - -} - -static SQInteger grease_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::grease(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'")); - return SQ_ERROR; - } - -} - -static SQInteger invincible_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::invincible(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'")); - return SQ_ERROR; - } - -} - -static SQInteger ghost_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::ghost(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'")); - return SQ_ERROR; - } - -} - -static SQInteger mortal_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::mortal(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'")); - return SQ_ERROR; - } - -} - -static SQInteger restart_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::restart(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'")); - return SQ_ERROR; - } - -} - -static SQInteger whereami_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::whereami(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'")); - return SQ_ERROR; - } - -} - -static SQInteger gotoend_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::gotoend(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'")); - return SQ_ERROR; - } - -} - -static SQInteger warp_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - - try { - scripting::warp(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'warp'")); - return SQ_ERROR; - } - -} - -static SQInteger camera_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::camera(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'")); - return SQ_ERROR; - } - -} - -static SQInteger set_gamma_wrapper(HSQUIRRELVM vm) -{ - SQFloat arg0; - if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a float")); - return SQ_ERROR; - } - - try { - scripting::set_gamma(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'")); - return SQ_ERROR; - } - -} - -static SQInteger rand_wrapper(HSQUIRRELVM vm) -{ - - try { - int return_value = scripting::rand(); - - sq_pushinteger(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'")); - return SQ_ERROR; - } - -} - -static SQInteger set_title_frame_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - - try { - scripting::set_title_frame(arg0); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_title_frame'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_finish_wrapper(HSQUIRRELVM vm) -{ - SQBool arg0; - if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a bool")); - return SQ_ERROR; - } - - try { - scripting::Level_finish(arg0 == SQTrue); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_finish'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_has_active_sequence_wrapper(HSQUIRRELVM vm) -{ - - try { - bool return_value = scripting::Level_has_active_sequence(); - - sq_pushbool(vm, return_value); - return 1; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_has_active_sequence'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - - try { - scripting::Level_spawn(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_spawn_transition_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - - const SQChar* arg2; - if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a string")); - return SQ_ERROR; - } - - try { - scripting::Level_spawn_transition(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn_transition'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_set_start_point_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - - try { - scripting::Level_set_start_point(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_set_start_point'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_set_start_pos_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - scripting::Level_set_start_pos(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_set_start_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_set_respawn_point_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - const SQChar* arg1; - if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a string")); - return SQ_ERROR; - } - - try { - scripting::Level_set_respawn_point(arg0, arg1); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_set_respawn_point'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_set_respawn_pos_wrapper(HSQUIRRELVM vm) -{ - const SQChar* arg0; - if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { - sq_throwerror(vm, _SC("Argument 1 not a string")); - return SQ_ERROR; - } - SQFloat arg1; - if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) { - sq_throwerror(vm, _SC("Argument 2 not a float")); - return SQ_ERROR; - } - SQFloat arg2; - if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) { - sq_throwerror(vm, _SC("Argument 3 not a float")); - return SQ_ERROR; - } - - try { - scripting::Level_set_respawn_pos(arg0, arg1, arg2); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_set_respawn_pos'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::Level_flip_vertically(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_flip_vertically'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::Level_toggle_pause(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_toggle_pause'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_pause_target_timer_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::Level_pause_target_timer(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_pause_target_timer'")); - return SQ_ERROR; - } - -} - -static SQInteger Level_resume_target_timer_wrapper(HSQUIRRELVM vm) -{ - (void) vm; - - try { - scripting::Level_resume_target_timer(); - - return 0; - - } catch(std::exception& e) { - sq_throwerror(vm, e.what()); - return SQ_ERROR; - } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_resume_target_timer'")); - return SQ_ERROR; - } - -} - -} // namespace wrapper -void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "AmbientSound", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'AmbientSound'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, AmbientSound_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Background* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Background", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Background'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Background'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Background_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::BadGuy* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "BadGuy", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'BadGuy'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'BadGuy'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, BadGuy_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Camera", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Camera'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Camera'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Camera_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Candle", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Candle'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Candle'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Candle_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Clouds* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Clouds", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Clouds'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Clouds'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Clouds_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::ConveyorBelt* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "ConveyorBelt", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'ConveyorBelt'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'ConveyorBelt'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, ConveyorBelt_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::CustomParticles* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "CustomParticles", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'CustomParticles'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'CustomParticles'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, CustomParticles_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Decal* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Decal", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Decal'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Decal'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Decal_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Dispenser* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Dispenser", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Dispenser'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Dispenser'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Dispenser_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "DisplayEffect", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'DisplayEffect'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, DisplayEffect_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "FloatingImage", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'FloatingImage'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, FloatingImage_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::GameObjectManager* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "GameObjectManager", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'GameObjectManager'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'GameObjectManager'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, GameObjectManager_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Gradient* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Gradient", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Gradient'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Gradient'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Gradient_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "LevelTime", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'LevelTime'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'LevelTime'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, LevelTime_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::LitObject* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "LitObject", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'LitObject'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'LitObject'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, LitObject_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::ParticleSystem* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "ParticleSystem", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'ParticleSystem'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'ParticleSystem'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, ParticleSystem_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Platform", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Platform'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Platform'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Platform_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Player", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Player'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Player'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Player_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Rain* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Rain", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Rain'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Rain'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Rain_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Rock* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Rock", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Rock'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Rock'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Rock_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "ScriptedObject", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'ScriptedObject'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, ScriptedObject_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Sector* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Sector", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Sector'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Sector'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Sector_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::SoundObject* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "SoundObject", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'SoundObject'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'SoundObject'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, SoundObject_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Spotlight* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Spotlight", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Spotlight'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Spotlight'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Spotlight_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::TextObject* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "TextObject", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'TextObject'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'TextObject'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, TextObject_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::TextArrayObject* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "TextArrayObject", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'TextArrayObject'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'TextArrayObject'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, TextArrayObject_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Thunderstorm", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Thunderstorm'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Thunderstorm_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "TileMap", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'TileMap'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'TileMap'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, TileMap_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Torch* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Torch", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Torch'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Torch'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Torch_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "WillOWisp", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'WillOWisp'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, WillOWisp_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "Wind", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'Wind'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'Wind'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, Wind_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void create_squirrel_instance(HSQUIRRELVM v, scripting::WorldMapSector* object, bool setup_releasehook) -{ - using namespace wrapper; - - sq_pushroottable(v); - sq_pushstring(v, "WorldMapSector", -1); - if(SQ_FAILED(sq_get(v, -2))) { - std::ostringstream msg; - msg << "Couldn't resolved squirrel type 'WorldMapSector'"; - throw SquirrelError(v, msg.str()); - } - - if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) { - std::ostringstream msg; - msg << "Couldn't setup squirrel instance for object of type 'WorldMapSector'"; - throw SquirrelError(v, msg.str()); - } - sq_remove(v, -2); // remove object name - - if(setup_releasehook) { - sq_setreleasehook(v, -1, WorldMapSector_release_hook); - } - - sq_remove(v, -2); // remove root table -} - -void register_supertux_wrapper(HSQUIRRELVM v) -{ - using namespace wrapper; - - sq_pushstring(v, "ANCHOR_TOP_LEFT", -1); - sq_pushinteger(v, 0); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'"); - } - - sq_pushstring(v, "ANCHOR_TOP", -1); - sq_pushinteger(v, 1); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'"); - } - - sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1); - sq_pushinteger(v, 2); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'"); - } - - sq_pushstring(v, "ANCHOR_LEFT", -1); - sq_pushinteger(v, 3); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'"); - } - - sq_pushstring(v, "ANCHOR_MIDDLE", -1); - sq_pushinteger(v, 4); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'"); - } - - sq_pushstring(v, "ANCHOR_RIGHT", -1); - sq_pushinteger(v, 5); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'"); - } - - sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1); - sq_pushinteger(v, 6); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'"); - } - - sq_pushstring(v, "ANCHOR_BOTTOM", -1); - sq_pushinteger(v, 7); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'"); - } - - sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1); - sq_pushinteger(v, 8); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'"); - } - - sq_pushstring(v, "display", -1); - sq_newclosure(v, &display_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'display'"); - } - - sq_pushstring(v, "print_stacktrace", -1); - sq_newclosure(v, &print_stacktrace_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'print_stacktrace'"); - } - - sq_pushstring(v, "get_current_thread", -1); - sq_newclosure(v, &get_current_thread_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_current_thread'"); - } - - sq_pushstring(v, "is_christmas", -1); - sq_newclosure(v, &is_christmas_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_christmas'"); - } - - sq_pushstring(v, "display_text_file", -1); - sq_newclosure(v, &display_text_file_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'display_text_file'"); - } - - sq_pushstring(v, "load_worldmap", -1); - sq_newclosure(v, &load_worldmap_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'load_worldmap'"); - } - - sq_pushstring(v, "set_next_worldmap", -1); - sq_newclosure(v, &set_next_worldmap_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_next_worldmap'"); - } - - sq_pushstring(v, "load_level", -1); - sq_newclosure(v, &load_level_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'load_level'"); - } - - sq_pushstring(v, "start_cutscene", -1); - sq_newclosure(v, &start_cutscene_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_cutscene'"); - } - - sq_pushstring(v, "end_cutscene", -1); - sq_newclosure(v, &end_cutscene_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'end_cutscene'"); - } - - sq_pushstring(v, "check_cutscene", -1); - sq_newclosure(v, &check_cutscene_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'check_cutscene'"); - } - - sq_pushstring(v, "wait", -1); - sq_newclosure(v, &wait_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'wait'"); - } - - sq_pushstring(v, "wait_for_screenswitch", -1); - sq_newclosure(v, &wait_for_screenswitch_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'"); - } - - sq_pushstring(v, "exit_screen", -1); - sq_newclosure(v, &exit_screen_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'exit_screen'"); - } - - sq_pushstring(v, "translate", -1); - sq_newclosure(v, &translate_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'translate'"); - } - - sq_pushstring(v, "_", -1); - sq_newclosure(v, &__wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function '_'"); - } - - sq_pushstring(v, "translate_plural", -1); - sq_newclosure(v, &translate_plural_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ssb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'translate_plural'"); - } - - sq_pushstring(v, "__", -1); - sq_newclosure(v, &___wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ssb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function '__'"); - } - - sq_pushstring(v, "import", -1); - sq_newclosure(v, &import_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'import'"); - } - - sq_pushstring(v, "save_state", -1); - sq_newclosure(v, &save_state_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'save_state'"); - } - - sq_pushstring(v, "load_state", -1); - sq_newclosure(v, &load_state_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'load_state'"); - } - - sq_pushstring(v, "debug_collrects", -1); - sq_newclosure(v, &debug_collrects_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'debug_collrects'"); - } - - sq_pushstring(v, "debug_show_fps", -1); - sq_newclosure(v, &debug_show_fps_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'debug_show_fps'"); - } - - sq_pushstring(v, "debug_draw_solids_only", -1); - sq_newclosure(v, &debug_draw_solids_only_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'"); - } - - sq_pushstring(v, "debug_draw_editor_images", -1); - sq_newclosure(v, &debug_draw_editor_images_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'"); - } - - sq_pushstring(v, "debug_worldmap_ghost", -1); - sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'debug_worldmap_ghost'"); - } - - sq_pushstring(v, "play_music", -1); - sq_newclosure(v, &play_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'play_music'"); - } - - sq_pushstring(v, "fade_in_music", -1); - sq_newclosure(v, &fade_in_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in_music'"); - } - - sq_pushstring(v, "stop_music", -1); - sq_newclosure(v, &stop_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_music'"); - } - - sq_pushstring(v, "resume_music", -1); - sq_newclosure(v, &resume_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'resume_music'"); - } - - sq_pushstring(v, "pause_music", -1); - sq_newclosure(v, &pause_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'pause_music'"); - } - - sq_pushstring(v, "play_sound", -1); - sq_newclosure(v, &play_sound_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'play_sound'"); - } - - sq_pushstring(v, "set_game_speed", -1); - sq_newclosure(v, &set_game_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_game_speed'"); - } - - sq_pushstring(v, "grease", -1); - sq_newclosure(v, &grease_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'grease'"); - } - - sq_pushstring(v, "invincible", -1); - sq_newclosure(v, &invincible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'invincible'"); - } - - sq_pushstring(v, "ghost", -1); - sq_newclosure(v, &ghost_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ghost'"); - } - - sq_pushstring(v, "mortal", -1); - sq_newclosure(v, &mortal_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'mortal'"); - } - - sq_pushstring(v, "restart", -1); - sq_newclosure(v, &restart_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'restart'"); - } - - sq_pushstring(v, "whereami", -1); - sq_newclosure(v, &whereami_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'whereami'"); - } - - sq_pushstring(v, "gotoend", -1); - sq_newclosure(v, &gotoend_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'gotoend'"); - } - - sq_pushstring(v, "warp", -1); - sq_newclosure(v, &warp_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'warp'"); - } - - sq_pushstring(v, "camera", -1); - sq_newclosure(v, &camera_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'camera'"); - } - - sq_pushstring(v, "set_gamma", -1); - sq_newclosure(v, &set_gamma_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_gamma'"); - } - - sq_pushstring(v, "rand", -1); - sq_newclosure(v, &rand_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'rand'"); - } - - sq_pushstring(v, "set_title_frame", -1); - sq_newclosure(v, &set_title_frame_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_title_frame'"); - } - - sq_pushstring(v, "Level_finish", -1); - sq_newclosure(v, &Level_finish_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_finish'"); - } - - sq_pushstring(v, "Level_has_active_sequence", -1); - sq_newclosure(v, &Level_has_active_sequence_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_has_active_sequence'"); - } - - sq_pushstring(v, "Level_spawn", -1); - sq_newclosure(v, &Level_spawn_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_spawn'"); - } - - sq_pushstring(v, "Level_spawn_transition", -1); - sq_newclosure(v, &Level_spawn_transition_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_spawn_transition'"); - } - - sq_pushstring(v, "Level_set_start_point", -1); - sq_newclosure(v, &Level_set_start_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_set_start_point'"); - } - - sq_pushstring(v, "Level_set_start_pos", -1); - sq_newclosure(v, &Level_set_start_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_set_start_pos'"); - } - - sq_pushstring(v, "Level_set_respawn_point", -1); - sq_newclosure(v, &Level_set_respawn_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_set_respawn_point'"); - } - - sq_pushstring(v, "Level_set_respawn_pos", -1); - sq_newclosure(v, &Level_set_respawn_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_set_respawn_pos'"); - } - - sq_pushstring(v, "Level_flip_vertically", -1); - sq_newclosure(v, &Level_flip_vertically_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_flip_vertically'"); - } - - sq_pushstring(v, "Level_toggle_pause", -1); - sq_newclosure(v, &Level_toggle_pause_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_toggle_pause'"); - } - - sq_pushstring(v, "Level_pause_target_timer", -1); - sq_newclosure(v, &Level_pause_target_timer_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_pause_target_timer'"); - } - - sq_pushstring(v, "Level_resume_target_timer", -1); - sq_newclosure(v, &Level_resume_target_timer_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_resume_target_timer'"); - } - - // Register class AmbientSound - sq_pushstring(v, "AmbientSound", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'AmbientSound'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_pos_x", -1); - sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_x'"); - } - - sq_pushstring(v, "get_pos_y", -1); - sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_y'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'AmbientSound'"); - } - - // Register class Background - sq_pushstring(v, "Background", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Background'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_image", -1); - sq_newclosure(v, &Background_set_image_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_image'"); - } - - sq_pushstring(v, "set_images", -1); - sq_newclosure(v, &Background_set_images_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_images'"); - } - - sq_pushstring(v, "set_speed", -1); - sq_newclosure(v, &Background_set_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed'"); - } - - sq_pushstring(v, "get_color_red", -1); - sq_newclosure(v, &Background_get_color_red_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_color_red'"); - } - - sq_pushstring(v, "get_color_green", -1); - sq_newclosure(v, &Background_get_color_green_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_color_green'"); - } - - sq_pushstring(v, "get_color_blue", -1); - sq_newclosure(v, &Background_get_color_blue_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_color_blue'"); - } - - sq_pushstring(v, "get_color_alpha", -1); - sq_newclosure(v, &Background_get_color_alpha_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_color_alpha'"); - } - - sq_pushstring(v, "set_color", -1); - sq_newclosure(v, &Background_set_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_color'"); - } - - sq_pushstring(v, "fade_color", -1); - sq_newclosure(v, &Background_fade_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_color'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Background'"); - } - - // Register class BadGuy - sq_pushstring(v, "BadGuy", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'BadGuy'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "kill", -1); - sq_newclosure(v, &BadGuy_kill_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'kill'"); - } - - sq_pushstring(v, "ignite", -1); - sq_newclosure(v, &BadGuy_ignite_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ignite'"); - } - - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &BadGuy_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - sq_pushstring(v, "set_sprite", -1); - sq_newclosure(v, &BadGuy_set_sprite_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_sprite'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'BadGuy'"); - } - - // Register class Dispenser - sq_pushstring(v, "Dispenser", -1); - sq_pushstring(v, "BadGuy", -1); - sq_get(v, -3); - if(sq_newclass(v, SQTrue) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Dispenser'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "activate", -1); - sq_newclosure(v, &Dispenser_activate_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'activate'"); - } - - sq_pushstring(v, "deactivate", -1); - sq_newclosure(v, &Dispenser_deactivate_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'deactivate'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Dispenser'"); - } - - // Register class WillOWisp - sq_pushstring(v, "WillOWisp", -1); - sq_pushstring(v, "BadGuy", -1); - sq_get(v, -3); - if(sq_newclass(v, SQTrue) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'WillOWisp'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "goto_node", -1); - sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'goto_node'"); - } - - sq_pushstring(v, "set_state", -1); - sq_newclosure(v, &WillOWisp_set_state_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_state'"); - } - - sq_pushstring(v, "start_moving", -1); - sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_moving'"); - } - - sq_pushstring(v, "stop_moving", -1); - sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_moving'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'WillOWisp'"); - } - - // Register class Camera - sq_pushstring(v, "Camera", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Camera'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "shake", -1); - sq_newclosure(v, &Camera_shake_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'shake'"); - } - - sq_pushstring(v, "start_earthquake", -1); - sq_newclosure(v, &Camera_start_earthquake_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_earthquake'"); - } - - sq_pushstring(v, "stop_earthquake", -1); - sq_newclosure(v, &Camera_stop_earthquake_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_earthquake'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &Camera_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "move", -1); - sq_newclosure(v, &Camera_move_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'move'"); - } - - sq_pushstring(v, "set_mode", -1); - sq_newclosure(v, &Camera_set_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_mode'"); - } - - sq_pushstring(v, "scroll_to", -1); - sq_newclosure(v, &Camera_scroll_to_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'scroll_to'"); - } - - sq_pushstring(v, "get_current_scale", -1); - sq_newclosure(v, &Camera_get_current_scale_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_current_scale'"); - } - - sq_pushstring(v, "get_target_scale", -1); - sq_newclosure(v, &Camera_get_target_scale_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_target_scale'"); - } - - sq_pushstring(v, "set_scale", -1); - sq_newclosure(v, &Camera_set_scale_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_scale'"); - } - - sq_pushstring(v, "set_scale_anchor", -1); - sq_newclosure(v, &Camera_set_scale_anchor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_scale_anchor'"); - } - - sq_pushstring(v, "scale", -1); - sq_newclosure(v, &Camera_scale_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'scale'"); - } - - sq_pushstring(v, "scale_anchor", -1); - sq_newclosure(v, &Camera_scale_anchor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'scale_anchor'"); - } - - sq_pushstring(v, "ease_scale", -1); - sq_newclosure(v, &Camera_ease_scale_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_scale'"); - } - - sq_pushstring(v, "ease_scale_anchor", -1); - sq_newclosure(v, &Camera_ease_scale_anchor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_scale_anchor'"); - } - - sq_pushstring(v, "get_screen_width", -1); - sq_newclosure(v, &Camera_get_screen_width_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_screen_width'"); - } - - sq_pushstring(v, "get_screen_height", -1); - sq_newclosure(v, &Camera_get_screen_height_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_screen_height'"); - } - - sq_pushstring(v, "get_x", -1); - sq_newclosure(v, &Camera_get_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_x'"); - } - - sq_pushstring(v, "get_y", -1); - sq_newclosure(v, &Camera_get_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_y'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Camera'"); - } - - // Register class Candle - sq_pushstring(v, "Candle", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Candle'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "get_burning", -1); - sq_newclosure(v, &Candle_get_burning_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_burning'"); - } - - sq_pushstring(v, "set_burning", -1); - sq_newclosure(v, &Candle_set_burning_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_burning'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Candle'"); - } - - // Register class Clouds - sq_pushstring(v, "Clouds", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Clouds'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_enabled", -1); - sq_newclosure(v, &Clouds_set_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_enabled'"); - } - - sq_pushstring(v, "get_enabled", -1); - sq_newclosure(v, &Clouds_get_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_enabled'"); - } - - sq_pushstring(v, "fade_speed", -1); - sq_newclosure(v, &Clouds_fade_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed'"); - } - - sq_pushstring(v, "fade_amount", -1); - sq_newclosure(v, &Clouds_fade_amount_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_amount'"); - } - - sq_pushstring(v, "set_amount", -1); - sq_newclosure(v, &Clouds_set_amount_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_amount'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Clouds'"); - } - - // Register class ConveyorBelt - sq_pushstring(v, "ConveyorBelt", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'ConveyorBelt'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "start", -1); - sq_newclosure(v, &ConveyorBelt_start_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start'"); - } - - sq_pushstring(v, "stop", -1); - sq_newclosure(v, &ConveyorBelt_stop_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop'"); - } - - sq_pushstring(v, "move_left", -1); - sq_newclosure(v, &ConveyorBelt_move_left_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'move_left'"); - } - - sq_pushstring(v, "move_right", -1); - sq_newclosure(v, &ConveyorBelt_move_right_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'move_right'"); - } - - sq_pushstring(v, "set_speed", -1); - sq_newclosure(v, &ConveyorBelt_set_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'ConveyorBelt'"); - } - - // Register class CustomParticles - sq_pushstring(v, "CustomParticles", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'CustomParticles'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_enabled", -1); - sq_newclosure(v, &CustomParticles_set_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_enabled'"); - } - - sq_pushstring(v, "get_enabled", -1); - sq_newclosure(v, &CustomParticles_get_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_enabled'"); - } - - sq_pushstring(v, "clear", -1); - sq_newclosure(v, &CustomParticles_clear_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'clear'"); - } - - sq_pushstring(v, "spawn_particles", -1); - sq_newclosure(v, &CustomParticles_spawn_particles_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'spawn_particles'"); - } - - sq_pushstring(v, "get_max_amount", -1); - sq_newclosure(v, &CustomParticles_get_max_amount_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_max_amount'"); - } - - sq_pushstring(v, "set_max_amount", -1); - sq_newclosure(v, &CustomParticles_set_max_amount_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_max_amount'"); - } - - sq_pushstring(v, "get_birth_mode", -1); - sq_newclosure(v, &CustomParticles_get_birth_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_birth_mode'"); - } - - sq_pushstring(v, "set_birth_mode", -1); - sq_newclosure(v, &CustomParticles_set_birth_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_birth_mode'"); - } - - sq_pushstring(v, "get_death_mode", -1); - sq_newclosure(v, &CustomParticles_get_death_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_death_mode'"); - } - - sq_pushstring(v, "set_death_mode", -1); - sq_newclosure(v, &CustomParticles_set_death_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_death_mode'"); - } - - sq_pushstring(v, "get_rotation_mode", -1); - sq_newclosure(v, &CustomParticles_get_rotation_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_mode'"); - } - - sq_pushstring(v, "set_rotation_mode", -1); - sq_newclosure(v, &CustomParticles_set_rotation_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_mode'"); - } - - sq_pushstring(v, "get_collision_mode", -1); - sq_newclosure(v, &CustomParticles_get_collision_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_collision_mode'"); - } - - sq_pushstring(v, "set_collision_mode", -1); - sq_newclosure(v, &CustomParticles_set_collision_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_collision_mode'"); - } - - sq_pushstring(v, "get_offscreen_mode", -1); - sq_newclosure(v, &CustomParticles_get_offscreen_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_offscreen_mode'"); - } - - sq_pushstring(v, "set_offscreen_mode", -1); - sq_newclosure(v, &CustomParticles_set_offscreen_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_offscreen_mode'"); - } - - sq_pushstring(v, "get_cover_screen", -1); - sq_newclosure(v, &CustomParticles_get_cover_screen_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_cover_screen'"); - } - - sq_pushstring(v, "set_cover_screen", -1); - sq_newclosure(v, &CustomParticles_set_cover_screen_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_cover_screen'"); - } - - sq_pushstring(v, "get_delay", -1); - sq_newclosure(v, &CustomParticles_get_delay_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_delay'"); - } - - sq_pushstring(v, "set_delay", -1); - sq_newclosure(v, &CustomParticles_set_delay_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_delay'"); - } - - sq_pushstring(v, "fade_delay", -1); - sq_newclosure(v, &CustomParticles_fade_delay_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_delay'"); - } - - sq_pushstring(v, "ease_delay", -1); - sq_newclosure(v, &CustomParticles_ease_delay_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_delay'"); - } - - sq_pushstring(v, "get_lifetime", -1); - sq_newclosure(v, &CustomParticles_get_lifetime_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_lifetime'"); - } - - sq_pushstring(v, "set_lifetime", -1); - sq_newclosure(v, &CustomParticles_set_lifetime_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_lifetime'"); - } - - sq_pushstring(v, "fade_lifetime", -1); - sq_newclosure(v, &CustomParticles_fade_lifetime_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_lifetime'"); - } - - sq_pushstring(v, "ease_lifetime", -1); - sq_newclosure(v, &CustomParticles_ease_lifetime_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_lifetime'"); - } - - sq_pushstring(v, "get_lifetime_variation", -1); - sq_newclosure(v, &CustomParticles_get_lifetime_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_lifetime_variation'"); - } - - sq_pushstring(v, "set_lifetime_variation", -1); - sq_newclosure(v, &CustomParticles_set_lifetime_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_lifetime_variation'"); - } - - sq_pushstring(v, "fade_lifetime_variation", -1); - sq_newclosure(v, &CustomParticles_fade_lifetime_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_lifetime_variation'"); - } - - sq_pushstring(v, "ease_lifetime_variation", -1); - sq_newclosure(v, &CustomParticles_ease_lifetime_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_lifetime_variation'"); - } - - sq_pushstring(v, "get_birth_time", -1); - sq_newclosure(v, &CustomParticles_get_birth_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_birth_time'"); - } - - sq_pushstring(v, "set_birth_time", -1); - sq_newclosure(v, &CustomParticles_set_birth_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_birth_time'"); - } - - sq_pushstring(v, "fade_birth_time", -1); - sq_newclosure(v, &CustomParticles_fade_birth_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_birth_time'"); - } - - sq_pushstring(v, "ease_birth_time", -1); - sq_newclosure(v, &CustomParticles_ease_birth_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_birth_time'"); - } - - sq_pushstring(v, "get_birth_time_variation", -1); - sq_newclosure(v, &CustomParticles_get_birth_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_birth_time_variation'"); - } - - sq_pushstring(v, "set_birth_time_variation", -1); - sq_newclosure(v, &CustomParticles_set_birth_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_birth_time_variation'"); - } - - sq_pushstring(v, "fade_birth_time_variation", -1); - sq_newclosure(v, &CustomParticles_fade_birth_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_birth_time_variation'"); - } - - sq_pushstring(v, "ease_birth_time_variation", -1); - sq_newclosure(v, &CustomParticles_ease_birth_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_birth_time_variation'"); - } - - sq_pushstring(v, "get_death_time", -1); - sq_newclosure(v, &CustomParticles_get_death_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_death_time'"); - } - - sq_pushstring(v, "set_death_time", -1); - sq_newclosure(v, &CustomParticles_set_death_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_death_time'"); - } - - sq_pushstring(v, "fade_death_time", -1); - sq_newclosure(v, &CustomParticles_fade_death_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_death_time'"); - } - - sq_pushstring(v, "ease_death_time", -1); - sq_newclosure(v, &CustomParticles_ease_death_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_death_time'"); - } - - sq_pushstring(v, "get_death_time_variation", -1); - sq_newclosure(v, &CustomParticles_get_death_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_death_time_variation'"); - } - - sq_pushstring(v, "set_death_time_variation", -1); - sq_newclosure(v, &CustomParticles_set_death_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_death_time_variation'"); - } - - sq_pushstring(v, "fade_death_time_variation", -1); - sq_newclosure(v, &CustomParticles_fade_death_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_death_time_variation'"); - } - - sq_pushstring(v, "ease_death_time_variation", -1); - sq_newclosure(v, &CustomParticles_ease_death_time_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_death_time_variation'"); - } - - sq_pushstring(v, "get_speed_x", -1); - sq_newclosure(v, &CustomParticles_get_speed_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_speed_x'"); - } - - sq_pushstring(v, "set_speed_x", -1); - sq_newclosure(v, &CustomParticles_set_speed_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed_x'"); - } - - sq_pushstring(v, "fade_speed_x", -1); - sq_newclosure(v, &CustomParticles_fade_speed_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed_x'"); - } - - sq_pushstring(v, "ease_speed_x", -1); - sq_newclosure(v, &CustomParticles_ease_speed_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_speed_x'"); - } - - sq_pushstring(v, "get_speed_y", -1); - sq_newclosure(v, &CustomParticles_get_speed_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_speed_y'"); - } - - sq_pushstring(v, "set_speed_y", -1); - sq_newclosure(v, &CustomParticles_set_speed_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed_y'"); - } - - sq_pushstring(v, "fade_speed_y", -1); - sq_newclosure(v, &CustomParticles_fade_speed_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed_y'"); - } - - sq_pushstring(v, "ease_speed_y", -1); - sq_newclosure(v, &CustomParticles_ease_speed_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_speed_y'"); - } - - sq_pushstring(v, "get_speed_variation_x", -1); - sq_newclosure(v, &CustomParticles_get_speed_variation_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_speed_variation_x'"); - } - - sq_pushstring(v, "set_speed_variation_x", -1); - sq_newclosure(v, &CustomParticles_set_speed_variation_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed_variation_x'"); - } - - sq_pushstring(v, "fade_speed_variation_x", -1); - sq_newclosure(v, &CustomParticles_fade_speed_variation_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed_variation_x'"); - } - - sq_pushstring(v, "ease_speed_variation_x", -1); - sq_newclosure(v, &CustomParticles_ease_speed_variation_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_speed_variation_x'"); - } - - sq_pushstring(v, "get_speed_variation_y", -1); - sq_newclosure(v, &CustomParticles_get_speed_variation_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_speed_variation_y'"); - } - - sq_pushstring(v, "set_speed_variation_y", -1); - sq_newclosure(v, &CustomParticles_set_speed_variation_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed_variation_y'"); - } - - sq_pushstring(v, "fade_speed_variation_y", -1); - sq_newclosure(v, &CustomParticles_fade_speed_variation_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed_variation_y'"); - } - - sq_pushstring(v, "ease_speed_variation_y", -1); - sq_newclosure(v, &CustomParticles_ease_speed_variation_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_speed_variation_y'"); - } - - sq_pushstring(v, "get_acceleration_x", -1); - sq_newclosure(v, &CustomParticles_get_acceleration_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_acceleration_x'"); - } - - sq_pushstring(v, "set_acceleration_x", -1); - sq_newclosure(v, &CustomParticles_set_acceleration_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_acceleration_x'"); - } - - sq_pushstring(v, "fade_acceleration_x", -1); - sq_newclosure(v, &CustomParticles_fade_acceleration_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_acceleration_x'"); - } - - sq_pushstring(v, "ease_acceleration_x", -1); - sq_newclosure(v, &CustomParticles_ease_acceleration_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_acceleration_x'"); - } - - sq_pushstring(v, "get_acceleration_y", -1); - sq_newclosure(v, &CustomParticles_get_acceleration_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_acceleration_y'"); - } - - sq_pushstring(v, "set_acceleration_y", -1); - sq_newclosure(v, &CustomParticles_set_acceleration_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_acceleration_y'"); - } - - sq_pushstring(v, "fade_acceleration_y", -1); - sq_newclosure(v, &CustomParticles_fade_acceleration_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_acceleration_y'"); - } - - sq_pushstring(v, "ease_acceleration_y", -1); - sq_newclosure(v, &CustomParticles_ease_acceleration_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_acceleration_y'"); - } - - sq_pushstring(v, "get_friction_x", -1); - sq_newclosure(v, &CustomParticles_get_friction_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_friction_x'"); - } - - sq_pushstring(v, "set_friction_x", -1); - sq_newclosure(v, &CustomParticles_set_friction_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_friction_x'"); - } - - sq_pushstring(v, "fade_friction_x", -1); - sq_newclosure(v, &CustomParticles_fade_friction_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_friction_x'"); - } - - sq_pushstring(v, "ease_friction_x", -1); - sq_newclosure(v, &CustomParticles_ease_friction_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_friction_x'"); - } - - sq_pushstring(v, "get_friction_y", -1); - sq_newclosure(v, &CustomParticles_get_friction_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_friction_y'"); - } - - sq_pushstring(v, "set_friction_y", -1); - sq_newclosure(v, &CustomParticles_set_friction_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_friction_y'"); - } - - sq_pushstring(v, "fade_friction_y", -1); - sq_newclosure(v, &CustomParticles_fade_friction_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_friction_y'"); - } - - sq_pushstring(v, "ease_friction_y", -1); - sq_newclosure(v, &CustomParticles_ease_friction_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_friction_y'"); - } - - sq_pushstring(v, "get_feather_factor", -1); - sq_newclosure(v, &CustomParticles_get_feather_factor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_feather_factor'"); - } - - sq_pushstring(v, "set_feather_factor", -1); - sq_newclosure(v, &CustomParticles_set_feather_factor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_feather_factor'"); - } - - sq_pushstring(v, "fade_feather_factor", -1); - sq_newclosure(v, &CustomParticles_fade_feather_factor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_feather_factor'"); - } - - sq_pushstring(v, "ease_feather_factor", -1); - sq_newclosure(v, &CustomParticles_ease_feather_factor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_feather_factor'"); - } - - sq_pushstring(v, "get_rotation", -1); - sq_newclosure(v, &CustomParticles_get_rotation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation'"); - } - - sq_pushstring(v, "set_rotation", -1); - sq_newclosure(v, &CustomParticles_set_rotation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation'"); - } - - sq_pushstring(v, "fade_rotation", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation'"); - } - - sq_pushstring(v, "ease_rotation", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation'"); - } - - sq_pushstring(v, "get_rotation_variation", -1); - sq_newclosure(v, &CustomParticles_get_rotation_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_variation'"); - } - - sq_pushstring(v, "set_rotation_variation", -1); - sq_newclosure(v, &CustomParticles_set_rotation_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_variation'"); - } - - sq_pushstring(v, "fade_rotation_variation", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation_variation'"); - } - - sq_pushstring(v, "ease_rotation_variation", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation_variation'"); - } - - sq_pushstring(v, "get_rotation_speed", -1); - sq_newclosure(v, &CustomParticles_get_rotation_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_speed'"); - } - - sq_pushstring(v, "set_rotation_speed", -1); - sq_newclosure(v, &CustomParticles_set_rotation_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_speed'"); - } - - sq_pushstring(v, "fade_rotation_speed", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation_speed'"); - } - - sq_pushstring(v, "ease_rotation_speed", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation_speed'"); - } - - sq_pushstring(v, "get_rotation_speed_variation", -1); - sq_newclosure(v, &CustomParticles_get_rotation_speed_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_speed_variation'"); - } - - sq_pushstring(v, "set_rotation_speed_variation", -1); - sq_newclosure(v, &CustomParticles_set_rotation_speed_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_speed_variation'"); - } - - sq_pushstring(v, "fade_rotation_speed_variation", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_speed_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation_speed_variation'"); - } - - sq_pushstring(v, "ease_rotation_speed_variation", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_speed_variation_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation_speed_variation'"); - } - - sq_pushstring(v, "get_rotation_acceleration", -1); - sq_newclosure(v, &CustomParticles_get_rotation_acceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_acceleration'"); - } - - sq_pushstring(v, "set_rotation_acceleration", -1); - sq_newclosure(v, &CustomParticles_set_rotation_acceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_acceleration'"); - } - - sq_pushstring(v, "fade_rotation_acceleration", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_acceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation_acceleration'"); - } - - sq_pushstring(v, "ease_rotation_acceleration", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_acceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation_acceleration'"); - } - - sq_pushstring(v, "get_rotation_decceleration", -1); - sq_newclosure(v, &CustomParticles_get_rotation_decceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_rotation_decceleration'"); - } - - sq_pushstring(v, "set_rotation_decceleration", -1); - sq_newclosure(v, &CustomParticles_set_rotation_decceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_rotation_decceleration'"); - } - - sq_pushstring(v, "fade_rotation_decceleration", -1); - sq_newclosure(v, &CustomParticles_fade_rotation_decceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_rotation_decceleration'"); - } - - sq_pushstring(v, "ease_rotation_decceleration", -1); - sq_newclosure(v, &CustomParticles_ease_rotation_decceleration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_rotation_decceleration'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'CustomParticles'"); - } - - // Register class Decal - sq_pushstring(v, "Decal", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Decal'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "fade_sprite", -1); - sq_newclosure(v, &Decal_fade_sprite_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_sprite'"); - } - - sq_pushstring(v, "change_sprite", -1); - sq_newclosure(v, &Decal_change_sprite_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'change_sprite'"); - } - - sq_pushstring(v, "fade_in", -1); - sq_newclosure(v, &Decal_fade_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in'"); - } - - sq_pushstring(v, "fade_out", -1); - sq_newclosure(v, &Decal_fade_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_out'"); - } - - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &Decal_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Decal'"); - } - - // Register class DisplayEffect - sq_pushstring(v, "DisplayEffect", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'DisplayEffect'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "fade_out", -1); - sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_out'"); - } - - sq_pushstring(v, "fade_in", -1); - sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in'"); - } - - sq_pushstring(v, "set_black", -1); - sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_black'"); - } - - sq_pushstring(v, "is_black", -1); - sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_black'"); - } - - sq_pushstring(v, "sixteen_to_nine", -1); - sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'"); - } - - sq_pushstring(v, "four_to_three", -1); - sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'four_to_three'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'DisplayEffect'"); - } - - // Register class FloatingImage - sq_pushstring(v, "FloatingImage", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'FloatingImage'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "constructor", -1); - sq_newclosure(v, &FloatingImage_constructor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'constructor'"); - } - - sq_pushstring(v, "set_layer", -1); - sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_layer'"); - } - - sq_pushstring(v, "get_layer", -1); - sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_layer'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_pos_x", -1); - sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_x'"); - } - - sq_pushstring(v, "get_pos_y", -1); - sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_y'"); - } - - sq_pushstring(v, "set_anchor_point", -1); - sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_anchor_point'"); - } - - sq_pushstring(v, "get_anchor_point", -1); - sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_anchor_point'"); - } - - sq_pushstring(v, "set_visible", -1); - sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_visible'"); - } - - sq_pushstring(v, "get_visible", -1); - sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_visible'"); - } - - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &FloatingImage_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - sq_pushstring(v, "get_action", -1); - sq_newclosure(v, &FloatingImage_get_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_action'"); - } - - sq_pushstring(v, "fade_in", -1); - sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in'"); - } - - sq_pushstring(v, "fade_out", -1); - sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_out'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'FloatingImage'"); - } - - // Register class GameObjectManager - sq_pushstring(v, "GameObjectManager", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'GameObjectManager'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_ambient_light", -1); - sq_newclosure(v, &GameObjectManager_set_ambient_light_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_ambient_light'"); - } - - sq_pushstring(v, "fade_to_ambient_light", -1); - sq_newclosure(v, &GameObjectManager_fade_to_ambient_light_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_to_ambient_light'"); - } - - sq_pushstring(v, "get_ambient_red", -1); - sq_newclosure(v, &GameObjectManager_get_ambient_red_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_ambient_red'"); - } - - sq_pushstring(v, "get_ambient_green", -1); - sq_newclosure(v, &GameObjectManager_get_ambient_green_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_ambient_green'"); - } - - sq_pushstring(v, "get_ambient_blue", -1); - sq_newclosure(v, &GameObjectManager_get_ambient_blue_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'"); - } - - sq_pushstring(v, "set_music", -1); - sq_newclosure(v, &GameObjectManager_set_music_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_music'"); - } - - sq_pushstring(v, "add_object", -1); - sq_newclosure(v, &GameObjectManager_add_object_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ssb|nb|nss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'add_object'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'GameObjectManager'"); - } - - // Register class Sector - sq_pushstring(v, "Sector", -1); - sq_pushstring(v, "GameObjectManager", -1); - sq_get(v, -3); - if(sq_newclass(v, SQTrue) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Sector'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_gravity", -1); - sq_newclosure(v, &Sector_set_gravity_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_gravity'"); - } - - sq_pushstring(v, "is_free_of_solid_tiles", -1); - sq_newclosure(v, &Sector_is_free_of_solid_tiles_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_free_of_solid_tiles'"); - } - - sq_pushstring(v, "is_free_of_statics", -1); - sq_newclosure(v, &Sector_is_free_of_statics_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_free_of_statics'"); - } - - sq_pushstring(v, "is_free_of_movingstatics", -1); - sq_newclosure(v, &Sector_is_free_of_movingstatics_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_free_of_movingstatics'"); - } - - sq_pushstring(v, "is_free_of_specifically_movingstatics", -1); - sq_newclosure(v, &Sector_is_free_of_specifically_movingstatics_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_free_of_specifically_movingstatics'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Sector'"); - } - - // Register class WorldMapSector - sq_pushstring(v, "WorldMapSector", -1); - sq_pushstring(v, "GameObjectManager", -1); - sq_get(v, -3); - if(sq_newclass(v, SQTrue) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'WorldMapSector'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "get_tux_x", -1); - sq_newclosure(v, &WorldMapSector_get_tux_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_tux_x'"); - } - - sq_pushstring(v, "get_tux_y", -1); - sq_newclosure(v, &WorldMapSector_get_tux_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_tux_y'"); - } - - sq_pushstring(v, "set_sector", -1); - sq_newclosure(v, &WorldMapSector_set_sector_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_sector'"); - } - - sq_pushstring(v, "spawn", -1); - sq_newclosure(v, &WorldMapSector_spawn_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".ss"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'spawn'"); - } - - sq_pushstring(v, "move_to_spawnpoint", -1); - sq_newclosure(v, &WorldMapSector_move_to_spawnpoint_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'move_to_spawnpoint'"); - } - - sq_pushstring(v, "get_filename", -1); - sq_newclosure(v, &WorldMapSector_get_filename_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_filename'"); - } - - sq_pushstring(v, "set_title_level", -1); - sq_newclosure(v, &WorldMapSector_set_title_level_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_title_level'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'WorldMapSector'"); - } - - // Register class Gradient - sq_pushstring(v, "Gradient", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Gradient'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_direction", -1); - sq_newclosure(v, &Gradient_set_direction_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_direction'"); - } - - sq_pushstring(v, "get_direction", -1); - sq_newclosure(v, &Gradient_get_direction_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_direction'"); - } - - sq_pushstring(v, "set_color1", -1); - sq_newclosure(v, &Gradient_set_color1_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_color1'"); - } - - sq_pushstring(v, "set_color2", -1); - sq_newclosure(v, &Gradient_set_color2_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_color2'"); - } - - sq_pushstring(v, "set_colors", -1); - sq_newclosure(v, &Gradient_set_colors_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_colors'"); - } - - sq_pushstring(v, "fade_color1", -1); - sq_newclosure(v, &Gradient_fade_color1_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_color1'"); - } - - sq_pushstring(v, "fade_color2", -1); - sq_newclosure(v, &Gradient_fade_color2_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_color2'"); - } - - sq_pushstring(v, "fade_colors", -1); - sq_newclosure(v, &Gradient_fade_colors_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_colors'"); - } - - sq_pushstring(v, "swap_colors", -1); - sq_newclosure(v, &Gradient_swap_colors_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'swap_colors'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Gradient'"); - } - - // Register class LevelTime - sq_pushstring(v, "LevelTime", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'LevelTime'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "start", -1); - sq_newclosure(v, &LevelTime_start_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start'"); - } - - sq_pushstring(v, "stop", -1); - sq_newclosure(v, &LevelTime_stop_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop'"); - } - - sq_pushstring(v, "get_time", -1); - sq_newclosure(v, &LevelTime_get_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_time'"); - } - - sq_pushstring(v, "set_time", -1); - sq_newclosure(v, &LevelTime_set_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_time'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'LevelTime'"); - } - - // Register class LitObject - sq_pushstring(v, "LitObject", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'LitObject'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "get_action", -1); - sq_newclosure(v, &LitObject_get_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_action'"); - } - - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &LitObject_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - sq_pushstring(v, "get_light_action", -1); - sq_newclosure(v, &LitObject_get_light_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_light_action'"); - } - - sq_pushstring(v, "set_light_action", -1); - sq_newclosure(v, &LitObject_set_light_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_light_action'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'LitObject'"); - } - - // Register class ParticleSystem - sq_pushstring(v, "ParticleSystem", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'ParticleSystem'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_enabled", -1); - sq_newclosure(v, &ParticleSystem_set_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_enabled'"); - } - - sq_pushstring(v, "get_enabled", -1); - sq_newclosure(v, &ParticleSystem_get_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_enabled'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'ParticleSystem'"); - } - - // Register class Platform - sq_pushstring(v, "Platform", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Platform'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "goto_node", -1); - sq_newclosure(v, &Platform_goto_node_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'goto_node'"); - } - - sq_pushstring(v, "set_node", -1); - sq_newclosure(v, &Platform_set_node_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_node'"); - } - - sq_pushstring(v, "start_moving", -1); - sq_newclosure(v, &Platform_start_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_moving'"); - } - - sq_pushstring(v, "stop_moving", -1); - sq_newclosure(v, &Platform_stop_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_moving'"); - } - - sq_pushstring(v, "get_action", -1); - sq_newclosure(v, &Platform_get_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_action'"); - } - - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &Platform_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Platform'"); - } - - // Register class Player - sq_pushstring(v, "Player", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Player'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "add_bonus", -1); - sq_newclosure(v, &Player_add_bonus_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'add_bonus'"); - } - - sq_pushstring(v, "set_bonus", -1); - sq_newclosure(v, &Player_set_bonus_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_bonus'"); - } - - sq_pushstring(v, "get_bonus", -1); - sq_newclosure(v, &Player_get_bonus_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_bonus'"); - } - - sq_pushstring(v, "add_coins", -1); - sq_newclosure(v, &Player_add_coins_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'add_coins'"); - } - - sq_pushstring(v, "get_coins", -1); - sq_newclosure(v, &Player_get_coins_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_coins'"); - } - - sq_pushstring(v, "make_invincible", -1); - sq_newclosure(v, &Player_make_invincible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'make_invincible'"); - } - - sq_pushstring(v, "deactivate", -1); - sq_newclosure(v, &Player_deactivate_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'deactivate'"); - } - - sq_pushstring(v, "activate", -1); - sq_newclosure(v, &Player_activate_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'activate'"); - } - - sq_pushstring(v, "walk", -1); - sq_newclosure(v, &Player_walk_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'walk'"); - } - - sq_pushstring(v, "set_dir", -1); - sq_newclosure(v, &Player_set_dir_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_dir'"); - } - - sq_pushstring(v, "set_visible", -1); - sq_newclosure(v, &Player_set_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_visible'"); - } - - sq_pushstring(v, "get_visible", -1); - sq_newclosure(v, &Player_get_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_visible'"); - } - - sq_pushstring(v, "kill", -1); - sq_newclosure(v, &Player_kill_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'kill'"); - } - - sq_pushstring(v, "set_ghost_mode", -1); - sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'"); - } - - sq_pushstring(v, "get_ghost_mode", -1); - sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'"); - } - - sq_pushstring(v, "kick", -1); - sq_newclosure(v, &Player_kick_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'kick'"); - } - - sq_pushstring(v, "do_cheer", -1); - sq_newclosure(v, &Player_do_cheer_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_cheer'"); - } - - sq_pushstring(v, "do_duck", -1); - sq_newclosure(v, &Player_do_duck_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_duck'"); - } - - sq_pushstring(v, "do_standup", -1); - sq_newclosure(v, &Player_do_standup_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_standup'"); - } - - sq_pushstring(v, "do_backflip", -1); - sq_newclosure(v, &Player_do_backflip_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_backflip'"); - } - - sq_pushstring(v, "do_jump", -1); - sq_newclosure(v, &Player_do_jump_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_jump'"); - } - - sq_pushstring(v, "trigger_sequence", -1); - sq_newclosure(v, &Player_trigger_sequence_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'trigger_sequence'"); - } - - sq_pushstring(v, "use_scripting_controller", -1); - sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'"); - } - - sq_pushstring(v, "do_scripting_controller", -1); - sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'"); - } - - sq_pushstring(v, "has_grabbed", -1); - sq_newclosure(v, &Player_has_grabbed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'has_grabbed'"); - } - - sq_pushstring(v, "get_velocity_x", -1); - sq_newclosure(v, &Player_get_velocity_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_velocity_x'"); - } - - sq_pushstring(v, "get_velocity_y", -1); - sq_newclosure(v, &Player_get_velocity_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_velocity_y'"); - } - - sq_pushstring(v, "set_velocity", -1); - sq_newclosure(v, &Player_set_velocity_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_velocity'"); - } - - sq_pushstring(v, "get_x", -1); - sq_newclosure(v, &Player_get_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_x'"); - } - - sq_pushstring(v, "get_y", -1); - sq_newclosure(v, &Player_get_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_y'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &Player_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_action", -1); - sq_newclosure(v, &Player_get_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_action'"); - } - - sq_pushstring(v, "get_input_pressed", -1); - sq_newclosure(v, &Player_get_input_pressed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_input_pressed'"); - } - - sq_pushstring(v, "get_input_held", -1); - sq_newclosure(v, &Player_get_input_held_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_input_held'"); - } - - sq_pushstring(v, "get_input_released", -1); - sq_newclosure(v, &Player_get_input_released_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_input_released'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Player'"); - } - - // Register class Rain - sq_pushstring(v, "Rain", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Rain'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_enabled", -1); - sq_newclosure(v, &Rain_set_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_enabled'"); - } - - sq_pushstring(v, "get_enabled", -1); - sq_newclosure(v, &Rain_get_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_enabled'"); - } - - sq_pushstring(v, "fade_speed", -1); - sq_newclosure(v, &Rain_fade_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed'"); - } - - sq_pushstring(v, "fade_amount", -1); - sq_newclosure(v, &Rain_fade_amount_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_amount'"); - } - - sq_pushstring(v, "fade_angle", -1); - sq_newclosure(v, &Rain_fade_angle_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_angle'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Rain'"); - } - - // Register class Rock - sq_pushstring(v, "Rock", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Rock'"; - throw SquirrelError(v, msg.str()); - } - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Rock'"); - } - - // Register class ScriptedObject - sq_pushstring(v, "ScriptedObject", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'ScriptedObject'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_action", -1); - sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_action'"); - } - - sq_pushstring(v, "get_action", -1); - sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_action'"); - } - - sq_pushstring(v, "get_name", -1); - sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_name'"); - } - - sq_pushstring(v, "move", -1); - sq_newclosure(v, &ScriptedObject_move_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'move'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_pos_x", -1); - sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_x'"); - } - - sq_pushstring(v, "get_pos_y", -1); - sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_y'"); - } - - sq_pushstring(v, "set_velocity", -1); - sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_velocity'"); - } - - sq_pushstring(v, "get_velocity_x", -1); - sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_velocity_x'"); - } - - sq_pushstring(v, "get_velocity_y", -1); - sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_velocity_y'"); - } - - sq_pushstring(v, "enable_gravity", -1); - sq_newclosure(v, &ScriptedObject_enable_gravity_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'enable_gravity'"); - } - - sq_pushstring(v, "gravity_enabled", -1); - sq_newclosure(v, &ScriptedObject_gravity_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'gravity_enabled'"); - } - - sq_pushstring(v, "set_visible", -1); - sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_visible'"); - } - - sq_pushstring(v, "is_visible", -1); - sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_visible'"); - } - - sq_pushstring(v, "set_solid", -1); - sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_solid'"); - } - - sq_pushstring(v, "is_solid", -1); - sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_solid'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'ScriptedObject'"); - } - - // Register class SoundObject - sq_pushstring(v, "SoundObject", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'SoundObject'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "start_playing", -1); - sq_newclosure(v, &SoundObject_start_playing_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_playing'"); - } - - sq_pushstring(v, "stop_playing", -1); - sq_newclosure(v, &SoundObject_stop_playing_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_playing'"); - } - - sq_pushstring(v, "set_volume", -1); - sq_newclosure(v, &SoundObject_set_volume_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_volume'"); - } - - sq_pushstring(v, "get_volume", -1); - sq_newclosure(v, &SoundObject_get_volume_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_volume'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'SoundObject'"); - } - - // Register class Spotlight - sq_pushstring(v, "Spotlight", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Spotlight'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "set_enabled", -1); - sq_newclosure(v, &Spotlight_set_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_enabled'"); - } - - sq_pushstring(v, "is_enabled", -1); - sq_newclosure(v, &Spotlight_is_enabled_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'is_enabled'"); - } - - sq_pushstring(v, "set_direction", -1); - sq_newclosure(v, &Spotlight_set_direction_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_direction'"); - } - - sq_pushstring(v, "set_angle", -1); - sq_newclosure(v, &Spotlight_set_angle_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_angle'"); - } - - sq_pushstring(v, "fade_angle", -1); - sq_newclosure(v, &Spotlight_fade_angle_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_angle'"); - } - - sq_pushstring(v, "ease_angle", -1); - sq_newclosure(v, &Spotlight_ease_angle_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_angle'"); - } - - sq_pushstring(v, "set_speed", -1); - sq_newclosure(v, &Spotlight_set_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_speed'"); - } - - sq_pushstring(v, "fade_speed", -1); - sq_newclosure(v, &Spotlight_fade_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_speed'"); - } - - sq_pushstring(v, "ease_speed", -1); - sq_newclosure(v, &Spotlight_ease_speed_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_speed'"); - } - - sq_pushstring(v, "set_color_rgba", -1); - sq_newclosure(v, &Spotlight_set_color_rgba_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_color_rgba'"); - } - - sq_pushstring(v, "fade_color_rgba", -1); - sq_newclosure(v, &Spotlight_fade_color_rgba_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_color_rgba'"); - } - - sq_pushstring(v, "ease_color_rgba", -1); - sq_newclosure(v, &Spotlight_ease_color_rgba_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|ns"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'ease_color_rgba'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Spotlight'"); - } - - // Register class TextObject - sq_pushstring(v, "TextObject", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'TextObject'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "constructor", -1); - sq_newclosure(v, &TextObject_constructor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'constructor'"); - } - - sq_pushstring(v, "set_text", -1); - sq_newclosure(v, &TextObject_set_text_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_text'"); - } - - sq_pushstring(v, "set_font", -1); - sq_newclosure(v, &TextObject_set_font_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_font'"); - } - - sq_pushstring(v, "fade_in", -1); - sq_newclosure(v, &TextObject_fade_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in'"); - } - - sq_pushstring(v, "fade_out", -1); - sq_newclosure(v, &TextObject_fade_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_out'"); - } - - sq_pushstring(v, "grow_in", -1); - sq_newclosure(v, &TextObject_grow_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'grow_in'"); - } - - sq_pushstring(v, "grow_out", -1); - sq_newclosure(v, &TextObject_grow_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'grow_out'"); - } - - sq_pushstring(v, "set_visible", -1); - sq_newclosure(v, &TextObject_set_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_visible'"); - } - - sq_pushstring(v, "set_centered", -1); - sq_newclosure(v, &TextObject_set_centered_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_centered'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &TextObject_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_pos_x", -1); - sq_newclosure(v, &TextObject_get_pos_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_x'"); - } - - sq_pushstring(v, "get_pos_y", -1); - sq_newclosure(v, &TextObject_get_pos_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_y'"); - } - - sq_pushstring(v, "set_anchor_point", -1); - sq_newclosure(v, &TextObject_set_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_anchor_point'"); - } - - sq_pushstring(v, "get_anchor_point", -1); - sq_newclosure(v, &TextObject_get_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_anchor_point'"); - } - - sq_pushstring(v, "set_anchor_offset", -1); - sq_newclosure(v, &TextObject_set_anchor_offset_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_anchor_offset'"); - } - - sq_pushstring(v, "get_wrap_width", -1); - sq_newclosure(v, &TextObject_get_wrap_width_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_wrap_width'"); - } - - sq_pushstring(v, "set_wrap_width", -1); - sq_newclosure(v, &TextObject_set_wrap_width_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_wrap_width'"); - } - - sq_pushstring(v, "set_front_fill_color", -1); - sq_newclosure(v, &TextObject_set_front_fill_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_front_fill_color'"); - } - - sq_pushstring(v, "set_back_fill_color", -1); - sq_newclosure(v, &TextObject_set_back_fill_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_back_fill_color'"); - } - - sq_pushstring(v, "set_text_color", -1); - sq_newclosure(v, &TextObject_set_text_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_text_color'"); - } - - sq_pushstring(v, "set_roundness", -1); - sq_newclosure(v, &TextObject_set_roundness_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_roundness'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'TextObject'"); - } - - // Register class TextArrayObject - sq_pushstring(v, "TextArrayObject", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'TextArrayObject'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "constructor", -1); - sq_newclosure(v, &TextArrayObject_constructor_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'constructor'"); - } - - sq_pushstring(v, "clear", -1); - sq_newclosure(v, &TextArrayObject_clear_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'clear'"); - } - - sq_pushstring(v, "add_text", -1); - sq_newclosure(v, &TextArrayObject_add_text_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'add_text'"); - } - - sq_pushstring(v, "add_text_duration", -1); - sq_newclosure(v, &TextArrayObject_add_text_duration_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".sb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'add_text_duration'"); - } - - sq_pushstring(v, "set_text_index", -1); - sq_newclosure(v, &TextArrayObject_set_text_index_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_text_index'"); - } - - sq_pushstring(v, "set_keep_visible", -1); - sq_newclosure(v, &TextArrayObject_set_keep_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_keep_visible'"); - } - - sq_pushstring(v, "set_fade_transition", -1); - sq_newclosure(v, &TextArrayObject_set_fade_transition_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_fade_transition'"); - } - - sq_pushstring(v, "set_fade_time", -1); - sq_newclosure(v, &TextArrayObject_set_fade_time_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_fade_time'"); - } - - sq_pushstring(v, "set_done", -1); - sq_newclosure(v, &TextArrayObject_set_done_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_done'"); - } - - sq_pushstring(v, "set_auto", -1); - sq_newclosure(v, &TextArrayObject_set_auto_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_auto'"); - } - - sq_pushstring(v, "next_text", -1); - sq_newclosure(v, &TextArrayObject_next_text_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'next_text'"); - } - - sq_pushstring(v, "prev_text", -1); - sq_newclosure(v, &TextArrayObject_prev_text_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'prev_text'"); - } - - sq_pushstring(v, "set_text", -1); - sq_newclosure(v, &TextArrayObject_set_text_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_text'"); - } - - sq_pushstring(v, "set_font", -1); - sq_newclosure(v, &TextArrayObject_set_font_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".s"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_font'"); - } - - sq_pushstring(v, "fade_in", -1); - sq_newclosure(v, &TextArrayObject_fade_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_in'"); - } - - sq_pushstring(v, "fade_out", -1); - sq_newclosure(v, &TextArrayObject_fade_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade_out'"); - } - - sq_pushstring(v, "grow_in", -1); - sq_newclosure(v, &TextArrayObject_grow_in_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'grow_in'"); - } - - sq_pushstring(v, "grow_out", -1); - sq_newclosure(v, &TextArrayObject_grow_out_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'grow_out'"); - } - - sq_pushstring(v, "set_visible", -1); - sq_newclosure(v, &TextArrayObject_set_visible_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_visible'"); - } - - sq_pushstring(v, "set_centered", -1); - sq_newclosure(v, &TextArrayObject_set_centered_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_centered'"); - } - - sq_pushstring(v, "set_pos", -1); - sq_newclosure(v, &TextArrayObject_set_pos_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_pos'"); - } - - sq_pushstring(v, "get_pos_x", -1); - sq_newclosure(v, &TextArrayObject_get_pos_x_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_x'"); - } - - sq_pushstring(v, "get_pos_y", -1); - sq_newclosure(v, &TextArrayObject_get_pos_y_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_pos_y'"); - } - - sq_pushstring(v, "set_anchor_point", -1); - sq_newclosure(v, &TextArrayObject_set_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_anchor_point'"); - } - - sq_pushstring(v, "get_anchor_point", -1); - sq_newclosure(v, &TextArrayObject_get_anchor_point_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_anchor_point'"); - } - - sq_pushstring(v, "set_anchor_offset", -1); - sq_newclosure(v, &TextArrayObject_set_anchor_offset_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_anchor_offset'"); - } - - sq_pushstring(v, "get_wrap_width", -1); - sq_newclosure(v, &TextArrayObject_get_wrap_width_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_wrap_width'"); - } - - sq_pushstring(v, "set_wrap_width", -1); - sq_newclosure(v, &TextArrayObject_set_wrap_width_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_wrap_width'"); - } - - sq_pushstring(v, "set_front_fill_color", -1); - sq_newclosure(v, &TextArrayObject_set_front_fill_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_front_fill_color'"); - } - - sq_pushstring(v, "set_back_fill_color", -1); - sq_newclosure(v, &TextArrayObject_set_back_fill_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_back_fill_color'"); - } - - sq_pushstring(v, "set_text_color", -1); - sq_newclosure(v, &TextArrayObject_set_text_color_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_text_color'"); - } - - sq_pushstring(v, "set_roundness", -1); - sq_newclosure(v, &TextArrayObject_set_roundness_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_roundness'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'TextArrayObject'"); - } - - // Register class Thunderstorm - sq_pushstring(v, "Thunderstorm", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Thunderstorm'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "start", -1); - sq_newclosure(v, &Thunderstorm_start_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start'"); - } - - sq_pushstring(v, "stop", -1); - sq_newclosure(v, &Thunderstorm_stop_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop'"); - } - - sq_pushstring(v, "thunder", -1); - sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'thunder'"); - } - - sq_pushstring(v, "lightning", -1); - sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'lightning'"); - } - - sq_pushstring(v, "flash", -1); - sq_newclosure(v, &Thunderstorm_flash_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'flash'"); - } - - sq_pushstring(v, "electrify", -1); - sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'electrify'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Thunderstorm'"); - } - - // Register class TileMap - sq_pushstring(v, "TileMap", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'TileMap'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "goto_node", -1); - sq_newclosure(v, &TileMap_goto_node_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'goto_node'"); - } - - sq_pushstring(v, "set_node", -1); - sq_newclosure(v, &TileMap_set_node_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_node'"); - } - - sq_pushstring(v, "start_moving", -1); - sq_newclosure(v, &TileMap_start_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start_moving'"); - } - - sq_pushstring(v, "stop_moving", -1); - sq_newclosure(v, &TileMap_stop_moving_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop_moving'"); - } - - sq_pushstring(v, "get_tile_id", -1); - sq_newclosure(v, &TileMap_get_tile_id_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_tile_id'"); - } - - sq_pushstring(v, "get_tile_id_at", -1); - sq_newclosure(v, &TileMap_get_tile_id_at_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_tile_id_at'"); - } - - sq_pushstring(v, "change", -1); - sq_newclosure(v, &TileMap_change_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'change'"); - } - - sq_pushstring(v, "change_at", -1); - sq_newclosure(v, &TileMap_change_at_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'change_at'"); - } - - sq_pushstring(v, "fade", -1); - sq_newclosure(v, &TileMap_fade_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'fade'"); - } - - sq_pushstring(v, "tint_fade", -1); - sq_newclosure(v, &TileMap_tint_fade_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|nb|nb|nb|nb|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'tint_fade'"); - } - - sq_pushstring(v, "set_alpha", -1); - sq_newclosure(v, &TileMap_set_alpha_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_alpha'"); - } - - sq_pushstring(v, "get_alpha", -1); - sq_newclosure(v, &TileMap_get_alpha_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_alpha'"); - } - - sq_pushstring(v, "set_solid", -1); - sq_newclosure(v, &TileMap_set_solid_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_solid'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'TileMap'"); - } - - // Register class Torch - sq_pushstring(v, "Torch", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Torch'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "get_burning", -1); - sq_newclosure(v, &Torch_get_burning_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'get_burning'"); - } - - sq_pushstring(v, "set_burning", -1); - sq_newclosure(v, &Torch_set_burning_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, ".b|n"); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'set_burning'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Torch'"); - } - - // Register class Wind - sq_pushstring(v, "Wind", -1); - if(sq_newclass(v, SQFalse) < 0) { - std::ostringstream msg; - msg << "Couldn't create new class 'Wind'"; - throw SquirrelError(v, msg.str()); - } - sq_pushstring(v, "start", -1); - sq_newclosure(v, &Wind_start_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'start'"); - } - - sq_pushstring(v, "stop", -1); - sq_newclosure(v, &Wind_stop_wrapper, 0); - sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'stop'"); - } - - if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register class 'Wind'"); - } - -} - -} // namespace scripting - -/* EOF */ diff --git a/src/scripting/wrapper.hpp b/src/scripting/wrapper.hpp deleted file mode 100644 index bb8a329977a..00000000000 --- a/src/scripting/wrapper.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * WARNING: This file is automatically generated from: - * 'src/scripting/wrapper.interface.hpp' - * DO NOT CHANGE - */ -#ifndef HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP -#define HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP - -#include - -namespace scripting { - -void register_supertux_wrapper(HSQUIRRELVM v); - -class AmbientSound; -void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook = false); -class Background; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Background* object, bool setup_releasehook = false); -class BadGuy; -void create_squirrel_instance(HSQUIRRELVM v, scripting::BadGuy* object, bool setup_releasehook = false); -class Camera; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook = false); -class Candle; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook = false); -class Clouds; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Clouds* object, bool setup_releasehook = false); -class ConveyorBelt; -void create_squirrel_instance(HSQUIRRELVM v, scripting::ConveyorBelt* object, bool setup_releasehook = false); -class CustomParticles; -void create_squirrel_instance(HSQUIRRELVM v, scripting::CustomParticles* object, bool setup_releasehook = false); -class Decal; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Decal* object, bool setup_releasehook = false); -class Dispenser; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Dispenser* object, bool setup_releasehook = false); -class DisplayEffect; -void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook = false); -class FloatingImage; -void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook = false); -class GameObjectManager; -void create_squirrel_instance(HSQUIRRELVM v, scripting::GameObjectManager* object, bool setup_releasehook = false); -class Gradient; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Gradient* object, bool setup_releasehook = false); -class LevelTime; -void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook = false); -class LitObject; -void create_squirrel_instance(HSQUIRRELVM v, scripting::LitObject* object, bool setup_releasehook = false); -class ParticleSystem; -void create_squirrel_instance(HSQUIRRELVM v, scripting::ParticleSystem* object, bool setup_releasehook = false); -class Platform; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook = false); -class Player; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook = false); -class Rain; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Rain* object, bool setup_releasehook = false); -class Rock; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Rock* object, bool setup_releasehook = false); -class ScriptedObject; -void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook = false); -class Sector; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Sector* object, bool setup_releasehook = false); -class SoundObject; -void create_squirrel_instance(HSQUIRRELVM v, scripting::SoundObject* object, bool setup_releasehook = false); -class Spotlight; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Spotlight* object, bool setup_releasehook = false); -class TextObject; -void create_squirrel_instance(HSQUIRRELVM v, scripting::TextObject* object, bool setup_releasehook = false); -class TextArrayObject; -void create_squirrel_instance(HSQUIRRELVM v, scripting::TextArrayObject* object, bool setup_releasehook = false); -class Thunderstorm; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook = false); -class TileMap; -void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook = false); -class Torch; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Torch* object, bool setup_releasehook = false); -class WillOWisp; -void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook = false); -class Wind; -void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook = false); -class WorldMapSector; -void create_squirrel_instance(HSQUIRRELVM v, scripting::WorldMapSector* object, bool setup_releasehook = false); - -} - -#endif - -/* EOF */ diff --git a/src/scripting/wrapper.interface.hpp b/src/scripting/wrapper.interface.hpp deleted file mode 100644 index 4d73317027e..00000000000 --- a/src/scripting/wrapper.interface.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* This file is processed by miniswig to produce the scripting API */ -#include "scripting/ambient_sound.hpp" -#include "scripting/anchor_points.hpp" -#include "scripting/background.hpp" -#include "scripting/badguy.hpp" -#include "scripting/camera.hpp" -#include "scripting/candle.hpp" -#include "scripting/clouds.hpp" -#include "scripting/conveyor_belt.hpp" -#include "scripting/custom_particles.hpp" -#include "scripting/decal.hpp" -#include "scripting/dispenser.hpp" -#include "scripting/display_effect.hpp" -#include "scripting/floating_image.hpp" -#include "scripting/functions.hpp" -#include "scripting/game_object_manager.hpp" -#include "scripting/gradient.hpp" -#include "scripting/level.hpp" -#include "scripting/level_time.hpp" -#include "scripting/lit_object.hpp" -#include "scripting/particlesystem.hpp" -#include "scripting/platform.hpp" -#include "scripting/player.hpp" -#include "scripting/rain.hpp" -#include "scripting/rock.hpp" -#include "scripting/scripted_object.hpp" -#include "scripting/sector.hpp" -#include "scripting/sound_object.hpp" -#include "scripting/spotlight.hpp" -#include "scripting/text_object.hpp" -#include "scripting/text_array_object.hpp" -#include "scripting/thunderstorm.hpp" -#include "scripting/tilemap.hpp" -#include "scripting/torch.hpp" -#include "scripting/willowisp.hpp" -#include "scripting/wind.hpp" -#include "scripting/worldmap_sector.hpp" - -/* EOF */ diff --git a/src/squirrel/script_interface.hpp b/src/squirrel/exposable_class.hpp similarity index 55% rename from src/squirrel/script_interface.hpp rename to src/squirrel/exposable_class.hpp index 9569e03a5ac..9d572e18680 100644 --- a/src/squirrel/script_interface.hpp +++ b/src/squirrel/exposable_class.hpp @@ -1,5 +1,5 @@ // SuperTux -// Copyright (C) 2006 Matthias Braun +// Copyright (C) 2024 Vankata453 // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,23 +14,25 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#ifndef HEADER_SUPERTUX_SQUIRREL_SCRIPT_INTERFACE_HPP -#define HEADER_SUPERTUX_SQUIRREL_SCRIPT_INTERFACE_HPP +#ifndef HEADER_SUPERTUX_SQUIRREL_EXPOSABLE_CLASS_HPP +#define HEADER_SUPERTUX_SQUIRREL_EXPOSABLE_CLASS_HPP -#include +#include -/** - * Objects that want to expose themself to the scripting environment - * should implement this interface - */ -class ScriptInterface +#include + +/** Represents a class, which can be exposed to scripting. */ +class ExposableClass : public ssq::ExposableClass { public: - virtual ~ScriptInterface() - {} + ExposableClass() {} + virtual ~ExposableClass() override {} + + virtual std::string get_exposed_class_name() const = 0; - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) = 0; - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) = 0; +private: + ExposableClass(const ExposableClass&) = delete; + ExposableClass& operator=(const ExposableClass&) = delete; }; #endif diff --git a/src/squirrel/exposed_object.hpp b/src/squirrel/exposed_object.hpp deleted file mode 100644 index ad28bb8fd28..00000000000 --- a/src/squirrel/exposed_object.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// SuperTux -- ExposedObject class -// Copyright (C) 2016 Tobias Markus -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SQUIRREL_EXPOSED_OBJECT_HPP -#define HEADER_SUPERTUX_SQUIRREL_EXPOSED_OBJECT_HPP - -#include - -#include "squirrel/squirrel_virtual_machine.hpp" -#include "squirrel/squirrel_util.hpp" -#include "squirrel/script_interface.hpp" -#include "util/log.hpp" - -/** - * @class ExposedObject - * This class binds a certain GameObject class to a scripting class. - * To bind a game object class to a scripting class, extend the GameObject - * class as shown in the following example: - * \code{.cpp} - * public ExposedObject - * \endcode - * - * and instantiate it in each constructor with the this pointer, like this: - * \code{.cpp} - * Gradient::Gradient(const ReaderMapping& reader) : - * ExposedObject(this) - * \endcode - * @param class S: GameObject class (e.g. Gradient) - * @param class T: Scripting class (e.g. scripting::Gradient) - */ -template -class ExposedObject : virtual public ScriptInterface -{ -private: - /** - * The parent object that is exposed to the script interface - */ - S* m_parent; - -public: - /** - * Constructor - * @param parent GameObject - */ - ExposedObject(S* parent) : - m_parent(parent) - { - } - - /** - * Exposes the parent GameObject to the script Interface - * @param vm The squirrel virtual machine to expose the object on - * @param table_idx Index of the table to expose the object on - */ - virtual void expose(HSQUIRRELVM vm, SQInteger table_idx) override - { - auto name = m_parent->get_name(); - if (name.empty()) - { - return; - } - - log_debug << "Exposing " << m_parent->get_class_name() << " object " << name << std::endl; - - auto object = std::make_unique(*m_parent); - expose_object(vm, table_idx, std::move(object), name); - } - - /** - * Un-exposes the parent GameObject to the script Interface - * @param vm The squirrel virtual machine to un-expose the object on - * @param table_idx Index of the table to un-expose the object on - */ - virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx) override - { - auto name = m_parent->get_name(); - if (name.empty()) - { - return; - } - - log_debug << "Unexposing object " << name << std::endl; - - unexpose_object(vm, table_idx, name); - } - -private: - ExposedObject(const ExposedObject&) = delete; - ExposedObject& operator=(const ExposedObject&) = delete; -}; - -#endif - -/* EOF */ diff --git a/src/squirrel/serialize.cpp b/src/squirrel/serialize.cpp index 1c58c4da724..17ab2733801 100644 --- a/src/squirrel/serialize.cpp +++ b/src/squirrel/serialize.cpp @@ -16,24 +16,20 @@ #include "squirrel/serialize.hpp" -#include #include #include +#include -#include "squirrel/squirrel_error.hpp" #include "util/log.hpp" #include "util/reader_mapping.hpp" #include "util/writer.hpp" -void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const ReaderMapping& mapping) +void load_squirrel_table(ssq::Table& table, const ReaderMapping& mapping) { - if (table_idx < 0) - table_idx -= 2; - auto const& arr = mapping.get_sexp().as_array(); for (size_t i = 1; i < arr.size(); ++i) { - auto const& pair = arr[i].as_array(); + const auto& pair = arr[i].as_array(); // Ignore key value pairs with invalid length if (pair.size() < 2) @@ -42,8 +38,8 @@ void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const ReaderMappin continue; } - const std::string& key = pair[0].as_string(); - auto const& value = pair[1]; + const char* key = pair[0].as_string().c_str(); + const auto& value = pair[1]; // ignore empty / null values if (value.is_nil()) @@ -51,100 +47,72 @@ void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const ReaderMappin log_debug << "Found null value for key " << key << ". Ignoring." << std::endl; continue; } - // push the key - sq_pushstring(vm, key.c_str(), key.size()); // push the value - switch (value.get_type()) { + switch (value.get_type()) + { case sexp::Value::Type::ARRAY: - sq_newtable(vm); - load_squirrel_table(vm, sq_gettop(vm), ReaderMapping(mapping.get_doc(), arr[i])); + { + ssq::Table new_table = table.addTable(key); + load_squirrel_table(new_table, ReaderMapping(mapping.get_doc(), arr[i])); break; + } case sexp::Value::Type::INTEGER: - sq_pushinteger(vm, value.as_int()); + table.set(key, value.as_int()); break; case sexp::Value::Type::REAL: - sq_pushfloat(vm, value.as_float()); + table.set(key, value.as_float()); break; case sexp::Value::Type::STRING: - sq_pushstring(vm, value.as_string().c_str(), -1); + table.set(key, value.as_string()); break; case sexp::Value::Type::BOOLEAN: - sq_pushbool(vm, value.as_bool() ? SQTrue : SQFalse); + table.set(key, value.as_bool()); break; case sexp::Value::Type::SYMBOL: - log_fatal << "Unexpected symbol in file: " << value.as_string() << std::endl; - sq_pushnull(vm); + log_warning << "Unexpected symbol in file: " << value.as_string() << std::endl; + table.set(key, nullptr); break; default: assert(false); break; } - - if (SQ_FAILED(sq_createslot(vm, table_idx))) - throw SquirrelError(vm, "Couldn't create new index"); } } -void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, Writer& writer) +void save_squirrel_table(const ssq::Table& table, Writer& writer) { - // offset because of sq_pushnull - if (table_idx < 0) - table_idx -= 1; - - //iterator table - sq_pushnull(vm); - while (SQ_SUCCEEDED(sq_next(vm, table_idx))) { - if (sq_gettype(vm, -2) != OT_STRING) { - get_logging_instance(false) << "Table contains non-string key\n"; - continue; - } - const SQChar* key; - sq_getstring(vm, -2, &key); - - switch (sq_gettype(vm, -1)) { - case OT_INTEGER: { - SQInteger val; - sq_getinteger(vm, -1, &val); - writer.write(key, static_cast (val)); + for (const auto& [key, value] : table.convertRaw()) + { + switch (value.getType()) + { + case ssq::Type::INTEGER: + writer.write(key, value.to()); break; - } - case OT_FLOAT: { - SQFloat val; - sq_getfloat(vm, -1, &val); - writer.write(key, static_cast (val)); + case ssq::Type::FLOAT: + writer.write(key, value.toFloat()); break; - } - case OT_BOOL: { - SQBool val; - if (SQ_SUCCEEDED(sq_getbool(vm, -1, &val))) - writer.write(key, val == SQTrue); + case ssq::Type::BOOL: + writer.write(key, value.toBool()); break; - } - case OT_STRING: { - const SQChar* str; - sq_getstring(vm, -1, &str); - writer.write(key, reinterpret_cast (str)); + case ssq::Type::STRING: + writer.write(key, value.toString()); break; - } - case OT_TABLE: { + case ssq::Type::TABLE: writer.start_list(key, true); - save_squirrel_table(vm, -1, writer); + save_squirrel_table(value.toTable(), writer); writer.end_list(key); break; - } - case OT_CLOSURE: - break; // ignore - case OT_NATIVECLOSURE: - break; + + case ssq::Type::CLOSURE: + case ssq::Type::NATIVECLOSURE: + break; // Ignore + default: - get_logging_instance(false) << "Can't serialize key '" << key - << "' in table.\n"; + log_warning << "Can't serialize key '" << key << "' in Squirrel table." << std::endl; break; } - sq_pop(vm, 2); } - sq_pop(vm, 1); } /* EOF */ diff --git a/src/squirrel/serialize.hpp b/src/squirrel/serialize.hpp index f3741acd4f2..beb1b816f90 100644 --- a/src/squirrel/serialize.hpp +++ b/src/squirrel/serialize.hpp @@ -17,13 +17,15 @@ #ifndef HEADER_SUPERTUX_SQUIRREL_SERIALIZE_HPP #define HEADER_SUPERTUX_SQUIRREL_SERIALIZE_HPP -#include - class ReaderMapping; class Writer; -void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, Writer& writer); -void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const ReaderMapping& mapping); +namespace ssq { +class Table; +} // namespace ssq + +void load_squirrel_table(ssq::Table& table, const ReaderMapping& mapping); +void save_squirrel_table(const ssq::Table& table, Writer& writer); #endif diff --git a/src/squirrel/squirrel_environment.cpp b/src/squirrel/squirrel_environment.cpp index 86018eef32e..631ffebe7be 100644 --- a/src/squirrel/squirrel_environment.cpp +++ b/src/squirrel/squirrel_environment.cpp @@ -18,105 +18,81 @@ #include -#include "squirrel/script_interface.hpp" -#include "squirrel/squirrel_error.hpp" -#include "squirrel/squirrel_scheduler.hpp" +#include +#include +#include + #include "squirrel/squirrel_util.hpp" #include "squirrel/squirrel_virtual_machine.hpp" -#include "supertux/game_object.hpp" #include "supertux/globals.hpp" #include "util/log.hpp" -SquirrelEnvironment::SquirrelEnvironment(SquirrelVM& vm, const std::string& name) : +SquirrelEnvironment::SquirrelEnvironment(ssq::VM& vm, const std::string& name) : m_vm(vm), - m_table(), + m_table(m_vm.newTable()), m_name(name), m_scripts(), m_scheduler(std::make_unique(m_vm)) { - // garbage collector has to be invoked manually - sq_collectgarbage(m_vm.get_vm()); - - sq_newtable(m_vm.get_vm()); - sq_pushroottable(m_vm.get_vm()); - if (SQ_FAILED(sq_setdelegate(m_vm.get_vm(), -2))) - throw SquirrelError(m_vm.get_vm(), "Couldn't set table delegate"); - - sq_resetobject(&m_table); - if (SQ_FAILED(sq_getstackobj(m_vm.get_vm(), -1, &m_table))) { - throw SquirrelError(m_vm.get_vm(), "Couldn't get table"); - } + // Garbage collector has to be invoked manually! + sq_collectgarbage(m_vm.getHandle()); - sq_addref(m_vm.get_vm(), &m_table); - sq_pop(m_vm.get_vm(), 1); + // Set the root table as delegate. + m_table.setDelegate(m_vm); } SquirrelEnvironment::~SquirrelEnvironment() { - for (auto& script: m_scripts) - { - sq_release(m_vm.get_vm(), &script); - } m_scripts.clear(); - sq_release(m_vm.get_vm(), &m_table); + m_table.reset(); - sq_collectgarbage(m_vm.get_vm()); + sq_collectgarbage(m_vm.getHandle()); } void SquirrelEnvironment::expose_self() { - sq_pushroottable(m_vm.get_vm()); - m_vm.store_object(m_name.c_str(), m_table); - sq_pop(m_vm.get_vm(), 1); + m_vm.set(m_name.c_str(), m_table); } void SquirrelEnvironment::unexpose_self() { - sq_pushroottable(m_vm.get_vm()); - m_vm.delete_table_entry(m_name.c_str()); - sq_pop(m_vm.get_vm(), 1); + m_vm.remove(m_name.c_str()); } void -SquirrelEnvironment::try_expose(GameObject& object) +SquirrelEnvironment::expose(ExposableClass& object, const std::string& name) { - auto script_object = dynamic_cast(&object); - if (script_object != nullptr) { - sq_pushobject(m_vm.get_vm(), m_table); - script_object->expose(m_vm.get_vm(), -1); - sq_pop(m_vm.get_vm(), 1); - } -} + if (name.empty()) return; -void -SquirrelEnvironment::try_unexpose(GameObject& object) -{ - auto script_object = dynamic_cast(&object); - if (script_object != nullptr) { - SQInteger oldtop = sq_gettop(m_vm.get_vm()); - sq_pushobject(m_vm.get_vm(), m_table); - try { - script_object->unexpose(m_vm.get_vm(), -1); - } catch(std::exception& e) { - log_warning << "Couldn't unregister object: " << e.what() << std::endl; - } - sq_settop(m_vm.get_vm(), oldtop); + const std::string class_name = object.get_exposed_class_name(); + assert(!class_name.empty()); + + try + { + ssq::Class sq_class = m_vm.findClass(class_name.c_str()); + m_vm.newInstancePtr(m_table, sq_class, name.c_str(), &object); + } + catch (const std::exception& err) + { + log_warning << "Couldn't expose object of class '" << class_name << "': " << err.what() << std::endl; } } void SquirrelEnvironment::unexpose(const std::string& name) { - SQInteger oldtop = sq_gettop(m_vm.get_vm()); - sq_pushobject(m_vm.get_vm(), m_table); - try { - unexpose_object(m_vm.get_vm(), -1, name); - } catch(std::exception& e) { - log_warning << "Couldn't unregister object: " << e.what() << std::endl; + if (name.empty()) return; + + try + { + m_table.remove(name.c_str()); + } + catch (const std::exception& err) + { + log_warning << "Couldn't unregister object: " << err.what() << std::endl; } - sq_settop(m_vm.get_vm(), oldtop); } void @@ -133,15 +109,8 @@ SquirrelEnvironment::garbage_collect() { m_scripts.erase( std::remove_if(m_scripts.begin(), m_scripts.end(), - [this](HSQOBJECT& object){ - HSQUIRRELVM vm = object_to_vm(object); - - if (sq_getvmstate(vm) != SQ_VMSTATE_SUSPENDED) { - sq_release(m_vm.get_vm(), &object); - return true; - } else { - return false; - } + [](ssq::VM& thread) { + return thread.getState() != SQ_VMSTATE_SUSPENDED; }), m_scripts.end()); } @@ -153,35 +122,37 @@ SquirrelEnvironment::run_script(std::istream& in, const std::string& sourcename) try { - HSQOBJECT object = m_vm.create_thread(); - m_scripts.push_back(object); - - HSQUIRRELVM vm = object_to_vm(object); + ssq::VM thread = m_vm.newThread(64); + thread.setForeignPtr(this); + thread.setRootTable(m_table); - sq_setforeignptr(vm, this); + thread.run(thread.compileSource(in, sourcename.c_str())); - // set root table - sq_pushobject(vm, m_table); - sq_setroottable(vm); + m_scripts.push_back(std::move(thread)); + } + catch (const ssq::Exception& e) + { + if (e.vm) + sqstd_printcallstack(e.vm); - compile_and_run(vm, in, sourcename); + log_warning << e.what() << std::endl; } - catch(const std::exception& e) + catch (const std::exception& e) { - log_warning << "Error running script: " << e.what() << std::endl; + log_warning << e.what() << std::endl; } } -void +SQInteger SquirrelEnvironment::wait_for_seconds(HSQUIRRELVM vm, float seconds) { - m_scheduler->schedule_thread(vm, g_game_time + seconds, false); + return m_scheduler->schedule_thread(vm, g_game_time + seconds, false); } -void +SQInteger SquirrelEnvironment::skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds) { - m_scheduler->schedule_thread(vm, g_game_time + seconds, true); + return m_scheduler->schedule_thread(vm, g_game_time + seconds, true); } void diff --git a/src/squirrel/squirrel_environment.hpp b/src/squirrel/squirrel_environment.hpp index ddb4cc70a92..338350b1584 100644 --- a/src/squirrel/squirrel_environment.hpp +++ b/src/squirrel/squirrel_environment.hpp @@ -21,44 +21,31 @@ #include #include -#include +#include +#include "squirrel/exposable_class.hpp" +#include "squirrel/squirrel_scheduler.hpp" #include "squirrel/squirrel_util.hpp" - -class GameObject; -class ScriptInterface; -class SquirrelVM; +#include "util/log.hpp" /** The SquirrelEnvironment contains the environment in which a script is executed, meaning a root table containing objects and variables. */ -class SquirrelEnvironment +class SquirrelEnvironment final { public: - SquirrelEnvironment(SquirrelVM& vm, const std::string& name); + SquirrelEnvironment(ssq::VM& vm, const std::string& name); virtual ~SquirrelEnvironment(); public: - SquirrelVM& get_vm() const { return m_vm; } + ssq::VM& get_vm() const { return m_vm; } /** Expose this engine under 'name' */ void expose_self(); void unexpose_self(); - /** Expose the GameObject if it has a ScriptInterface, otherwise do - nothing. */ - void try_expose(GameObject& object); - void try_unexpose(GameObject& object); - - /** Generic expose function, T must be a type that has a - create_squirrel_instance() associated with it. */ - template - void expose(const std::string& name, std::unique_ptr script_object) - { - sq_pushobject(m_vm.get_vm(), m_table); - expose_object(m_vm.get_vm(), -1, std::move(script_object), name); - sq_pop(m_vm.get_vm(), 1); - } + /** Expose and unexpose objects */ + void expose(ExposableClass& object, const std::string& name); void unexpose(const std::string& name); /** Convenience function that takes an std::string instead of an @@ -72,17 +59,17 @@ class SquirrelEnvironment void run_script(std::istream& in, const std::string& sourcename); void update(float dt_sec); - void wait_for_seconds(HSQUIRRELVM vm, float seconds); - void skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds); + SQInteger wait_for_seconds(HSQUIRRELVM vm, float seconds); + SQInteger skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds); private: void garbage_collect(); private: - SquirrelVM& m_vm; - HSQOBJECT m_table; + ssq::VM& m_vm; + ssq::Table m_table; std::string m_name; - SquirrelObjectList m_scripts; + std::vector m_scripts; std::unique_ptr m_scheduler; private: diff --git a/src/squirrel/squirrel_error.cpp b/src/squirrel/squirrel_error.cpp deleted file mode 100644 index a09a72e6a06..00000000000 --- a/src/squirrel/squirrel_error.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "squirrel/squirrel_error.hpp" - -#include - -SquirrelError::SquirrelError(HSQUIRRELVM v, const std::string& message_) throw() : - message() -{ - std::ostringstream msg; - msg << "Squirrel error: " << message_ << " ("; - const char* lasterr; - sq_getlasterror(v); - if (sq_gettype(v, -1) != OT_STRING) - { - lasterr = "no error info"; - } - else - { - sq_getstring(v, -1, &lasterr); - } - msg << lasterr << ")"; - sq_pop(v, 1); - message = msg.str(); -} - -SquirrelError::~SquirrelError() throw() -{} - -const char* -SquirrelError::what() const throw() -{ - return message.c_str(); -} - -/* EOF */ diff --git a/src/squirrel/squirrel_error.hpp b/src/squirrel/squirrel_error.hpp deleted file mode 100644 index 1e709714d8e..00000000000 --- a/src/squirrel/squirrel_error.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SQUIRREL_SQUIRREL_ERROR_HPP -#define HEADER_SUPERTUX_SQUIRREL_SQUIRREL_ERROR_HPP - -#include -#include -#include - -/** Exception class for squirrel errors, it takes a squirrelvm and uses - * sq_geterror() to retrieve additional information about the last error that - * occurred and creates a readable message from that. - */ -class SquirrelError final : public std::exception -{ -public: - SquirrelError(HSQUIRRELVM v, const std::string& message) throw(); - SquirrelError(const SquirrelError&) = default; - SquirrelError& operator=(const SquirrelError&) = default; - ~SquirrelError() throw() override; - - virtual const char* what() const throw() override; - -private: - std::string message; -}; - -#endif - -/* EOF */ diff --git a/src/squirrel/squirrel_scheduler.cpp b/src/squirrel/squirrel_scheduler.cpp index 5396b2c97de..5c700a142c6 100644 --- a/src/squirrel/squirrel_scheduler.cpp +++ b/src/squirrel/squirrel_scheduler.cpp @@ -18,12 +18,14 @@ #include -#include "squirrel/squirrel_virtual_machine.hpp" +#include + #include "squirrel/squirrel_util.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "supertux/level.hpp" #include "util/log.hpp" -SquirrelScheduler::SquirrelScheduler(SquirrelVM& vm) : +SquirrelScheduler::SquirrelScheduler(ssq::VM& vm) : m_vm(vm), schedule() { @@ -32,19 +34,19 @@ SquirrelScheduler::SquirrelScheduler(SquirrelVM& vm) : void SquirrelScheduler::update(float time) { - while (!schedule.empty() && (schedule.front().wakeup_time < time || - (schedule.front().skippable && - Level::current() != nullptr && - Level::current()->m_skip_cutscene) - )) { + while (!schedule.empty() && + (schedule.front().wakeup_time < time || + (schedule.front().skippable && Level::current() && + Level::current()->m_skip_cutscene))) + { HSQOBJECT thread_ref = schedule.front().thread_ref; - sq_pushobject(m_vm.get_vm(), thread_ref); - sq_getweakrefval(m_vm.get_vm(), -1); + sq_pushobject(m_vm.getHandle(), thread_ref); + sq_getweakrefval(m_vm.getHandle(), -1); HSQUIRRELVM scheduled_vm; - if (sq_gettype(m_vm.get_vm(), -1) == OT_THREAD && - SQ_SUCCEEDED(sq_getthread(m_vm.get_vm(), -1, &scheduled_vm))) { + if (sq_gettype(m_vm.getHandle(), -1) == OT_THREAD && + SQ_SUCCEEDED(sq_getthread(m_vm.getHandle(), -1, &scheduled_vm))) { if (SQ_FAILED(sq_wakeupvm(scheduled_vm, SQFalse, SQFalse, SQTrue, SQFalse))) { std::ostringstream msg; msg << "Error waking VM: "; @@ -61,34 +63,36 @@ SquirrelScheduler::update(float time) } } - sq_release(m_vm.get_vm(), &thread_ref); - sq_pop(m_vm.get_vm(), 2); + sq_release(m_vm.getHandle(), &thread_ref); + sq_pop(m_vm.getHandle(), 2); std::pop_heap(schedule.begin(), schedule.end()); schedule.pop_back(); } } -void +SQInteger SquirrelScheduler::schedule_thread(HSQUIRRELVM scheduled_vm, float time, bool skippable) { // create a weakref to the VM - sq_pushthread(m_vm.get_vm(), scheduled_vm); - sq_weakref(m_vm.get_vm(), -1); + sq_pushthread(m_vm.getHandle(), scheduled_vm); + sq_weakref(m_vm.getHandle(), -1); ScheduleEntry entry; - if (SQ_FAILED(sq_getstackobj(m_vm.get_vm(), -1, & entry.thread_ref))) { - sq_pop(m_vm.get_vm(), 2); - throw SquirrelError(m_vm.get_vm(), "Couldn't get thread weakref from vm"); + if (SQ_FAILED(sq_getstackobj(m_vm.getHandle(), -1, & entry.thread_ref))) { + sq_pop(m_vm.getHandle(), 2); + throw ssq::Exception(m_vm.getHandle(), "Couldn't get thread weakref from vm"); } entry.wakeup_time = time; entry.skippable = skippable; - sq_addref(m_vm.get_vm(), & entry.thread_ref); - sq_pop(m_vm.get_vm(), 2); + sq_addref(m_vm.getHandle(), & entry.thread_ref); + sq_pop(m_vm.getHandle(), 2); schedule.push_back(entry); std::push_heap(schedule.begin(), schedule.end()); + + return sq_suspendvm(scheduled_vm); } /* EOF */ diff --git a/src/squirrel/squirrel_scheduler.hpp b/src/squirrel/squirrel_scheduler.hpp index 548584ac56e..728f3d11854 100644 --- a/src/squirrel/squirrel_scheduler.hpp +++ b/src/squirrel/squirrel_scheduler.hpp @@ -19,23 +19,23 @@ #include -#include - -class SquirrelVM; +#include /** This class keeps a list of squirrel threads that are scheduled for a certain time. (the typical result of a wait() command in a squirrel script) */ class SquirrelScheduler final { public: - SquirrelScheduler(SquirrelVM& vm); + SquirrelScheduler(ssq::VM& vm); /** time must be absolute time, not relative updates, i.e. g_game_time */ void update(float time); - void schedule_thread(HSQUIRRELVM vm, float time, bool skippable); + + SQInteger schedule_thread(HSQUIRRELVM vm, float time, bool skippable); private: - struct ScheduleEntry { + struct ScheduleEntry final + { /// weak reference to the squirrel vm object HSQOBJECT thread_ref; /// time when the thread should be woken up @@ -51,7 +51,7 @@ class SquirrelScheduler final }; private: - SquirrelVM& m_vm; + ssq::VM& m_vm; typedef std::vector ScheduleHeap; ScheduleHeap schedule; diff --git a/src/squirrel/squirrel_thread_queue.cpp b/src/squirrel/squirrel_thread_queue.cpp index a06ae9936a3..a06dbaf8800 100644 --- a/src/squirrel/squirrel_thread_queue.cpp +++ b/src/squirrel/squirrel_thread_queue.cpp @@ -16,32 +16,36 @@ #include "squirrel/squirrel_thread_queue.hpp" -#include "squirrel/squirrel_virtual_machine.hpp" +#include + #include "squirrel/squirrel_util.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "util/log.hpp" -SquirrelThreadQueue::SquirrelThreadQueue(SquirrelVM& vm) : +SquirrelThreadQueue::SquirrelThreadQueue(ssq::VM& vm) : m_vm(vm), m_threads() { } -void +SQInteger SquirrelThreadQueue::add(HSQUIRRELVM vm) { // create a weakref to the VM - sq_pushthread(m_vm.get_vm(), vm); - sq_weakref(m_vm.get_vm(), -1); + sq_pushthread(m_vm.getHandle(), vm); + sq_weakref(m_vm.getHandle(), -1); HSQOBJECT object; - if (SQ_FAILED(sq_getstackobj(m_vm.get_vm(), -1, &object))) { - sq_pop(m_vm.get_vm(), 2); - throw SquirrelError(m_vm.get_vm(), "Couldn't get thread weakref from vm"); + if (SQ_FAILED(sq_getstackobj(m_vm.getHandle(), -1, &object))) + { + sq_pop(m_vm.getHandle(), 2); + throw ssq::RuntimeException(m_vm.getHandle(), "Couldn't get thread weakref from VM!"); } - sq_addref(m_vm.get_vm(), &object); + sq_addref(m_vm.getHandle(), &object); m_threads.push_back(object); - sq_pop(m_vm.get_vm(), 2); + sq_pop(m_vm.getHandle(), 2); + return sq_suspendvm(vm); } void @@ -52,20 +56,20 @@ SquirrelThreadQueue::wakeup() for (HSQOBJECT& object : threads) { - sq_pushobject(m_vm.get_vm(), object); - sq_getweakrefval(m_vm.get_vm(), -1); + sq_pushobject(m_vm.getHandle(), object); + sq_getweakrefval(m_vm.getHandle(), -1); HSQUIRRELVM scheduled_vm; - if (sq_gettype(m_vm.get_vm(), -1) == OT_THREAD && - SQ_SUCCEEDED(sq_getthread(m_vm.get_vm(), -1, &scheduled_vm))) + if (sq_gettype(m_vm.getHandle(), -1) == OT_THREAD && + SQ_SUCCEEDED(sq_getthread(m_vm.getHandle(), -1, &scheduled_vm))) { if (SQ_FAILED(sq_wakeupvm(scheduled_vm, SQFalse, SQFalse, SQTrue, SQFalse))) { log_warning << "Couldn't wakeup scheduled squirrel VM" << std::endl; } } - sq_release(m_vm.get_vm(), &object); - sq_pop(m_vm.get_vm(), 1); + sq_release(m_vm.getHandle(), &object); + sq_pop(m_vm.getHandle(), 1); } } diff --git a/src/squirrel/squirrel_thread_queue.hpp b/src/squirrel/squirrel_thread_queue.hpp index 275418d01cf..7793712f380 100644 --- a/src/squirrel/squirrel_thread_queue.hpp +++ b/src/squirrel/squirrel_thread_queue.hpp @@ -17,27 +17,26 @@ #ifndef HEADER_SUPERTUX_SQUIRREL_SQUIRREL_THREAD_QUEUE_HPP #define HEADER_SUPERTUX_SQUIRREL_SQUIRREL_THREAD_QUEUE_HPP -#include #include -#include "squirrel/squirrel_util.hpp" +#include -class SquirrelVM; +#include "squirrel/squirrel_util.hpp" /** Keeps a list of SquirrelThreads that wait for a wakeup event */ class SquirrelThreadQueue final { public: - SquirrelThreadQueue(SquirrelVM& vm); + SquirrelThreadQueue(ssq::VM& vm); /** adds a thread (actually a weakref to the thread) */ - void add(HSQUIRRELVM vm); + SQInteger add(HSQUIRRELVM vm); /** wakes up threads in the list */ void wakeup(); private: - SquirrelVM& m_vm; + ssq::VM& m_vm; SquirrelObjectList m_threads; private: diff --git a/src/squirrel/squirrel_util.cpp b/src/squirrel/squirrel_util.cpp index 084c1a5b7a3..70b760fe6ac 100644 --- a/src/squirrel/squirrel_util.cpp +++ b/src/squirrel/squirrel_util.cpp @@ -16,122 +16,88 @@ #include "squirrel/squirrel_util.hpp" -#include +#include +#include -#include -#include -#include -#include -#include -#include - -#include "squirrel/script_interface.hpp" -#include "supertux/game_object.hpp" -#include "util/log.hpp" - -std::string squirrel2string(HSQUIRRELVM v, SQInteger i) +std::string squirrel_to_string(const ssq::Object& object) { std::ostringstream os; - switch (sq_gettype(v, i)) + switch (object.getType()) { - case OT_NULL: + case ssq::Type::NULLPTR: os << ""; break; - case OT_BOOL: { - SQBool p; - if (SQ_SUCCEEDED(sq_getbool(v, i, &p))) { - if (p) - os << "true"; - else - os << "false"; - } + case ssq::Type::BOOL: + os << object.toBool(); break; - } - case OT_INTEGER: { - SQInteger val; - sq_getinteger(v, i, &val); - os << val; + case ssq::Type::INTEGER: + os << object.to(); break; - } - case OT_FLOAT: { - SQFloat val; - sq_getfloat(v, i, &val); - os << val; + case ssq::Type::FLOAT: + os << object.toFloat(); break; - } - case OT_STRING: { - const SQChar* val; - sq_getstring(v, i, &val); - os << "\"" << val << "\""; + case ssq::Type::STRING: + os << "\"" << object.toString() << "\""; break; - } - case OT_TABLE: { + case ssq::Type::TABLE: + { + const std::map table = object.toTable().convertRaw(); + bool first = true; os << "{"; - sq_pushnull(v); //null iterator - while (SQ_SUCCEEDED(sq_next(v,i-1))) + for (const auto& [key, value] : table) { - if (!first) { + if (!first) os << ", "; - } first = false; - //here -1 is the value and -2 is the key - os << squirrel2string(v, -2) << " => " - << squirrel2string(v, -1); - - sq_pop(v,2); //pops key and val before the nex iteration + os << key << " => " << squirrel_to_string(value); } - sq_pop(v, 1); os << "}"; break; } - case OT_ARRAY: { + case ssq::Type::ARRAY: + { + const std::vector array = object.toArray().convertRaw(); + bool first = true; os << "["; - sq_pushnull(v); //null iterator - while (SQ_SUCCEEDED(sq_next(v,i-1))) + for (const ssq::Object& value : array) { - if (!first) { + if (!first) os << ", "; - } first = false; - //here -1 is the value and -2 is the key - // we ignore the key, since that is just the index in an array - os << squirrel2string(v, -1); - - sq_pop(v,2); //pops key and val before the nex iteration + os << squirrel_to_string(value); } - sq_pop(v, 1); os << "]"; break; } - case OT_USERDATA: + case ssq::Type::USERDATA: os << ""; break; - case OT_CLOSURE: + case ssq::Type::CLOSURE: os << ""; break; - case OT_NATIVECLOSURE: + case ssq::Type::NATIVECLOSURE: os << ""; break; - case OT_GENERATOR: + case ssq::Type::GENERATOR: os << ""; break; - case OT_USERPOINTER: + case ssq::Type::USERPOINTER: os << "userpointer"; break; - case OT_THREAD: + case ssq::Type::THREAD: os << ""; break; - case OT_CLASS: + case ssq::Type::CLASS: os << ""; break; - case OT_INSTANCE: + case ssq::Type::INSTANCE: os << ""; break; - case OT_WEAKREF: + case ssq::Type::WEAKREF: os << ""; break; default: @@ -141,120 +107,4 @@ std::string squirrel2string(HSQUIRRELVM v, SQInteger i) return os.str(); } -void print_squirrel_stack(HSQUIRRELVM v) -{ - printf("--------------------------------------------------------------\n"); - SQInteger count = sq_gettop(v); - for (int i = 1; i <= count; ++i) { - printf("%d: ",i); - switch (sq_gettype(v, i)) - { - case OT_NULL: - printf("null"); - break; - case OT_INTEGER: { - SQInteger val; - sq_getinteger(v, i, &val); - printf("integer (%d)", static_cast(val)); - break; - } - case OT_FLOAT: { - SQFloat val; - sq_getfloat(v, i, &val); - printf("float (%f)", static_cast(val)); - break; - } - case OT_STRING: { - const SQChar* val; - sq_getstring(v, i, &val); - printf("string (%s)", val); - break; - } - case OT_TABLE: - printf("table"); - break; - case OT_ARRAY: - printf("array"); - break; - case OT_USERDATA: - printf("userdata"); - break; - case OT_CLOSURE: - printf("closure(function)"); - break; - case OT_NATIVECLOSURE: - printf("native closure(C function)"); - break; - case OT_GENERATOR: - printf("generator"); - break; - case OT_USERPOINTER: - printf("userpointer"); - break; - case OT_THREAD: - printf("thread"); - break; - case OT_CLASS: - printf("class"); - break; - case OT_INSTANCE: - printf("instance"); - break; - case OT_WEAKREF: - printf("weakref"); - break; - default: - printf("unknown?!?"); - break; - } - printf("\n"); - } - printf("--------------------------------------------------------------\n"); -} - -SQInteger squirrel_read_char(SQUserPointer file) -{ - std::istream* in = reinterpret_cast (file); - int c = in->get(); - if (in->eof()) - return 0; - return c; -} - -void compile_script(HSQUIRRELVM vm, std::istream& in, const std::string& sourcename) -{ - if (SQ_FAILED(sq_compile(vm, squirrel_read_char, &in, sourcename.c_str(), true))) - throw SquirrelError(vm, "Couldn't parse script"); -} - -void compile_and_run(HSQUIRRELVM vm, std::istream& in, - const std::string& sourcename) -{ - compile_script(vm, in, sourcename); - - SQInteger oldtop = sq_gettop(vm); - - try { - sq_pushroottable(vm); - if (SQ_FAILED(sq_call(vm, 1, SQFalse, SQTrue))) - throw SquirrelError(vm, "Couldn't start script"); - } catch(...) { - sq_settop(vm, oldtop); - throw; - } - - // we can remove the closure in case the script was not suspended - if (sq_getvmstate(vm) != SQ_VMSTATE_SUSPENDED) { - sq_settop(vm, oldtop-1); - } -} - -HSQUIRRELVM object_to_vm(const HSQOBJECT& object) -{ - if (object._type != OT_THREAD) - return nullptr; - - return object._unVal.pThread; -} - /* EOF */ diff --git a/src/squirrel/squirrel_util.hpp b/src/squirrel/squirrel_util.hpp index f2daf53d6dd..b6e4e5cd7ba 100644 --- a/src/squirrel/squirrel_util.hpp +++ b/src/squirrel/squirrel_util.hpp @@ -17,63 +17,18 @@ #ifndef HEADER_SUPERTUX_SQUIRREL_SQUIRREL_UTIL_HPP #define HEADER_SUPERTUX_SQUIRREL_SQUIRREL_UTIL_HPP -#include -#include -#include -#include +#include #include -#include "squirrel/squirrel_virtual_machine.hpp" -#include "squirrel/squirrel_error.hpp" -#include "scripting/wrapper.hpp" +#include -typedef std::vector SquirrelObjectList; - -std::string squirrel2string(HSQUIRRELVM vm, SQInteger i); -void print_squirrel_stack(HSQUIRRELVM vm); - -SQInteger squirrel_read_char(SQUserPointer file); - -HSQUIRRELVM object_to_vm(const HSQOBJECT& object); - -void compile_script(HSQUIRRELVM vm, std::istream& in, - const std::string& sourcename); -void compile_and_run(HSQUIRRELVM vm, std::istream& in, - const std::string& sourcename); +namespace ssq { +class Object; +} // namespace ssq -template -void expose_object(HSQUIRRELVM vm, SQInteger table_idx, - std::unique_ptr object, const std::string& name) -{ - sq_pushstring(vm, name.c_str(), -1); - scripting::create_squirrel_instance(vm, object.release(), true); - - if (table_idx < 0) - table_idx -= 2; - - // register instance in root table - if (SQ_FAILED(sq_createslot(vm, table_idx))) { - std::ostringstream msg; - msg << "Couldn't register object '" << name << "' in squirrel table"; - throw SquirrelError(vm, msg.str()); - } -} - -static inline void unexpose_object(HSQUIRRELVM vm, SQInteger table_idx, - const std::string& name) -{ - assert(name.length() < static_cast(std::numeric_limits::max())); - sq_pushstring(vm, name.c_str(), static_cast(name.length())); - - if (table_idx < 0) - table_idx -= 1; +typedef std::vector SquirrelObjectList; - if (SQ_FAILED(sq_deleteslot(vm, table_idx, SQFalse))) { - std::ostringstream msg; - msg << "Couldn't unregister object '" << name << "' in squirrel root table"; - throw SquirrelError(vm, msg.str()); - } -} +std::string squirrel_to_string(const ssq::Object& object); #endif diff --git a/src/squirrel/squirrel_virtual_machine.cpp b/src/squirrel/squirrel_virtual_machine.cpp index bbc25980135..f2d5ac25941 100644 --- a/src/squirrel/squirrel_virtual_machine.cpp +++ b/src/squirrel/squirrel_virtual_machine.cpp @@ -16,20 +16,15 @@ #include "squirrel/squirrel_virtual_machine.hpp" -#include -#include -#include -#include #include #include #include #include "physfs/ifile_stream.hpp" -#include "scripting/wrapper.hpp" -#include "squirrel/squirrel_error.hpp" -#include "squirrel/squirrel_thread_queue.hpp" #include "squirrel/squirrel_scheduler.hpp" -#include "squirrel_util.hpp" +#include "squirrel/squirrel_thread_queue.hpp" +#include "squirrel/squirrel_util.hpp" +#include "squirrel/supertux_api.hpp" #include "supertux/console.hpp" #include "supertux/globals.hpp" #include "util/log.hpp" @@ -41,12 +36,10 @@ HSQREMOTEDBG debugger = nullptr; } // namespace #endif -namespace { - #ifdef __clang__ __attribute__((__format__ (__printf__, 2, 0))) #endif -void printfunc(HSQUIRRELVM, const char* fmt, ...) +static void printFunc(HSQUIRRELVM, const char* fmt, ...) { char buf[4096]; const char separator[] = "\n"; @@ -62,69 +55,60 @@ void printfunc(HSQUIRRELVM, const char* fmt, ...) va_end(arglist); } -} // namespace +static const char* DEFAULT_SCRIPT_FILE = "scripts/default.nut"; SquirrelVirtualMachine::SquirrelVirtualMachine(bool enable_debugger) : - m_vm(), + m_vm(64, ssq::Libs::BLOB | ssq::Libs::MATH | ssq::Libs::STRING), m_screenswitch_queue(), m_scheduler() { - sq_setsharedforeignptr(m_vm.get_vm(), this); + m_vm.setForeignPtr(this); m_screenswitch_queue = std::make_unique(m_vm); m_scheduler = std::make_unique(m_vm); if (enable_debugger) { #ifdef ENABLE_SQDBG - sq_enabledebuginfo(m_vm.get_vm(), SQTrue); - debugger = sq_rdbg_init(m_vm.get_vm(), 1234, SQFalse); + sq_enabledebuginfo(m_vm.getHandle(), SQTrue); + debugger = sq_rdbg_init(m_vm.getHandle(), 1234, SQFalse); if (debugger == nullptr) - throw SquirrelError(m_vm.get_vm(), "Couldn't initialize squirrel debugger"); + throw ssq::Exception(m_vm.getHandle(), "Couldn't initialize squirrel debugger"); - sq_enabledebuginfo(m_vm.get_vm(), SQTrue); + sq_enabledebuginfo(m_vm.getHandle(), SQTrue); log_info << "Waiting for debug client..." << std::endl; if (SQ_FAILED(sq_rdbg_waitforconnections(debugger))) - throw SquirrelError(m_vm.get_vm(), "Waiting for debug clients failed"); + throw ssq::Exception(m_vm.getHandle(), "Waiting for debug clients failed"); log_info << "debug client connected." << std::endl; #endif } - sq_pushroottable(m_vm.get_vm()); - if (SQ_FAILED(sqstd_register_bloblib(m_vm.get_vm()))) - throw SquirrelError(m_vm.get_vm(), "Couldn't register blob lib"); - if (SQ_FAILED(sqstd_register_mathlib(m_vm.get_vm()))) - throw SquirrelError(m_vm.get_vm(), "Couldn't register math lib"); - if (SQ_FAILED(sqstd_register_stringlib(m_vm.get_vm()))) - throw SquirrelError(m_vm.get_vm(), "Couldn't register string lib"); - - // remove rand and srand calls from sqstdmath, we'll provide our own - m_vm.delete_table_entry("srand"); - m_vm.delete_table_entry("rand"); - - // register supertux API - scripting::register_supertux_wrapper(m_vm.get_vm()); - - sq_pop(m_vm.get_vm(), 1); - - // register print function - sq_setprintfunc(m_vm.get_vm(), printfunc, printfunc); - // register default error handlers - sqstd_seterrorhandlers(m_vm.get_vm()); - - // try to load default script - try { - std::string filename = "scripts/default.nut"; - IFileStream stream(filename); - compile_and_run(m_vm.get_vm(), stream, filename); - } catch(std::exception& e) { - log_warning << "Couldn't load default.nut: " << e.what() << std::endl; + // Set print function. + m_vm.setPrintFunc(&printFunc, &printFunc); + + // Remove rand and srand calls from sqstdmath, we'll provide our own. + m_vm.remove("srand"); + m_vm.remove("rand"); + + // Register SuperTux API. + register_supertux_scripting_api(m_vm); + + // Try to load the default script. + try + { + IFileStream stream(DEFAULT_SCRIPT_FILE); + m_vm.run(m_vm.compileSource(stream, DEFAULT_SCRIPT_FILE)); + } + catch (const std::exception& err) + { + log_warning << "Couldn't load 'default.nut': " << err.what() << std::endl; } } SquirrelVirtualMachine::~SquirrelVirtualMachine() { #ifdef ENABLE_SQDBG - if (debugger != nullptr) { + if (debugger) + { sq_rdbg_shutdown(debugger); debugger = nullptr; } @@ -142,27 +126,27 @@ void SquirrelVirtualMachine::update_debugger() { #ifdef ENABLE_SQDBG - if (debugger != nullptr) + if (debugger) sq_rdbg_update(debugger); #endif } -void +SQInteger SquirrelVirtualMachine::wait_for_seconds(HSQUIRRELVM vm, float seconds) { - m_scheduler->schedule_thread(vm, g_game_time + seconds, false); + return m_scheduler->schedule_thread(vm, g_game_time + seconds, false); } -void +SQInteger SquirrelVirtualMachine::skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds) { - m_scheduler->schedule_thread(vm, g_game_time + seconds, true); + return m_scheduler->schedule_thread(vm, g_game_time + seconds, true); } -void +SQInteger SquirrelVirtualMachine::wait_for_screenswitch(HSQUIRRELVM vm) { - m_screenswitch_queue->add(vm); + return m_screenswitch_queue->add(vm); } void diff --git a/src/squirrel/squirrel_virtual_machine.hpp b/src/squirrel/squirrel_virtual_machine.hpp index 3e7406aeae2..01e67cd0a33 100644 --- a/src/squirrel/squirrel_virtual_machine.hpp +++ b/src/squirrel/squirrel_virtual_machine.hpp @@ -19,9 +19,8 @@ #include -#include +#include -#include "squirrel/squirrel_vm.hpp" #include "util/currenton.hpp" class SquirrelThreadQueue; @@ -33,23 +32,23 @@ class SquirrelVirtualMachine final : public Currenton SquirrelVirtualMachine(bool enable_debugger); ~SquirrelVirtualMachine() override; - SquirrelVM& get_vm() { return m_vm; } + ssq::VM& get_vm() { return m_vm; } - void wait_for_seconds(HSQUIRRELVM vm, float seconds); - void skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds); + SQInteger wait_for_seconds(HSQUIRRELVM vm, float seconds); + SQInteger skippable_wait_for_seconds(HSQUIRRELVM vm, float seconds); void update(float dt_sec); /** adds thread waiting for a screen switch event */ - void wait_for_screenswitch(HSQUIRRELVM vm); + SQInteger wait_for_screenswitch(HSQUIRRELVM vm); /** wakes up threads waiting for a screen switch event */ void wakeup_screenswitch(); private: - void update_debugger(); + void update_debugger(); private: - SquirrelVM m_vm; + ssq::VM m_vm; std::unique_ptr m_screenswitch_queue; std::unique_ptr m_scheduler; diff --git a/src/squirrel/squirrel_vm.cpp b/src/squirrel/squirrel_vm.cpp deleted file mode 100644 index 3be4bf85d5d..00000000000 --- a/src/squirrel/squirrel_vm.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// 2018 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#include "squirrel/squirrel_vm.hpp" - -#include - -#include "squirrel/squirrel_error.hpp" -#include "squirrel/squirrel_util.hpp" - -SquirrelVM::SquirrelVM() : - m_vm(sq_open(64)) -{ - if (m_vm == nullptr) - throw std::runtime_error("Couldn't initialize squirrel vm"); -} - -SquirrelVM::~SquirrelVM() -{ -#ifdef ENABLE_SQDBG - if (debugger != nullptr) { - sq_rdbg_shutdown(debugger); - debugger = nullptr; - } -#endif - - sq_close(m_vm); -} - -void -SquirrelVM::begin_table(const char* name) -{ - sq_pushstring(m_vm, name, -1); - sq_newtable(m_vm); -} - -void -SquirrelVM::end_table(const char* name) -{ - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Failed to create '" + std::string(name) + "' table entry"); -} - -void -SquirrelVM::create_empty_table(const char* name) -{ - begin_table(name); - end_table(name); -} - -bool -SquirrelVM::has_property(const char* name) -{ - sq_pushstring(m_vm, name, -1); - if (SQ_FAILED(sq_get(m_vm, -2))) return false; - sq_pop(m_vm, 1); - return true; -} - -void -SquirrelVM::store_bool(const char* name, bool val) -{ - sq_pushstring(m_vm, name, -1); - sq_pushbool(m_vm, val ? SQTrue : SQFalse); - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Couldn't add float value to table"); -} - -void -SquirrelVM::store_int(const char* name, int val) -{ - sq_pushstring(m_vm, name, -1); - sq_pushinteger(m_vm, val); - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Couldn't add int value to table"); -} - -void -SquirrelVM::store_float(const char* name, float val) -{ - sq_pushstring(m_vm, name, -1); - sq_pushfloat(m_vm, val); - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Couldn't add float value to table"); -} - -void -SquirrelVM::store_string(const char* name, const std::string& val) -{ - sq_pushstring(m_vm, name, -1); - sq_pushstring(m_vm, val.c_str(), val.length()); - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Couldn't add float value to table"); -} - -void -SquirrelVM::store_object(const char* name, const HSQOBJECT& val) -{ - sq_pushstring(m_vm, name, -1); - sq_pushobject(m_vm, val); - if (SQ_FAILED(sq_createslot(m_vm, -3))) - throw SquirrelError(m_vm, "Couldn't add object value to table"); -} - -bool -SquirrelVM::get_bool(const char* name, bool& val) -{ - if (!has_property(name)) return false; - val = read_bool(name); - return true; -} - -bool -SquirrelVM::get_int(const char* name, int& val) -{ - if (!has_property(name)) return false; - val = read_int(name); - return true; -} - -bool -SquirrelVM::get_float(const char* name, float& val) -{ - if (!has_property(name)) return false; - val = read_float(name); - return true; -} - -bool -SquirrelVM::get_string(const char* name, std::string& val) -{ - if (!has_property(name)) return false; - val = read_string(name); - return true; -} - -bool -SquirrelVM::read_bool(const char* name) -{ - get_table_entry(name); - - SQBool result; - if (SQ_FAILED(sq_getbool(m_vm, -1, &result))) { - std::ostringstream msg; - msg << "Couldn't get bool value for '" << name << "' from table"; - throw SquirrelError(m_vm, msg.str()); - } - sq_pop(m_vm, 1); - - return result == SQTrue; -} - -int -SquirrelVM::read_int(const char* name) -{ - get_table_entry(name); - - SQInteger result; - if (SQ_FAILED(sq_getinteger(m_vm, -1, &result))) { - std::ostringstream msg; - msg << "Couldn't get int value for '" << name << "' from table"; - throw SquirrelError(m_vm, msg.str()); - } - sq_pop(m_vm, 1); - - return static_cast(result); -} - -float -SquirrelVM::read_float(const char* name) -{ - get_table_entry(name); - - float result; - if (SQ_FAILED(sq_getfloat(m_vm, -1, &result))) { - std::ostringstream msg; - msg << "Couldn't get float value for '" << name << "' from table"; - throw SquirrelError(m_vm, msg.str()); - } - sq_pop(m_vm, 1); - - return result; -} - -std::string -SquirrelVM::read_string(const char* name) -{ - get_table_entry(name); - - const char* result; - if (SQ_FAILED(sq_getstring(m_vm, -1, &result))) { - std::ostringstream msg; - msg << "Couldn't get string value for '" << name << "' from table"; - throw SquirrelError(m_vm, msg.str()); - } - sq_pop(m_vm, 1); - - return std::string(result); -} - -void -SquirrelVM::get_table_entry(const std::string& name) -{ - sq_pushstring(m_vm, name.c_str(), -1); - if (SQ_FAILED(sq_get(m_vm, -2))) - { - std::ostringstream msg; - msg << "failed to get '" << name << "' table entry"; - throw SquirrelError(m_vm, msg.str()); - } - else - { - // successfully placed result on stack - } -} - -void -SquirrelVM::get_or_create_table_entry(const std::string& name) -{ - try - { - get_table_entry(name); - } - catch(std::exception&) - { - create_empty_table(name.c_str()); - get_table_entry(name); - } -} - -void -SquirrelVM::delete_table_entry(const char* name) -{ - sq_pushstring(m_vm, name, -1); - if (SQ_FAILED(sq_deleteslot(m_vm, -2, false))) - { - // Something failed while deleting the table entry. - // Key doesn't exist? - } -} - -void -SquirrelVM::rename_table_entry(const char* oldname, const char* newname) -{ - SQInteger oldtop = sq_gettop(m_vm); - - // push key - sq_pushstring(m_vm, newname, -1); - - // push value and delete old oldname - sq_pushstring(m_vm, oldname, -1); - if (SQ_FAILED(sq_deleteslot(m_vm, oldtop, SQTrue))) { - sq_settop(m_vm, oldtop); - throw SquirrelError(m_vm, "Couldn't find 'oldname' entry in table"); - } - - // create new entry - sq_createslot(m_vm, -3); - - sq_settop(m_vm, oldtop); -} - -std::vector -SquirrelVM::get_table_keys() -{ - auto old_top = sq_gettop(m_vm); - std::vector keys; - - sq_pushnull(m_vm); - while (SQ_SUCCEEDED(sq_next(m_vm, -2))) - { - //here -1 is the value and -2 is the key - const char* result; - if (SQ_FAILED(sq_getstring(m_vm, -2, &result))) - { - throw SquirrelError(m_vm, "Couldn't get string value for key"); - } - else - { - keys.push_back(result); - } - - // pops key and val before the next iteration - sq_pop(m_vm, 2); - } - - sq_settop(m_vm, old_top); - - return keys; -} - -HSQOBJECT -SquirrelVM::create_thread() -{ - HSQUIRRELVM new_vm = sq_newthread(m_vm, 64); - if (new_vm == nullptr) - throw SquirrelError(m_vm, "Couldn't create new VM"); - - HSQOBJECT vm_object; - sq_resetobject(&vm_object); - if (SQ_FAILED(sq_getstackobj(m_vm, -1, &vm_object))) - throw SquirrelError(m_vm, "Couldn't get squirrel thread from stack"); - sq_addref(m_vm, &vm_object); - - sq_pop(m_vm, 1); - - return vm_object; -} - -/* EOF */ diff --git a/src/squirrel/squirrel_vm.hpp b/src/squirrel/squirrel_vm.hpp deleted file mode 100644 index 58718bd2623..00000000000 --- a/src/squirrel/squirrel_vm.hpp +++ /dev/null @@ -1,81 +0,0 @@ -// SuperTux -// Copyright (C) 2006 Matthias Braun -// 2018 Ingo Ruhnke -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -#ifndef HEADER_SUPERTUX_SQUIRREL_SQUIRREL_VM_HPP -#define HEADER_SUPERTUX_SQUIRREL_SQUIRREL_VM_HPP - -#include -#include - -#include - -/** Basic wrapper around HSQUIRRELVM with some utility functions, not - to be confused with SquirrelVirtualMachine. The classes might be - merged in the future. */ -class SquirrelVM -{ -public: - SquirrelVM(); - ~SquirrelVM(); - - HSQUIRRELVM get_vm() const { return m_vm; } - - void begin_table(const char* name); - void end_table(const char* name); - - /** Creates an empty table with given name - @param vm VM to create table on - @param name Name of the table to create */ - void create_empty_table(const char* name); - - bool has_property(const char* name); - - void store_bool(const char* name, bool val); - void store_int(const char* name, int val); - void store_float(const char* name, float val); - void store_string(const char* name, const std::string& val); - void store_object(const char* name, const HSQOBJECT& val); - - bool get_bool(const char* name, bool& val); - bool get_int(const char* name, int& val); - bool get_float(const char* name, float& val); - bool get_string(const char* name, std::string& val); - - bool read_bool(const char* name); - int read_int(const char* name); - float read_float(const char* name); - std::string read_string(const char* name); - - void get_table_entry(const std::string& name); - void get_or_create_table_entry(const std::string& name); - void delete_table_entry(const char* name); - void rename_table_entry(const char* oldname, const char* newname); - std::vector get_table_keys(); - - HSQOBJECT create_thread(); - -private: - HSQUIRRELVM m_vm; - -private: - SquirrelVM(const SquirrelVM&) = delete; - SquirrelVM& operator=(const SquirrelVM&) = delete; -}; - -#endif - -/* EOF */ diff --git a/src/squirrel/supertux_api.cpp b/src/squirrel/supertux_api.cpp new file mode 100644 index 00000000000..13379b92d17 --- /dev/null +++ b/src/squirrel/supertux_api.cpp @@ -0,0 +1,877 @@ +// SuperTux +// Copyright (C) 2024 Vankata453 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "squirrel/supertux_api.hpp" + +#include +#include +#include + +#include "audio/sound_manager.hpp" +#include "math/anchor_point.hpp" +#include "math/random.hpp" +#include "object/camera.hpp" +#include "object/player.hpp" +#include "physfs/ifile_stream.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" +#include "supertux/console.hpp" +#include "supertux/debug.hpp" +#include "supertux/d_scope.hpp" +#include "supertux/flip_level_transformer.hpp" +#include "supertux/game_manager.hpp" +#include "supertux/game_object_factory.hpp" +#include "supertux/game_session.hpp" +#include "supertux/gameconfig.hpp" +#include "supertux/globals.hpp" +#include "supertux/level.hpp" +#include "supertux/screen_manager.hpp" +#include "supertux/sector.hpp" +#include "supertux/textscroller_screen.hpp" +#include "supertux/title_screen.hpp" +#include "worldmap/worldmap.hpp" + +namespace scripting { + +/** + * @scripting + * @summary This module contains global methods. + */ +namespace Globals { + +/** + * @scripting + * @description Displays the value of an argument. This is useful for inspecting tables. + * @param ANY $object + */ +static void display(const ssq::Object& object) +{ + ConsoleBuffer::output << squirrel_to_string(object) << std::endl; +} +/** + * @scripting + * @description Displays the contents of the current stack. + */ +static void print_stacktrace(HSQUIRRELVM vm) +{ + sqstd_printcallstack(vm); +} +/** + * @scripting + * @description Returns the currently running thread. + * @returns Thread + */ +static SQInteger get_current_thread(HSQUIRRELVM vm) +{ + sq_pushthread(vm, vm); + return 1; +} + +/** + * @scripting + * @description Returns whether the game is in christmas mode. + */ +static bool is_christmas() +{ + return g_config->christmas_mode; +} + +/** + * @scripting + * @description Starts a skippable cutscene. + */ +static void start_cutscene() +{ + auto session = GameSession::current(); + if (session == nullptr) + { + log_info << "No game session" << std::endl; + return; + } + + if (session->get_current_level().m_is_in_cutscene) + { + log_warning << "start_cutscene(): starting a new cutscene above another one, ending preceding cutscene (use end_cutscene() in scripts!)" << std::endl; + + // Remove all sounds that started playing while skipping. + if (session->get_current_level().m_skip_cutscene) + SoundManager::current()->stop_sounds(); + } + + session->get_current_level().m_is_in_cutscene = true; + session->get_current_level().m_skip_cutscene = false; +} +/** + * @scripting + * @description Ends a skippable cutscene. + */ +static void end_cutscene() +{ + auto session = GameSession::current(); + if (session == nullptr) + { + log_info << "No game session." << std::endl; + return; + } + + if (!session->get_current_level().m_is_in_cutscene) + { + log_warning << "end_cutscene(): no cutscene to end, resetting status anyways." << std::endl; + } + + // Remove all sounds that started playing while skipping. + if (session->get_current_level().m_skip_cutscene) + SoundManager::current()->stop_sounds(); + + session->get_current_level().m_is_in_cutscene = false; + session->get_current_level().m_skip_cutscene = false; +} +/** + * @scripting + * @description Checks if a skippable cutscene is currently running. + */ +static bool check_cutscene() +{ + auto session = GameSession::current(); + if (session == nullptr) + { + log_info << "No game session" << std::endl; + return false; + } + + return session->get_current_level().m_is_in_cutscene; +} + +/** + * @scripting + * @description Suspends the script execution for a specified number of seconds. + * @param float $seconds + * @returns void + */ +static SQInteger wait(HSQUIRRELVM vm, float seconds) +{ + ssq::VM* ssq_vm = ssq::VM::get(vm); + if (ssq_vm && !ssq_vm->isThread()) return 0; + + auto session = GameSession::current(); + if (session && session->get_current_level().m_skip_cutscene) + { + if (ssq_vm && ssq_vm->getForeignPtr()) + { + auto squirrelenv = ssq_vm->getForeignPtr(); + // Wait anyways, to prevent scripts like `while (true) {wait(0.1); ...}`. + return squirrelenv->wait_for_seconds(vm, 0); + } + else + { + auto squirrelvm = ssq::VM::getMain(vm).getForeignPtr(); + return squirrelvm->wait_for_seconds(vm, 0); + } + } + else if (session && session->get_current_level().m_is_in_cutscene) + { + if (ssq_vm && ssq_vm->getForeignPtr()) + { + auto squirrelenv = ssq_vm->getForeignPtr(); + // Wait anyways, to prevent scripts like `while (true) {wait(0.1); ...}` from freezing the game. + return squirrelenv->skippable_wait_for_seconds(vm, seconds); + } + else + { + auto squirrelvm = ssq::VM::getMain(vm).getForeignPtr(); + return squirrelvm->skippable_wait_for_seconds(vm, seconds); + } + } + else + { + if (ssq_vm && ssq_vm->getForeignPtr()) + { + auto squirrelenv = ssq_vm->getForeignPtr(); + return squirrelenv->wait_for_seconds(vm, seconds); + } + else + { + auto squirrelvm = ssq::VM::getMain(vm).getForeignPtr(); + return squirrelvm->wait_for_seconds(vm, seconds); + } + } +} + +/** + * @scripting + * @description Suspends the script execution until the current screen has been changed. + * @returns void + */ +static SQInteger wait_for_screenswitch(HSQUIRRELVM vm) +{ + auto squirrelvm = ssq::VM::getMain(vm).getForeignPtr(); + return squirrelvm->wait_for_screenswitch(vm); +} +/** + * @scripting + * @description Exits the currently running screen (for example, force exits from worldmap or scrolling text). + */ +static void exit_screen() +{ + ScreenManager::current()->pop_screen(); +} + +/** + * @scripting + * @description Translates a text into the user's language (by looking in the "".po"" files). + * @param string $text + */ +static std::string translate(const std::string& text) +{ + return g_dictionary_manager->get_dictionary().translate(text); +} +#ifdef DOXYGEN_SCRIPTING +/** + * @scripting + * @description Same function as ""translate()"". + * @param string $text + */ +static std::string _(const std::string& text) +{ +} +#endif +/** + * @scripting + * @description Translates a text into the user's language (by looking in the "".po"" files). + Returns ""text"" or ""text_plural"", depending on ""num"" and the locale. + * @param string $text + * @param string $text_plural + * @param int $num + */ +static std::string translate_plural(const std::string& text, const std::string& text_plural, int num) +{ + return g_dictionary_manager->get_dictionary().translate_plural(text, text_plural, num); +} +#ifdef DOXYGEN_SCRIPTING +/** + * @scripting + * @description Same function as ""translate_plural()"". + * @param string $text + * @param string $text_plural + * @param int $num + */ +static std::string __(const std::string& text, const std::string& text_plural, int num) +{ +} +#endif + +/** + * @scripting + * @description Displays a text file and scrolls it over the screen (on next screenswitch). + * @param string $filename + */ +static void display_text_file(const std::string& filename) +{ + ScreenManager::current()->push_screen(std::make_unique(filename)); +} + +/** + * @scripting + * @description Loads and displays a worldmap (on next screenswitch), using the savegame of the current worldmap. + * @param string $filename + * @param string $sector Forced sector to spawn in the worldmap on. Leave empty to use last sector from savegame. + * @param string $spawnpoint Forced spawnpoint to spawn in the worldmap on. Leave empty to use last position from savegame. + */ +static void load_worldmap(const std::string& filename, const std::string& sector, const std::string& spawnpoint) +{ + using namespace worldmap; + + if (!WorldMap::current()) + { + throw std::runtime_error("Can't start Worldmap without active WorldMap"); + } + else + { + WorldMap::current()->change(filename, sector, spawnpoint); + } +} +/** + * @scripting + * @description Switches to a different worldmap after unloading the current one, after ""exit_screen()"" is called. + * @param string $dirname The world directory, where the "worldmap.stwm" file is located. + * @param string $sector Forced sector to spawn in the worldmap on. Leave empty to use last sector from savegame. + * @param string $spawnpoint Forced spawnpoint to spawn in the worldmap on. Leave empty to use last position from savegame. + */ +static void set_next_worldmap(const std::string& dirname, const std::string& sector, const std::string& spawnpoint) +{ + GameManager::current()->set_next_worldmap(dirname, sector, spawnpoint); +} +/** + * @scripting + * @description Loads and displays a level (on next screenswitch), using the savegame of the current level. + * @param string $filename + */ +static void load_level(const std::string& filename) +{ + if (!GameSession::current()) + { + throw std::runtime_error("Can't start level without active level."); + } + else + { + ScreenManager::current()->push_screen(std::make_unique(filename, GameSession::current()->get_savegame())); + } +} + +/** + * @scripting + * @description Loads a script file and executes it. This is typically used to import functions from external files. + * @param string $filename + */ +static void import(HSQUIRRELVM vm, const std::string& filename) +{ + ssq::VM ssq_vm(vm); + + IFileStream in(filename); + ssq_vm.run(ssq_vm.compileSource(in, filename.c_str())); +} + +/** + * @scripting + * @description Enables/disables drawing of collision rectangles. + * @param bool $enable + */ +static void debug_collrects(bool enable) +{ + g_debug.show_collision_rects = enable; +} +/** + * @scripting + * @description Enables/disables drawing of FPS. + * @param bool $enable + */ +static void debug_show_fps(bool enable) +{ + g_config->show_fps = enable; +} +/** + * @scripting + * @description Enables/disables drawing of non-solid layers. + * @param bool $enable + */ +static void debug_draw_solids_only(bool enable) +{ + ::Sector::s_draw_solids_only = enable; +} +/** + * @scripting + * @description Enables/disables drawing of editor images. + * @param bool $enable + */ +static void debug_draw_editor_images(bool enable) +{ + Tile::draw_editor_images = enable; +} +/** + * @scripting + * @description Enables/disables worldmap ghost mode. + * @param bool $enable + */ +static void debug_worldmap_ghost(bool enable) +{ + auto worldmap_sector = worldmap::WorldMapSector::current(); + + if (worldmap_sector == nullptr) + throw std::runtime_error("Can't change ghost mode without active WorldMapSector."); + + auto& tux = worldmap_sector->get_singleton_by_type(); + tux.set_ghost_mode(enable); +} +/** + * @scripting + * @description Sets the game speed to ""speed"". + * @param float $speed + */ +static void set_game_speed(float speed) +{ + if (speed < 0.05f) + { + // Always put a minimum speed above 0 - if the user enabled transitions, + // executing transitions would take an unreaonably long time if we allow + // game speeds like 0.00001. + log_warning << "Cannot set game speed to less than 0.05" << std::endl; + throw std::runtime_error("Cannot set game speed to less than 0.05"); + } + + ::g_debug.set_game_speed_multiplier(speed); +} + +/** + * @scripting + * @description Saves world state to scripting table. + */ +static void save_state() +{ + auto worldmap = worldmap::WorldMap::current(); + + if (!worldmap) + { + throw std::runtime_error("Can't save state without active Worldmap."); + } + else + { + worldmap->save_state(); + } +} +/** + * @scripting + * @description Loads world state from scripting table. + */ +static void load_state() +{ + auto worldmap = worldmap::WorldMap::current(); + + if (!worldmap) + { + throw std::runtime_error("Can't save state without active Worldmap."); + } + else + { + worldmap->load_state(); + } +} + +/** + * @scripting + * @description Changes the music to ""musicfile"". + * @param string $musicfile + */ +static void play_music(const std::string& filename) +{ + SoundManager::current()->play_music(filename); +} +/** + * @scripting + * @description Fades in the music from ""musicfile"" for ""fadetime"" seconds. + * @param string $musicfile + * @param float $fadetime + */ +static void fade_in_music(const std::string& filename, float fadetime) +{ + SoundManager::current()->play_music(filename, fadetime); +} +/** + * @scripting + * @description Fades out the music for ""fadetime"" seconds. + * @param float $fadetime Set to "0" for no fade-out. + */ +static void stop_music(float fadetime) +{ + SoundManager::current()->stop_music(fadetime); +} +/** + * @scripting + * @description Resumes and fades in the music for ""fadetime"" seconds. + * @param float $fadetime Set to "0" for no fade-in. + */ +static void resume_music(float fadetime) +{ + SoundManager::current()->resume_music(fadetime); +} +/** + * @scripting + * @description Pauses the music with a fade-out for ""fadetime"" seconds. + * @param float $fadetime Set to "0" for no fade-out. + */ +static void pause_music(float fadetime) +{ + SoundManager::current()->pause_music(fadetime); +} +/** + * @scripting + * @description Plays ""soundfile"" as a sound. + * @param string $soundfile + */ +static void play_sound(const std::string& filename) +{ + SoundManager::current()->play(filename); +} + +/** + * @scripting + * @description Speeds Tux up. + */ +static void grease() +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); // scripting::Player != ::Player + tux.get_physic().set_velocity_x(tux.get_physic().get_velocity_x()*3); +} +/** + * @scripting + * @description Makes Tux invincible for 10000 units of time. + */ +static void invincible() +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); + tux.m_invincible_timer.start(10000); +} +/** + * @scripting + * @description Makes Tux a ghost, i.e. lets him float around and through solid objects. + */ +static void ghost() +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); + tux.set_ghost_mode(true); +} +/** + * @scripting + * @description Recalls Tux's invincibility and ghost status. + */ +static void mortal() +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); + tux.m_invincible_timer.stop(); + tux.set_ghost_mode(false); +} +/** + * @scripting + * @description Re-initializes and respawns Tux at the beginning of the current level. + */ +static void restart() +{ + auto session = GameSession::current(); + if (session == nullptr) + { + log_info << "No game session." << std::endl; + return; + } + session->reset_button = true; +} +/** + * @scripting + * @description Moves Tux near the end of the current level. + */ +static void gotoend() +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); + tux.set_pos(Vector((::Sector::get().get_width()) - (static_cast(SCREEN_WIDTH) * 2.0f), 0)); + ::Sector::get().get_camera().reset( + Vector(tux.get_pos().x, tux.get_pos().y)); +} +/** + * @scripting + * @description Moves Tux to the X and Y blocks, relative to his position. + * @param float $offset_x + * @param float $offset_y + */ +static void warp(float offset_x, float offset_y) +{ + if (!Sector::current()) return; + // FIXME: This only has effect on the first player. + ::Player& tux = *(::Sector::get().get_players()[0]); + tux.set_pos(Vector(tux.get_pos().x + (offset_x*32), tux.get_pos().y - (offset_y*32))); + ::Sector::get().get_camera().reset( + Vector(tux.get_pos().x, tux.get_pos().y)); +} + +/** + * @scripting + * @description Adjusts the gamma. + * @param float $gamma + */ +static void set_gamma(float gamma) +{ + VideoSystem::current()->set_gamma(gamma); +} + +/** + * @scripting + * @description Returns a random integer. + */ +static int rand() +{ + return gameRandom.rand(); +} + +/** + * @scripting + * @description Sets the frame, displayed on the title screen. + * @param string $image + */ +static void set_title_frame(const std::string& image) +{ + auto title_screen = TitleScreen::current(); + if (!title_screen) + { + log_info << "No title screen loaded." << std::endl; + return; + } + title_screen->set_frame(image); +} + +} // namespace Globals + + +/** + * @scripting + * @summary The ""Level"" table provides basic controlling functions for the current level. + * @scope global + */ +namespace Level { + +/** + * @scripting + * @description Ends the current level. + * @param bool $win If ""true"", the level is marked as completed if launched from a worldmap. + */ +static void finish(bool win) +{ + if (!GameSession::current()) return; + GameSession::current()->finish(win); +} +/** + * @scripting + * @description Returns whether an end sequence has started. (AKA when the stats at the end are visible) + */ +static bool has_active_sequence() +{ + if (!GameSession::current()) return false; + return GameSession::current()->has_active_sequence(); +} + +/** + * @scripting + * @description Respawns Tux in sector named ""sector"" at spawnpoint named ""spawnpoint"".${SRG_TABLENEWPARAGRAPH} + Exceptions: If ""sector"" or ""spawnpoint"" are empty, or the specified sector does not exist, the function will bail out the first chance it gets. + If the specified spawnpoint doesn't exist, Tux will be spawned at the spawnpoint named “main”. + If that spawnpoint doesn't exist either, Tux will simply end up at the origin (top-left 0, 0). + * @param string $sector + * @param string $spawnpoint + */ +static void spawn(const std::string& sector, const std::string& spawnpoint) +{ + if (!GameSession::current()) return; + GameSession::current()->respawn(sector, spawnpoint); +} + +/** + * @scripting + * @description Respawns Tux in sector named ""sector"" at spawnpoint named ""spawnpoint"" with the given transition ""transition"".${SRG_TABLENEWPARAGRAPH} + Exceptions: If ""sector"" or ""spawnpoint"" are empty, or the specified sector does not exist, the function will bail out the first chance it gets. + If the specified spawnpoint doesn't exist, Tux will be spawned at the spawnpoint named “main”. + If that spawnpoint doesn't exist either, Tux will simply end up at the origin (top-left 0, 0). + * @param string $sector + * @param string $spawnpoint + * @param string $transition Valid transitions are ""circle"" and ""fade"". If any other value is specified, no transition effect is drawn. + */ +static void spawn_transition(const std::string& sector, const std::string& spawnpoint, const std::string& transition) +{ + if (!GameSession::current()) return; + + ScreenFade::FadeType fade_type = ScreenFade::FadeType::NONE; + + if (transition == "fade") + fade_type = ScreenFade::FadeType::FADE; + else if (transition == "circle") + fade_type = ScreenFade::FadeType::CIRCLE; + else + log_warning << "Invalid transition type '" << transition << "'." << std::endl; + + GameSession::current()->respawn_with_fade(sector, spawnpoint, fade_type, {0.0f, 0.0f}, true); +} + +/** + * @scripting + * @description Sets the default start spawnpoint of the level. + * @param string $sector + * @param string $spawnpoint + */ +static void set_start_point(const std::string& sector, const std::string& spawnpoint) +{ + if (!GameSession::current()) return; + GameSession::current()->set_start_point(sector, spawnpoint); +} +/** + * @scripting + * @description Sets the default start spawn position of the level. + * @param string $sector + * @param float $x + * @param float $y + */ +static void set_start_pos(const std::string& sector, float x, float y) +{ + if (!GameSession::current()) return; + GameSession::current()->set_start_pos(sector, Vector(x, y)); +} +/** + * @scripting + * @description Sets the default respawn spawnpoint of the level. + * @param string $sector + * @param string $spawnpoint + */ +static void set_respawn_point(const std::string& sector, const std::string& spawnpoint) +{ + if (!GameSession::current()) return; + GameSession::current()->set_respawn_point(sector, spawnpoint); +} +/** + * @scripting + * @description Sets the default respawn position of the level. + * @param string $sector + * @param float $x + * @param float $y + */ +static void set_respawn_pos(const std::string& sector, float x, float y) +{ + if (!GameSession::current()) return; + GameSession::current()->set_respawn_pos(sector, Vector(x, y)); +} + +/** + * @scripting + * @description Flips the level vertically (i.e. top is now bottom and vice versa). + Call again to revert the effect. Make sure the player can land on something after the level is flipped! + */ +static void flip_vertically() +{ + if (!GameSession::current()) return; + BIND_SECTOR(::Sector::get()); + FlipLevelTransformer flip_transformer; + flip_transformer.transform(GameSession::current()->get_current_level()); +} + +/** + * @scripting + * @description Toggles pause. + */ +static void toggle_pause() +{ + if (!GameSession::current()) return; + GameSession::current()->toggle_pause(); +} + +/** + * @scripting + * @description Pauses the target timer. + */ +static void pause_target_timer() +{ + if (!GameSession::current()) return; + GameSession::current()->set_target_timer_paused(true); +} +/** + * @scripting + * @description Resumes the target timer. + */ +static void resume_target_timer() +{ + if (!GameSession::current()) return; + GameSession::current()->set_target_timer_paused(false); +} + +} // namespace Level + +} // namespace scripting + + +void register_supertux_scripting_api(ssq::VM& vm) +{ + /* GameObject-s */ + GameObjectFactory::register_objects(vm); + + /* Other classes */ + GameObjectManager::register_class(vm); + Sector::register_class(vm); + worldmap::WorldMapSector::register_class(vm); + + /* Global constants */ + vm.setConst("ANCHOR_TOP_LEFT", AnchorPoint::ANCHOR_TOP_LEFT); + vm.setConst("ANCHOR_TOP", AnchorPoint::ANCHOR_TOP); + vm.setConst("ANCHOR_TOP_RIGHT", AnchorPoint::ANCHOR_TOP_RIGHT); + vm.setConst("ANCHOR_LEFT", AnchorPoint::ANCHOR_LEFT); + vm.setConst("ANCHOR_MIDDLE", AnchorPoint::ANCHOR_MIDDLE); + vm.setConst("ANCHOR_RIGHT", AnchorPoint::ANCHOR_RIGHT); + vm.setConst("ANCHOR_BOTTOM_LEFT", AnchorPoint::ANCHOR_BOTTOM_LEFT); + vm.setConst("ANCHOR_BOTTOM", AnchorPoint::ANCHOR_BOTTOM); + vm.setConst("ANCHOR_BOTTOM_RIGHT", AnchorPoint::ANCHOR_BOTTOM_RIGHT); + + /* Global functions */ + vm.addFunc("display", &scripting::Globals::display); + vm.addFunc("print_stacktrace", &scripting::Globals::print_stacktrace); + vm.addFunc("get_current_thread", &scripting::Globals::get_current_thread); + vm.addFunc("is_christmas", &scripting::Globals::is_christmas); + vm.addFunc("start_cutscene", &scripting::Globals::start_cutscene); + vm.addFunc("end_cutscene", &scripting::Globals::end_cutscene); + vm.addFunc("check_cutscene", &scripting::Globals::check_cutscene); + vm.addFunc("wait", &scripting::Globals::wait); + vm.addFunc("wait_for_screenswitch", &scripting::Globals::wait_for_screenswitch); + vm.addFunc("exit_screen", &scripting::Globals::exit_screen); + vm.addFunc("translate", &scripting::Globals::translate); + vm.addFunc("_", &scripting::Globals::translate); + vm.addFunc("translate_plural", &scripting::Globals::translate_plural); + vm.addFunc("__", &scripting::Globals::translate_plural); + vm.addFunc("display_text_file", &scripting::Globals::display_text_file); + vm.addFunc("load_worldmap", &scripting::Globals::load_worldmap); + vm.addFunc("set_next_worldmap", &scripting::Globals::set_next_worldmap); + vm.addFunc("load_level", &scripting::Globals::load_level); + vm.addFunc("import", &scripting::Globals::import); + vm.addFunc("debug_collrects", &scripting::Globals::debug_collrects); + vm.addFunc("debug_show_fps", &scripting::Globals::debug_show_fps); + vm.addFunc("debug_draw_solids_only", &scripting::Globals::debug_draw_solids_only); + vm.addFunc("debug_draw_editor_images", &scripting::Globals::debug_draw_editor_images); + vm.addFunc("debug_worldmap_ghost", &scripting::Globals::debug_worldmap_ghost); + vm.addFunc("set_game_speed", &scripting::Globals::set_game_speed); + vm.addFunc("save_state", &scripting::Globals::save_state); + vm.addFunc("load_state", &scripting::Globals::load_state); + vm.addFunc("play_music", &scripting::Globals::play_music); + vm.addFunc("fade_in_music", &scripting::Globals::fade_in_music); + vm.addFunc("stop_music", &scripting::Globals::stop_music); + vm.addFunc("resume_music", &scripting::Globals::resume_music); + vm.addFunc("pause_music", &scripting::Globals::pause_music); + vm.addFunc("play_sound", &scripting::Globals::play_sound); + vm.addFunc("grease", &scripting::Globals::grease); + vm.addFunc("invincible", &scripting::Globals::invincible); + vm.addFunc("ghost", &scripting::Globals::ghost); + vm.addFunc("mortal", &scripting::Globals::mortal); + vm.addFunc("restart", &scripting::Globals::restart); + vm.addFunc("gotoend", &scripting::Globals::gotoend); + vm.addFunc("warp", &scripting::Globals::warp); + vm.addFunc("set_gamma", &scripting::Globals::set_gamma); + vm.addFunc("rand", &scripting::Globals::rand); + vm.addFunc("set_title_frame", &scripting::Globals::set_title_frame); + + /* "Level" global functions */ + ssq::Table level = vm.addTable("Level"); + level.addFunc("finish", &scripting::Level::finish); + level.addFunc("has_active_sequence", &scripting::Level::has_active_sequence); + level.addFunc("spawn", &scripting::Level::spawn); + level.addFunc("spawn_transition", &scripting::Level::spawn_transition); + level.addFunc("set_start_point", &scripting::Level::set_start_point); + level.addFunc("set_start_pos", &scripting::Level::set_start_pos); + level.addFunc("set_respawn_point", &scripting::Level::set_respawn_point); + level.addFunc("set_respawn_pos", &scripting::Level::set_respawn_pos); + level.addFunc("flip_vertically", &scripting::Level::flip_vertically); + level.addFunc("toggle_pause", &scripting::Level::toggle_pause); + level.addFunc("pause_target_timer", &scripting::Level::pause_target_timer); + level.addFunc("resume_target_timer", &scripting::Level::resume_target_timer); +} + +/* EOF */ diff --git a/src/scripting/wind.cpp b/src/squirrel/supertux_api.hpp similarity index 70% rename from src/scripting/wind.cpp rename to src/squirrel/supertux_api.hpp index 929017f3d4f..74a87f9df15 100644 --- a/src/scripting/wind.cpp +++ b/src/squirrel/supertux_api.hpp @@ -1,5 +1,5 @@ // SuperTux -// Copyright (C) 2006 Matthias Braun +// Copyright (C) 2024 Vankata453 // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,23 +14,15 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "object/wind.hpp" -#include "scripting/wind.hpp" +#ifndef HEADER_SUPERTUX_SQUIRREL_SUPERTUX_API_HPP +#define HEADER_SUPERTUX_SQUIRREL_SUPERTUX_API_HPP -namespace scripting { +namespace ssq { +class VM; +} // namespace ssq -void Wind::start() -{ - SCRIPT_GUARD_VOID; - object.start(); -} +void register_supertux_scripting_api(ssq::VM& vm); -void Wind::stop() -{ - SCRIPT_GUARD_VOID; - object.stop(); -} - -} // namespace scripting +#endif /* EOF */ diff --git a/src/supertux/console.cpp b/src/supertux/console.cpp index 488b2179aa8..5c0f1dac4f7 100644 --- a/src/supertux/console.cpp +++ b/src/supertux/console.cpp @@ -18,8 +18,8 @@ #include "math/sizef.hpp" #include "physfs/ifile_stream.hpp" -#include "squirrel/squirrel_virtual_machine.hpp" #include "squirrel/squirrel_util.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "supertux/gameconfig.hpp" #include "supertux/globals.hpp" #include "supertux/resources.hpp" @@ -111,8 +111,7 @@ Console::Console(ConsoleBuffer& buffer) : m_history_position(m_history.end()), m_background(Surface::from_file("images/engine/console.png")), m_background2(Surface::from_file("images/engine/console2.png")), - m_vm(nullptr), - m_vm_object(), + m_vm(), m_backgroundOffset(0), m_height(0), m_alpha(1.0), @@ -126,10 +125,7 @@ Console::Console(ConsoleBuffer& buffer) : Console::~Console() { - if (m_vm != nullptr && SquirrelVirtualMachine::current() != nullptr) - { - sq_release(SquirrelVirtualMachine::current()->get_vm().get_vm(), &m_vm_object); - } + m_vm.reset(); m_buffer.set_console(nullptr); } @@ -153,36 +149,23 @@ Console::on_buffer_change(int line_count) void Console::ready_vm() { - if (m_vm == nullptr) { - m_vm = SquirrelVirtualMachine::current()->get_vm().get_vm(); - HSQUIRRELVM new_vm = sq_newthread(m_vm, 16); - if (new_vm == nullptr) - throw SquirrelError(m_vm, "Couldn't create new VM thread for console"); - - // Store reference to thread. - sq_resetobject(&m_vm_object); - if (SQ_FAILED(sq_getstackobj(m_vm, -1, &m_vm_object))) - throw SquirrelError(m_vm, "Couldn't get vm object for console"); - sq_addref(m_vm, &m_vm_object); - sq_pop(m_vm, 1); - - // Create new roottable for thread. - sq_newtable(new_vm); - sq_pushroottable(new_vm); - if (SQ_FAILED(sq_setdelegate(new_vm, -2))) - throw SquirrelError(new_vm, "Couldn't set console_table delegate"); - - sq_setroottable(new_vm); - - m_vm = new_vm; - - try { - std::string filename = "scripts/console.nut"; - IFileStream stream(filename); - compile_and_run(m_vm, stream, filename); - } catch(std::exception& e) { - log_warning << "Couldn't load console.nut: " << e.what() << std::endl; - } + if (!m_vm.isEmpty()) return; + + m_vm = SquirrelVirtualMachine::current()->get_vm().newThread(16); + + // Create new root table for the thread. + ssq::Table root = m_vm.newTable(); + root.setDelegate(m_vm); // Set the root table as delegate. + m_vm.setRootTable(root); + + try + { + IFileStream stream("scripts/console.nut"); + m_vm.run(m_vm.compileSource(stream, "scripts/console.nut")); + } + catch (const std::exception& e) + { + log_warning << "Couldn't load 'console.nut': " << e.what() << std::endl; } } @@ -191,26 +174,26 @@ Console::execute_script(const std::string& command) { ready_vm(); - SQInteger oldtop = sq_gettop(m_vm); - try { - if (SQ_FAILED(sq_compilebuffer(m_vm, command.c_str(), command.length(), - "", SQTrue))) - throw SquirrelError(m_vm, "Couldn't compile command"); - - sq_pushroottable(m_vm); - if (SQ_FAILED(sq_call(m_vm, 1, SQTrue, SQTrue))) - throw SquirrelError(m_vm, "Problem while executing command"); + const SQInteger old_top = m_vm.getTop(); + try + { + ssq::Object ret = m_vm.runAndReturn(m_vm.compileSource(command.c_str())); - if (sq_gettype(m_vm, -1) != OT_NULL) - m_buffer.addLines(squirrel2string(m_vm, -1)); - } catch(std::exception& e) { + if (ret.getType() != ssq::Type::NULLPTR) + m_buffer.addLines(squirrel_to_string(ret)); + } + catch (const std::exception& e) + { m_buffer.addLines(e.what()); } - SQInteger newtop = sq_gettop(m_vm); - if (newtop < oldtop) { - log_fatal << "Script destroyed squirrel stack..." << std::endl; - } else { - sq_settop(m_vm, oldtop); + + if (m_vm.getTop() < old_top) + { + log_fatal << "Script destroyed Squirrel stack..." << std::endl; + } + else + { + sq_settop(m_vm.getHandle(), old_top); } } @@ -367,19 +350,20 @@ Console::autocomplete() ready_vm(); // Append all keys of the current root table to list. - sq_pushroottable(m_vm); // push root table. - while (true) { + sq_pushroottable(m_vm.getHandle()); // push root table. + while (true) + { // Check all keys (and their children) for matches. - sq_insert_commands(cmds, m_vm, "", prefix); + sq_insert_commands(cmds, m_vm.getHandle(), "", prefix); // Cycle through parent(delegate) table. - SQInteger oldtop = sq_gettop(m_vm); - if (SQ_FAILED(sq_getdelegate(m_vm, -1)) || oldtop == sq_gettop(m_vm)) { + const SQInteger old_top = m_vm.getTop(); + if (SQ_FAILED(sq_getdelegate(m_vm.getHandle(), -1)) || old_top == m_vm.getTop()) break; - } - sq_remove(m_vm, -2); // Remove old table. + + sq_remove(m_vm.getHandle(), -2); // Remove old table. } - sq_pop(m_vm, 1); // Remove table. + sq_pop(m_vm.getHandle(), 1); // Remove table. // Depending on number of hits, show matches or autocomplete. if (cmds.empty()) diff --git a/src/supertux/console.hpp b/src/supertux/console.hpp index 46841dcef11..dffb5585b28 100644 --- a/src/supertux/console.hpp +++ b/src/supertux/console.hpp @@ -18,10 +18,11 @@ #define HEADER_SUPERTUX_SUPERTUX_CONSOLE_HPP #include -#include #include #include +#include + #include "util/currenton.hpp" #include "video/font_ptr.hpp" #include "video/surface_ptr.hpp" @@ -94,8 +95,7 @@ class Console final : public Currenton SurfacePtr m_background; /**< console background image */ SurfacePtr m_background2; /**< second, moving console background image */ - HSQUIRRELVM m_vm; /**< squirrel thread for the console (with custom roottable) */ - HSQOBJECT m_vm_object; + ssq::VM m_vm; /**< squirrel thread for the console (with custom roottable) */ int m_backgroundOffset; /**< current offset of scrolling background image */ float m_height; /**< height of the console in px */ diff --git a/src/supertux/debug.cpp b/src/supertux/debug.cpp index 82f33215627..14f41dc11c0 100644 --- a/src/supertux/debug.cpp +++ b/src/supertux/debug.cpp @@ -25,6 +25,7 @@ Debug::Debug() : show_collision_rects(false), show_worldmap_path(false), draw_redundant_frames(false), + show_toolbox_tile_ids(false), m_use_bitmap_fonts(false), m_game_speed_multiplier(1.0f) { diff --git a/src/supertux/debug.hpp b/src/supertux/debug.hpp index 6ef8c46e784..8d49f8a8893 100644 --- a/src/supertux/debug.hpp +++ b/src/supertux/debug.hpp @@ -39,6 +39,8 @@ class Debug // vaguely measure the impact of code changes which should increase the FPS bool draw_redundant_frames; + bool show_toolbox_tile_ids; + private: /** Use old bitmap fonts instead of TTF */ bool m_use_bitmap_fonts; diff --git a/src/supertux/game_object.cpp b/src/supertux/game_object.cpp index 325b839b48f..d52bb6d5e20 100644 --- a/src/supertux/game_object.cpp +++ b/src/supertux/game_object.cpp @@ -18,6 +18,9 @@ #include +#include +#include + #include "editor/editor.hpp" #include "supertux/object_remove_listener.hpp" #include "util/reader_mapping.hpp" @@ -106,6 +109,15 @@ GameObject::save() return save_stream.str(); } +GameObjectClasses +GameObject::get_class_types() const +{ + GameObjectClasses g; + // All class types except GameObject, since everything implements GameObject + // g.add(typeid(GameObject)); + return g; +} + ObjectSettings GameObject::get_settings() { @@ -132,12 +144,30 @@ GameObject::get_settings() return result; } +const std::string& +GameObject::get_name() const +{ + return m_name; +} + +int +GameObject::get_type() const +{ + return m_type; +} + std::vector GameObject::get_patches() const { return {}; } +int +GameObject::get_version() const +{ + return m_version; +} + int GameObject::get_latest_version() const { @@ -147,7 +177,9 @@ GameObject::get_latest_version() const bool GameObject::is_up_to_date() const { - return m_version >= get_latest_version(); + const int latest = get_latest_version(); + assert(m_version <= latest); + return m_version == latest; } void @@ -275,4 +307,18 @@ GameObject::update(float dt_sec) m_fade_helpers.erase(new_end, m_fade_helpers.end()); } + +void +GameObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("GameObject"); + + cls.addFunc("get_version", &GameObject::get_version); + cls.addFunc("get_latest_version", &GameObject::get_latest_version); + cls.addFunc("is_up_to_date", &GameObject::is_up_to_date); + cls.addFunc("get_name", &GameObject::get_name); + cls.addFunc("get_display_name", &GameObject::get_display_name); + cls.addFunc("get_type", &GameObject::get_type); +} + /* EOF */ diff --git a/src/supertux/game_object.hpp b/src/supertux/game_object.hpp index c24feebc222..e576d653c2d 100644 --- a/src/supertux/game_object.hpp +++ b/src/supertux/game_object.hpp @@ -17,9 +17,12 @@ #ifndef HEADER_SUPERTUX_SUPERTUX_GAME_OBJECT_HPP #define HEADER_SUPERTUX_SUPERTUX_GAME_OBJECT_HPP +#include "squirrel/exposable_class.hpp" + #include #include #include +#include #include "editor/object_settings.hpp" #include "supertux/game_object_component.hpp" @@ -34,6 +37,10 @@ class ObjectRemoveListener; class ReaderMapping; class Writer; +namespace ssq { +class VM; +} // namespace ssq + struct GameObjectType { const std::string id; @@ -42,26 +49,49 @@ struct GameObjectType typedef std::vector GameObjectTypes; /** - Base class for all the things that make up Levels' Sectors. + A helper structure to list all the type_indexes of the classes in the + type hierarchy of a given class. This makes it easier to register e.g. + a MrIceblock in lists for MrIceBlock, WalkingBadguy, Badguy, Portable, + MovingSprite, MovingObject, and GameObject. +*/ +struct GameObjectClasses +{ + std::vector types; - Each sector of a level will hold a list of active GameObject while the - game is played. + GameObjectClasses& add(const std::type_info& info) + { + std::type_index idx(info); + types.push_back(idx); + return *this; + } +}; - This class is responsible for: - - Updating and Drawing the object. This should happen in the update() and +/** + This class is responsible for: + * Updating and drawing the object. This should happen in the update() and draw() functions. Both are called once per frame. - - Providing a safe way to remove the object by calling the remove_me + * Providing a safe way to remove the object by calling the remove_me functions. + */ +/** + * @scripting + * @summary Base class for all the things that make up Levels' Sectors.${SRG_NEWPARAGRAPH} + + Each sector of a level holds a list of active ""GameObject""s, while the + game is played.${SRG_NEWPARAGRAPH} */ -class GameObject +class GameObject : public ExposableClass { friend class GameObjectManager; +public: + static void register_class(ssq::VM& vm); + public: GameObject(); GameObject(const std::string& name); GameObject(const ReaderMapping& reader); - virtual ~GameObject(); + virtual ~GameObject() override; /** Called after all objects have been added to the Sector and the Sector is fully constructed. If objects refer to other objects @@ -85,14 +115,34 @@ class GameObject virtual void save(Writer& writer); std::string save(); virtual std::string get_class_name() const { return "game-object"; } + virtual std::string get_exposed_class_name() const override { return "GameObject"; } + /** + * @scripting + * @description Returns the display name of the object, translated to the user's locale. + */ virtual std::string get_display_name() const { return _("Unknown object"); } + /** List notable classes in inheritance hierarchy of class. This makes it possible + to efficiently look up all objects deriving from a particular intermediate class */ + virtual GameObjectClasses get_class_types() const; /** Version checking/updating, patch information */ virtual std::vector get_patches() const; - int get_version() const { return m_version; } + virtual void update_version(); + /** + * @scripting + * @description Returns the current version of the object. + */ + int get_version() const; + /** + * @scripting + * @description Returns the latest version of the object. + */ int get_latest_version() const; + /** + * @scripting + * @description Checks whether the object's current version is equal to its latest one. + */ bool is_up_to_date() const; - virtual void update_version(); /** If true only a single object of this type is allowed in a given GameObjectManager */ @@ -120,7 +170,11 @@ class GameObject /** Get all types of the object, if available. **/ virtual GameObjectTypes get_types() const; - int get_type() const { return m_type; } + /** + * @scripting + * @description Returns the type index of the object. + */ + int get_type() const; virtual void after_editor_set(); @@ -142,7 +196,11 @@ class GameObject void del_remove_listener(ObjectRemoveListener* listener); void set_name(const std::string& name) { m_name = name; } - const std::string& get_name() const { return m_name; } + /** + * @scripting + * @description Returns the name of the object. + */ + const std::string& get_name() const; virtual const std::string get_icon_path() const { return "images/tiles/auxiliary/notile.png"; diff --git a/src/supertux/game_object_factory.cpp b/src/supertux/game_object_factory.cpp index 9e49789709b..66185b31a54 100644 --- a/src/supertux/game_object_factory.cpp +++ b/src/supertux/game_object_factory.cpp @@ -16,6 +16,8 @@ #include "supertux/game_object_factory.hpp" +#include + #include "audio/sound_source.hpp" #include "badguy/angrystone.hpp" #include "badguy/bouncing_snowball.hpp" @@ -82,6 +84,7 @@ #include "object/ambient_sound.hpp" #include "object/background.hpp" #include "object/bicycle_platform.hpp" +#include "object/bigsnowball.hpp" #include "object/bonus_block.hpp" #include "object/brick.hpp" #include "object/bumper.hpp" @@ -94,9 +97,11 @@ #include "object/coin.hpp" #include "object/conveyor_belt.hpp" #include "object/decal.hpp" +#include "object/display_effect.hpp" #include "object/explosion.hpp" #include "object/fallblock.hpp" #include "object/firefly.hpp" +#include "object/floating_image.hpp" #include "object/ghost_particle_system.hpp" #include "object/gradient.hpp" #include "object/hurting_platform.hpp" @@ -125,6 +130,7 @@ #include "object/sound_object.hpp" #include "object/spawnpoint.hpp" #include "object/spotlight.hpp" +#include "object/text_array_object.hpp" #include "object/textscroller.hpp" #include "object/thunderstorm.hpp" #include "object/tilemap.hpp" @@ -246,6 +252,7 @@ GameObjectFactory::init_factories() add_factory("ambient_sound"); // Backward compatibilty. add_factory("ambient-sound"); add_factory("background", OBJ_PARAM_WORLDMAP); + add_factory("bigsnowball", OBJ_PARAM_DISPENSABLE); add_factory("path"); add_factory("bicycle-platform"); add_factory("bonusblock", OBJ_PARAM_DISPENSABLE); @@ -327,6 +334,48 @@ GameObjectFactory::init_factories() }); } +/** Register all scriptable objects to a Squirrel VM. */ +void +GameObjectFactory::register_objects(ssq::VM& vm) +{ + /* Base classes */ + GameObject::register_class(vm); + MovingObject::register_class(vm); + MovingSprite::register_class(vm); + BadGuy::register_class(vm); + ParticleSystem::register_class(vm); + + AmbientSound::register_class(vm); + Background::register_class(vm); + Camera::register_class(vm); + Candle::register_class(vm); + CloudParticleSystem::register_class(vm); + ConveyorBelt::register_class(vm); + CustomParticleSystem::register_class(vm); + Decal::register_class(vm); + Dispenser::register_class(vm); + DisplayEffect::register_class(vm); + FloatingImage::register_class(vm); + Gradient::register_class(vm); + LevelTime::register_class(vm); + LitObject::register_class(vm); + Platform::register_class(vm); + Player::register_class(vm); + RainParticleSystem::register_class(vm); + ScriptedObject::register_class(vm); + SoundObject::register_class(vm); + Spotlight::register_class(vm); + TextArrayObject::register_class(vm); + TextObject::register_class(vm); + Thunderstorm::register_class(vm); + TileMap::register_class(vm); + Torch::register_class(vm); + WillOWisp::register_class(vm); + Wind::register_class(vm); + Granito::register_class(vm); + GranitoBig::register_class(vm); +} + std::unique_ptr GameObjectFactory::create(const std::string& name, const std::string& data) const { diff --git a/src/supertux/game_object_factory.hpp b/src/supertux/game_object_factory.hpp index f3398f47b3a..87efebbab55 100644 --- a/src/supertux/game_object_factory.hpp +++ b/src/supertux/game_object_factory.hpp @@ -23,11 +23,18 @@ #include "math/vector.hpp" +namespace ssq { +class VM; +} // namespace ssq + class GameObjectFactory final : public ObjectFactory { public: static GameObjectFactory& instance(); + /** Register all scriptable objects to a Squirrel VM. */ + static void register_objects(ssq::VM& vm); + public: using ObjectFactory::create; std::unique_ptr create(const std::string& name, const std::string& data) const; diff --git a/src/supertux/game_object_iterator.hpp b/src/supertux/game_object_iterator.hpp index d16757434f0..1bef5e52390 100644 --- a/src/supertux/game_object_iterator.hpp +++ b/src/supertux/game_object_iterator.hpp @@ -25,7 +25,7 @@ template class GameObjectIterator { public: - typedef std::vector >::const_iterator Iterator; + typedef std::vector::const_iterator Iterator; public: GameObjectIterator(Iterator it, Iterator end) : @@ -35,24 +35,28 @@ class GameObjectIterator { if (m_it != m_end) { - m_object = dynamic_cast(m_it->get()); - if (!m_object) - { - skip_to_next(); - } + // A dynamic_cast is needed to perform sidecasts (a.k.a. crosscasts) + // T may be one of multiple base classes of the object and need not inherit GameObject + m_object = dynamic_cast(*m_it); + assert(m_object); } } GameObjectIterator& operator++() { - skip_to_next(); + ++m_it; + if (m_it != m_end) + { + m_object = dynamic_cast(*m_it); + assert(m_object); + } return *this; } GameObjectIterator operator++(int) { GameObjectIterator tmp(*this); - skip_to_next(); + operator++(); return tmp; } @@ -82,24 +86,6 @@ class GameObjectIterator return !(*this == other); } -private: - void skip_to_next() - { - do - { - ++m_it; - if (m_it == m_end) - { - break; - } - else - { - m_object = dynamic_cast(m_it->get()); - } - } - while (!m_object); - } - private: Iterator m_it; Iterator m_end; @@ -115,11 +101,13 @@ class GameObjectRange {} GameObjectIterator begin() const { - return GameObjectIterator(m_manager.get_objects().begin(), m_manager.get_objects().end()); + auto& objects = m_manager.get_objects_by_type_index(typeid(T)); + return GameObjectIterator(objects.begin(), objects.end()); } GameObjectIterator end() const { - return GameObjectIterator(m_manager.get_objects().end(), m_manager.get_objects().end()); + auto& objects = m_manager.get_objects_by_type_index(typeid(T)); + return GameObjectIterator(objects.end(), objects.end()); } private: diff --git a/src/supertux/game_object_manager.cpp b/src/supertux/game_object_manager.cpp index 4a92cb2d1d9..52d33a26af7 100644 --- a/src/supertux/game_object_manager.cpp +++ b/src/supertux/game_object_manager.cpp @@ -20,7 +20,12 @@ #include +#include +#include + #include "editor/editor.hpp" +#include "object/ambient_light.hpp" +#include "object/music_object.hpp" #include "object/tilemap.hpp" #include "supertux/game_object_factory.hpp" #include "supertux/moving_object.hpp" @@ -155,6 +160,14 @@ GameObjectManager::add_object(std::unique_ptr object) return tmp; } +void +GameObjectManager::add_object(const std::string& class_name, const std::string& name, + float pos_x, float pos_y, const std::string& direction, + const std::string& data) +{ + add_object_scripting(class_name, name, Vector(pos_x, pos_y), direction, data); +} + MovingObject& GameObjectManager::add_object_scripting(const std::string& class_name, const std::string& name, const Vector& pos, const std::string& direction, @@ -470,7 +483,10 @@ GameObjectManager::this_before_object_add(GameObject& object) } { // By type index: - m_objects_by_type_index[std::type_index(typeid(object))].push_back(&object); + for (const std::type_index& type : object.get_class_types().types) + { + m_objects_by_type_index[type].push_back(&object); + } } save_object_change(object, true); @@ -494,13 +510,52 @@ GameObjectManager::this_before_object_remove(GameObject& object) } { // By type index: - auto& vec = m_objects_by_type_index[std::type_index(typeid(object))]; - auto it = std::find(vec.begin(), vec.end(), &object); - assert(it != vec.end()); - vec.erase(it); + for (const std::type_index& type : object.get_class_types().types) + { + auto& vec = m_objects_by_type_index[type]; + auto it = std::find(vec.begin(), vec.end(), &object); + assert(it != vec.end()); + vec.erase(it); + } } } +void +GameObjectManager::fade_to_ambient_light(float red, float green, float blue, float fadetime) +{ + get_singleton_by_type().fade_to_ambient_light(red, green, blue, fadetime); +} + +void +GameObjectManager::set_ambient_light(float red, float green, float blue) +{ + get_singleton_by_type().set_ambient_light(Color(red, green, blue)); +} + +float +GameObjectManager::get_ambient_red() const +{ + return get_singleton_by_type().get_ambient_light().red; +} + +float +GameObjectManager::get_ambient_green() const +{ + return get_singleton_by_type().get_ambient_light().green; +} + +float +GameObjectManager::get_ambient_blue() const +{ + return get_singleton_by_type().get_ambient_light().blue; +} + +void +GameObjectManager::set_music(const std::string& filename) +{ + get_singleton_by_type().set_music(filename); +} + float GameObjectManager::get_width() const { @@ -565,4 +620,20 @@ GameObjectManager::get_tiles_height() const return height; } + +void +GameObjectManager::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("GameObjectManager"); + + cls.addFunc("set_ambient_light", &GameObjectManager::set_ambient_light); + cls.addFunc("fade_to_ambient_light", &GameObjectManager::fade_to_ambient_light); + cls.addFunc("get_ambient_red", &GameObjectManager::get_ambient_red); + cls.addFunc("get_ambient_green", &GameObjectManager::get_ambient_green); + cls.addFunc("get_ambient_blue", &GameObjectManager::get_ambient_blue); + cls.addFunc("set_music", &GameObjectManager::set_music); + cls.addFunc("add_object", &GameObjectManager::add_object); +} + /* EOF */ diff --git a/src/supertux/game_object_manager.hpp b/src/supertux/game_object_manager.hpp index 4fcd6f775a4..07a79f77dba 100644 --- a/src/supertux/game_object_manager.hpp +++ b/src/supertux/game_object_manager.hpp @@ -19,6 +19,8 @@ #ifndef HEADER_SUPERTUX_SUPERTUX_GAME_OBJECT_MANAGER_HPP #define HEADER_SUPERTUX_SUPERTUX_GAME_OBJECT_MANAGER_HPP +#include "squirrel/exposable_class.hpp" + #include #include #include @@ -34,11 +36,20 @@ class TileMap; template class GameObjectRange; -class GameObjectManager +/** + * @scripting + * @summary This class provides basic controlling functions for a sector. Applies for both worldmap and in-level sectors. + * @instances For in-level sectors, an instance under ""sector.settings"" is available from scripts and the console.${SRG_NEWPARAGRAPH} + For worldmap sectors, such instance is available under ""worldmap.settings"". + */ +class GameObjectManager : public ExposableClass { public: static bool s_draw_solids_only; +public: + static void register_class(ssq::VM& vm); + private: struct NameResolveRequest { @@ -48,7 +59,9 @@ class GameObjectManager public: GameObjectManager(bool undo_tracking = false); - virtual ~GameObjectManager(); + virtual ~GameObjectManager() override; + + virtual std::string get_exposed_class_name() const override { return "GameObjectManager"; } /** Queue an object up to be added to the object list */ GameObject& add_object(std::unique_ptr object); @@ -64,11 +77,6 @@ class GameObjectManager return obj_ref; } - /** Add a MovingObject from scripting. */ - virtual MovingObject& add_object_scripting(const std::string& class_name, const std::string& name, - const Vector& pos, const std::string& direction, - const std::string& data); - void update(float dt_sec); void draw(DrawingContext& context); @@ -77,6 +85,61 @@ class GameObjectManager /** Commit the queued up additions and deletions to the object list */ void flush_game_objects(); + /** + * @scripting + * @description Sets the sector's ambient light to the specified color. + * @param float $red + * @param float $green + * @param float $blue + */ + void set_ambient_light(float red, float green, float blue); + /** + * @scripting + * @description Fades to a specified ambient light color in ""fadetime"" seconds. + * @param float $red + * @param float $green + * @param float $blue + * @param float $fadetime + */ + void fade_to_ambient_light(float red, float green, float blue, float fadetime); + /** + * @scripting + * @description Returns the red channel of the ambient light color. + */ + float get_ambient_red() const; + /** + * @scripting + * @description Returns the green channel of the ambient light color. + */ + float get_ambient_green() const; + /** + * @scripting + * @description Returns the blue channel of the ambient light color. + */ + float get_ambient_blue() const; + + /** + * @scripting + * @description Sets the sector's music. + * @param string $music Full filename, relative to the "music" folder. + */ + void set_music(const std::string& music); + + /** + * @scripting + * @description Adds a ""MovingObject"" to the manager. + Note: If adding objects to a worldmap sector, ""posX"" and ""posY"" have to be tile positions (sector position / 32). + * @param string $class_name GameObject's class. + * @param string $name Name of the created object. + * @param float $pos_x X position inside the current sector. + * @param float $pos_y Y position inside the current sector. + * @param string $direction Direction. + * @param string $data Additional data in S-Expression format (check object definitions in level files). + */ + void add_object(const std::string& class_name, const std::string& name, + float pos_x, float pos_y, const std::string& direction, + const std::string& data); + float get_width() const; float get_height() const; float get_editor_width() const; @@ -180,8 +243,8 @@ class GameObjectManager int get_object_count(std::function predicate = nullptr) const { int total = 0; - for (const auto& obj : m_gameobjects) { - auto object = dynamic_cast(obj.get()); + for (const auto& obj : get_objects_by_type_index(typeid(T))) { + auto object = static_cast(obj); if (object && (predicate == nullptr || predicate(*object))) { total += 1; @@ -224,6 +287,11 @@ class GameObjectManager void on_editor_save(); protected: + /** Add a MovingObject from scripting. */ + virtual MovingObject& add_object_scripting(const std::string& class_name, const std::string& name, + const Vector& pos, const std::string& direction, + const std::string& data); + void update_tilemaps(); void process_resolve_requests(); diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp index ca88bc9f3f9..ce9ff0d6285 100644 --- a/src/supertux/game_session.cpp +++ b/src/supertux/game_session.cpp @@ -31,6 +31,7 @@ #include "object/player.hpp" #include "object/spawnpoint.hpp" #include "sdk/integration.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "supertux/constants.hpp" #include "supertux/fadetoblack.hpp" #include "supertux/gameconfig.hpp" @@ -61,7 +62,7 @@ GameSession::GameSession(const std::string& levelfile_, Savegame& savegame, Stat m_prevent_death(false), m_level(), m_statistics_backdrop(Surface::from_file("images/engine/menu/score-backdrop.png")), - m_scripts(), + m_data_table(SquirrelVirtualMachine::current()->get_vm().findTable("Level").getOrCreateTable("data")), m_currentsector(nullptr), m_end_sequence(nullptr), m_game_pause(false), @@ -94,6 +95,8 @@ GameSession::GameSession(const std::string& levelfile_, Savegame& savegame, Stat m_max_fire_bullets_at_start.resize(InputManager::current()->get_num_users(), 0); m_max_ice_bullets_at_start.resize(InputManager::current()->get_num_users(), 0); + m_data_table.clear(); + if (restart_level(false, preserve_music) != 0) throw std::runtime_error ("Initializing the level failed."); } @@ -122,6 +125,8 @@ GameSession::reset_level() m_activated_checkpoint = nullptr; m_pause_target_timer = false; m_spawn_with_invincibility = false; + + m_data_table.clear(); } int @@ -201,6 +206,7 @@ GameSession::restart_level(bool after_death, bool preserve_music) spawnpoint = &m_spawnpoints.front(); m_play_time = 0; // Reset play time. + m_data_table.clear(); } /* Perform the respawn from the chosen spawnpoint. */ @@ -483,6 +489,7 @@ GameSession::setup() void GameSession::leave() { + m_data_table.clear(); } void diff --git a/src/supertux/game_session.hpp b/src/supertux/game_session.hpp index bc0e4ddfe93..5623714d030 100644 --- a/src/supertux/game_session.hpp +++ b/src/supertux/game_session.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include "math/vector.hpp" #include "squirrel/squirrel_scheduler.hpp" @@ -154,8 +154,7 @@ class GameSession final : public Screen, std::unique_ptr m_level; SurfacePtr m_statistics_backdrop; - // scripts - SquirrelObjectList m_scripts; + ssq::Table m_data_table; Sector* m_currentsector; diff --git a/src/supertux/gameconfig.cpp b/src/supertux/gameconfig.cpp index 8f1080d0621..810b8ef025f 100644 --- a/src/supertux/gameconfig.cpp +++ b/src/supertux/gameconfig.cpp @@ -19,6 +19,7 @@ #include #include "editor/overlay_widget.hpp" +#include "math/util.hpp" #include "supertux/colorscheme.hpp" #include "util/reader_collection.hpp" #include "util/reader_document.hpp" @@ -56,10 +57,12 @@ Config::Config() : show_fps(false), show_player_pos(false), show_controller(false), + camera_peek_multiplier(0.03f), sound_enabled(true), music_enabled(true), sound_volume(100), music_volume(50), + flash_intensity(50), random_seed(0), // Set by time(), by default (unless in config). enable_script_debugger(false), tux_spawn_pos(), @@ -141,10 +144,12 @@ Config::load() auto config_mapping = root.get_mapping(); config_mapping.get("profile", profile); + config_mapping.get("flash_intensity", flash_intensity); config_mapping.get("frame_prediction", frame_prediction); config_mapping.get("show_fps", show_fps); config_mapping.get("show_player_pos", show_player_pos); config_mapping.get("show_controller", show_controller); + config_mapping.get("camera_peek_multiplier", camera_peek_multiplier); config_mapping.get("developer", developer_mode); config_mapping.get("confirmation_dialog", confirmation_dialog); config_mapping.get("pause_on_focusloss", pause_on_focusloss); @@ -344,11 +349,15 @@ Config::load() } } } + + check_values(); } void Config::save() { + check_values(); + Writer writer("config"); writer.start_list("supertux-config"); @@ -359,6 +368,7 @@ Config::save() writer.write("show_fps", show_fps); writer.write("show_player_pos", show_player_pos); writer.write("show_controller", show_controller); + writer.write("camera_peek_multiplier", camera_peek_multiplier); writer.write("developer", developer_mode); writer.write("confirmation_dialog", confirmation_dialog); writer.write("pause_on_focusloss", pause_on_focusloss); @@ -433,6 +443,8 @@ Config::save() writer.write("aspect_width", aspect_size.width); writer.write("aspect_height", aspect_size.height); + writer.write("flash_intensity", flash_intensity); + #ifdef __EMSCRIPTEN__ // Forcibly set autofit to true // TODO: Remove the autofit parameter entirely - it should always be true @@ -494,6 +506,11 @@ Config::save() writer.end_list("supertux-config"); } +void +Config::check_values() +{ + camera_peek_multiplier = math::clamp(camera_peek_multiplier, 0.f, 1.f); +} bool Config::is_christmas() const diff --git a/src/supertux/gameconfig.hpp b/src/supertux/gameconfig.hpp index f4ca84a408f..97cde1e6491 100644 --- a/src/supertux/gameconfig.hpp +++ b/src/supertux/gameconfig.hpp @@ -34,6 +34,9 @@ class Config final void load(); void save(); + void check_values(); + +public: int profile; /** the width/height to be used to display the game in fullscreen */ @@ -65,10 +68,12 @@ class Config final bool show_fps; bool show_player_pos; bool show_controller; + float camera_peek_multiplier; bool sound_enabled; bool music_enabled; int sound_volume; int music_volume; + int flash_intensity; /** initial random seed. 0 ==> set from time() */ int random_seed; diff --git a/src/supertux/level.cpp b/src/supertux/level.cpp index 3847cde031a..a88fbc6318c 100644 --- a/src/supertux/level.cpp +++ b/src/supertux/level.cpp @@ -26,7 +26,6 @@ #include "object/coin.hpp" #include "object/player.hpp" #include "physfs/util.hpp" -#include "supertux/constants.hpp" #include "supertux/game_session.hpp" #include "supertux/player_status_hud.hpp" #include "supertux/savegame.hpp" @@ -71,10 +70,8 @@ Level::~Level() void Level::initialize() { - // Get the "main" sector. - Sector* main_sector = get_sector(DEFAULT_SECTOR_NAME); - if (!main_sector) - throw std::runtime_error("No \"main\" sector found."); + if (m_sectors.empty()) + throw std::runtime_error("Level has no sectors!"); m_stats.init(*this); @@ -88,6 +85,7 @@ Level::initialize() sector->add(player_status); } + Sector* sector = m_sectors.at(0).get(); for (int id = 0; id < InputManager::current()->get_num_users() || id == 0; id++) { if (!InputManager::current()->has_corresponsing_controller(id) @@ -100,10 +98,10 @@ Level::initialize() if (id > 0 && !savegame) s_dummy_player_status.add_player(); - // Add players only in the main sector. Players will be moved between sectors. - main_sector->add(player_status, "Tux" + (id == 0 ? "" : std::to_string(id + 1)), id); + // Add all players in the first sector. They will be moved between sectors. + sector->add(player_status, "Tux" + (id == 0 ? "" : std::to_string(id + 1)), id); } - main_sector->flush_game_objects(); + sector->flush_game_objects(); } void diff --git a/src/supertux/menu/cheat_apply_menu.cpp b/src/supertux/menu/cheat_apply_menu.cpp index 3d4c77a26ae..242612ab071 100644 --- a/src/supertux/menu/cheat_apply_menu.cpp +++ b/src/supertux/menu/cheat_apply_menu.cpp @@ -21,7 +21,6 @@ #include "gui/menu_item.hpp" #include "gui/menu_manager.hpp" #include "object/player.hpp" -#include "scripting/functions.hpp" #include "supertux/game_session.hpp" #include "supertux/sector.hpp" diff --git a/src/supertux/menu/cheat_menu.cpp b/src/supertux/menu/cheat_menu.cpp index 4100e94b290..871efec94e4 100644 --- a/src/supertux/menu/cheat_menu.cpp +++ b/src/supertux/menu/cheat_menu.cpp @@ -19,7 +19,6 @@ #include "gui/menu_item.hpp" #include "gui/menu_manager.hpp" #include "object/player.hpp" -#include "scripting/functions.hpp" #include "supertux/game_session.hpp" #include "supertux/menu/cheat_apply_menu.hpp" #include "supertux/sector.hpp" diff --git a/src/supertux/menu/debug_menu.cpp b/src/supertux/menu/debug_menu.cpp index 377732871c1..1461c19bb13 100644 --- a/src/supertux/menu/debug_menu.cpp +++ b/src/supertux/menu/debug_menu.cpp @@ -71,6 +71,7 @@ DebugMenu::DebugMenu() : add_toggle(-1, _("Use Bitmap Fonts"), []{ return g_debug.get_use_bitmap_fonts(); }, [](bool value){ g_debug.set_use_bitmap_fonts(value); }); + add_toggle(-1, _("Show Tile IDs in Editor Toolbox"), &g_debug.show_toolbox_tile_ids); add_entry(_("Dump Texture Cache"), []{ TextureManager::current()->debug_print(get_logging_instance()); }); add_hl(); diff --git a/src/supertux/menu/options_menu.cpp b/src/supertux/menu/options_menu.cpp index a0a0eb34545..c06f2eeef1c 100644 --- a/src/supertux/menu/options_menu.cpp +++ b/src/supertux/menu/options_menu.cpp @@ -19,6 +19,7 @@ #include "audio/sound_manager.hpp" #include "gui/dialog.hpp" +#include "gui/item_floatfield.hpp" #include "gui/item_goto.hpp" #include "gui/item_stringselect.hpp" #include "gui/item_toggle.hpp" @@ -54,7 +55,6 @@ OptionsMenu::less_than_volume(const std::string& lhs, const std::string& rhs) return false; } - OptionsMenu::OptionsMenu(Type type, bool complete) : m_magnifications(), m_aspect_ratios(), @@ -63,6 +63,7 @@ OptionsMenu::OptionsMenu(Type type, bool complete) : m_vsyncs(), m_sound_volumes(), m_music_volumes(), + m_flash_intensity_values(), m_mobile_control_scales() { switch (type) // Insert label and menu items, appropriate for the chosen OptionsMenu type @@ -112,13 +113,17 @@ OptionsMenu::OptionsMenu(Type type, bool complete) : add_toggle(MNID_FRAME_PREDICTION, _("Frame prediction"), &g_config->frame_prediction) .set_help(_("Smooth camera motion, generating intermediate frames. This has a noticeable effect on monitors at >> 60Hz. Moving objects may be blurry.")); + add_flash_intensity(); + #if !defined(HIDE_NONMOBILE_OPTIONS) && !defined(__EMSCRIPTEN__) add_aspect_ratio(); #endif + add_floatfield(_("Camera Peek Multiplier"), &g_config->camera_peek_multiplier) + .set_help(_("The fractional distance towards the camera peek position to move each frame.\n\n0 = No Peek, 1 = Instant Peek")); + add_submenu(_("Change Video System"), MenuStorage::MenuId::VIDEO_SYSTEM_MENU) .set_help(_("Change video system used to render graphics")); - break; } @@ -230,6 +235,7 @@ OptionsMenu::OptionsMenu(Type type, bool complete) : OptionsMenu::~OptionsMenu() { + g_config->save(); } void @@ -507,6 +513,42 @@ OptionsMenu::add_music_volume() .set_help(_("Adjust music volume")); } +void +OptionsMenu::add_flash_intensity() +{ + m_flash_intensity_values.list = { "0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%" }; + + std::ostringstream flash_intensity_value_stream; + flash_intensity_value_stream << g_config->flash_intensity << "%"; + std::string flash_intensity_string = flash_intensity_value_stream.str(); + + if (std::find(m_flash_intensity_values.list.begin(), + m_flash_intensity_values.list.end(), flash_intensity_string) == m_flash_intensity_values.list.end()) + { + m_flash_intensity_values.list.push_back(flash_intensity_string); + } + + std::sort(m_flash_intensity_values.list.begin(), m_flash_intensity_values.list.end(), less_than_volume); + + std::ostringstream out; + out << g_config->flash_intensity << "%"; + std::string flash_intensity_value = out.str(); + int count = 0; + for (const auto& value : m_flash_intensity_values.list) + { + if (value == flash_intensity_value) + { + flash_intensity_value.clear(); + m_flash_intensity_values.next = count; + break; + } + ++count; + } + + add_string_select(MNID_FLASH_INTENSITY, _("Flash Intensity"), &m_flash_intensity_values.next, m_flash_intensity_values.list) + .set_help(_("Adjust the intensity of the flash produced by the thunderstorm")); +} + void OptionsMenu::add_mobile_control_scales() { @@ -520,7 +562,6 @@ OptionsMenu::add_mobile_control_scales() add_string_select(MNID_MOBILE_CONTROLS_SCALE, _("On-screen controls scale"), &m_mobile_control_scales.next, m_mobile_control_scales.list); } - void OptionsMenu::on_window_resize() { @@ -528,7 +569,6 @@ OptionsMenu::on_window_resize() static_cast(SCREEN_HEIGHT) / 2.0f + 15.0f); } - void OptionsMenu::menu_action(MenuItem& item) { @@ -705,6 +745,13 @@ OptionsMenu::menu_action(MenuItem& item) } break; + case MNID_FLASH_INTENSITY: + if (sscanf(m_flash_intensity_values.list[m_flash_intensity_values.next].c_str(), "%i", &g_config->flash_intensity) == 1) + { + g_config->save(); + } + break; + case MNID_CUSTOM_TITLE_LEVELS: TitleScreen::current()->refresh_level(); break; diff --git a/src/supertux/menu/options_menu.hpp b/src/supertux/menu/options_menu.hpp index ae66d352866..703f7120236 100644 --- a/src/supertux/menu/options_menu.hpp +++ b/src/supertux/menu/options_menu.hpp @@ -53,6 +53,7 @@ class OptionsMenu final : public Menu void add_vsync(); void add_sound_volume(); void add_music_volume(); + void add_flash_intensity(); void add_mobile_control_scales(); private: @@ -70,6 +71,7 @@ class OptionsMenu final : public Menu MNID_MUSIC, MNID_SOUND_VOLUME, MNID_MUSIC_VOLUME, + MNID_FLASH_INTENSITY, MNID_RUMBLING, MNID_DEVELOPER_MODE, MNID_CHRISTMAS_MODE, @@ -97,6 +99,7 @@ class OptionsMenu final : public Menu StringOption m_vsyncs; StringOption m_sound_volumes; StringOption m_music_volumes; + StringOption m_flash_intensity_values; StringOption m_mobile_control_scales; private: diff --git a/src/supertux/menu/worldmap_cheat_apply_menu.cpp b/src/supertux/menu/worldmap_cheat_apply_menu.cpp index d0498eae1a8..4a5c80040cb 100644 --- a/src/supertux/menu/worldmap_cheat_apply_menu.cpp +++ b/src/supertux/menu/worldmap_cheat_apply_menu.cpp @@ -21,7 +21,6 @@ #include "gui/menu_item.hpp" #include "gui/menu_manager.hpp" #include "object/player.hpp" -#include "scripting/functions.hpp" #include "supertux/game_session.hpp" #include "supertux/sector.hpp" diff --git a/src/supertux/moving_object.cpp b/src/supertux/moving_object.cpp index f042fd57285..7a391677446 100644 --- a/src/supertux/moving_object.cpp +++ b/src/supertux/moving_object.cpp @@ -16,6 +16,9 @@ #include "supertux/moving_object.hpp" +#include +#include + #include "editor/resize_marker.hpp" #include "supertux/sector.hpp" #include "util/reader_mapping.hpp" @@ -78,6 +81,42 @@ MovingObject::set_parent_dispenser(Dispenser* dispenser) } } +float +MovingObject::get_x() const +{ + return m_col.m_bbox.get_left(); +} + +float +MovingObject::get_y() const +{ + return m_col.m_bbox.get_top(); +} + +void +MovingObject::set_pos(float x, float y) +{ + set_pos(Vector(x, y)); +} + +void +MovingObject::move(float x, float y) +{ + move(Vector(x, y)); +} + +float +MovingObject::get_width() const +{ + return m_col.m_bbox.get_width(); +} + +float +MovingObject::get_height() const +{ + return m_col.m_bbox.get_height(); +} + void MovingObject::editor_select() { @@ -99,4 +138,18 @@ MovingObject::on_flip(float height) set_pos(pos); } + +void +MovingObject::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("MovingObject", vm.findClass("GameObject")); + + cls.addFunc("get_x", &MovingObject::get_x); + cls.addFunc("get_y", &MovingObject::get_y); + cls.addFunc("set_pos", &MovingObject::set_pos); + cls.addFunc("move", &MovingObject::move); + cls.addFunc("get_width", &MovingObject::get_width); + cls.addFunc("get_height", &MovingObject::get_height); +} + /* EOF */ diff --git a/src/supertux/moving_object.hpp b/src/supertux/moving_object.hpp index e883e959009..873533a5644 100644 --- a/src/supertux/moving_object.hpp +++ b/src/supertux/moving_object.hpp @@ -26,9 +26,12 @@ class Dispenser; class Sector; -/** Base class for all dynamic/moving game objects. This class - contains things for handling the bounding boxes and collision - feedback. */ +/** + * @scripting + * @summary Base class for all dynamic/moving game objects. This class + contains things for handling the bounding boxes and collision + feedback. + */ class MovingObject : public GameObject, public CollisionListener { @@ -36,10 +39,14 @@ class MovingObject : public GameObject, friend class Sector; friend class CollisionSystem; +public: + static void register_class(ssq::VM& vm); + public: MovingObject(); MovingObject(const ReaderMapping& reader); ~MovingObject() override; + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(CollisionListener)).add(typeid(MovingObject)); } virtual void collision_solid(const CollisionHit& /*hit*/) override { @@ -63,6 +70,10 @@ class MovingObject : public GameObject, { m_col.move_to(pos); } + virtual void move(const Vector& dist) + { + m_col.m_bbox.move(dist); + } virtual bool listener_is_valid() const override { return is_valid(); } @@ -99,6 +110,7 @@ class MovingObject : public GameObject, static std::string class_name() { return "moving-object"; } virtual std::string get_class_name() const override { return class_name(); } + virtual std::string get_exposed_class_name() const override { return "MovingObject"; } virtual ObjectSettings get_settings() override; virtual void editor_select() override; @@ -107,6 +119,42 @@ class MovingObject : public GameObject, virtual int get_layer() const = 0; + /** + * @scripting + * @description Returns the object's X coordinate. + */ + float get_x() const; + /** + * @scripting + * @description Returns the object's Y coordinate. + */ + float get_y() const; + /** + * @scripting + * @description Sets the position of the object. + * @param float $x + * @param float $y + */ + void set_pos(float x, float y); + /** + * @scripting + * @description Moves the object by ""x"" units to the right and ""y"" down, relative to its current position. + * @param float $x + * @param float $y + */ + void move(float x, float y); + + /** + * @scripting + * @description Returns the object's hitbox width. + */ + float get_width() const; + /** + * @scripting + * @description Returns the object's hitbox height. + */ + float get_height() const; + protected: void set_group(CollisionGroup group) { diff --git a/src/supertux/player_status_hud.hpp b/src/supertux/player_status_hud.hpp index 0315f532001..3bcc649eef0 100644 --- a/src/supertux/player_status_hud.hpp +++ b/src/supertux/player_status_hud.hpp @@ -34,6 +34,7 @@ class PlayerStatusHUD : public GameObject public: PlayerStatusHUD(PlayerStatus& player_status); + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(PlayerStatusHUD)); } virtual void update(float dt_sec) override; virtual void draw(DrawingContext& context) override; diff --git a/src/supertux/savegame.cpp b/src/supertux/savegame.cpp index 2ea286d8fd8..a3e76bf73b2 100644 --- a/src/supertux/savegame.cpp +++ b/src/supertux/savegame.cpp @@ -24,7 +24,6 @@ #include "physfs/physfs_file_system.hpp" #include "physfs/util.hpp" #include "squirrel/serialize.hpp" -#include "squirrel/squirrel_util.hpp" #include "squirrel/squirrel_virtual_machine.hpp" #include "supertux/player_status.hpp" #include "supertux/profile_manager.hpp" @@ -37,33 +36,26 @@ namespace { -std::vector get_level_states(SquirrelVM& vm) +std::vector get_level_states(ssq::Table& levels) { std::vector results; - - sq_pushnull(vm.get_vm()); - while (SQ_SUCCEEDED(sq_next(vm.get_vm(), -2))) + for (const auto& [key, value] : levels.convertRaw()) { - //here -1 is the value and -2 is the key - const char* result; - if (SQ_FAILED(sq_getstring(vm.get_vm(), -2, &result))) - { - std::ostringstream msg; - msg << "Couldn't get string value"; - throw SquirrelError(vm.get_vm(), msg.str()); - } - else + try { + ssq::Table table = value.toTable(); + LevelState level_state; - level_state.filename = result; - vm.get_bool("solved", level_state.solved); - vm.get_bool("perfect", level_state.perfect); + level_state.filename = key; + table.get("solved", level_state.solved); + table.get("perfect", level_state.perfect); - results.push_back(level_state); + results.push_back(std::move(level_state)); + } + catch (const ssq::TypeException&) + { + // Ignore non-table entries } - - // pops key and val before the next iteration - sq_pop(vm.get_vm(), 2); } return results; @@ -131,7 +123,8 @@ Savegame::from_current_profile(const std::string& world_name, bool base_data) Savegame::Savegame(Profile& profile, const std::string& world_name) : m_profile(profile), m_world_name(world_name), - m_player_status(new PlayerStatus(InputManager::current()->get_num_users())) + m_player_status(new PlayerStatus(InputManager::current()->get_num_users())), + m_state_table() { } @@ -176,8 +169,6 @@ Savegame::load(bool base_data) try { - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - auto doc = ReaderDocument::from_file(filename); auto root = doc.get_root(); @@ -213,16 +204,9 @@ Savegame::load(bool base_data) /** Load "state" table */ std::optional state; if (!mapping.get("state", state)) - { throw std::runtime_error("No state section in savegame"); - } else - { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - load_squirrel_table(vm.get_vm(), -1, *state); - sq_pop(vm.get_vm(), 2); - } + load_squirrel_table(m_state_table, *state); } } } @@ -236,15 +220,10 @@ Savegame::load(bool base_data) void Savegame::clear_state_table() { - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); + ssq::VM& vm = SquirrelVirtualMachine::current()->get_vm(); - // delete existing state table, if it exists - sq_pushroottable(vm.get_vm()); - { - // create a new empty state table - vm.create_empty_table("state"); - } - sq_pop(vm.get_vm(), 1); + vm.remove("state"); + m_state_table = vm.addTable("state"); } void @@ -261,8 +240,6 @@ Savegame::save() m_profile.save(); // Make sure profile directory exists, save profile info - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - Writer writer(filename); writer.start_list("supertux-savegame"); @@ -283,18 +260,13 @@ Savegame::save() writer.end_list("tux"); writer.start_list("state"); - - sq_pushroottable(vm.get_vm()); try { - vm.get_table_entry("state"); // Push "state" - save_squirrel_table(vm.get_vm(), -1, writer); - sq_pop(vm.get_vm(), 1); // Pop "state" + save_squirrel_table(m_state_table, writer); } catch(const std::exception&) { } - sq_pop(vm.get_vm(), 1); // Pop root table writer.end_list("state"); writer.end_list("supertux-savegame"); @@ -305,23 +277,16 @@ Savegame::get_worldmaps() { std::vector worlds; - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - try { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - vm.get_or_create_table_entry("worlds"); - worlds = vm.get_table_keys(); + ssq::Table worlds_table = m_state_table.getOrCreateTable("worlds"); + worlds = worlds_table.getKeys(); } catch(const std::exception& err) { log_warning << err.what() << std::endl; } - sq_settop(vm.get_vm(), oldtop); - // ensure that the loaded worldmap names have their canonical form std::transform(worlds.begin(), worlds.end(), worlds.begin(), physfsutil::realpath); @@ -333,35 +298,26 @@ Savegame::get_worldmap_state(const std::string& name) { WorldmapState result; - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - try { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - vm.get_or_create_table_entry("worlds"); + ssq::Table worlds = m_state_table.getOrCreateTable("worlds"); // if a non-canonical entry is present, replace them with a canonical one - if (name != "/levels/world2/worldmap.stwm") { + if (name != "/levels/world2/worldmap.stwm") + { std::string old_map_filename = name.substr(1); - if (vm.has_property(old_map_filename.c_str())) { - vm.rename_table_entry(old_map_filename.c_str(), name.c_str()); - } + if (worlds.hasEntry(old_map_filename.c_str())) + worlds.rename(old_map_filename.c_str(), name.c_str()); } - vm.get_or_create_table_entry(name); - vm.get_or_create_table_entry("levels"); - - result.level_states = get_level_states(vm); + ssq::Table levels = worlds.getOrCreateTable(name.c_str()).getOrCreateTable("levels"); + result.level_states = get_level_states(levels); } catch(const std::exception& err) { log_warning << err.what() << std::endl; } - sq_settop(vm.get_vm(), oldtop); - return result; } @@ -370,23 +326,16 @@ Savegame::get_levelsets() { std::vector results; - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - try { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - vm.get_or_create_table_entry("levelsets"); - results = vm.get_table_keys(); + ssq::Table levelsets = m_state_table.getOrCreateTable("levelsets"); + results = levelsets.getKeys(); } catch(const std::exception& err) { log_warning << err.what() << std::endl; } - sq_settop(vm.get_vm(), oldtop); - return results; } @@ -395,26 +344,17 @@ Savegame::get_levelset_state(const std::string& basedir) { LevelsetState result; - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - try { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - vm.get_or_create_table_entry("levelsets"); - vm.get_or_create_table_entry(basedir); - vm.get_or_create_table_entry("levels"); - - result.level_states = get_level_states(vm); + ssq::Table levelsets = m_state_table.getOrCreateTable("levelsets"); + ssq::Table levels = levelsets.getOrCreateTable(basedir.c_str()).getOrCreateTable("levels"); + result.level_states = get_level_states(levels); } catch(const std::exception& err) { log_warning << err.what() << std::endl; } - sq_settop(vm.get_vm(), oldtop); - return result; } @@ -425,28 +365,20 @@ Savegame::set_levelset_state(const std::string& basedir, { LevelsetState state = get_levelset_state(basedir); - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - try { - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - vm.get_or_create_table_entry("levelsets"); - vm.get_or_create_table_entry(basedir); - vm.get_or_create_table_entry("levels"); - vm.get_or_create_table_entry(level_filename); + ssq::Table levelsets = m_state_table.getOrCreateTable("levelsets"); + ssq::Table levels = levelsets.getOrCreateTable(basedir.c_str()).getOrCreateTable("levels"); + ssq::Table level = levels.getOrCreateTable(level_filename.c_str()); bool old_solved = false; - vm.get_bool("solved", old_solved); - vm.store_bool("solved", solved || old_solved); + level.get("solved", old_solved); + level.set("solved", solved || old_solved); } catch(const std::exception& err) { log_warning << err.what() << std::endl; } - - sq_settop(vm.get_vm(), oldtop); } /* EOF */ diff --git a/src/supertux/savegame.hpp b/src/supertux/savegame.hpp index d200ce67212..a36b64623b9 100644 --- a/src/supertux/savegame.hpp +++ b/src/supertux/savegame.hpp @@ -22,6 +22,8 @@ #include #include +#include + class PlayerStatus; class Profile; @@ -102,6 +104,7 @@ class Savegame final Profile& m_profile; std::string m_world_name; std::unique_ptr m_player_status; + ssq::Table m_state_table; private: Savegame(const Savegame&) = delete; diff --git a/src/supertux/sector.cpp b/src/supertux/sector.cpp index a9d841ba91f..592b769d6bd 100644 --- a/src/supertux/sector.cpp +++ b/src/supertux/sector.cpp @@ -16,9 +16,12 @@ #include "supertux/sector.hpp" -#include #include +#include +#include +#include + #include "audio/sound_manager.hpp" #include "badguy/badguy.hpp" #include "collision/collision.hpp" @@ -42,7 +45,6 @@ #include "object/tilemap.hpp" #include "object/vertical_stripes.hpp" #include "physfs/ifile_stream.hpp" -#include "scripting/sector.hpp" #include "squirrel/squirrel_environment.hpp" #include "supertux/colorscheme.hpp" #include "supertux/constants.hpp" @@ -227,12 +229,12 @@ Sector::activate(const Vector& player_pos) m_squirrel_environment->expose_self(); for (const auto& object : get_objects()) { - m_squirrel_environment->try_expose(*object); + m_squirrel_environment->expose(*object, object->get_name()); } } // The Sector object is called 'settings' as it is accessed as 'sector.settings' - m_squirrel_environment->expose("settings", std::make_unique(this)); + m_squirrel_environment->expose(*this, "settings"); if (Editor::is_active()) return; @@ -243,9 +245,9 @@ Sector::activate(const Vector& player_pos) Player& player = *static_cast(player_ptr); // spawn smalltux below spawnpoint if (!player.is_big()) { - player.move(player_pos + Vector(0,32)); + player.set_pos(player_pos + Vector(0,32)); } else { - player.move(player_pos); + player.set_pos(player_pos); } // spawning tux in the ground would kill him @@ -254,7 +256,7 @@ Sector::activate(const Vector& player_pos) log_warning << current_level << "Tried spawning Tux in solid matter. Compensating." << std::endl; Vector npos = player.get_bbox().p1(); npos.y-=32; - player.move(npos); + player.set_pos(npos); } } @@ -263,10 +265,10 @@ Sector::activate(const Vector& player_pos) { Player& player = *(get_players()[0]); Camera& camera = get_camera(); - player.move(player.get_pos()+Vector(-32, 0)); + player.set_pos(player.get_pos()+Vector(-32, 0)); camera.reset(player.get_pos()); camera.update(1); - player.move(player.get_pos()+(Vector(32, 0))); + player.set_pos(player.get_pos()+(Vector(32, 0))); camera.update(1); } @@ -303,9 +305,8 @@ Sector::deactivate() m_squirrel_environment->unexpose_self(); - for (const auto& object: get_objects()) { - m_squirrel_environment->try_unexpose(*object); - } + for (const auto& object : get_objects()) + m_squirrel_environment->unexpose(object->get_name()); m_squirrel_environment->unexpose("settings"); @@ -414,7 +415,7 @@ Sector::before_object_add(GameObject& object) } if (s_current == this) { - m_squirrel_environment->try_expose(object); + m_squirrel_environment->expose(object, object.get_name()); } if (m_fully_constructed) { @@ -434,7 +435,7 @@ Sector::before_object_remove(GameObject& object) } if (s_current == this) - m_squirrel_environment->try_unexpose(object); + m_squirrel_environment->unexpose(object.get_name()); } void @@ -540,6 +541,14 @@ Sector::is_free_of_tiles(const Rectf& rect, const bool ignoreUnisolid, uint32_t return m_collision_system->is_free_of_tiles(rect, ignoreUnisolid, tiletype); } +bool +Sector::is_free_of_solid_tiles(float left, float top, float right, float bottom, + bool ignore_unisolid) const +{ + return m_collision_system->is_free_of_tiles(Rectf(Vector(left, top), Vector(right, bottom)), + ignore_unisolid, Tile::SOLID); +} + bool Sector::is_free_of_statics(const Rectf& rect, const MovingObject* ignore_object, const bool ignoreUnisolid) const { @@ -548,6 +557,14 @@ Sector::is_free_of_statics(const Rectf& rect, const MovingObject* ignore_object, ignoreUnisolid); } +bool +Sector::is_free_of_statics(float left, float top, float right, float bottom, + bool ignore_unisolid) const +{ + return m_collision_system->is_free_of_statics(Rectf(Vector(left, top), Vector(right, bottom)), + nullptr, ignore_unisolid); +} + bool Sector::is_free_of_movingstatics(const Rectf& rect, const MovingObject* ignore_object) const { @@ -555,6 +572,12 @@ Sector::is_free_of_movingstatics(const Rectf& rect, const MovingObject* ignore_o ignore_object ? ignore_object->get_collision_object() : nullptr); } +bool +Sector::is_free_of_movingstatics(float left, float top, float right, float bottom) const +{ + return m_collision_system->is_free_of_movingstatics(Rectf(Vector(left, top), Vector(right, bottom)), nullptr); +} + bool Sector::is_free_of_specifically_movingstatics(const Rectf& rect, const MovingObject* ignore_object) const { @@ -562,6 +585,12 @@ Sector::is_free_of_specifically_movingstatics(const Rectf& rect, const MovingObj ignore_object ? ignore_object->get_collision_object() : nullptr); } +bool +Sector::is_free_of_specifically_movingstatics(float left, float top, float right, float bottom) const +{ + return m_collision_system->is_free_of_specifically_movingstatics(Rectf(Vector(left, top), Vector(right, bottom)), nullptr); +} + CollisionSystem::RaycastResult Sector::get_first_line_intersection(const Vector& line_start, const Vector& line_end, @@ -684,6 +713,12 @@ Sector::set_gravity(float gravity) m_gravity = gravity; } +float +Sector::get_gravity() const +{ + return m_gravity; +} + Player* Sector::get_nearest_player (const Vector& pos) const { @@ -864,4 +899,20 @@ Sector::get_effect() const return get_singleton_by_type(); } + +void +Sector::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("Sector", vm.findClass("GameObjectManager")); + + cls.addFunc("set_gravity", &Sector::set_gravity); + cls.addFunc("get_gravity", &Sector::get_gravity); + cls.addFunc("is_free_of_solid_tiles", &Sector::is_free_of_solid_tiles); + cls.addFunc("is_free_of_statics", &Sector::is_free_of_statics); + cls.addFunc("is_free_of_movingstatics", &Sector::is_free_of_movingstatics); + cls.addFunc("is_free_of_specifically_movingstatics", &Sector::is_free_of_specifically_movingstatics); + + cls.addVar("gravity", &Sector::m_gravity); +} + /* EOF */ diff --git a/src/supertux/sector.hpp b/src/supertux/sector.hpp index a4d342d6c31..bcc603f07c3 100644 --- a/src/supertux/sector.hpp +++ b/src/supertux/sector.hpp @@ -49,14 +49,23 @@ class TextObject; class TileMap; class Writer; -/** Represents one of (potentially) multiple, separate parts of a Level. - Sectors contain GameObjects, e.g. Badguys and Players. */ +/** + * Represents one of (potentially) multiple, separate parts of a Level. + Sectors contain GameObjects, e.g. Badguys and Players. + */ +/** + * @scripting + * @summary This class provides additional controlling functions for a sector, other than the ones listed at ${SRG_REF_GameObjectManager}. + * @instances An instance under ""sector.settings"" is available from scripts and the console. + */ class Sector final : public Base::Sector { -public: friend class CollisionSystem; friend class EditorSectorMenu; +public: + static void register_class(ssq::VM& vm); + private: static Sector* s_current; @@ -71,6 +80,8 @@ class Sector final : public Base::Sector void finish_construction(bool editable) override; + std::string get_exposed_class_name() const override { return "Sector"; } + Level& get_level() const { return m_level; } TileSet* get_tileset() const override; bool in_worldmap() const override; @@ -101,22 +112,69 @@ class Sector final : public Base::Sector /** Checks if the specified rectangle is free of (solid) tiles. Note that this does not include static objects, e.g. bonus blocks. */ bool is_free_of_tiles(const Rectf& rect, const bool ignoreUnisolid = false, uint32_t tiletype = Tile::SOLID) const; + /** + * @scripting + * @description Checks if the specified sector-relative rectangle is free of solid tiles. + * @param float $left + * @param float $top + * @param float $right + * @param float $bottom + * @param bool $ignore_unisolid If ""true"", unisolid tiles will be ignored. + */ + bool is_free_of_solid_tiles(float left, float top, float right, float bottom, + bool ignore_unisolid) const; /** Checks if the specified rectangle is free of both 1.) solid tiles and 2.) MovingObjects in COLGROUP_STATIC. Note that this does not include badguys or players. */ bool is_free_of_statics(const Rectf& rect, const MovingObject* ignore_object = nullptr, const bool ignoreUnisolid = false) const; + /** + * @scripting + * @description Checks if the specified sector-relative rectangle is free of both: + 1) Solid tiles. + 2) ""MovingObject""s in ""COLGROUP_STATIC"". + Note: This does not include badguys or players. + * @param float $left + * @param float $top + * @param float $right + * @param float $bottom + * @param bool $ignore_unisolid If ""true"", unisolid tiles will be ignored. + */ + bool is_free_of_statics(float left, float top, float right, float bottom, + bool ignore_unisolid) const; /** Checks if the specified rectangle is free of both 1.) solid tiles and 2.) MovingObjects in COLGROUP_STATIC, COLGROUP_MOVINGSTATIC or COLGROUP_MOVING. This includes badguys and players. */ bool is_free_of_movingstatics(const Rectf& rect, const MovingObject* ignore_object = nullptr) const; + /** + * @scripting + * @description Checks if the specified sector-relative rectangle is free of both: + 1) Solid tiles. + 2) ""MovingObject""s in ""COLGROUP_STATIC"", ""COLGROUP_MOVINGSTATIC"" or ""COLGROUP_MOVING"". + This includes badguys and players. + * @param float $left + * @param float $top + * @param float $right + * @param float $bottom + */ + bool is_free_of_movingstatics(float left, float top, float right, float bottom) const; /** Checks if the specified rectangle is free of MovingObjects in COLGROUP_MOVINGSTATIC. Note that this does not include moving badguys, or players */ bool is_free_of_specifically_movingstatics(const Rectf& rect, const MovingObject* ignore_object = nullptr) const; + /** + * @scripting + * @description Checks if the specified sector-relative rectangle is free of ""MovingObject""s in ""COLGROUP_MOVINGSTATIC"". + Note: This does not include moving badguys or players. + * @param float $left + * @param float $top + * @param float $right + * @param float $bottom + */ + bool is_free_of_specifically_movingstatics(float left, float top, float right, float bottom) const; CollisionSystem::RaycastResult get_first_line_intersection(const Vector& line_start, const Vector& line_end, @@ -146,9 +204,20 @@ class Sector final : public Base::Sector /** globally changes solid tilemaps' tile ids */ void change_solid_tiles(uint32_t old_tile_id, uint32_t new_tile_id); - /** set gravity throughout sector */ + /** + * @scripting + * @deprecated Use the ""gravity"" property instead! + * Sets the sector's gravity. + * @param float $gravity + */ void set_gravity(float gravity); - float get_gravity() const { return m_gravity; } + /** + * @scripting + * @deprecated Use the ""gravity"" property instead! + * Returns the sector's gravity. + * @param float $gravity + */ + float get_gravity() const; Camera& get_camera() const; std::vector get_players() const; @@ -178,6 +247,10 @@ class Sector final : public Base::Sector int m_foremost_layer; int m_foremost_opaque_layer; + /** + * @scripting + * @description The sector's gravity. + */ float m_gravity; std::unique_ptr m_collision_system; diff --git a/src/supertux/sector_base.cpp b/src/supertux/sector_base.cpp index aad09d6106e..24acd9b0898 100644 --- a/src/supertux/sector_base.cpp +++ b/src/supertux/sector_base.cpp @@ -16,6 +16,7 @@ #include "supertux/sector_base.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "util/log.hpp" namespace Base { @@ -43,14 +44,14 @@ Sector::run_script(const std::string& script, const std::string& sourcename) bool Sector::before_object_add(GameObject& object) { - m_squirrel_environment->try_expose(object); + m_squirrel_environment->expose(object, object.get_name()); return true; } void Sector::before_object_remove(GameObject& object) { - m_squirrel_environment->try_unexpose(object); + m_squirrel_environment->unexpose(object.get_name()); } } // namespace Base diff --git a/src/supertux/statistics.cpp b/src/supertux/statistics.cpp index 091d84ed2a4..e5bafd36a15 100644 --- a/src/supertux/statistics.cpp +++ b/src/supertux/statistics.cpp @@ -22,9 +22,10 @@ #include #include +#include + #include "audio/sound_manager.hpp" #include "math/util.hpp" -#include "squirrel/squirrel_util.hpp" #include "supertux/globals.hpp" #include "supertux/level.hpp" #include "supertux/resources.hpp" @@ -93,39 +94,37 @@ Statistics::calculate_max_caption_length() } void -Statistics::serialize_to_squirrel(SquirrelVM& vm) const +Statistics::serialize_to_squirrel(ssq::Table& table) const { if (m_status != FINAL) return; - vm.begin_table("statistics"); - vm.store_int("coins-collected", m_coins); - vm.store_int("badguys-killed", m_badguys); - vm.store_int("secrets-found", m_secrets); - vm.store_float("time-needed", m_time); - vm.store_int("coins-collected-total", m_total_coins); - vm.store_int("badguys-killed-total", m_total_badguys); - vm.store_int("secrets-found-total", m_total_secrets); - vm.end_table("statistics"); + ssq::Table statistics = table.addTable("statistics"); + statistics.set("coins-collected", m_coins); + statistics.set("badguys-killed", m_badguys); + statistics.set("secrets-found", m_secrets); + statistics.set("time-needed", m_time); + statistics.set("coins-collected-total", m_total_coins); + statistics.set("badguys-killed-total", m_total_badguys); + statistics.set("secrets-found-total", m_total_secrets); } void -Statistics::unserialize_from_squirrel(SquirrelVM& vm) +Statistics::unserialize_from_squirrel(const ssq::Table& table) { try { - vm.get_table_entry("statistics"); - vm.get_int("coins-collected", m_coins); - vm.get_int("badguys-killed", m_badguys); - vm.get_int("secrets-found", m_secrets); - vm.get_float("time-needed", m_time); - vm.get_int("coins-collected-total", m_total_coins); - vm.get_int("badguys-killed-total", m_total_badguys); - vm.get_int("secrets-found-total", m_total_secrets); - sq_pop(vm.get_vm(), 1); + const ssq::Table statistics = table.findTable("statistics"); + statistics.get("coins-collected", m_coins); + statistics.get("badguys-killed", m_badguys); + statistics.get("secrets-found", m_secrets); + statistics.get("time-needed", m_time); + statistics.get("coins-collected-total", m_total_coins); + statistics.get("badguys-killed-total", m_total_badguys); + statistics.get("secrets-found-total", m_total_secrets); m_status = FINAL; } - catch(const std::exception&) + catch(const ssq::NotFoundException&) { // ignore non-existing or malformed statistics table } diff --git a/src/supertux/statistics.hpp b/src/supertux/statistics.hpp index b2d1206ac5b..3a61934919b 100644 --- a/src/supertux/statistics.hpp +++ b/src/supertux/statistics.hpp @@ -25,7 +25,10 @@ class DrawingContext; class Level; -class SquirrelVM; + +namespace ssq { +class Table; +} // namespace ssq /** This class is a layer between level and worldmap to keep track of stuff like scores, and minor, but funny things, like @@ -50,10 +53,10 @@ class Statistics final Statistics(); /**< Creates new statistics, call reset() before counting */ /** serialize statistics object as squirrel table "statistics" */ - void serialize_to_squirrel(SquirrelVM& vm) const; + void serialize_to_squirrel(ssq::Table& table) const; /** unserialize statistics object from squirrel table "statistics" */ - void unserialize_from_squirrel(SquirrelVM& vm); + void unserialize_from_squirrel(const ssq::Table& table); void draw_worldmap_info(DrawingContext& context, float target_time); /**< draw worldmap stat HUD */ void draw_endseq_panel(DrawingContext& context, Statistics* best_stats, const SurfacePtr& backdrop, float target_time); /**< draw panel shown during level's end sequence */ diff --git a/src/supertux/title_screen.cpp b/src/supertux/title_screen.cpp index abaed5402e2..275913e9bd2 100644 --- a/src/supertux/title_screen.cpp +++ b/src/supertux/title_screen.cpp @@ -45,9 +45,6 @@ static const std::string DEFAULT_TITLE_LEVEL = "levels/misc/menu.stl"; -static const std::string TITLE_MUSIC = "music/misc/theme.music"; -static const std::string CHRISTMAS_TITLE_MUSIC = "music/misc/christmas_theme.music"; - TitleScreen::TitleScreen(Savegame& savegame, bool christmas) : m_savegame(savegame), m_christmas(christmas), @@ -75,6 +72,7 @@ void TitleScreen::leave() { m_titlesession->get_current_sector().deactivate(); + m_titlesession->leave(); MenuManager::instance().clear_menu_stack(); } @@ -148,7 +146,6 @@ void TitleScreen::setup_sector(Sector& sector) { auto& music = sector.get_singleton_by_type(); - music.set_music(m_christmas ? CHRISTMAS_TITLE_MUSIC : TITLE_MUSIC); music.resume_music(true); Player& player = *(sector.get_players()[0]); diff --git a/src/trigger/climbable.hpp b/src/trigger/climbable.hpp index c3214b61d4f..6ef3bffcaa9 100644 --- a/src/trigger/climbable.hpp +++ b/src/trigger/climbable.hpp @@ -46,6 +46,7 @@ class Climbable final : public Trigger static std::string display_name() { return _("Climbable"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return Trigger::get_class_types().add(typeid(Climbable)); } virtual ObjectSettings get_settings() override; diff --git a/src/trigger/door.hpp b/src/trigger/door.hpp index fe363954944..7b095c33157 100644 --- a/src/trigger/door.hpp +++ b/src/trigger/door.hpp @@ -30,6 +30,7 @@ class Door final : public SpritedTrigger virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Door"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return SpritedTrigger::get_class_types().add(typeid(Door)); } virtual ObjectSettings get_settings() override; virtual void after_editor_set() override; diff --git a/src/trigger/scripttrigger.hpp b/src/trigger/scripttrigger.hpp index 538990e8752..6b3276346b7 100644 --- a/src/trigger/scripttrigger.hpp +++ b/src/trigger/scripttrigger.hpp @@ -29,6 +29,7 @@ class ScriptTrigger final : public Trigger static std::string display_name() { return _("Script Trigger"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return Trigger::get_class_types().add(typeid(ScriptTrigger)); } virtual ObjectSettings get_settings() override; diff --git a/src/trigger/secretarea_trigger.hpp b/src/trigger/secretarea_trigger.hpp index a32a237b5bb..8473b06da0f 100644 --- a/src/trigger/secretarea_trigger.hpp +++ b/src/trigger/secretarea_trigger.hpp @@ -36,6 +36,7 @@ class SecretAreaTrigger final : public Trigger static std::string display_name() { return _("Secret Area"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return Trigger::get_class_types().add(typeid(SecretAreaTrigger)); } virtual ObjectSettings get_settings() override; diff --git a/src/trigger/sequence_trigger.hpp b/src/trigger/sequence_trigger.hpp index 4de2fcb446b..fdbd44cb04b 100644 --- a/src/trigger/sequence_trigger.hpp +++ b/src/trigger/sequence_trigger.hpp @@ -31,6 +31,7 @@ class SequenceTrigger final : public Trigger static std::string display_name() { return _("Sequence Trigger"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return Trigger::get_class_types().add(typeid(SequenceTrigger)); } virtual ObjectSettings get_settings() override; diff --git a/src/trigger/switch.hpp b/src/trigger/switch.hpp index 0a09d06eb73..a83e267d799 100644 --- a/src/trigger/switch.hpp +++ b/src/trigger/switch.hpp @@ -29,6 +29,7 @@ class Switch final : public StickyTrigger virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Switch"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return StickyTrigger::get_class_types().add(typeid(Switch)); } virtual ObjectSettings get_settings() override; diff --git a/src/trigger/text_area.hpp b/src/trigger/text_area.hpp index 0c0b3d9df31..e652afd2bc8 100644 --- a/src/trigger/text_area.hpp +++ b/src/trigger/text_area.hpp @@ -47,6 +47,7 @@ class TextArea final : public Trigger static std::string display_name() { return _("Text Area"); } virtual std::string get_display_name() const override { return display_name(); } virtual bool has_variable_size() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return Trigger::get_class_types().add(typeid(TextArea)); } private: bool m_once; diff --git a/src/trigger/trigger_base.hpp b/src/trigger/trigger_base.hpp index 211df6fdc28..f532d1a4cae 100644 --- a/src/trigger/trigger_base.hpp +++ b/src/trigger/trigger_base.hpp @@ -68,6 +68,7 @@ class Trigger : public MovingObject, { public: Trigger(const ReaderMapping& reader); + virtual GameObjectClasses get_class_types() const override { return MovingObject::get_class_types().add(typeid(TriggerBase)).add(typeid(Trigger)); } virtual void update(float) override { @@ -91,6 +92,7 @@ class SpritedTrigger : public MovingSprite, { public: SpritedTrigger(const ReaderMapping& reader, const std::string& sprite_name); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(TriggerBase)).add(typeid(SpritedTrigger)); } virtual void update(float) override { @@ -112,6 +114,7 @@ class StickyTrigger : public StickyObject, { public: StickyTrigger(const ReaderMapping& reader, const std::string& sprite_name); + virtual GameObjectClasses get_class_types() const override { return StickyObject::get_class_types().add(typeid(TriggerBase)).add(typeid(StickyTrigger)); } virtual void update(float dt_sec) override { diff --git a/src/video/drawing_context.cpp b/src/video/drawing_context.cpp index c33a6d6570f..66bbd62b9fc 100644 --- a/src/video/drawing_context.cpp +++ b/src/video/drawing_context.cpp @@ -133,4 +133,27 @@ DrawingContext::get_size() const return Vector(get_width(), get_height()) * transform().scale; } +bool +DrawingContext::perspective_scale(float speed_x, float speed_y) +{ + DrawingTransform& tfm = transform(); + if (tfm.scale == 1 || speed_x < 0 || speed_y < 0) { + //Trivial or unreal situation: Do not apply perspective. + return true; + } + const float speed = sqrt(speed_x * speed_y); + if (speed == 0) { + //Special case: The object appears to be infinitely far. + tfm.scale = 1.0; + return true; + } + const float t = tfm.scale * (1 / speed - 1) + 1; + if (t <= 0) { + //The object will appear behind the camera, therefore we shall not see it. + return false; + } + tfm.scale /= speed * t; + return true; +} + /* EOF */ diff --git a/src/video/drawing_context.hpp b/src/video/drawing_context.hpp index ad250db5756..737e7b8d16d 100644 --- a/src/video/drawing_context.hpp +++ b/src/video/drawing_context.hpp @@ -77,6 +77,9 @@ class DrawingContext final float get_scale() const { return transform().scale; } void scale(float scale) { transform().scale *= scale; } + + /** Recalculates the scaling factor for parallax layers.*/ + bool perspective_scale(float speed_x, float speed_y); /** Apply that flip in the next draws (flips are listed on surface.h). */ void set_flip(Flip flip); diff --git a/src/worldmap/level_tile.hpp b/src/worldmap/level_tile.hpp index 66e20c1337f..59cc80a7539 100644 --- a/src/worldmap/level_tile.hpp +++ b/src/worldmap/level_tile.hpp @@ -35,6 +35,7 @@ class LevelTile final : public WorldMapObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Level"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WorldMapObject::get_class_types().add(typeid(LevelTile)); } virtual ObjectSettings get_settings() override; diff --git a/src/worldmap/spawn_point.hpp b/src/worldmap/spawn_point.hpp index 3a664a1a48a..108eaa915d7 100644 --- a/src/worldmap/spawn_point.hpp +++ b/src/worldmap/spawn_point.hpp @@ -57,6 +57,7 @@ class SpawnPointObject final : public WorldMapObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Spawn point"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WorldMapObject::get_class_types().add(typeid(SpawnPointObject)); } virtual ObjectSettings get_settings() override; diff --git a/src/worldmap/special_tile.hpp b/src/worldmap/special_tile.hpp index fab8de59fca..902d37c835c 100644 --- a/src/worldmap/special_tile.hpp +++ b/src/worldmap/special_tile.hpp @@ -35,6 +35,7 @@ class SpecialTile final : public WorldMapObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Special Tile"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WorldMapObject::get_class_types().add(typeid(SpecialTile)); } virtual void draw_worldmap(DrawingContext& context) override; diff --git a/src/worldmap/sprite_change.hpp b/src/worldmap/sprite_change.hpp index e889b681066..4fa4fda3292 100644 --- a/src/worldmap/sprite_change.hpp +++ b/src/worldmap/sprite_change.hpp @@ -34,6 +34,7 @@ class SpriteChange final : public WorldMapObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Sprite Change"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WorldMapObject::get_class_types().add(typeid(SpriteChange)); } virtual void draw_worldmap(DrawingContext& context) override; diff --git a/src/worldmap/teleporter.hpp b/src/worldmap/teleporter.hpp index b35b43e6aa4..39c7ec8253e 100644 --- a/src/worldmap/teleporter.hpp +++ b/src/worldmap/teleporter.hpp @@ -33,6 +33,7 @@ class Teleporter final : public WorldMapObject virtual std::string get_class_name() const override { return class_name(); } static std::string display_name() { return _("Teleporter"); } virtual std::string get_display_name() const override { return display_name(); } + virtual GameObjectClasses get_class_types() const override { return WorldMapObject::get_class_types().add(typeid(Teleporter)); } virtual ObjectSettings get_settings() override; diff --git a/src/worldmap/tux.hpp b/src/worldmap/tux.hpp index 60031875974..4347fd3d1ac 100644 --- a/src/worldmap/tux.hpp +++ b/src/worldmap/tux.hpp @@ -39,6 +39,7 @@ class Tux final : public GameObject virtual void draw(DrawingContext& context) override; virtual void update(float dt_sec) override; virtual bool is_singleton() const override { return true; } + virtual GameObjectClasses get_class_types() const override { return GameObject::get_class_types().add(typeid(Tux)); } void setup(); /**< called prior to first update */ diff --git a/src/worldmap/world_select.cpp b/src/worldmap/world_select.cpp index 0e2220ee8c4..4d9aac46136 100644 --- a/src/worldmap/world_select.cpp +++ b/src/worldmap/world_select.cpp @@ -20,6 +20,7 @@ #include "control/controller.hpp" #include "math/util.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "supertux/constants.hpp" #include "supertux/fadetoblack.hpp" #include "supertux/resources.hpp" @@ -44,93 +45,91 @@ WorldSelect::WorldSelect(const std::string& current_world_filename) : m_angle(), m_bkg() { - std::vector worlds; - auto& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - - sq_pushroottable(vm.get_vm()); - try { - vm.get_table_entry("state"); - vm.get_table_entry("world_select"); - worlds = vm.get_table_keys(); - } catch(const std::exception&) {} - - if (worlds.size() > 0) - std::reverse(worlds.begin(), worlds.end()); - - // Only worlds with a set prefix, which also are numbered starting with 1, will be ordered properly. - // This is a probably a poor solution, but I can't think of any other. - Daniel - std::string prefix = ""; - vm.get_string("prefix", prefix); - if (!prefix.empty()) - { - for (int i = 0; unsigned(i) < worlds.size(); i++) - { - worlds[i] = prefix + std::to_string(i+1) + "/worldmap.stwm"; - } - } int i = 0; - for (const auto& world : worlds) { - sq_pushroottable(vm.get_vm()); - try { - vm.get_table_entry("state"); - vm.get_table_entry("world_select"); - vm.get_table_entry(world); - - bool unlocked = false; - vm.get_bool("unlocked", unlocked); - - WMdata wm; - wm.filename = world; - wm.unlocked = unlocked; - - ReaderDocument doc = ReaderDocument::from_file(world); - if (!doc.get_root().get_mapping().get("name", wm.name)) - { - log_warning << "No name for worldmap " << world << std::endl; - continue; - } + try + { + ssq::Table world_select = vm.findTable("state").findTable("world_select"); + std::vector worlds = world_select.getKeys(); - std::string icon_path = ""; - if (!doc.get_root().get_mapping().get(unlocked ? "icon" : "icon-locked", icon_path)) - { - log_warning << "No icon (" << (unlocked ? "unlocked" : "locked") << ") for worldmap " << world << std::endl; - continue; - } + if (!worlds.empty()) + std::reverse(worlds.begin(), worlds.end()); - wm.icon = Surface::from_file(icon_path); - if (!wm.icon) + // Only worlds with a set prefix, which also are numbered starting with 1, will be ordered properly. + // This is a probably a poor solution, but I can't think of any other. - Daniel + std::string prefix; + world_select.get("prefix", prefix); + if (!prefix.empty()) + { + for (size_t y = 0; y < worlds.size(); y++) { - log_warning << "Icon not found for worldmap " << world << ": " - << icon_path << std::endl; - continue; + worlds[y] = prefix + std::to_string(y + 1) + "/worldmap.stwm"; } + } - m_worlds.push_back(wm); - if (current_world_filename == world) + for (const std::string& world : worlds) + { + try { - m_current_world = i; + ssq::Table world_table = world_select.findTable(world.c_str()); + + bool unlocked = false; + world_table.get("unlocked", unlocked); - std::string bkg_path = ""; - if (doc.get_root().get_mapping().get("bkg", bkg_path)) + WMdata wm; + wm.filename = world; + wm.unlocked = unlocked; + + ReaderDocument doc = ReaderDocument::from_file(world); + if (!doc.get_root().get_mapping().get("name", wm.name)) { - m_bkg = Surface::from_file(bkg_path); + log_warning << "No name for worldmap " << world << std::endl; + continue; } - else + + std::string icon_path = ""; + if (!doc.get_root().get_mapping().get(unlocked ? "icon" : "icon-locked", icon_path)) { - m_bkg = Surface::from_file("/images/worlds/background/default.png"); + log_warning << "No icon (" << (unlocked ? "unlocked" : "locked") << ") for worldmap " << world << std::endl; + continue; } - } - i++; - } catch(const std::exception& e) { - log_info << "Exception thrown while generating world state: " << e.what() << std::endl; + wm.icon = Surface::from_file(icon_path); + if (!wm.icon) + { + log_warning << "Icon not found for worldmap " << world << ": " + << icon_path << std::endl; + continue; + } + + m_worlds.push_back(wm); + if (current_world_filename == world) + { + m_current_world = i; + + std::string bkg_path = ""; + if (doc.get_root().get_mapping().get("bkg", bkg_path)) + { + m_bkg = Surface::from_file(bkg_path); + } + else + { + m_bkg = Surface::from_file("/images/worlds/background/default.png"); + } + } + i++; + } + catch(const std::exception& e) + { + log_info << "Exception thrown while generating world state: " << e.what() << std::endl; + } } } - - sq_settop(vm.get_vm(), oldtop); + catch (const std::exception& err) + { + log_warning << "Couldn't load world select data: " << err.what() << std::endl; + } m_selected_world = m_current_world; m_angle = static_cast(m_current_world) / static_cast(i) * math::PI * 2; diff --git a/src/worldmap/worldmap_object.hpp b/src/worldmap/worldmap_object.hpp index 7d60963f188..9803e576d0a 100644 --- a/src/worldmap/worldmap_object.hpp +++ b/src/worldmap/worldmap_object.hpp @@ -36,6 +36,7 @@ class WorldMapObject : public MovingSprite WorldMapObject(const ReaderMapping& mapping, const std::string& default_sprite); WorldMapObject(const ReaderMapping& mapping); WorldMapObject(const Vector& pos, const std::string& default_sprite); + virtual GameObjectClasses get_class_types() const override { return MovingSprite::get_class_types().add(typeid(WorldMapObject)); } static std::string class_name() { return "worldmap-object"; } virtual std::string get_class_name() const override { return class_name(); } diff --git a/src/worldmap/worldmap_sector.cpp b/src/worldmap/worldmap_sector.cpp index 4244d155ade..c7d4ada2ca4 100644 --- a/src/worldmap/worldmap_sector.cpp +++ b/src/worldmap/worldmap_sector.cpp @@ -18,13 +18,15 @@ #include "worldmap/worldmap_sector.hpp" +#include +#include + #include "audio/sound_manager.hpp" #include "object/ambient_light.hpp" #include "object/display_effect.hpp" #include "object/music_object.hpp" #include "object/tilemap.hpp" #include "physfs/ifile_stream.hpp" -#include "scripting/worldmap_sector.hpp" #include "squirrel/squirrel_environment.hpp" #include "supertux/constants.hpp" #include "supertux/d_scope.hpp" @@ -130,7 +132,7 @@ WorldMapSector::setup() // register worldmap_table as "worldmap" in scripting m_squirrel_environment->expose_self(); - m_squirrel_environment->expose("settings", std::make_unique(this)); + m_squirrel_environment->expose(*this, "settings"); /** Perform scripting related actions. **/ // Run default.nut just before init script @@ -568,6 +570,24 @@ WorldMapSector::path_ok(const Direction& direction, const Vector& old_pos, Vecto } } +void +WorldMapSector::set_sector(const std::string& sector) +{ + m_parent.set_sector(sector); +} + +void +WorldMapSector::spawn(const std::string& sector, const std::string& spawnpoint) +{ + m_parent.set_sector(sector, spawnpoint); +} + +void +WorldMapSector::move_to_spawnpoint(const std::string& spawnpoint) +{ + move_to_spawnpoint(spawnpoint, false); +} + void WorldMapSector::move_to_spawnpoint(const std::string& spawnpoint, bool pan) { @@ -608,6 +628,45 @@ WorldMapSector::get_tux_pos() const return m_tux->get_pos(); } +float +WorldMapSector::get_tux_x() const +{ + return m_tux->get_pos().x; +} + +float +WorldMapSector::get_tux_y() const +{ + return m_tux->get_pos().y; +} + +std::string +WorldMapSector::get_filename() const +{ + return m_parent.get_filename(); +} + +void +WorldMapSector::set_title_level(const std::string& filename) +{ + m_parent.get_savegame().get_player_status().title_level = filename; +} + + +void +WorldMapSector::register_class(ssq::VM& vm) +{ + ssq::Class cls = vm.addAbstractClass("WorldMapSector", vm.findClass("GameObjectManager")); + + cls.addFunc("get_tux_x", &WorldMapSector::get_tux_x); + cls.addFunc("get_tux_y", &WorldMapSector::get_tux_y); + cls.addFunc("set_sector", &WorldMapSector::set_sector); + cls.addFunc("spawn", &WorldMapSector::spawn); + cls.addFunc("move_to_spawnpoint", &WorldMapSector::move_to_spawnpoint); + cls.addFunc("get_filename", &WorldMapSector::get_filename); + cls.addFunc("set_title_level", &WorldMapSector::set_title_level); +} + } // namespace worldmap /* EOF */ diff --git a/src/worldmap/worldmap_sector.hpp b/src/worldmap/worldmap_sector.hpp index 262b2f48e39..69134751877 100644 --- a/src/worldmap/worldmap_sector.hpp +++ b/src/worldmap/worldmap_sector.hpp @@ -36,6 +36,9 @@ class WorldMapSector final : public Base::Sector friend class WorldMapSectorParser; friend class WorldMapState; +public: + static void register_class(ssq::VM& vm); + public: static WorldMapSector* current(); @@ -45,16 +48,14 @@ class WorldMapSector final : public Base::Sector void finish_construction(bool editable) override; + std::string get_exposed_class_name() const override { return "WorldMapSector"; } + void setup(); void leave(); void draw(DrawingContext& context) override; void update(float dt_sec) override; - MovingObject& add_object_scripting(const std::string& class_name, const std::string& name, - const Vector& pos, const std::string& direction, - const std::string& data) override; - Vector get_next_tile(const Vector& pos, const Direction& direction) const; /** gets a bitfield of Tile::WORLDMAP_NORTH | Tile::WORLDMAP_WEST | @@ -97,16 +98,50 @@ class WorldMapSector final : public Base::Sector if possible, write the new position to \a new_pos */ bool path_ok(const Direction& direction, const Vector& old_pos, Vector* new_pos) const; - /** Moves Tux to the given spawnpoint - @param spawnpoint Name of the spawnpoint to move to - @param pan Pan the camera during to new spawnpoint */ - void move_to_spawnpoint(const std::string& spawnpoint, bool pan = false); - /** Sets the name of the tilemap that should fade when worldmap is set up. */ void set_initial_fade_tilemap(const std::string& tilemap_name, int direction); bool in_worldmap() const override { return true; } + /** + * Returns Tux's X position on the worldmap. + */ + float get_tux_x() const; + /** + * Returns Tux's Y position on the worldmap. + */ + float get_tux_y() const; + + /** + * Changes the current sector of the worldmap to a specified new sector. + * @param string $sector + */ + void set_sector(const std::string& sector); + /** + * Changes the current sector of the worldmap to a specified new sector, + moving Tux to the specified spawnpoint. + * @param string $sector + * @param string $spawnpoint + */ + void spawn(const std::string& sector, const std::string& spawnpoint); + /** + * Moves Tux to the specified spawnpoint. + * @param string $spawnpoint + */ + void move_to_spawnpoint(const std::string& spawnpoint); + void move_to_spawnpoint(const std::string& spawnpoint, bool pan); + + /** + * Gets the path to the worldmap file. Useful for saving worldmap-specific data. + */ + std::string get_filename() const; + /** + * Overrides the "Title Screen Level" property for the world with ""filename"". + The newly set level will be used for the title screen, after exiting the world. + * @param string $filename + */ + void set_title_level(const std::string& filename); + TileSet* get_tileset() const override; WorldMap& get_worldmap() const { return m_parent; } Camera& get_camera() const { return *m_camera; } @@ -114,6 +149,10 @@ class WorldMapSector final : public Base::Sector Vector get_tux_pos() const; protected: + MovingObject& add_object_scripting(const std::string& class_name, const std::string& name, + const Vector& pos, const std::string& direction, + const std::string& data) override; + void draw_status(DrawingContext& context); private: diff --git a/src/worldmap/worldmap_state.cpp b/src/worldmap/worldmap_state.cpp index 4961d21c78b..423bd21c79d 100644 --- a/src/worldmap/worldmap_state.cpp +++ b/src/worldmap/worldmap_state.cpp @@ -21,6 +21,7 @@ #include "math/vector.hpp" #include "object/music_object.hpp" #include "object/tilemap.hpp" +#include "squirrel/squirrel_virtual_machine.hpp" #include "squirrel/squirrel_util.hpp" #include "supertux/constants.hpp" #include "supertux/savegame.hpp" @@ -46,64 +47,63 @@ WorldMapState::load_state() { log_debug << "loading worldmap state" << std::endl; - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - SQInteger oldtop = sq_gettop(vm.get_vm()); - - try { - /** Get state table. **/ - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - + ssq::VM& vm = SquirrelVirtualMachine::current()->get_vm(); + try + { /** Get state table for all worldmaps. **/ - vm.get_table_entry("worlds"); + ssq::Table worlds_table = vm.findTable("state").findTable("worlds"); // If a non-canonical entry is present, replace it with a canonical one. const std::string old_map_filename = m_worldmap.m_map_filename.substr(1); - if (vm.has_property(old_map_filename.c_str())) - { - vm.rename_table_entry(old_map_filename.c_str(), m_worldmap.m_map_filename.c_str()); - } + if (worlds_table.hasEntry(old_map_filename.c_str())) + worlds_table.rename(old_map_filename.c_str(), m_worldmap.m_map_filename.c_str()); /** Get state table for the current worldmap. **/ - vm.get_table_entry(m_worldmap.m_map_filename); + ssq::Table worldmap_table = worlds_table.findTable(m_worldmap.m_map_filename.c_str()); // Load the current sector. - if (vm.has_property("sector")) // Load the current sector, only if a "sector" property exists. + ssq::Table sector_table; + if (worldmap_table.hasEntry("sector")) // Load the current sector only if a "sector" property exists. { - const std::string sector_name = vm.read_string("sector"); + const std::string sector_name = worldmap_table.get("sector"); if (!m_worldmap.m_sector) // If the worldmap doesn't have a current sector, try setting the new sector. m_worldmap.set_sector(sector_name, "", false); - WORLDMAP_STATE_SECTOR_GUARD; - /** Get state table for the current sector. **/ - vm.get_table_entry(sector.get_name().c_str()); + sector_table = worldmap_table.findTable(m_worldmap.get_sector().get_name().c_str()); } else // Sector property does not exist, which may indicate outdated save file. { if (!m_worldmap.m_sector) // If the worldmap doesn't have a current sector, try setting the main one. m_worldmap.set_sector(DEFAULT_SECTOR_NAME, "", false); + + sector_table = worldmap_table; } + if (!m_worldmap.m_sector) { // Quit loading worldmap state, if there is still no current sector loaded. throw std::runtime_error("No sector set."); } - - if (vm.has_property("music")) + + try { - const std::string music = vm.read_string("music"); + ssq::Object music = sector_table.find("music"); auto& music_object = m_worldmap.get_sector().get_singleton_by_type(); - music_object.set_music(music); + music_object.set_music(music.toString()); + } + catch (const ssq::NotFoundException&) + { + log_debug << "Could not find \"music\" in the worldmap sector state table." << std::endl; } /** Load objects. **/ - load_tux(); - load_levels(); - load_tilemap_visibility(); - load_sprite_change_objects(); + load_tux(sector_table); + load_levels(sector_table); + load_tilemap_visibility(sector_table); + load_sprite_change_objects(sector_table); } - catch (std::exception& err) + catch (const std::exception& err) { log_warning << "Not loading worldmap state: " << err.what() << std::endl; @@ -114,7 +114,6 @@ WorldMapState::load_state() // Create a new initial save. save_state(); } - sq_settop(vm.get_vm(), oldtop); m_worldmap.m_in_level = false; } @@ -122,109 +121,94 @@ WorldMapState::load_state() /** Load Tux **/ void -WorldMapState::load_tux() +WorldMapState::load_tux(const ssq::Table& table) { - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; + WorldMapSector& sector = m_worldmap.get_sector(); - vm.get_table_entry("tux"); + const ssq::Table tux = table.findTable("tux"); Vector p(0.0f, 0.0f); - if (!vm.get_float("x", p.x) || !vm.get_float("y", p.y)) + if (!tux.get("x", p.x) || !tux.get("y", p.y)) { log_warning << "Player position not set, respawning." << std::endl; sector.move_to_spawnpoint(DEFAULT_SPAWNPOINT_NAME); m_position_was_reset = true; } - std::string back_str = vm.read_string("back"); + + std::string back_str; + tux.get("back", back_str); sector.m_tux->m_back_direction = string_to_direction(back_str); sector.m_tux->set_tile_pos(p); int tile_data = sector.tile_data_at(p); - if (!( tile_data & ( Tile::WORLDMAP_NORTH | Tile::WORLDMAP_SOUTH | Tile::WORLDMAP_WEST | Tile::WORLDMAP_EAST ))) { + if (!(tile_data & (Tile::WORLDMAP_NORTH | Tile::WORLDMAP_SOUTH | Tile::WORLDMAP_WEST | Tile::WORLDMAP_EAST))) + { log_warning << "Player at illegal position " << p.x << ", " << p.y << " respawning." << std::endl; sector.move_to_spawnpoint(DEFAULT_SPAWNPOINT_NAME); m_position_was_reset = true; } - sq_pop(vm.get_vm(), 1); } /** Load levels **/ void -WorldMapState::load_levels() +WorldMapState::load_levels(const ssq::Table& table) { - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; + try + { + const ssq::Table levels_table = table.findTable("levels"); - vm.get_or_create_table_entry("levels"); - for (auto& level : sector.get_objects_by_type()) { - sq_pushstring(vm.get_vm(), level.get_level_filename().c_str(), -1); - if (SQ_SUCCEEDED(sq_get(vm.get_vm(), -2))) + for (auto& level_tile : m_worldmap.get_sector().get_objects_by_type()) { - bool solved = false; - vm.get_bool("solved", solved); - level.set_solved(solved); + try + { + const ssq::Table level = levels_table.findTable(level_tile.get_level_filename().c_str()); + + bool solved = false; + level.get("solved", solved); + level_tile.set_solved(solved); - bool perfect = false; - vm.get_bool("perfect", perfect); - level.set_perfect(perfect); + bool perfect = false; + level.get("perfect", perfect); + level_tile.set_perfect(perfect); - level.update_sprite_action(); - level.get_statistics().unserialize_from_squirrel(vm); - sq_pop(vm.get_vm(), 1); + level_tile.update_sprite_action(); + level_tile.get_statistics().unserialize_from_squirrel(level); + } + catch (const ssq::NotFoundException&) + { + // Level not saved. + } } } - sq_pop(vm.get_vm(), 1); + catch (const ssq::NotFoundException&) + { + // Level table not saved. + } } /** Load tilemap visibility **/ void -WorldMapState::load_tilemap_visibility() +WorldMapState::load_tilemap_visibility(const ssq::Table& table) { - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; + if (m_position_was_reset) return; + WorldMapSector& sector = m_worldmap.get_sector(); try { - if (!m_position_was_reset) + const std::map tilemaps = table.findTable("tilemaps").convertRaw(); + for (const auto& [key, value] : tilemaps) { - vm.get_table_entry("tilemaps"); - sq_pushnull(vm.get_vm()); // Null-iterator - while (SQ_SUCCEEDED(sq_next(vm.get_vm(), -2))) + TileMap* tilemap = sector.get_object_by_name(key); + if (tilemap) { - const char* key; // Name of specific tilemap table - if (SQ_SUCCEEDED(sq_getstring(vm.get_vm(), -2, &key))) - { - auto tilemap = sector.get_object_by_name(key); - if (tilemap != nullptr) - { - sq_pushnull(vm.get_vm()); // null iterator (inner); - while (SQ_SUCCEEDED(sq_next(vm.get_vm(), -2))) - { - const char* property_key; - if (SQ_SUCCEEDED(sq_getstring(vm.get_vm(), -2, &property_key))) - { - auto propKey = std::string(property_key); - if (propKey == "alpha") - { - float alpha_value = 1.0; - if (SQ_SUCCEEDED(sq_getfloat(vm.get_vm(), -1, &alpha_value))) - { - tilemap->set_alpha(alpha_value); - } - } - } - sq_pop(vm.get_vm(), 2); // Pop key/value from the stack - } - sq_pop(vm.get_vm(), 1); // Pop null iterator - } - } - sq_pop(vm.get_vm(), 2); // Pop key value pair from stack + const ssq::Table tilemap_table = value.toTable(); + + float alpha = 1.f; + tilemap_table.get("alpha", alpha); + tilemap->set_alpha(alpha); } - sq_pop(vm.get_vm(), 1); // Pop null - sq_pop(vm.get_vm(), 1); // leave tilemaps table } } - catch(const SquirrelError&) + catch (const ssq::Exception&) { // Failed to get tilemap entry. This could indicate // that no savable tilemaps have been found. In any @@ -234,40 +218,31 @@ WorldMapState::load_tilemap_visibility() /** Load sprite change objects **/ void -WorldMapState::load_sprite_change_objects() +WorldMapState::load_sprite_change_objects(const ssq::Table& table) { - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; + if (m_worldmap.get_sector().get_object_count() <= 0) return; - if (sector.get_object_count() > 0) + const ssq::Table sprite_changes = table.findTable("sprite-changes"); + for (auto& sc : m_worldmap.get_sector().get_objects_by_type()) { - vm.get_table_entry("sprite-changes"); - for (auto& sc : sector.get_objects_by_type()) + const std::string key = std::to_string(static_cast(sc.get_pos().x)) + "_" + + std::to_string(static_cast(sc.get_pos().y)); + + try { - auto key = std::to_string(int(sc.get_pos().x)) + "_" + - std::to_string(int(sc.get_pos().y)); - sq_pushstring(vm.get_vm(), key.c_str(), -1); - if (SQ_SUCCEEDED(sq_get(vm.get_vm(), -2))) { - bool show_stay_action = false; - if (!vm.get_bool("show-stay-action", show_stay_action)) - { - sc.clear_stay_action(/* propagate = */ false); - } - else - { - if (show_stay_action) - { - sc.set_stay_action(); - } - else - { - sc.clear_stay_action(/* propagate = */ false); - } - } - sq_pop(vm.get_vm(), 1); - } + const ssq::Table sprite_change = sprite_changes.findTable(key.c_str()); + + bool show_stay_action = false; + sprite_change.get("show-stay-action", show_stay_action); + if (show_stay_action) + sc.set_stay_action(); + else + sc.clear_stay_action(/* propagate = */ false); + } + catch (const ssq::NotFoundException&) + { + // Sprite change not saved. } - sq_pop(vm.get_vm(), 1); // Leave sprite change objects table. } } @@ -277,135 +252,72 @@ WorldMapState::save_state() const { WorldMapSector& sector = m_worldmap.get_sector(); - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm(); - SQInteger oldtop = sq_gettop(vm.get_vm()); - - try { - /** Get state table. **/ - sq_pushroottable(vm.get_vm()); - vm.get_table_entry("state"); - + ssq::VM& vm = SquirrelVirtualMachine::current()->get_vm(); + try + { /** Get or create state table for all worldmaps. **/ - vm.get_or_create_table_entry("worlds"); + ssq::Table worlds_table = vm.findTable("state").getOrCreateTable("worlds"); /** Get or create state table for the current worldmap. **/ - vm.get_or_create_table_entry(m_worldmap.m_map_filename); + ssq::Table worldmap_table = worlds_table.getOrCreateTable(m_worldmap.m_map_filename.c_str()); // Save the current sector. - vm.store_string("sector", sector.get_name()); + worldmap_table.set("sector", sector.get_name()); /** Delete the table entry for the current sector and construct a new one. **/ - vm.delete_table_entry(sector.get_name().c_str()); - vm.begin_table(sector.get_name().c_str()); + worldmap_table.remove(sector.get_name().c_str()); + ssq::Table sector_table = worldmap_table.addTable(sector.get_name().c_str()); + /** Save Music **/ auto& music_object = m_worldmap.get_sector().get_singleton_by_type(); - vm.store_string("music", music_object.get_music()); - - /** Save objects. **/ - save_tux(); - save_levels(); - save_tilemap_visibility(); - save_sprite_change_objects(); - - /** Push the current sector into the current worldmap table. **/ - vm.end_table(sector.get_name().c_str()); - } - catch (std::exception& err) - { - log_warning << "Failed to save worldmap state: " << err.what() << std::endl; - - sq_settop(vm.get_vm(), oldtop); - } - - sq_settop(vm.get_vm(), oldtop); - - m_worldmap.m_savegame.save(); -} + sector_table.set("music", music_object.get_music()); + /** Save Tux **/ + ssq::Table tux = sector_table.addTable("tux"); + tux.set("x", sector.m_tux->get_tile_pos().x); + tux.set("y", sector.m_tux->get_tile_pos().y); + tux.set("back", direction_to_string(sector.m_tux->m_back_direction)); -/** Save Tux **/ -void -WorldMapState::save_tux() const -{ - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; - - vm.begin_table("tux"); - vm.store_float("x", sector.m_tux->get_tile_pos().x); - vm.store_float("y", sector.m_tux->get_tile_pos().y); - vm.store_string("back", direction_to_string(sector.m_tux->m_back_direction)); - vm.end_table("tux"); -} - -/** Save levels **/ -void -WorldMapState::save_levels() const -{ - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; - - vm.begin_table("levels"); - for (const auto& level : sector.get_objects_by_type()) - { - vm.begin_table(level.get_level_filename().c_str()); - - vm.store_bool("solved", level.is_solved()); - vm.store_bool("perfect", level.is_perfect()); - - level.get_statistics().serialize_to_squirrel(vm); - vm.end_table(level.get_level_filename().c_str()); - } - vm.end_table("levels"); -} + /** Save levels **/ + ssq::Table levels = sector_table.addTable("levels"); + for (const auto& level_tile : m_worldmap.get_sector().get_objects_by_type()) + { + ssq::Table level = levels.addTable(level_tile.get_level_filename().c_str()); + level.set("solved", level_tile.is_solved()); + level.set("perfect", level_tile.is_perfect()); + level_tile.get_statistics().serialize_to_squirrel(level); + } -/** Save tilemap visibility **/ -void -WorldMapState::save_tilemap_visibility() const -{ - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; + /** Save tilemap visibility **/ + ssq::Table tilemaps = sector_table.addTable("tilemaps"); + for (auto& tilemap : m_worldmap.get_sector().get_objects_by_type<::TileMap>()) + { + if (!tilemap.get_name().empty()) + { + ssq::Table tilemap_table = tilemaps.addTable(tilemap.get_name().c_str()); + tilemap_table.set("alpha", tilemap.get_target_alpha()); + } + } - sq_pushstring(vm.get_vm(), "tilemaps", -1); - sq_newtable(vm.get_vm()); - for (auto& tilemap : sector.get_objects_by_type<::TileMap>()) - { - if (!tilemap.get_name().empty()) + /** Save sprite change objects **/ + if (m_worldmap.get_sector().get_object_count() > 0) { - sq_pushstring(vm.get_vm(), tilemap.get_name().c_str(), -1); - sq_newtable(vm.get_vm()); - vm.store_float("alpha", tilemap.get_target_alpha()); - if (SQ_FAILED(sq_createslot(vm.get_vm(), -3))) + ssq::Table sprite_changes = sector_table.addTable("sprite-changes"); + for (const auto& sc : m_worldmap.get_sector().get_objects_by_type()) { - throw std::runtime_error("failed to create '" + m_worldmap.m_name + "' table entry"); + const std::string key = std::to_string(static_cast(sc.get_pos().x)) + "_" + + std::to_string(static_cast(sc.get_pos().y)); + ssq::Table sprite_change = sprite_changes.addTable(key.c_str()); + sprite_change.set("show-stay-action", sc.show_stay_action()); } } } - if (SQ_FAILED(sq_createslot(vm.get_vm(), -3))) + catch (const std::exception& err) { - throw std::runtime_error("failed to create '" + m_worldmap.m_name + "' table entry"); + log_warning << "Failed to save worldmap state: " << err.what() << std::endl; } -} -/** Save sprite change objects **/ -void -WorldMapState::save_sprite_change_objects() const -{ - WORLDMAP_STATE_SQUIRREL_VM_GUARD; - WORLDMAP_STATE_SECTOR_GUARD; - - if (sector.get_object_count() > 0) - { - vm.begin_table("sprite-changes"); - for (const auto& sc : sector.get_objects_by_type()) - { - auto key = std::to_string(int(sc.get_pos().x)) + "_" + - std::to_string(int(sc.get_pos().y)); - vm.begin_table(key.c_str()); - vm.store_bool("show-stay-action", sc.show_stay_action()); - vm.end_table(key.c_str()); - } - vm.end_table("sprite-changes"); - } + m_worldmap.m_savegame.save(); } } // namespace worldmap diff --git a/src/worldmap/worldmap_state.hpp b/src/worldmap/worldmap_state.hpp index edaaac205ca..c0257d39a53 100644 --- a/src/worldmap/worldmap_state.hpp +++ b/src/worldmap/worldmap_state.hpp @@ -19,16 +19,11 @@ #ifndef HEADER_SUPERTUX_WORLDMAP_WORLDMAP_STATE_HPP #define HEADER_SUPERTUX_WORLDMAP_WORLDMAP_STATE_HPP -namespace worldmap { - -/** Macro to allow quick and easy access to the current Squirrel VM. **/ -#define WORLDMAP_STATE_SQUIRREL_VM_GUARD \ - SquirrelVM& vm = SquirrelVirtualMachine::current()->get_vm() - -/** Macro to allow quick and easy access to the current WorldMapSector. **/ -#define WORLDMAP_STATE_SECTOR_GUARD \ - WorldMapSector& sector = m_worldmap.get_sector() +namespace ssq { +class Table; +} // namespace ssq +namespace worldmap { class WorldMap; @@ -41,15 +36,10 @@ class WorldMapState final void save_state() const; private: - void load_tux(); - void load_levels(); - void load_tilemap_visibility(); - void load_sprite_change_objects(); - - void save_tux() const; - void save_levels() const; - void save_tilemap_visibility() const; - void save_sprite_change_objects() const; + void load_tux(const ssq::Table& table); + void load_levels(const ssq::Table& table); + void load_tilemap_visibility(const ssq::Table& table); + void load_sprite_change_objects(const ssq::Table& table); private: WorldMap& m_worldmap; diff --git a/tools/miniswig b/tools/miniswig deleted file mode 160000 index 2ea03004661..00000000000 --- a/tools/miniswig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ea030046610d3ee156e6c9c546f5b9c02fc24ef diff --git a/tools/scripting_docs_gen/class.hpp b/tools/scripting_docs_gen/class.hpp index 38b1a763bee..a19c353e327 100644 --- a/tools/scripting_docs_gen/class.hpp +++ b/tools/scripting_docs_gen/class.hpp @@ -17,38 +17,55 @@ #ifndef CLASS_HEADER #define CLASS_HEADER +#include #include #include struct Constant { - std::string type; - std::string name; - std::string description; + std::string type {}; + std::string name {}; + std::string initializer {}; + std::string description {}; +}; + +struct Variable +{ + std::string type {}; + std::string name {}; + std::string description {}; }; struct Parameter { - std::string type; - std::string name; - std::string description; + std::string type {}; + std::string name {}; + std::string description {}; }; struct Function { - std::string type; - std::string name; - std::string description; - std::vector parameters; + std::string type {}; + std::string name {}; + std::string description {}; + std::vector parameters {}; + + bool deprecated {}; + std::string deprecation_msg {}; }; struct Class { - std::string name; - std::string summary; - std::string instances; - std::vector constants; - std::vector functions; + std::string name {}; + std::string summary {}; + std::string instances {}; + std::vector constants {}; + std::vector variables {}; + std::vector functions {}; + + typedef std::map BaseClasses; + BaseClasses base_classes {}; + std::vector derived_classes {}; }; #endif diff --git a/tools/scripting_docs_gen/main.cpp b/tools/scripting_docs_gen/main.cpp index 8d806c7e170..04dd02e445a 100644 --- a/tools/scripting_docs_gen/main.cpp +++ b/tools/scripting_docs_gen/main.cpp @@ -72,20 +72,37 @@ int main(int argc, char** argv) const std::string filename = fspath.filename(); if (!(std::filesystem::is_regular_file(dir_entry) && - starts_with(filename, "classscripting_1_1"))) continue; // Make sure the current file is about "scripting" namespace member class + (starts_with(filename, "class") || starts_with(filename, "namespace")))) continue; // Make sure the current file is about a class or a namespace /** Read data from current XML class data file **/ tinyxml2::XMLDocument doc; doc.LoadFile(fspath.c_str()); - /** Parse the class and its functions **/ + /** Parse the class and its members **/ Class cl; // Store class data Parser::parse_compounddef(doc.RootElement(), cl); - if (cl.constants.empty() && cl.functions.empty()) continue; // If there are no constants or functions, do not create a file + if (cl.constants.empty() && cl.variables.empty() && cl.functions.empty()) continue; // If the class has no content, do not save it - // Save class, so it gets included in the home page - classes.push_back(cl); + // Save the class + classes.push_back(std::move(cl)); + } + + // Sort classes by their names (A-Z) + std::sort(classes.begin(), classes.end(), + [](const Class& lhs, const Class& rhs) { return lhs.name < rhs.name; }); + + /** Loop through all classes and write their data to files **/ + for (Class& cl : classes) + { + // Remove a few internal base classes + for (auto it = cl.base_classes.begin(); it != cl.base_classes.end();) + { + if (it->second == "ssq::ExposableClass" || it->second == "ExposableClass") + cl.base_classes.erase(it++); + else + ++it; + } /** Fill in the data in the provided page template file and save as new file. File entries to be replaced: @@ -107,7 +124,9 @@ int main(int argc, char** argv) // Entries replace(target_data, "${SRG_CLASSSUMMARY}", cl.summary, "None."); replace(target_data, "${SRG_CLASSINSTANCES}", cl.instances, "None."); + replace(target_data, "${SRG_CLASSINHERITANCE}", Writer::write_inheritance_list(classes, cl.base_classes, cl.derived_classes), "None."); replace(target_data, "${SRG_CLASSCONSTANTS}", Writer::write_constants_table(cl.constants), "None."); + replace(target_data, "${SRG_CLASSVARIABLES}", Writer::write_variables_table(cl.variables), "None."); replace(target_data, "${SRG_CLASSFUNCTIONS}", Writer::write_function_table(cl.functions), "None."); replace(target_data, "${SRG_CLASSNAME}", "`" + cl.name + "`"); regex_replace(target_data, std::regex("\\$\\{SRG_REF_(.+?)\\}"), Writer::write_class_ref("$1")); @@ -115,16 +134,14 @@ int main(int argc, char** argv) replace(target_data, "${SRG_NEWPARAGRAPH} ", "\r\n\r\n"); replace(target_data, "${SRG_TABLENEWPARAGRAPH}", "

"); replace(target_data, "\"\"", "`"); + replace(target_data, "NOTE:", "

**NOTE:**"); + replace(target_data, "Note:", "

**NOTE:**"); // Write to target file write_file(output_dir_path / std::filesystem::path("Scripting" + cl.name + ".md"), target_data); std::cout << "Generated reference for class \"" << cl.name << "\"." << std::endl; } - // Sort classes by their names (A-Z) - std::sort(classes.begin(), classes.end(), - [](const Class& lhs, const Class& rhs) { return lhs.name < rhs.name; }); - /** Fill in the data in the provided home page template file and save as new file. File entries to be replaced: "${SRG_CLASSLIST}": Insert a list with all classes which have been parsed. diff --git a/tools/scripting_docs_gen/parser.cpp b/tools/scripting_docs_gen/parser.cpp index d0beb8ae0cc..460dbf6183f 100644 --- a/tools/scripting_docs_gen/parser.cpp +++ b/tools/scripting_docs_gen/parser.cpp @@ -18,12 +18,47 @@ #include #include +#include #include "util.hpp" namespace Parser { -Class* cl = nullptr; +// Simplified versions of various C++ types for easier understanding +static const std::unordered_map s_simplified_types = { + { "SQInteger", "ANY" }, // SQInteger is used internally with Squirrel, so we don't know the exact return type + { "char", "int" }, + { "signed char", "int" }, + { "short", "int" }, + { "long", "int" }, + { "unsigned char", "int" }, + { "unsigned short", "int" }, + { "unsigned int", "int" }, + { "unsigned long", "int" }, + { "uint8_t", "int" }, + { "uint16_t", "int" }, + { "uint32_t", "int" }, + { "long long", "int" }, + { "unsigned long long", "int" }, + { "double", "float" }, + { "std::string", "string" }, + { "std::wstring", "string" } +}; + +static void parse_base_classes(tinyxml2::XMLElement* p_inheritancenode, tinyxml2::XMLElement* p_inheritancegraph, Class::BaseClasses& list) +{ + list[std::stoi(p_inheritancenode->FindAttribute("id")->Value())] = p_inheritancenode->FirstChildElement("label")->GetText(); + + tinyxml2::XMLElement* p_childnode = p_inheritancenode->FirstChildElement("childnode"); + while (p_childnode) + { + tinyxml2::XMLElement* p_childinheritancenode = first_child_with_attribute(p_inheritancegraph, "node", "id", p_childnode->FindAttribute("refid")->Value()); + if (p_childinheritancenode) + parse_base_classes(p_childinheritancenode, p_inheritancegraph, list); + + p_childnode = p_childnode->NextSiblingElement("childnode"); + } +} void parse_compounddef(tinyxml2::XMLElement* p_root, Class& cls) @@ -31,15 +66,35 @@ void parse_compounddef(tinyxml2::XMLElement* p_root, Class& cls) tinyxml2::XMLElement* p_compounddef = p_root->FirstChildElement("compounddef"); // Get general class info - cls.name = p_compounddef->FirstChildElement("compoundname")->GetText(); - replace(cls.name, "scripting::", ""); // Leave only the class name + const char* name = p_compounddef->FirstChildElement("compoundname")->GetText(); + if (!name) return; // Some namespaces may not have a name. Don't include those. + cls.name = name; + + // Leave only the class name + const size_t pos = cls.name.find_last_of("::"); + if (pos != std::string::npos) + cls.name.erase(0, pos + 1); // Get additional info tinyxml2::XMLElement* p_detaileddescpara = p_compounddef->FirstChildElement("detaileddescription")->FirstChildElement("para"); if (p_detaileddescpara) // Detailed description (possibly containing additional info) is available { + // Check whether the class is marked with "@scripting". Otherwise, do not include. + bool include = false; tinyxml2::XMLElement* p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); while (p_xrefsect) + { + if (el_equal(p_xrefsect, "xreftitle", "Scripting")) + { + include = true; + break; + } + p_xrefsect = p_xrefsect->NextSiblingElement("xrefsect"); + } + if (!include) return; + + p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); + while (p_xrefsect) { // Check if the "xrefsect" title matches any of the additional info titles const std::string title = p_xrefsect->FirstChildElement("xreftitle")->GetText(); @@ -52,94 +107,271 @@ void parse_compounddef(tinyxml2::XMLElement* p_root, Class& cls) } } - cl = &cls; - parse_sectiondef(p_compounddef); - cl = nullptr; + parse_sectiondef(p_compounddef, cls); + + tinyxml2::XMLElement* p_inheritancegraph = p_compounddef->FirstChildElement("inheritancegraph"); + if (p_inheritancegraph) + { + // Get base classes + tinyxml2::XMLElement* p_inheritancenode = first_child_with_attribute(p_inheritancegraph, "node", "id", "1"); + if (p_inheritancenode) + parse_base_classes(p_inheritancenode, p_inheritancegraph, cls.base_classes); + + cls.base_classes.erase(1); // The node with an ID of "1" is this class + + // Get derived (child) classes + p_inheritancenode = p_inheritancegraph->FirstChildElement("node"); + while (p_inheritancenode) + { + const int id = std::stoi(p_inheritancenode->FindAttribute("id")->Value()); + if (id != 1 && cls.base_classes.find(id) == cls.base_classes.end()) // Make sure this is not this class, or a base class + { + std::string name = p_inheritancenode->FirstChildElement("label")->GetText(); + + // Leave only the class name + const size_t pos = name.find_last_of("::"); + if (pos != std::string::npos) + name.erase(0, pos + 1); + + cls.derived_classes.push_back(name); + } + + p_inheritancenode = p_inheritancenode->NextSiblingElement("node"); + } + std::sort(cls.derived_classes.begin(), cls.derived_classes.end()); // Sort A-Z + cls.derived_classes.erase(std::unique(cls.derived_classes.begin(), cls.derived_classes.end()), cls.derived_classes.end()); // Remove duplicates + } } -void parse_sectiondef(tinyxml2::XMLElement* p_compounddef) +void parse_sectiondef(tinyxml2::XMLElement* p_compounddef, Class& cls) { - if (!cl) return; - tinyxml2::XMLElement* p_sectiondef = p_compounddef->FirstChildElement("sectiondef"); while (p_sectiondef) { - if (attr_equal(p_sectiondef, "kind", "public-func") || - attr_equal(p_sectiondef, "kind", "public-static-attrib")) // Is public, contains public class functions or static attributes - { - parse_memberdef(p_sectiondef); - } + parse_memberdef(p_sectiondef, cls); + p_sectiondef = p_sectiondef->NextSiblingElement("sectiondef"); } } -void parse_memberdef(tinyxml2::XMLElement* p_sectiondef) +void parse_memberdef(tinyxml2::XMLElement* p_sectiondef, Class& cls) { - if (!cl) return; - tinyxml2::XMLElement* p_memberdef = p_sectiondef->FirstChildElement("memberdef"); while (p_memberdef) { if (attr_equal(p_memberdef, "kind", "function") && - attr_equal(p_memberdef, "static", "no") && - !el_equal(p_memberdef, "type", "")) // Try searching for non-static, typed functions + //!el_equal(p_memberdef, "type", "") && + !p_memberdef->FirstChildElement("reimplements")) // Look for non-derived typed functions + { + parse_function(p_memberdef, cls); + } + else if (attr_equal(p_memberdef, "kind", "enum")) // Look for enumerators { - /** Parse the function **/ - Function func; - - // Get general info - func.type = p_memberdef->FirstChildElement("type")->GetText(); - func.name = p_memberdef->FirstChildElement("name")->GetText(); - if (starts_with(func.name, cl->name + "_")) // If function name starts with the string "{CLASS}_", remove it - func.name.erase(0, cl->name.size() + 1); - tinyxml2::XMLElement* p_descpara = p_memberdef->FirstChildElement("briefdescription")->FirstChildElement("para"); tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); - if (p_descpara) // Brief description has been provided + if (p_detaileddescpara) { - XMLTextReader read(func.description); - p_descpara->Accept(&read); + bool include = false; + std::string prefix; + + tinyxml2::XMLElement* p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); + while (p_xrefsect) + { + if (el_equal(p_xrefsect, "xreftitle", "Scripting")) // Make sure the enum is marked with "@scripting". Otherwise, do not include. + include = true; + else if (el_equal(p_xrefsect, "xreftitle", "Prefix")) + parse_xrefsect_desc(p_xrefsect, prefix); + + p_xrefsect = p_xrefsect->NextSiblingElement("xrefsect"); + } + if (include) + { + tinyxml2::XMLElement* p_enumvalue = p_memberdef->FirstChildElement("enumvalue"); + while (p_enumvalue) + { + parse_constant(p_enumvalue, cls, true, prefix); // Parse enumerators as constants + + p_enumvalue = p_enumvalue->NextSiblingElement("enumvalue"); + } + } } - if (p_detaileddescpara && p_detaileddescpara->GetText()) // The description may also continue in the detailed description. Check if more text is available. - func.description += p_detaileddescpara->GetText(); + } + else if (attr_equal(p_memberdef, "kind", "variable") && + !el_equal(p_memberdef, "type", "")) // Look for variables + { + if (starts_with(p_memberdef->FirstChildElement("type")->GetText(), "const ")) // Constant variable + parse_constant(p_memberdef, cls); + else // Non-constant variable + parse_variable(p_memberdef, cls); + } + p_memberdef = p_memberdef->NextSiblingElement("memberdef"); + } +} - /** Parse function parameters **/ - parse_parameterlist(p_memberdef, func); - // Add to function list - cl->functions.push_back(func); +void parse_constant(tinyxml2::XMLElement* p_memberdef, Class& cls, bool include, const std::string& prefix) +{ + /** Parse the constant **/ + Constant con; + + // Get general info + tinyxml2::XMLElement* p_type = p_memberdef->FirstChildElement("type"); + if (p_type) + { + con.type = p_type->GetText(); + con.type.erase(0, 6); // Remove the "const " part from the type string + } + else // Would indicate this is an enumerator + { + con.type = "int"; + } + con.name = p_memberdef->FirstChildElement("name")->GetText(); + if (starts_with(con.name, "s_")) + con.name.erase(0, 2); // Remove the "s_" prefix + con.name = prefix + con.name; + tinyxml2::XMLElement* p_initializer = p_memberdef->FirstChildElement("initializer"); + if (p_initializer) + con.initializer = p_initializer->GetText(); + tinyxml2::XMLElement* p_descpara = p_memberdef->FirstChildElement("briefdescription")->FirstChildElement("para"); + tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); + + if (p_detaileddescpara) + { + tinyxml2::XMLElement* p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); + while (p_xrefsect) + { + if (el_equal(p_xrefsect, "xreftitle", "Scripting")) // Make sure the constant is marked with "@scripting". Otherwise, do not include. + include = true; + else if (el_equal(p_xrefsect, "xreftitle", "Description")) + parse_xrefsect_desc(p_xrefsect, con.description); + + p_xrefsect = p_xrefsect->NextSiblingElement("xrefsect"); } - else if (attr_equal(p_memberdef, "kind", "variable") && - !el_equal(p_memberdef, "type", "") && - starts_with(p_memberdef->FirstChildElement("type")->GetText(), "const ")) // Otherwise, try searching for constant variables + if (!include) return; + + if (p_descpara) // Brief description has been provided { - /** Parse the constant **/ - Constant con; - - // Get general info - con.type = p_memberdef->FirstChildElement("type")->GetText(); - con.type.erase(0, 6); // Remove the "const " part from the type string - con.name = p_memberdef->FirstChildElement("name")->GetText(); - tinyxml2::XMLElement* p_descpara = p_memberdef->FirstChildElement("briefdescription")->FirstChildElement("para"); - tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); + XMLTextReader read(con.description); + p_descpara->Accept(&read); + } + + // Add to constants list + cls.constants.push_back(std::move(con)); + } +} + +void parse_variable(tinyxml2::XMLElement* p_memberdef, Class& cls) +{ + /** Parse the variable **/ + Variable var; + + // Get general info + var.type = p_memberdef->FirstChildElement("type")->GetText(); + var.name = p_memberdef->FirstChildElement("name")->GetText(); + if (starts_with(var.name, "m_")) + var.name.erase(0, 2); // Remove the "m_" prefix + tinyxml2::XMLElement* p_descpara = p_memberdef->FirstChildElement("briefdescription")->FirstChildElement("para"); + tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); + + if (p_detaileddescpara) + { + bool include = false; + tinyxml2::XMLElement* p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); + while (p_xrefsect) + { + if (el_equal(p_xrefsect, "xreftitle", "Scripting")) // Make sure the variable is marked with "@scripting". Otherwise, do not include. + include = true; + else if (el_equal(p_xrefsect, "xreftitle", "Description")) + parse_xrefsect_desc(p_xrefsect, var.description); + + p_xrefsect = p_xrefsect->NextSiblingElement("xrefsect"); + } + if (!include) return; + + if (p_descpara) // Brief description has been provided + { + XMLTextReader read(var.description); + p_descpara->Accept(&read); + } + + // Add to variables list + cls.variables.push_back(std::move(var)); + } +} + +void parse_function(tinyxml2::XMLElement* p_memberdef, Class& cls) +{ + /** Parse the function **/ + Function func; + + // Get general info + const char* type = p_memberdef->FirstChildElement("type")->GetText(); + if (type) + { + func.type = type; + + // Replace type with simplified version, if available + const auto it = s_simplified_types.find(func.type); + if (it != s_simplified_types.end()) + func.type = it->second; + } + else + { + func.type = "void"; + } + func.name = p_memberdef->FirstChildElement("name")->GetText(); + + tinyxml2::XMLElement* p_descpara = p_memberdef->FirstChildElement("briefdescription")->FirstChildElement("para"); + tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); + + if (p_detaileddescpara) + { + bool include = false; + tinyxml2::XMLElement* p_xrefsect = p_detaileddescpara->FirstChildElement("xrefsect"); + while (p_xrefsect) + { + if (el_equal(p_xrefsect, "xreftitle", "Scripting")) // Make sure the function is marked with "@scripting". Otherwise, do not include. + include = true; + else if (el_equal(p_xrefsect, "xreftitle", "Deprecated")) + { + func.deprecated = true; + parse_xrefsect_desc(p_xrefsect, func.deprecation_msg); + } + else if (el_equal(p_xrefsect, "xreftitle", "Description")) + parse_xrefsect_desc(p_xrefsect, func.description); + + p_xrefsect = p_xrefsect->NextSiblingElement("xrefsect"); + } + if (include) + { + tinyxml2::XMLElement* p_simplesect = p_detaileddescpara->FirstChildElement("simplesect"); + while (p_simplesect) + { + if (attr_equal(p_simplesect, "kind", "return")) // Custom return type specified + { + func.type = p_simplesect->FirstChildElement("para")->GetText(); + func.type.pop_back(); // Remove space at the end + break; + } + p_simplesect = p_simplesect->NextSiblingElement("simplesect"); + } + if (p_descpara) // Brief description has been provided { - XMLTextReader read(con.description); + XMLTextReader read(func.description); p_descpara->Accept(&read); } - if (p_detaileddescpara && p_detaileddescpara->GetText()) // The description may also continue in the detailed description. Check if more text is available. - con.description += p_detaileddescpara->GetText(); - // Add to constants list - cl->constants.push_back(con); + /** Parse function parameters **/ + parse_parameterlist(p_memberdef, func); + + // Add to function list + cls.functions.push_back(std::move(func)); } - p_memberdef = p_memberdef->NextSiblingElement("memberdef"); } } void parse_parameterlist(tinyxml2::XMLElement* p_memberdef, Function& func) { - if (!cl) return; - tinyxml2::XMLElement* p_detaileddescpara = p_memberdef->FirstChildElement("detaileddescription")->FirstChildElement("para"); if (!p_detaileddescpara) return; // There is no detailed description, hence no parameter list @@ -171,7 +403,7 @@ void parse_parameterlist(tinyxml2::XMLElement* p_memberdef, Function& func) } // Add to parameter list - func.parameters.push_back(param); + func.parameters.push_back(std::move(param)); p_parameteritem = p_parameteritem->NextSiblingElement("parameteritem"); } diff --git a/tools/scripting_docs_gen/parser.hpp b/tools/scripting_docs_gen/parser.hpp index 52c67cccba0..3fd1970863a 100644 --- a/tools/scripting_docs_gen/parser.hpp +++ b/tools/scripting_docs_gen/parser.hpp @@ -25,11 +25,13 @@ namespace Parser { - extern Class* cl; // Set by "parse_compounddef()" so it can be accessed by the other functions. - void parse_compounddef(tinyxml2::XMLElement* p_root, Class& cls); - void parse_sectiondef(tinyxml2::XMLElement* p_compounddef); - void parse_memberdef(tinyxml2::XMLElement* p_sectiondef); + void parse_sectiondef(tinyxml2::XMLElement* p_compounddef, Class& cls); + void parse_memberdef(tinyxml2::XMLElement* p_sectiondef, Class& cls); + + void parse_constant(tinyxml2::XMLElement* p_memberdef, Class& cls, bool include = false, const std::string& prefix = {}); + void parse_variable(tinyxml2::XMLElement* p_memberdef, Class& cls); + void parse_function(tinyxml2::XMLElement* p_memberdef, Class& cls); void parse_parameterlist(tinyxml2::XMLElement* p_memberdef, Function& func); void parse_xrefsect_desc(tinyxml2::XMLElement* p_xrefsect, std::string& dest); diff --git a/tools/scripting_docs_gen/util.cpp b/tools/scripting_docs_gen/util.cpp index af7db7c8723..3f6a3110141 100644 --- a/tools/scripting_docs_gen/util.cpp +++ b/tools/scripting_docs_gen/util.cpp @@ -34,13 +34,15 @@ bool starts_with(const std::string& str, const std::string& prefix) } void replace(std::string& str, const std::string& from, - const std::string to, const std::string to_if_empty) + const std::string& to, const std::string& to_if_empty) { + const std::string& to_str = to.empty() ? to_if_empty : to; + size_t start_pos = str.find(from); while (start_pos != std::string::npos) { - str.replace(start_pos, from.length(), to.empty() ? to_if_empty : to); - start_pos = str.find(from); + str.replace(start_pos, from.length(), to_str); + start_pos = str.find(from, start_pos + to_str.length()); } } @@ -70,12 +72,35 @@ void write_file(const std::string& path, const std::string& content) bool attr_equal(tinyxml2::XMLElement* el, const char* attr, const std::string& rhs) { - const char* val = el->FindAttribute(attr)->Value(); + const tinyxml2::XMLAttribute* attr_obj = el->FindAttribute(attr); + if (!attr_obj) return false; + + const char* val = attr_obj->Value(); return val == NULL ? rhs.empty() : std::string(val) == rhs; } bool el_equal(tinyxml2::XMLElement* el, const char* child_el, const std::string& rhs) { - const char* text = el->FirstChildElement(child_el)->GetText(); + const tinyxml2::XMLElement* child_el_obj = el->FirstChildElement(child_el); + if (!child_el_obj) return false; + + const char* text = child_el_obj->GetText(); return text == NULL ? rhs.empty() : std::string(text) == rhs; } + + +tinyxml2::XMLElement* first_child_with_attribute(tinyxml2::XMLElement* el, + const char* child_name, + const char* child_attr, + const std::string& child_attr_val) +{ + tinyxml2::XMLElement* child_el = el->FirstChildElement(child_name); + while (child_el) + { + if (attr_equal(child_el, child_attr, child_attr_val)) + return child_el; + + child_el = child_el->NextSiblingElement(child_name); + } + return nullptr; +} diff --git a/tools/scripting_docs_gen/util.hpp b/tools/scripting_docs_gen/util.hpp index 470a5822cc4..92dc786be8d 100644 --- a/tools/scripting_docs_gen/util.hpp +++ b/tools/scripting_docs_gen/util.hpp @@ -28,7 +28,7 @@ bool param_matches(int argc, char** argv, int i, bool starts_with(const std::string& str, const std::string& prefix); void replace(std::string& str, const std::string& from, - const std::string to, const std::string to_if_empty = ""); + const std::string& to, const std::string& to_if_empty = ""); void regex_replace(std::string& str, const std::regex from, const std::string& to); @@ -38,6 +38,10 @@ void write_file(const std::string& path, const std::string& content); bool attr_equal(tinyxml2::XMLElement* el, const char* attr, const std::string& rhs); bool el_equal(tinyxml2::XMLElement* el, const char* child_el, const std::string& rhs); +tinyxml2::XMLElement* first_child_with_attribute(tinyxml2::XMLElement* el, + const char* child_name, + const char* child_attr, + const std::string& child_attr_val); // XML text reader, which is able to read text from all child nodes. class XMLTextReader : public tinyxml2::XMLVisitor diff --git a/tools/scripting_docs_gen/writer.cpp b/tools/scripting_docs_gen/writer.cpp index 2ed2658119d..daa5a06b118 100644 --- a/tools/scripting_docs_gen/writer.cpp +++ b/tools/scripting_docs_gen/writer.cpp @@ -26,7 +26,7 @@ std::string write_file_notice(const std::string& template_file) { std::stringstream notice; - notice << "> Note: This file is auto-generated from the [SuperTux scripting interface source code](https://github.com/SuperTux/supertux/tree/master/src/scripting), " + notice << "> This file is auto-generated from the [SuperTux source code](https://github.com/SuperTux/supertux/tree/master/src), " << "using the template [" << template_file << "](https://github.com/SuperTux/wiki/tree/master/templates/" << template_file << ")." << std::endl << std::endl; @@ -34,6 +34,42 @@ std::string write_file_notice(const std::string& template_file) } +std::string write_inheritance_list(const std::vector& classes, + const Class::BaseClasses& base_classes, + const std::vector& derived_classes) +{ + std::stringstream list; + + if (!base_classes.empty()) + { + list << "This class inherits functions and variables from the following base classes:" << std::endl; + // List of all base classes + for (const auto& [_, base_class] : base_classes) + { + // Check whether the current class is documented + const bool documented = std::any_of(classes.begin(), classes.end(), [base_class](const Class& cl) { return cl.name == base_class; }); + + list << "* " << (documented ? write_class_ref(base_class) : base_class) << std::endl; + } + if (!derived_classes.empty()) + list << std::endl; + } + if (!derived_classes.empty()) + { + list << "The following classes inherit functions and variables from this class:" << std::endl; + // List of all derived classes + for (const std::string& derived_class : derived_classes) + { + // Check whether the current class is documented + const bool documented = std::any_of(classes.begin(), classes.end(), [derived_class](const Class& cl) { return cl.name == derived_class; }); + + list << "* " << (documented ? write_class_ref(derived_class) : derived_class) << std::endl; + } + } + + return list.str(); +} + std::string write_constants_table(const std::vector& constants) { if (constants.empty()) return ""; @@ -45,9 +81,29 @@ std::string write_constants_table(const std::vector& constants) table << "---------|---------" << std::endl; // Table contents (constants) for (const Constant& con : constants) + { + // Print out type, name, initializer (if available) and description + table << "`" << con.type << " " << con.name << (con.initializer.empty() ? "" : " " + con.initializer) + << "` | " << con.description << std::endl; + } + + return table.str(); +} + +std::string write_variables_table(const std::vector& variables) +{ + if (variables.empty()) return ""; + + std::stringstream table; + + // Table beginning + table << "Variable | Explanation" << std::endl; + table << "---------|---------" << std::endl; + // Table contents (variables) + for (const Variable& var : variables) { // Print out type, name and description - table << "`" << con.type << " " << con.name << "` | " << con.description << std::endl; + table << "`" << var.type << " " << var.name << "` | " << var.description << std::endl; } return table.str(); @@ -66,7 +122,7 @@ std::string write_function_table(const std::vector& functions) for (const Function& func : functions) { // Print out function - table << "`" << func.name << "("; + table << "`" << func.type << " " << func.name << "("; for (size_t i = 0; i < func.parameters.size(); i++) { if (i != 0) table << ", "; @@ -75,15 +131,33 @@ std::string write_function_table(const std::vector& functions) table << ")`"; // Print out description of function - table << " | " << func.description; + table << " | "; + if (func.deprecated) + { + table << "**Deprecated!**"; + if (!func.deprecation_msg.empty()) + table << " " << func.deprecation_msg; + + // Add line breaks only if a description is available + if (!func.description.empty()) + table << "

"; + } + table << func.description; // Print out descriptions of parameters - bool has_printed_param_desc = false; - for (const Parameter& param : func.parameters) + if (std::any_of(func.parameters.begin(), func.parameters.end(), [](const Parameter& param) { return !param.description.empty(); })) { - if (param.description.empty()) continue; - table << (has_printed_param_desc ? "" : "
") << "
`" << param.name << "` - " << param.description; - has_printed_param_desc = true; + if (!func.deprecation_msg.empty() || !func.description.empty()) + table << "

"; + + bool has_printed_param_desc = false; + for (const Parameter& param : func.parameters) + { + if (param.description.empty()) continue; + + table << (has_printed_param_desc ? "
" : "") << " `" << param.name << "` - " << param.description; + has_printed_param_desc = true; + } } // End table entry diff --git a/tools/scripting_docs_gen/writer.hpp b/tools/scripting_docs_gen/writer.hpp index df8bea8a73b..a1e69fa4096 100644 --- a/tools/scripting_docs_gen/writer.hpp +++ b/tools/scripting_docs_gen/writer.hpp @@ -26,7 +26,11 @@ namespace Writer { std::string write_file_notice(const std::string& template_file); + std::string write_inheritance_list(const std::vector& classes, + const Class::BaseClasses& base_classes, + const std::vector& derived_classes); std::string write_constants_table(const std::vector& constants); + std::string write_variables_table(const std::vector& variables); std::string write_function_table(const std::vector& functions); std::string write_class_list(const std::vector& classes);