From 885b56b3dcaabeaceac994d5d9d63c67c9f4bc4b Mon Sep 17 00:00:00 2001 From: DepressedTWM Date: Sat, 1 Aug 2026 00:10:23 +0400 Subject: [PATCH] Test --- CMakeLists.txt | 20 ++--- MODDING.md | 1 + changelogs/0.1.2.txt | 1 - make-oneshot-linux.sh | 2 +- make-oneshot-mac.command | 38 +++------ src/aldatasource.h | 2 +- src/bitmap.h | 2 +- src/boost-hash.h | 2 +- src/config.cpp | 2 +- src/config.h | 2 +- src/debugwriter.h | 2 +- src/disposable.h | 2 +- src/etc-internal.h | 2 +- src/etc.cpp | 2 +- src/etc.h | 2 +- src/eventthread.cpp | 2 +- src/eventthread.h | 2 +- src/exception.h | 2 +- src/filesystem.cpp | 2 +- src/filesystem.h | 2 +- src/flashable.h | 2 +- src/font.cpp | 2 +- src/font.h | 2 +- src/gl-debug.cpp | 2 +- src/gl-debug.h | 2 +- src/gl-fun.cpp | 2 +- src/gl-fun.h | 2 +- src/gl-meta.cpp | 2 +- src/gl-meta.h | 2 +- src/gl-util.h | 2 +- src/global-ibo.h | 2 +- src/glstate.cpp | 2 +- src/glstate.h | 2 +- src/graphics.cpp | 2 +- src/graphics.h | 2 +- src/input.cpp | 2 +- src/input.h | 2 +- src/intrulist.h | 2 +- src/keybindings.cpp | 2 +- src/keybindings.h | 2 +- src/main.cpp | 2 +- src/plane.cpp | 2 +- src/plane.h | 2 +- src/quad.h | 2 +- src/quadarray.h | 2 +- src/rgssad.cpp | 2 +- src/rgssad.h | 2 +- src/scene.cpp | 2 +- src/scene.h | 2 +- src/sdlsoundsource.cpp | 2 +- src/serial-util.h | 2 +- src/serializable.h | 2 +- src/shader.cpp | 2 +- src/shader.h | 2 +- src/sharedstate.cpp | 2 +- src/sharedstate.h | 2 +- src/signals/signal.h | 2 +- src/signals/signalconnection.h | 3 +- src/soundemitter.cpp | 2 +- src/soundemitter.h | 2 +- src/sprite.cpp | 2 +- src/sprite.h | 2 +- src/table.cpp | 2 +- src/table.h | 2 +- src/texpool.cpp | 2 +- src/texpool.h | 2 +- src/tileatlas.cpp | 2 +- src/tileatlas.h | 2 +- src/tilemap-common.h | 2 +- src/tilemap.cpp | 2 +- src/tilemap.h | 2 +- src/tilequad.cpp | 2 +- src/tilequad.h | 2 +- src/transform.h | 2 +- src/util.h | 2 +- src/vertex.cpp | 2 +- src/vertex.h | 2 +- src/viewport.cpp | 2 +- src/viewport.h | 2 +- src/vorbissource.cpp | 2 +- src/window.cpp | 2 +- src/window.h | 2 +- src/xdg-user-dir-lookup.c | 5 +- steamshim_parent/CMakeLists.txt | 44 ++++++---- steamshim_parent/steamshim_parent.cpp | 115 ++++++++++++-------------- 85 files changed, 179 insertions(+), 202 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17223fc..9b615cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ option(DEBUG "Debug mode" OFF) option(SANITIZERS "Enable sanitizers" OFF) option(NATIVE "Use native instructions(for local use only)" OFF) #x86, arm64, ia-64 -option(CPU_ARCH "Enter here your target arch" "x86") +option(CPU_ARCH "CPU arch" "x86") #Configuration set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE) @@ -245,11 +245,6 @@ macro(ProcessWithXXD outvar inputfile outdir) ) endmacro() -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/xxdhack) -include_directories( - ${CMAKE_CURRENT_BINARY_DIR}/xxdhack -) - foreach(item ${EMBEDDED_INPUT}) ProcessWithXXD(EMBEDDED_SOURCE ${item} ${CMAKE_CURRENT_BINARY_DIR}) endforeach() @@ -305,7 +300,6 @@ set(BINDING_SOURCE source_group("Binding Source" FILES ${BINDING_SOURCE} ${BINDING_HEADERS}) - ################ # Настройки зависимые от компилятора if (MSVC) @@ -321,9 +315,10 @@ if (MSVC) endif() else() if(NATIVE) - + add_compile_options("-march=native -mtune=native") endif() if(SANITIZERS) + # ASan + Ruby = shit :< set(SANITIZERS "undefined,leak,shift,shift-base,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin,pointer-subtract,pointer-compare") add_compile_options(-fsanitize=${SANITIZERS}) add_link_options(-fsanitize=${SANITIZERS}) @@ -368,12 +363,14 @@ else() -mnoreturn-no-callee-saved-registers -mrelax-cmpxchg-loop) elseif(CPU_ARCH MATCHES "arm64") + # TODO: check is it really usefull:3 add_compile_options( -mlow-precision-recip-sqrt -mlow-precision-sqrt -mlow-precision-div ) elseif(CPU_ARCH MATCHES "ia-64") + # In theory it must make game work better on IA-64? add_compile_options( -minline-float-divide-min-latency -minline-float-divide-max-throughput @@ -383,7 +380,6 @@ else() -minline-sqrt-max-throughput ) endif() - endif() endif() @@ -426,7 +422,6 @@ find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INC mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY) find_package(OpenSSL CONFIG REQUIRED COMPONENTS Crypto) pkg_check_modules(SIGC2 REQUIRED sigc++-2.0) -pkg_check_modules(LIBZIP REQUIRED libzip) target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES}) target_include_directories(${PROJECT_NAME} PRIVATE src include ${PIXMAN_INCLUDE_DIR} ${SIGC2_INCLUDE_DIRS} @@ -439,12 +434,11 @@ physfs ${PIXMAN_LIBRARY} ${SIGC2_LIBRARIES} ${PLATFORM_LIBRARIES} ${Ruby_LIBRARIES} Boost::boost Boost::chrono ${Boost_LIBRARIES} ${VORBISFILE_LIBRARIES} ZLIB::ZLIB ${PLATFORM_LIBS}) -target_include_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) -target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBZIP_LIBRARIES} OpenSSL::Crypto) +target_include_directories(${PROJECT_NAME} PRIVATE ${OPENSSL_INCLUDE_DIR}) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::Crypto) if(STEAM) add_subdirectory(steamshim_parent) - # steam_appid.txt configure_file( "${CMAKE_SOURCE_DIR}/steam_appid.txt" diff --git a/MODDING.md b/MODDING.md index c08bbdc..2c430a3 100644 --- a/MODDING.md +++ b/MODDING.md @@ -1 +1,2 @@ # How Sunshine ModLoader work +todo lol diff --git a/changelogs/0.1.2.txt b/changelogs/0.1.2.txt index 9d68597..4aaab65 100644 --- a/changelogs/0.1.2.txt +++ b/changelogs/0.1.2.txt @@ -24,4 +24,3 @@ added icons and way to disable options in settings fixed segfault while to fast window size changing updated cg_blue picture Deleted useless hooks - diff --git a/make-oneshot-linux.sh b/make-oneshot-linux.sh index 686c16d..170cf73 100755 --- a/make-oneshot-linux.sh +++ b/make-oneshot-linux.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail # User-configurable variables. -oneshot_id=420530 +oneshot_id="$(cat steam_appid.txt)" STEAMWORKS_PATH=$(realpath ..)/steamworks cmake . -B build/ diff --git a/make-oneshot-mac.command b/make-oneshot-mac.command index ff75f11..af3ec41 100755 --- a/make-oneshot-mac.command +++ b/make-oneshot-mac.command @@ -1,44 +1,34 @@ #!/bin/sh -set -e - +set -ueo pipefail cd `dirname $0` # User-configurable variables mac_version="1.1.1" -make_threads=8 ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot -# Colors -white="\033[0;37m" # White - Regular -bold="\033[1;37m" # White - Bold -cyan="\033[1;36m" # Cyan - Bold -green="\033[1;32m" # Green - Bold -color_reset="\033[0m" # Reset Colors - use_qmake=True -echo "${white}Compiling ${bold}Sunshine ${white}engine for macOS...${color_reset}\n" +echo "Compiling Sunshine engine for macOS...\n" -# Generate makefile and build main + journal if [[ $use_qmake == True ]] then - echo "-> ${cyan}Generate makefile...${color_reset}" + echo "-> Generate makefile..." qmake MRIVERSION=3.3 - echo "-> ${cyan}Compile engine...${color_reset}" - make -j${make_threads} - echo "-> ${cyan}Compile steamshim...${color_reset}" + echo "-> Compile engine..." + make -j"${nproc}" + echo "-> Compile steamshim..." # cd steamshim_parent # mkdir build && cd build # cmake .. # STEAMWORKS=./steamworks make -j${make_threads} # cd ../.. else - echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}" + echo "WARNING: Conan/CMake method not ready yet." fi -echo "-> ${cyan}Compile journal...${color_reset}" +echo "-> Compile journal..." pyinstaller journal/unix/journal.spec --onefile --windowed # Create app bundles -echo "-> ${cyan}Create app bundles...${color_reset}" +echo "-> Create app bundles..." OSX_App="OneShot.app" ContentsDir="$OSX_App/Contents" LibrariesDir="$OSX_App/Contents/Libraries" @@ -67,26 +57,24 @@ mv OneShot.app/Contents/MacOS/OneShot OneShot.app/Contents/Resources/OneShot cp -r dist/_______.app _______.app # Set version number -echo "-> ${cyan}Set version number...${color_reset}" +echo "-> Set version number..." rm -f OneShot.app/Contents/Info.plist rm -f _______.app/Contents/Info.plist m4 patches/mac/Info.plist.in -DONESHOTMACVERSION=$mac_version > OneShot.app/Contents/Info.plist m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.app/Contents/Info.plist # Compile scripts -echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}" +echo "-> Compile xScripts.rxdata..." ruby rpgscript.rb ./scripts "$ONESHOT_PATH" cp "$ONESHOT_PATH/Data/xScripts.rxdata" . -echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}" +echo "-> Install OneShot apps to Steam directory..." cp -rf "./OneShot.app" "$ONESHOT_PATH" cp -rf "./_______.app" "$ONESHOT_PATH" # Cleanup -echo "-> ${cyan}Cleanup files...${color_reset}" +echo "-> Cleanup files..." # make clean rm -rf journal/unix/__pycache__ rm -rf build rm -rf dist - -echo "\n${green}Complete!" diff --git a/src/aldatasource.h b/src/aldatasource.h index d396764..597bb2f 100644 --- a/src/aldatasource.h +++ b/src/aldatasource.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/bitmap.h b/src/bitmap.h index c2495f1..02f2dff 100644 --- a/src/bitmap.h +++ b/src/bitmap.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/boost-hash.h b/src/boost-hash.h index d057fc7..244ad9d 100644 --- a/src/boost-hash.h +++ b/src/boost-hash.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/config.cpp b/src/config.cpp index 62e10fa..91ad7db 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/config.h b/src/config.h index 1c251eb..515744e 100644 --- a/src/config.h +++ b/src/config.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/debugwriter.h b/src/debugwriter.h index 42b8055..351d3d2 100644 --- a/src/debugwriter.h +++ b/src/debugwriter.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/disposable.h b/src/disposable.h index 22d9029..3874095 100644 --- a/src/disposable.h +++ b/src/disposable.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/etc-internal.h b/src/etc-internal.h index cb22ed0..af56ee3 100644 --- a/src/etc-internal.h +++ b/src/etc-internal.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/etc.cpp b/src/etc.cpp index f30a998..127457b 100644 --- a/src/etc.cpp +++ b/src/etc.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/etc.h b/src/etc.h index c6b87df..4efaffc 100644 --- a/src/etc.h +++ b/src/etc.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/eventthread.cpp b/src/eventthread.cpp index 418f109..9d1eab8 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/eventthread.h b/src/eventthread.h index a804d91..33cc36e 100644 --- a/src/eventthread.h +++ b/src/eventthread.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/exception.h b/src/exception.h index 8dc979e..982d864 100644 --- a/src/exception.h +++ b/src/exception.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/filesystem.cpp b/src/filesystem.cpp index e656fe1..6a2c8c2 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/filesystem.h b/src/filesystem.h index 6619902..66f461e 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/flashable.h b/src/flashable.h index 4d17c08..78a95a8 100644 --- a/src/flashable.h +++ b/src/flashable.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/font.cpp b/src/font.cpp index 0de1bee..8cc1f4b 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/font.h b/src/font.h index 8fd1438..b0ad63c 100644 --- a/src/font.h +++ b/src/font.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-debug.cpp b/src/gl-debug.cpp index 3fa2512..59ca648 100644 --- a/src/gl-debug.cpp +++ b/src/gl-debug.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-debug.h b/src/gl-debug.h index f8aeffc..04d2e9a 100644 --- a/src/gl-debug.h +++ b/src/gl-debug.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-fun.cpp b/src/gl-fun.cpp index e28ab0a..20b5835 100644 --- a/src/gl-fun.cpp +++ b/src/gl-fun.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-fun.h b/src/gl-fun.h index c548985..a13a9fc 100644 --- a/src/gl-fun.h +++ b/src/gl-fun.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-meta.cpp b/src/gl-meta.cpp index 7198eac..fc6ea6b 100644 --- a/src/gl-meta.cpp +++ b/src/gl-meta.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-meta.h b/src/gl-meta.h index 9070b04..6f9e264 100644 --- a/src/gl-meta.h +++ b/src/gl-meta.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/gl-util.h b/src/gl-util.h index 685b181..112799c 100644 --- a/src/gl-util.h +++ b/src/gl-util.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/global-ibo.h b/src/global-ibo.h index e1c0046..b2d4a46 100644 --- a/src/global-ibo.h +++ b/src/global-ibo.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/glstate.cpp b/src/glstate.cpp index 56a84f7..a206b08 100644 --- a/src/glstate.cpp +++ b/src/glstate.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/glstate.h b/src/glstate.h index 6a95826..43f5894 100644 --- a/src/glstate.h +++ b/src/glstate.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/graphics.cpp b/src/graphics.cpp index 4312cfe..473f7d3 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/graphics.h b/src/graphics.h index 1d2842c..2e18885 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/input.cpp b/src/input.cpp index 8778a7f..0a01349 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/input.h b/src/input.h index 031922a..ad3a675 100644 --- a/src/input.h +++ b/src/input.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/intrulist.h b/src/intrulist.h index bf3c29b..09b59f8 100644 --- a/src/intrulist.h +++ b/src/intrulist.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/keybindings.cpp b/src/keybindings.cpp index 02d5287..a220f1f 100644 --- a/src/keybindings.cpp +++ b/src/keybindings.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/keybindings.h b/src/keybindings.h index 0d1681f..9225a5f 100644 --- a/src/keybindings.h +++ b/src/keybindings.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/main.cpp b/src/main.cpp index c148ad0..fb1d64a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/plane.cpp b/src/plane.cpp index 047cf09..25b6ea7 100644 --- a/src/plane.cpp +++ b/src/plane.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/plane.h b/src/plane.h index 1e63dc4..4b1f951 100644 --- a/src/plane.h +++ b/src/plane.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/quad.h b/src/quad.h index 689223d..79208ba 100644 --- a/src/quad.h +++ b/src/quad.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/quadarray.h b/src/quadarray.h index c05eb37..628fc73 100644 --- a/src/quadarray.h +++ b/src/quadarray.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/rgssad.cpp b/src/rgssad.cpp index 247512e..ab7671a 100644 --- a/src/rgssad.cpp +++ b/src/rgssad.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/rgssad.h b/src/rgssad.h index 08bd95e..96f9695 100644 --- a/src/rgssad.h +++ b/src/rgssad.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/scene.cpp b/src/scene.cpp index 3d83327..a1b61aa 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/scene.h b/src/scene.h index dc890d2..3df91e5 100644 --- a/src/scene.h +++ b/src/scene.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/sdlsoundsource.cpp b/src/sdlsoundsource.cpp index 5cf5c4f..0e67e23 100644 --- a/src/sdlsoundsource.cpp +++ b/src/sdlsoundsource.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/serial-util.h b/src/serial-util.h index 87e6537..ddad309 100644 --- a/src/serial-util.h +++ b/src/serial-util.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/serializable.h b/src/serializable.h index d63fbe0..7ec4f10 100644 --- a/src/serializable.h +++ b/src/serializable.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/shader.cpp b/src/shader.cpp index ba58591..8b0609c 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/shader.h b/src/shader.h index e9a5308..9f8a070 100644 --- a/src/shader.h +++ b/src/shader.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/sharedstate.cpp b/src/sharedstate.cpp index 070eac3..a71e4de 100644 --- a/src/sharedstate.cpp +++ b/src/sharedstate.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/sharedstate.h b/src/sharedstate.h index 9bc4758..7213576 100644 --- a/src/sharedstate.h +++ b/src/sharedstate.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/signals/signal.h b/src/signals/signal.h index fff86a9..0602907 100644 --- a/src/signals/signal.h +++ b/src/signals/signal.h @@ -49,4 +49,4 @@ public: private: sigc::signal signal; -}; \ No newline at end of file +}; diff --git a/src/signals/signalconnection.h b/src/signals/signalconnection.h index caffdf4..dfce3ce 100644 --- a/src/signals/signalconnection.h +++ b/src/signals/signalconnection.h @@ -1,5 +1,4 @@ #pragma once - #include #include "debugwriter.h" @@ -34,4 +33,4 @@ private: template friend class Signal; -}; \ No newline at end of file +}; diff --git a/src/soundemitter.cpp b/src/soundemitter.cpp index 382dc93..79856c6 100644 --- a/src/soundemitter.cpp +++ b/src/soundemitter.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/soundemitter.h b/src/soundemitter.h index 738629d..b11da6c 100644 --- a/src/soundemitter.h +++ b/src/soundemitter.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/sprite.cpp b/src/sprite.cpp index dfd353f..ea02b89 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/sprite.h b/src/sprite.h index 08d9918..12cab0a 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/table.cpp b/src/table.cpp index 54b680a..5d1d9c0 100644 --- a/src/table.cpp +++ b/src/table.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/table.h b/src/table.h index 9dd975b..c94303c 100644 --- a/src/table.h +++ b/src/table.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/texpool.cpp b/src/texpool.cpp index 94ca0ea..a6e481f 100644 --- a/src/texpool.cpp +++ b/src/texpool.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/texpool.h b/src/texpool.h index edb23e7..001aa44 100644 --- a/src/texpool.h +++ b/src/texpool.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tileatlas.cpp b/src/tileatlas.cpp index db8931c..ff73043 100644 --- a/src/tileatlas.cpp +++ b/src/tileatlas.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tileatlas.h b/src/tileatlas.h index a351c91..5a7f097 100644 --- a/src/tileatlas.h +++ b/src/tileatlas.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tilemap-common.h b/src/tilemap-common.h index 4a35074..b4a5a5b 100644 --- a/src/tilemap-common.h +++ b/src/tilemap-common.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tilemap.cpp b/src/tilemap.cpp index 9b3f1eb..c813096 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tilemap.h b/src/tilemap.h index bc829f2..1c565de 100644 --- a/src/tilemap.h +++ b/src/tilemap.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tilequad.cpp b/src/tilequad.cpp index d5816d0..c9d2429 100644 --- a/src/tilequad.cpp +++ b/src/tilequad.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/tilequad.h b/src/tilequad.h index d95bbae..b35b7d2 100644 --- a/src/tilequad.h +++ b/src/tilequad.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/transform.h b/src/transform.h index ee6ed29..41e4442 100644 --- a/src/transform.h +++ b/src/transform.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/util.h b/src/util.h index 8da1845..5c74c80 100644 --- a/src/util.h +++ b/src/util.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/vertex.cpp b/src/vertex.cpp index 4ee8e00..d816fc9 100644 --- a/src/vertex.cpp +++ b/src/vertex.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/vertex.h b/src/vertex.h index 73560ff..e08b04b 100644 --- a/src/vertex.h +++ b/src/vertex.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/viewport.cpp b/src/viewport.cpp index 0ab4119..d2fcce8 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/viewport.h b/src/viewport.h index 557dcd6..4365574 100644 --- a/src/viewport.h +++ b/src/viewport.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/vorbissource.cpp b/src/vorbissource.cpp index 956ee6f..d3c454c 100644 --- a/src/vorbissource.cpp +++ b/src/vorbissource.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2014 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/window.cpp b/src/window.cpp index 240ec7d..f58d3f2 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/window.h b/src/window.h index 8b1bdff..cedf7b9 100644 --- a/src/window.h +++ b/src/window.h @@ -5,7 +5,7 @@ ** ** Copyright (C) 2013 Jonas Kulla ** -** mkxp is SDL_free software: you can redistribute it and/or modify +** mkxp 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 2 of the License, or ** (at your option) any later version. diff --git a/src/xdg-user-dir-lookup.c b/src/xdg-user-dir-lookup.c index 572d60a..c3b5d2f 100644 --- a/src/xdg-user-dir-lookup.c +++ b/src/xdg-user-dir-lookup.c @@ -4,7 +4,7 @@ Copyright (c) 2007 Red Hat, Inc. - Permission is hereby granted, SDL_free of charge, to any person + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, @@ -28,8 +28,6 @@ #include "xdg-user-dir-lookup.h" #include -#include -#include /** * xdg_user_dir_lookup_with_fallback: * @type: a string specifying the type of directory @@ -62,7 +60,6 @@ char * xdg_user_dir_lookup_with_fallback (const char *type, const char *fallback config_home = SDL_getenv("XDG_CONFIG_HOME"); if (config_home == NULL || config_home[0] == 0){ - //SDL_strlen("/.config/user-dirs.dirs") + 1 config_file = (char*)SDL_malloc(SDL_strlen(home_dir) + 23); if (config_file == NULL) goto error; diff --git a/steamshim_parent/CMakeLists.txt b/steamshim_parent/CMakeLists.txt index fbd218c..a2b2175 100644 --- a/steamshim_parent/CMakeLists.txt +++ b/steamshim_parent/CMakeLists.txt @@ -1,18 +1,36 @@ -cmake_minimum_required(VERSION 2.8.11) - +cmake_minimum_required(VERSION 3.28.3) set(STEAMWORKS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../steamworks" CACHE PATH "Path to Steamworks folder") set(GAME_LAUNCH_NAME "oneshot" CACHE STRING "Game launch name") option(DEBUG "Debug" OFF) - +option(NATIVE "Use native instructions(for local use only)" OFF) +set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE) +set(SANITIZERS "address,undefined,leak,shift,shift-base,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin,pointer-subtract,pointer-compare") if(DEBUG) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + add_definitions(-DSTEAMSHIM_DEBUG) + add_compile_options(-fsanitize=${SANITIZERS} -g) + add_link_options(-fsanitize=${SANITIZERS}) else() - add_compile_options(-O2 -ffast-math -fipa-pta -ftree-vectorize -fstdarg-opt -fomit-frame-pointer -frename-registers -ffunction-sections -fdata-sections -fvisibility=hidden) - add_link_options(-Wl,-O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--strip-debug -Wl,--no-undefined) - if(!WIN32) - add_compile_options(-flto) - endif() + add_compile_options( + -O2 + -ffast-math + -fipa-pta + -ftree-vectorize + -fstdarg-opt + -fomit-frame-pointer + -frename-registers + -ffunction-sections + -fdata-sections + -fvisibility=hidden + -flto) + add_link_options( + -Wl,-O2 + -Wl,--gc-sections + -Wl,--as-needed + -Wl,--strip-debug + -Wl,--no-undefined) +endif() +if(NATIVE) + add_compile_options("-march=native -mtune=native") endif() set(SOURCES @@ -20,15 +38,9 @@ set(SOURCES ) include_directories(${STEAMWORKS_PATH}/public) - add_definitions(-DGAME_LAUNCH_NAME="${GAME_LAUNCH_NAME}") - find_package(SDL3 CONFIG) -IF(DEBUG) - add_definitions(-DSTEAMSHIM_DEBUG) -ENDIF() - IF(APPLE) find_library(steamworks NAMES steam_api steam_api64 PATHS ${STEAMWORKS_PATH}/redistributable_bin/osx32) ELSEIF(WIN32) diff --git a/steamshim_parent/steamshim_parent.cpp b/steamshim_parent/steamshim_parent.cpp index e89d281..721029a 100644 --- a/steamshim_parent/steamshim_parent.cpp +++ b/steamshim_parent/steamshim_parent.cpp @@ -1,41 +1,33 @@ #ifndef GAME_LAUNCH_NAME -#define GAME_LAUNCH_NAME "oneshot" + #define GAME_LAUNCH_NAME "oneshot" #endif #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN 1 -#define UNICODE -#include -typedef PROCESS_INFORMATION ProcessType; -typedef HANDLE PipeType; -#define NULLPIPE NULL -#define LLUFMT "%I64u" + #define WIN32_LEAN_AND_MEAN 1 + #define UNICODE + #include + typedef PROCESS_INFORMATION ProcessType; + typedef HANDLE PipeType; + #define NULLPIPE NULL + #define LLUFMT "%I64u" #else -#include -#include -#include -#include -#include -#include -#include -typedef pid_t ProcessType; -typedef int PipeType; -#define NULLPIPE -1 -#define LLUFMT "%llu" + #include + #include + #include + #include + #include + #include + #include + typedef pid_t ProcessType; + typedef int PipeType; + #define NULLPIPE -1 + #define LLUFMT "%llu" #endif -#include #include "steam/steam_api.h" - -#ifdef STEAMSHIM_DEBUG -#define dbgpipe printf -#else -static inline void dbgpipe(const char *fmt, ...) { - (void)fmt; -} -#endif - #include +#include +#include /* platform-specific mainline calls this. */ static int mainline(void); @@ -44,19 +36,22 @@ static int mainline(void); static void fail(const char *err); static bool writePipe(PipeType fd, const void *buf, const unsigned int _len); static int readPipe(PipeType fd, void *buf, const unsigned int _len); -static bool createPipes(PipeType *pPipeParentRead, PipeType *pPipeParentWrite, - PipeType *pPipeChildRead, PipeType *pPipeChildWrite); +static bool createPipes(PipeType *pPipeParentRead, PipeType *pPipeParentWrite, PipeType *pPipeChildRead, PipeType *pPipeChildWrite); static void closePipe(PipeType fd); static bool setEnvVar(const char *key, const char *val); static bool launchChild(ProcessType *pid); static int closeProcess(ProcessType *pid); -#ifdef _WIN32 static void fail(const char *err){ - MessageBoxA(NULL, err, "ERROR", MB_ICONERROR | MB_OK); - ExitProcess(1); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Steamshim Error", err, NULL); + #ifdef _WIN32 + ExitProcess(1); + #else + _exit(1); + #endif } // fail +#ifdef _WIN32 static bool writePipe(PipeType fd, const void *buf, const unsigned int _len){ const DWORD len = (DWORD) _len; DWORD bw = 0; @@ -158,13 +153,6 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi #else // everyone else that isn't Windows. - -static void fail(const char *err){ - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Steamshim parent error", err, NULL); - fprintf(stderr, "%s\n", err); - _exit(1); -} // fail - static bool writePipe(PipeType fd, const void *buf, const unsigned int _len){ const ssize_t len = (ssize_t) _len; ssize_t bw; @@ -222,7 +210,7 @@ static bool launchChild(ProcessType *pid){ // we're the child. GArgv[0] = SDL_strdup("./" GAME_LAUNCH_NAME); - dbgpipe("Starting %s\n", GArgv[0]); + SDL_log("Starting %s\n", GArgv[0]); execvp(GArgv[0], GArgv); // still here? It failed! Terminate, closing child's ends of the pipes. _exit(1); @@ -249,7 +237,6 @@ int main(int argc, char **argv){ // THE ACTUAL PROGRAM. class SteamBridge; - static ISteamUserStats *GSteamStats = NULL; static ISteamUtils *GSteamUtils = NULL; static ISteamUser *GSteamUser = NULL; @@ -319,33 +306,33 @@ static bool writeString(PipeType fd, ShimEvent event, const char *str){ uint8 buf[256]; buf[0] = SDL_strlen(str) + 2; buf[1] = (uint8) event; - strcpy((char *) buf + 2, str); + SDL_strlcpy((char *) buf + 2, str, sizeof(buf + 2)); return writePipe(fd, buf, buf[0] + 1); } // writeString static inline bool writeBye(PipeType fd){ - dbgpipe("Parent sending SHIMEVENT_BYE().\n"); + SDL_log("Parent sending SHIMEVENT_BYE().\n"); return write1ByteCmd(fd, SHIMEVENT_BYE); } // writeBye static inline bool writeStatsReceived(PipeType fd, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_STATSRECEIVED(%sokay).\n", okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_STATSRECEIVED(%sokay).\n", okay ? "" : "!"); return write2ByteCmd(fd, SHIMEVENT_STATSRECEIVED, okay ? 1 : 0); } // writeStatsReceived static inline bool writeStatsStored(PipeType fd, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_STATSSTORED(%sokay).\n", okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_STATSSTORED(%sokay).\n", okay ? "" : "!"); return write2ByteCmd(fd, SHIMEVENT_STATSSTORED, okay ? 1 : 0); } // writeStatsStored static bool writeAchievementSet(PipeType fd, const char *name, const bool enable, const bool okay){ uint8 buf[256]; uint8 *ptr = buf+1; - dbgpipe("Parent sending SHIMEVENT_SETACHIEVEMENT('%s', %senable, %sokay).\n", name, enable ? "" : "!", okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_SETACHIEVEMENT('%s', %senable, %sokay).\n", name, enable ? "" : "!", okay ? "" : "!"); *(ptr++) = (uint8) SHIMEVENT_SETACHIEVEMENT; *(ptr++) = enable ? 1 : 0; *(ptr++) = okay ? 1 : 0; - strcpy((char *) ptr, name); + SDL_strlcpy((char *) ptr, name, buf); ptr += SDL_strlen(name) + 1; buf[0] = (uint8) ((ptr-1) - buf); return writePipe(fd, buf, buf[0] + 1); @@ -354,19 +341,19 @@ static bool writeAchievementSet(PipeType fd, const char *name, const bool enable static bool writeAchievementGet(PipeType fd, const char *name, const int status, const uint64 time){ uint8 buf[256]; uint8 *ptr = buf+1; - dbgpipe("Parent sending SHIMEVENT_GETACHIEVEMENT('%s', status %d, time " LLUFMT ").\n", name, status, (unsigned long long) time); + SDL_log("Parent sending SHIMEVENT_GETACHIEVEMENT('%s', status %d, time " LLUFMT ").\n", name, status, (unsigned long long) time); *(ptr++) = (uint8) SHIMEVENT_GETACHIEVEMENT; *(ptr++) = (uint8) status; SDL_memcpy(ptr, &time, sizeof (time)); ptr += sizeof (time); - strcpy((char *) ptr, name); + SDL_strlcpy((char *) ptr, name, buf); ptr += SDL_strlen(name) + 1; buf[0] = (uint8) ((ptr-1) - buf); return writePipe(fd, buf, buf[0] + 1); } // writeAchievementGet static inline bool writeResetStats(PipeType fd, const bool alsoAch, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_RESETSTATS(%salsoAchievements, %sokay).\n", alsoAch ? "" : "!", okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_RESETSTATS(%salsoAchievements, %sokay).\n", alsoAch ? "" : "!", okay ? "" : "!"); return write3ByteCmd(fd, SHIMEVENT_RESETSTATS, alsoAch ? 1 : 0, okay ? 1 : 0); } // writeResetStats @@ -377,29 +364,29 @@ static bool writeStatThing(PipeType fd, const ShimEvent ev, const char *name, co *(ptr++) = okay ? 1 : 0; SDL_memcpy(ptr, val, vallen); ptr += vallen; - strcpy((char *) ptr, name); + SDL_memcpy((char *) ptr, name, buf); ptr += SDL_strlen(name) + 1; buf[0] = (uint8) ((ptr-1) - buf); return writePipe(fd, buf, buf[0] + 1); } // writeStatThing static inline bool writeSetStatI(PipeType fd, const char *name, const int32 val, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_SETSTATI('%s', val %d, %sokay).\n", name, (int) val, okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_SETSTATI('%s', val %d, %sokay).\n", name, (int) val, okay ? "" : "!"); return writeStatThing(fd, SHIMEVENT_SETSTATI, name, &val, sizeof (val), okay); } // writeSetStatI static inline bool writeSetStatF(PipeType fd, const char *name, const float val, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_SETSTATF('%s', val %f, %sokay).\n", name, val, okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_SETSTATF('%s', val %f, %sokay).\n", name, val, okay ? "" : "!"); return writeStatThing(fd, SHIMEVENT_SETSTATF, name, &val, sizeof (val), okay); } // writeSetStatF static inline bool writeGetStatI(PipeType fd, const char *name, const int32 val, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_GETSTATI('%s', val %d, %sokay).\n", name, (int) val, okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_GETSTATI('%s', val %d, %sokay).\n", name, (int) val, okay ? "" : "!"); return writeStatThing(fd, SHIMEVENT_GETSTATI, name, &val, sizeof (val), okay); } // writeGetStatI static inline bool writeGetStatF(PipeType fd, const char *name, const float val, const bool okay){ - dbgpipe("Parent sending SHIMEVENT_GETSTATF('%s', val %f, %sokay).\n", name, val, okay ? "" : "!"); + SDL_log("Parent sending SHIMEVENT_GETSTATF('%s', val %f, %sokay).\n", name, val, okay ? "" : "!"); return writeStatThing(fd, SHIMEVENT_GETSTATF, name, &val, sizeof (val), okay); } // writeGetStatF @@ -547,12 +534,12 @@ static bool processCommand(const uint8 *buf, unsigned int buflen, PipeType fd){ break; case SHIMCMD_GETPERSONANAME: - dbgpipe("Parent sending SHIMEVENT_GETPERSONANAME.\n"); + SDL_log("Parent sending SHIMEVENT_GETPERSONANAME.\n"); writeString(fd, SHIMEVENT_GETPERSONANAME, GSteamFriends->GetPersonaName()); break; case SHIMCMD_GETCURRENTGAMELANGUAGE: - dbgpipe("Parent sending SHIMEVENT_GETCURRENTGAMELANGUAGE.\n"); + SDL_log("Parent sending SHIMEVENT_GETCURRENTGAMELANGUAGE.\n"); writeString(fd, SHIMEVENT_GETCURRENTGAMELANGUAGE, GSteamApps->GetCurrentGameLanguage()); break; } // switch @@ -642,7 +629,7 @@ static int mainline(void){ PipeType pipeChildWrite = NULLPIPE; ProcessType childPid; - dbgpipe("Parent starting mainline.\n"); + SDL_log("Parent starting mainline.\n"); if (!createPipes(&pipeParentRead, &pipeParentWrite, &pipeChildRead, &pipeChildWrite)) fail("Failed to create application pipes"); @@ -658,13 +645,13 @@ static int mainline(void){ closePipe(pipeChildWrite); pipeChildRead = pipeChildWrite = NULLPIPE; - dbgpipe("Parent in command processing loop.\n"); + SDL_log("Parent in command processing loop.\n"); // Now, we block for instructions until the pipe fails (child closed it or // terminated/crashed). processCommands(pipeParentRead, pipeParentWrite); - dbgpipe("Parent shutting down.\n"); + SDL_log("Parent shutting down.\n"); // Close our ends of the pipes. writeBye(pipeParentWrite); @@ -673,12 +660,12 @@ static int mainline(void){ deinitSteamworks(); - dbgpipe("Parent waiting on child process.\n"); + SDL_log("Parent waiting on child process.\n"); // Wait for the child to terminate, close the child process handles. const int retval = closeProcess(&childPid); - dbgpipe("Parent exiting mainline (child exit code %d).\n", retval); + SDL_log("Parent exiting mainline (child exit code %d).\n", retval); return retval; } // mainline