From 9a19a3cc0c5e8b7343954008887f82358dca156f Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Tue, 30 Apr 2019 14:04:50 -0700 Subject: Updated offline patch to newer version. Renamed patches to better explain their purpose. --- O3-support.patch | 11 ++++++ O3.patch | 11 ------ PKGBUILD | 22 ++++++------ aur-tome4.patch | 12 ------- glext-include-removal.patch | 10 ++++++ glext.patch | 10 ------ offline-donator.patch | 43 +++++++++++++++++++++++ offline-item-storage-hack.patch | 78 +++++++++++++++++++++++++++++++++++++++++ sdl2-path-fix.patch | 12 +++++++ tome4-offline.patch | 72 ------------------------------------- 10 files changed, 165 insertions(+), 116 deletions(-) create mode 100644 O3-support.patch delete mode 100644 O3.patch delete mode 100644 aur-tome4.patch create mode 100644 glext-include-removal.patch delete mode 100644 glext.patch create mode 100644 offline-donator.patch create mode 100644 offline-item-storage-hack.patch create mode 100644 sdl2-path-fix.patch delete mode 100644 tome4-offline.patch diff --git a/O3-support.patch b/O3-support.patch new file mode 100644 index 0000000..2728810 --- /dev/null +++ b/O3-support.patch @@ -0,0 +1,11 @@ +--- a/premake4.lua ++++ b/premake4.lua +@@ -88,7 +88,7 @@ + configuration "Release" + defines { "NDEBUG=1" } + flags { "Optimize", "NoFramePointer" } +- buildoptions { "-O2" } ++ buildoptions { "-O3" } + targetdir "bin/Release" + + diff --git a/O3.patch b/O3.patch deleted file mode 100644 index 2728810..0000000 --- a/O3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/premake4.lua -+++ b/premake4.lua -@@ -88,7 +88,7 @@ - configuration "Release" - defines { "NDEBUG=1" } - flags { "Optimize", "NoFramePointer" } -- buildoptions { "-O2" } -+ buildoptions { "-O3" } - targetdir "bin/Release" - - diff --git a/PKGBUILD b/PKGBUILD index 1438c37..0bffc65 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,7 +13,7 @@ pkgname=tome4 pkgver=1.5.10 -pkgrel=3 +pkgrel=4 pkgdesc="An open-source, single-player, role-playing roguelike game set in the world of Eyal." pkgdesc+="Includes DLC and offline patch." arch=('i686' 'x86_64') @@ -23,10 +23,10 @@ depends=(glu openal libvorbis sdl2_ttf sdl2_image) makedepends=(premake zip unzip) options=(!makeflags emptydirs) source=("${url}dl/t-engine/t-engine4-src-${pkgver}.tar.bz2" - aur-tome4.patch - tome4-offline.patch - O3.patch - glext.patch + sdl2-path-fix.patch + glext-include-removal.patch + O3-support.patch + offline-donator.patch ashes-urhrok.teaac orcs.teaac cults.teaac @@ -35,9 +35,9 @@ source=("${url}dl/t-engine/t-engine4-src-${pkgver}.tar.bz2" conflicts=('tome4-beta' 'tome4-git' 'tome4-nomusic') sha256sums=('a76d29d2c0b964e9ab121873041c55930db1a0ccdaf877228dcba62ee06b8555' '37f5be7020a06228b7d22f4c622ab5a8843b4dbea7493d7e3b324bd592cd818e' - '2d338ff8b1e690f1583ca891f4a62e7e2eb99a96310f9fb1fb16c88a1af165e8' - '3e8c53ef138edc00ccbffed840dca89df973e688497e8bd2f9cf9d84826c3618' '04e7fc180b1df55c63c91a0c59bbd092db0995db5600a168a6e68458b49327a8' + '3e8c53ef138edc00ccbffed840dca89df973e688497e8bd2f9cf9d84826c3618' + '7fda796a4ce59dc02e4bb21a07c190133a6c8da678bccba4437ea5704e69014c' '5e5e28b44a4ff154f4a86aca17d35aa6da70c5c3ca2ef38b45a61eb3ddbb2c8f' '2bf91a7a65690f813478f839bf2ebb48af76f9669f7d94b4fa1a43d8b0216017' 'a392bf93c83baa3cdb4d29d7ae6e8d27e3a2e7ba5bf4cdd139c9ac15bfd6cd8e' @@ -49,10 +49,10 @@ sha256sums=('a76d29d2c0b964e9ab121873041c55930db1a0ccdaf877228dcba62ee06b8555' ############################################################################### prepare() { cd "$srcdir"/t-engine4-src-${pkgver} - patch -p1 -i "${srcdir}/aur-tome4.patch" - patch -p1 -i "${srcdir}/tome4-offline.patch" - patch -p1 -i "${srcdir}/O3.patch" - patch -p1 -i "${srcdir}/glext.patch" + patch -p1 -i "${srcdir}/sdl2-path-fix.patch" + patch -p1 -i "${srcdir}/glext-include-removal.patch" + patch -p1 -i "${srcdir}/O3-support.patch" + patch -p1 -i "${srcdir}/offline-donator.patch" cp "${srcdir}/ashes-urhrok.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" cp "${srcdir}/orcs.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" cp "${srcdir}/cults.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" diff --git a/aur-tome4.patch b/aur-tome4.patch deleted file mode 100644 index 3831dfb..0000000 --- a/aur-tome4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur orig/premake4.lua new/premake4.lua ---- orig/premake4.lua 2014-05-19 10:42:14.000000000 +0200 -+++ new/premake4.lua 2015-12-03 22:09:15.687935809 +0100 -@@ -30,7 +30,7 @@ - } - else - includedirs { -- "/opt/SDL-2.0/include/SDL2", -+ "/usr/include/SDL2", - "/usr/include/GL", - } - end diff --git a/glext-include-removal.patch b/glext-include-removal.patch new file mode 100644 index 0000000..0ae15c5 --- /dev/null +++ b/glext-include-removal.patch @@ -0,0 +1,10 @@ +--- a/src/tgl.h ++++ b/src/tgl.h +@@ -9,7 +9,6 @@ #endif + #include + #include + #ifndef _WIN32 +-#include + #endif + #endif + diff --git a/glext.patch b/glext.patch deleted file mode 100644 index 0ae15c5..0000000 --- a/glext.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/tgl.h -+++ b/src/tgl.h -@@ -9,7 +9,6 @@ #endif - #include - #include - #ifndef _WIN32 --#include - #endif - #endif - diff --git a/offline-donator.patch b/offline-donator.patch new file mode 100644 index 0000000..e724540 --- /dev/null +++ b/offline-donator.patch @@ -0,0 +1,43 @@ +--- a/game/loader/init.lua ++++ b/game/loader/init.lua +@@ -214,4 +214,4 @@ + + + -- RUN engine RUN !! +-dofile("/engine/init.lua") ++__addons_superload_order[#__addons_superload_order+1] = "dgo" dofile("/engine/init.lua") +--- a/game/mod/addons/dgo/bin1 ++++ b/game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NxqGIglo+TeP+cZoMslVPnXK4t9/t7daO4uRUWZWGSTrx843mYW/H6xYsoK/FIXMOzCwdXDh3cbd4PWvkT8RKKibJiVDloI6udbEAROGrNJxO7OPkVKT2iXTSnISxhZeML8q3wfsP9r3He8qh6tjP1AH8Nwa0TGqkjTUDawfmAyWYU3Spdnwxcykjar45kziXclqVa9qarzXqUn2+15idn2UszsLcIS7TmNTMNteZy0zUHBQ1pKVb0DZscI2S4ZpAOgbqHCu9tHE4w7wrFzl+R8d80iu6g1p3jSo4mJu3bdR+CXVpaHTTxLuYXnQI8sfVQTJ55c8D9VL4x0mseCw92/G+P+iuYKz9wZFSS3kuurneHi40NkimsiI3FDg7V9dpmI9RXw0VdhywHWTXq1Eyelzc+65IVhWwr4BLMimEVxqHOaZABSWzt3Owe1gPM2WMXSA8EaW8uPXXt3++qb/55e3f7GcCVAcD1mRnLWKGnVXxX52pHoC8cb4UR3O+ry32XaZTWdccjS46ayVI+ifYYf4n8jM191/so6Tf8a+mui6aZdaPKONCqn8Rhl8FNVj/8FcBg8cowDaX9UfjrvwCoJw8oAZ8TU14QC0cbRxLOJZxrOBYhfsAM+nrxXGSHKEDj/xsnhAZXCr2liL7EuMEjtz1VAWCilz0sDcDJsiRKGVC+FFUPkYTqY5JEkwjsT5vtEoy3utjYQ8iP8vOOi78C6Fd5FAx +\ No newline at end of file +--- a/game/mod/addons/dgo/superload/engine/PlayerProfile.lua ++++ b/game/mod/addons/dgo/superload/engine/PlayerProfile.lua +@@ -0,0 +1,27 @@ ++-- ToME - Tales of Maj'Eyal ++-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini ++-- ++-- 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 . ++-- ++-- Nicolas Casalini "DarkGod" ++-- darkgod@te4.org ++ ++ ++local _M = loadPrevious(...) ++ ++function _M:isDonator(s) ++ return 6 ++end ++ ++return _M diff --git a/offline-item-storage-hack.patch b/offline-item-storage-hack.patch new file mode 100644 index 0000000..8d82bc1 --- /dev/null +++ b/offline-item-storage-hack.patch @@ -0,0 +1,78 @@ +# This patch: +# --Sets the offline item storage cap to 100 +# --Removes the time requirement for withdrawing stored items +# --Removes the level restriction added to stored items +# + +--- a/overload/data/chats/items-vault-command-orb-offline.lua ++++ b/overload/data/chats/items-vault-command-orb-offline.lua +@@ -24,9 +24,6 @@ + + function willModify(o) + local msg = "" +- if not rawget(o, "require") and getLevelReq(o) > 0 then +- msg = ("Transfering this item will place a level %d requirement on it, since it has no requirements. "):format(getLevelReq(o)) +- end + if o.unvault_ego then + msg = msg.."Some properties of the item will be lost upon transfer, since they are class- or talent-specific. " + end +@@ -34,9 +31,6 @@ + end + + function doModify(o) +- if not rawget(o, "require") and getLevelReq(o) > 0 then +- o.require = {level=getLevelReq(o)} +- end + if o.unvault_ego then + local list = table.clone(o.ego_list) + local n = #list, i, j +@@ -62,7 +56,7 @@ + Only items from a validated game versions are uploadable.#WHITE#* + + #CRIMSON#Offline mode#WHITE#: The item's vault works even without a network connection but items will thus only be saved on your computer and can not be shared to an other one. +-The offline vault is only available when offline and contains 3 slots.]], ++The offline vault is only available when offline and contains 100 slots.]], + answers = { + {"[Place an item in the vault]", cond=function() return profile:isDonator() end, action=function(npc, player) + if game:isTainted() then +--- a/overload/mod/class/ItemsVaultDLC.lua ++++ b/overload/mod/class/ItemsVaultDLC.lua +@@ -106,7 +106,7 @@ + + function transferToVaultOffline(actor, o, cb_success) + if not world.items_vault then world.items_vault = {} end +- if #world.items_vault >= 3 then return end ++ if #world.items_vault >= 100 then return end + + world.items_vault[#world.items_vault+1] = {o=o, time=os.time()} + +@@ -334,15 +334,15 @@ + + function listVaultOffline() + if not world.items_vault then world.items_vault = {} end +- local done = {list={}, max=3} ++ local done = {list={}, max=100} + + for i, o in ipairs(world.items_vault) do + done.list[#done.list+1] = { + id_entity = i, + name = o.o:getName{do_color=1, no_image=1}:toString(), + desc = o.o:getDesc{do_color=1, no_image=1}:toString(), +- usable = (os.time() - o.time) >= 3600, +- sec_until = 3600 - (os.time() - o.time), ++ usable = (os.time() - o.time) >= 1, ++ sec_until = 1 - (os.time() - o.time), + last_updated = o.time, + } + end +--- a/overload/mod/dialogs/ItemsVaultOffline.lua ++++ b/overload/mod/dialogs/ItemsVaultOffline.lua +@@ -37,7 +37,7 @@ + + Dialog.init(self, ("Item's Vault (%d/%d)"):format(#self.iv.list, self.iv.max), game.w * 0.8, game.h * 0.8) + +- local txt = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Retrieve an item from the vault. When you place an item in the vault the paradox energies around it are so powerful you must wait one hour before retrieving it. ++ local txt = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Retrieve an item from the vault. + #CRIMSON#Warning: while you *can* retrieve items made with previous versions of the game, no guaranty is given that the universe (or your character) will not explode.]]} + + self.c_list = ListColumns.new{width=math.floor(self.iw - 10), height=self.ih - 10 - txt.h - 20, scrollbar=true, sortable=true, columns={ diff --git a/sdl2-path-fix.patch b/sdl2-path-fix.patch new file mode 100644 index 0000000..3831dfb --- /dev/null +++ b/sdl2-path-fix.patch @@ -0,0 +1,12 @@ +diff -Naur orig/premake4.lua new/premake4.lua +--- orig/premake4.lua 2014-05-19 10:42:14.000000000 +0200 ++++ new/premake4.lua 2015-12-03 22:09:15.687935809 +0100 +@@ -30,7 +30,7 @@ + } + else + includedirs { +- "/opt/SDL-2.0/include/SDL2", ++ "/usr/include/SDL2", + "/usr/include/GL", + } + end diff --git a/tome4-offline.patch b/tome4-offline.patch deleted file mode 100644 index 9c35bf4..0000000 --- a/tome4-offline.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/game/loader/init.lua -+++ b/game/loader/init.lua -@@ -214,4 +214,4 @@ - - - -- RUN engine RUN !! --dofile("/engine/init.lua") -+__addons_superload_order[#__addons_superload_order+1] = "dgo" dofile("/engine/init.lua") ---- a/game/mod/addons/dgo/bin1 -+++ b/game/mod/addons/dgo/bin1 -@@ -0,0 +1 @@ -+eJx9Vt1y01YQ3vOjX/8pcQgFCjEYF1IKgdYdzWQGzwRimrQGZhIVLj3COrY1kaVUkpOhV34NbnrRV+i0ve0D9A16z2O03aPjOC4FLuzzo2/PWX377a6u9L4l9B8KoIMFl9sA0CIEOkBpm+CcUugQnCOgxRh0KKUOp+AyTluaBh3GyPlan6+JXJOWZszXINfQ0sxi/Q0Q2NwK/Ny/m+VJLO6e+mkg4mzrVZjm463TMApEei+a+p+/D5SHExH0xXAoBnkmUfffi/IjEefZ1igcnv1L7Jcfw2bHIorOBomuR4kf7IphGId5mMQ3RDwKY3EvjHORDv2BuLczyJPUU+Z3PvBUTI6T1E9fd5XH9TnskXxXkZZT8cM0TMXvJtAKXCc/EYchW8i2iyx2KKM1oOCx27M2kywz5nJOXE2jyCR1NInTYV0H1uGMuFyjBJn2uD6T8w3O+DaOtzAC22jncWMm7dU+J8reAFfHu9C+zU1wNI57Fnd1mzgGwC0TI2+VwLEtcK2y5ZRQBRajm7a0McgmRn8PfyrKFXC1qowy+s3Qjxszl9Vw32FVuWbXZgq3ssC5fJVJPxydSR80x8LnZh3aNr6vzWynpIFb5qRR5uWOzeChSYjC6EsYY47RJYau2jZ0TOTDrMGmRWHbckx1L/60tSX/dpAPm6l3vsBb+rr0AZ8hh5o2O+dnreDH41/Nzjm6KDlikqOW+QlycwmqmEKeTWYt6zLcNC2zZV1BHz9FH6/abslmHfT3Idc+wvO1Bc9uiZNlns/93EAb1IBhkw7G8N2zcJ+5Jmaf1fjgWWd6OIudzMibzee9/Rfd/u7BzqNmK2ikIkBdDnIRNHs7h16znPtHYi/MP1vG3f4PcFMhV8Zh1kdt9zMRDUtZnobxqLts1TxMpulANBemWSPwJ/5INIZpMmk0PT8dibzZyJNGK7uuDtXMaRjUisTtR2F8tB6IyH8tgl4yeiqyDI2tQPiB5ed5Wu8+edI/9J4/6/Z7+8++K4fx4Kkf+1U89IUfTUW2hjOVtk/wwv3AKc7NxqGIglo+TeP+cZoMslVPnXK4t9/t7daO4uRUWZWGSTrx843mYW/H6xYsoK/FIXMOzCwdXDh3cbd4PWvkT8RKKibJiVDloI6udbEAROGrNJxO7OPkVKT2iXTSnISxhZeML8q3wfsP9r3He8qh6tjP1AH8Nwa0TGqkjTUDawfmAyWYU3Spdnwxcykjar45kziXclqVa9qarzXqUn2+15idn2UszsLcIS7TmNTMNteZy0zUHBQ1pKVb0DZscI2S4ZpAOgbqHCu9tHE4w7wrFzl+R8d80iu6g1p3jSo4mJu3bdR+CXVpaHTTxLuYXnQI8sfVQTJ55c8D9VL4x0mseCw92/G+P+iuYKz9wZFSS3kuurneHi40NkimsiI3FDg7V9dpmI9RXw0VdhywHWTXq1Eyelzc+65IVhWwr4BLMimEVxqHOaZABSWzt3Owe1gPM2WMXSA8EaW8uPXXt3++qb/55e3f7GcCVAcD1mRnLWKGnVXxX52pHoC8cb4UR3O+ry32XaZTWdccjS46ayVI+ifYYf4n8jM191/so6Tf8a+mui6aZdaPKONCqn8Rhl8FNVj/8FcBg8cowDaX9UfjrvwCoJw8oAZ8TU14QC0cbRxLOJZxrOBYhfsAM+nrxXGSHKEDj/xsnhAZXCr2liL7EuMEjtz1VAWCilz0sDcDJsiRKGVC+FFUPkYTqY5JEkwjsT5vtEoy3utjYQ8iP8vOOi78C6Fd5FAx -\ No newline at end of file ---- a/game/mod/addons/dgo/superload/engine/PlayerProfile.lua -+++ b/game/mod/addons/dgo/superload/engine/PlayerProfile.lua -@@ -0,0 +1,56 @@ -+-- ToME - Tales of Maj'Eyal -+-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini -+-- -+-- 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 . -+-- -+-- Nicolas Casalini "DarkGod" -+-- darkgod@te4.org -+ -+ -+local _M = loadPrevious(...) -+ -+function _M:isDonator(s) -+ return 6 -+end -+ -+local getDLCD = _M.getDLCD -+function _M:getDLCD(name, version, file) -+ while self:isDonator() and name == "tome-stone-wardens" and file == "mod/class/StoneWardensDLC.lua" do -- breakable if -+ local f = fs.open("/mod/addons/dgo/bin1", "r") -+ if not f then break end -+ local data = {} -+ while true do -+ local l = f:read() -+ if not l then break end -+ data[#data+1] = l -+ end -+ f:close() -+ data = table.concat(data) -+ data = mime.unb64(data) -+ return zlib.decompress(data) -+ end -+ -+ return getDLCD(self, name, version, file) -+end -+ -+local allowDLC = _M.allowDLC -+function _M:allowDLC(dlc) -+ if dlc[1] == 2 then return true end -+ if dlc[1] == 3 then return true end -+ if dlc[1] == 4 then return true end -+ if dlc[1] == 5 then return true end -+ return allowDLC(self, dlc) -+end -+ -+return _M -- cgit v1.2.1