debian/0000755000000000000000000000000012075567242007200 5ustar debian/supertransball2.60000644000000000000000000000236712075451103012406 0ustar .TH SUPERTRANSBALL2 6 "October 31, 2012" .SH NAME supertransball2 \- Thrust type of game .SH DESCRIPTION \fBSuper Transball 2\fP is a game which was inspired by ZARA THRUSTA for the Amiga 500. In each level the goal is to find the SPHERE, to capture it and to carry it to the upper part of the level. The main challenge is the gravity that attracts your ship which makes it inevitable to control the ship's thrust. Many other obstacles like cannons, tanks, doors or lasers will also try to make your journey difficult and don't be wasteful with your thrusters and weapons or you will run out of fuel in no time. Super Transball 2 ships with 3 unique level packs consisting of 26 levels in total. You can choose between them by pressing the L-key ingame. If a level seems being to difficult you can skip it by entering a code after pressing the C-key in the main menu. These cheats are available in /usr/share/doc/supertransball2. .SH VIDEO RESOLUTION The game starts in windowed mode with a resolution of 320x240 pixel. However you can change this setting ingame with the ALT-key + 1,2,3,4 or ENTER combination. .TP .B ALT+1 standard view .TP .B ALT+2 200% zoom .TP .B ALT+3 300% zoom .TP .B ALT+4 400% zoom .TP .B ALT+ENTER Toggle between fullscreen and windowed mode debian/supertransball2.png0000644000000000000000000003142412075451103013021 0ustar PNG  IHDRpI)gAMA asRGB cHRMz&u0`:pQ<bKGD pHYsHHFk>2kIDATx}W[GJABދ@jK $!lcwlıciN6eny˞; ˒19:WWs<|>gf@J& ZGD`Y8@[߯q)rz!2s){#?yeII[L|XuPo'_<Ñg;*m.44 QRm*lHeTOSӨS1K$g? 6f(*>_BI@ 4 r/3L+ynm]= mB%OJR1Js5O 7_Ic̙ e4[T..i\ZVA$QEd?=d-:8O;rV~~\ЭxƞeڀJ!P t}(6&QV-\>SZC~wry#ek,}M(kHmlv@68MˍԘD 2,&wo>|5r[{5U!ye!AOQhu?]x&0 Bs+t{M8?x!o:H9~攖kZ5:,2d`¥q:N {fuj1[|v_(.D\Beyfnffv&:Ƣ}}}QUz]8a. ztzyQẐܸL7,+Ma*3d}$D;q/7Oʨd'HJZ5Gtx=m^OD"3 33ya!NO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c+dԄ\XH4 R`S`0~8`b >@~feeNDS a Q fgg6 AtGUi)|۷osI*]ph H`Q+g(8q0w|$gϞT ?Έ`|+++0333ܡ{4*>1NbX!:!>{$ U8;9!O?&BD$lI^AAwD SSSȕU{yC-C?L;^oqGCb|mȰ0 &t744*&pO<āhpB^ C뎌b+T|$+,NTJ/烵@J~{rssQ;P`?Q0w90t :swwo|QhȧO@bkuTq.{Mtpᅬ-'|D7%v΀EQ괳ā*qz?! p0~ߣ!ό AhΝ;wP"<;Q`u>$ [PP(+?Fa|"fBy@yݻw+K&q"|$NXټaNM1WPH6jE/..N␼˱L<b ?y Wed, 16 Jan 2013 17:02:03 +0100 supertransball2 (1.5-5) unstable; urgency=low * New Maintainer. (Closes: #661457) * Switch to package format 3.0 (quilt). Thanks Jari Aalto for the patch! (Closes: #668030). * Remove patch for command line option -f for fullscreen, it does not work. Instead improve supertransball2's manpage and suggest using the ingame key combinations ALT+1,2,3,4 or ALT+ENTER to control the video mode. (Closes: #590636) * Bump compat level to 9 and require debhelper >=9 for automatic hardening build flags. * Merge the old patches into one and modify the Makefile. Don't link against libsdl_sound anymore to avoid a superfluous dependency. * debian/control: - Add hardening wrapper to Build Depends. - Add Vcs-fields and point to supertransball2's git repository at git.debian.org. - Improve the package description. * debian/rules: - Use dh sequencer to simplify debian/rules. - Split readme.txt in README and changelog and install them in the right place. - Build with hardening=+all. * Add a desktop file, menu file and icons. * Update debian/copyright to copyright format 1.0. -- Markus Koschany Mon, 29 Oct 2012 15:48:17 +0100 supertransball2 (1.5-4) unstable; urgency=low * QA upload as part of Salzburg BSP. * Set Maintainer field to QA Group as the package has been orphaned. closes: 675219 -- Willi Mann Fri, 15 Jun 2012 15:10:04 +0200 supertransball2 (1.5-3) unstable; urgency=low * Patch to fix config file recreation. (closes: #334841) * Patch to fix crash cause of checking. (closes: #335166) * Update manual page. * Update standards version. -- Gürkan Sengün Sun, 6 Nov 2005 18:28:30 +0100 supertransball2 (1.5-2) unstable; urgency=low * Allocate enough memory for C string. (closes: #311861) -- Gürkan Sengün Tue, 7 Jun 2005 13:18:32 +0200 supertransball2 (1.5-1) unstable; urgency=low * Initial Release. (closes: #260882) -- Gürkan Sengün Tue, 20 Jul 2004 00:47:46 +0200 debian/manpages0000644000000000000000000000003112075451103010674 0ustar debian/supertransball2.6 debian/rules0000755000000000000000000000107712075456752010270 0ustar #!/usr/bin/make -f export DEB_BUILD_HARDENING=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ override_dh_auto_build: cd sources && $(MAKE) override_dh_auto_install-arch: cd sources && $(MAKE) install \ DESTDIR=$(CURDIR)/debian/supertransball2 override_dh_auto_install-indep: cd sources && $(MAKE) install-data \ DESTDIR=$(CURDIR)/debian/supertransball2-data find $(CURDIR)/debian/supertransball2-data \ -name "WS_FTP.LOG" -exec rm {} \; override_dh_installdocs: head -n 40 readme.txt > README tail -n 38 readme.txt > changelog dh_installdocs debian/watch0000644000000000000000000000044112075451103010214 0ustar # There hasn't been a new upstream release since 2005. The game is considered # being complete. Nevertheless let's check for new versions even if they are # only available for windows. version=3 http://www.braingames.getput.com/stransball2/ \ downloads/stransball2-v(\d)(\d+)-windows.zip debian/menu0000644000000000000000000000035512075451103010056 0ustar ?package(supertransball2):needs="X11" \ section="Games/Action" \ title="Super Transball 2" \ longtitle="Super Transball 2 - Thrust type of game" \ icon="/usr/share/pixmaps/supertransball2.xpm" \ command="/usr/games/supertransball2" debian/supertransball2.desktop0000644000000000000000000000036012075451103013701 0ustar [Desktop Entry] Type=Application Name=Super Transball 2 GenericName=Super Transball 2 Comment=Thrust type of game Comment[de]=Ein Spiel im Stil von Thrust Exec=supertransball2 Icon=supertransball2 Terminal=false Categories=Game;ArcadeGame; debian/install0000644000000000000000000000022112075451103010550 0ustar debian/supertransball2.desktop usr/share/applications debian/supertransball2.png usr/share/pixmaps debian/supertransball2.xpm usr/share/pixmaps debian/cheats.txt0000644000000000000000000000043112075451103011172 0ustar Transball 02 aojema 03 eulnfu 04 piwadf 05 qwejko 06 polter 07 bultos 08 fasmal 09 hipote 10 dastit 11 mertas 12 juhtyn 13 hugire 14 mnikot 15 hijopu Sample Pack 02 trompo 03 palill Second Assault 02 putrum 03 devila 04 winnie 05 semipa 06 consci 07 persep 08 mindst debian/compat0000644000000000000000000000000212075451103010362 0ustar 9 debian/control0000644000000000000000000000374012075451103010573 0ustar Source: supertransball2 Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Markus Koschany Build-Depends: debhelper (>= 9), hardening-wrapper, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl-sge-dev, libsdl1.2-dev Standards-Version: 3.9.4 Homepage: http://www.braingames.getput.com/stransball2/ Vcs-Git: git://anonscm.debian.org/pkg-games/supertransball2.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/supertransball2.git;a=summary Package: supertransball2 Architecture: any Depends: supertransball2-data (>= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} Description: Thrust type of game Super Transball 2 is a game which was inspired by ZARA THRUSTA for the Amiga 500. In each level the goal is to find the SPHERE, to capture it and to carry it to the upper part of the level. The main challenge is the gravity that attracts your ship which makes it inevitable to control the ship's thrust. Many other obstacles like cannons, tanks, doors or lasers will also try to make your journey difficult and don't be wasteful with your thrusters and weapons or you will run out of fuel in no time. Package: supertransball2-data Architecture: all Depends: ${misc:Depends} Suggests: supertransball2 Description: data files for supertransball2 Super Transball 2 is a game which was inspired by ZARA THRUSTA for the Amiga 500. In each level the goal is to find the SPHERE, to capture it and to carry it to the upper part of the level. The main challenge is the gravity that attracts your ship which makes it inevitable to control the ship's thrust. Many other obstacles like cannons, tanks, doors or lasers will also try to make your journey difficult and don't be wasteful with your thrusters and weapons or you will run out of fuel in no time. . Super Transball 2 ships with 3 unique level packs consisting of 26 levels in total. This package contains the data files for Super Transball 2. debian/supertransball2.dirs0000644000000000000000000000001212075451103013163 0ustar usr/games debian/copyright0000644000000000000000000000240612075451103011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: supertransball2 Source: http://www.braingames.getput.com/stransball2/ Files: * Copyright: 2003-2005, Santiago Ontañón License: GPL-2+ Files: debian/* Copyright: 2004-2005, Gürkan Sengün 2012, Willi Mann 2012, Markus Koschany License: GPL-2+ License: GPL-2+ 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . On Debian GNU/Linux systems, the complete text of the GNU General Public License 2 can be found in `/usr/share/common-licenses/GPL-2'. debian/supertransball2.xpm0000644000000000000000000002067712075451103013051 0ustar /* XPM */ static char *supertransball2_xpm[] = { "32 32 400 2", " c None", "BA c #110005", "CA c #0B0000", "DA c #0A0009", "EA c #090009", "FA c #3B003F", "GA c #320035", "HA c #060006", "IA c #010000", "JA c #19001A", "KA c #074245", "LA c #1B535D", "MA c #205D68", "NA c #004946", "OA c #000001", "PA c #430048", "QA c #5F0067", "RA c #020001", "SA c #1F0021", "TA c #6F007A", "UA c #670071", "VA c #2F0031", "WA c #62006A", "XA c #440049", "YA c #2A0029", "ZA c #3F5977", "aA c #1A6E76", "bA c #1B6C75", "cA c #345670", "dA c #280023", "eA c #000200", "fA c #28002C", "gA c #410046", "hA c #56005E", "iA c #73007E", "jA c #29002C", "kA c #310035", "lA c #73007F", "mA c #520059", "nA c #500057", "oA c #750082", "pA c #3D0043", "qA c #000700", "rA c #4A074F", "sA c #600A68", "tA c #4E1E51", "uA c #472E47", "vA c #523855", "wA c #504050", "xA c #343833", "yA c #4A214D", "zA c #540859", "0A c #4E0354", "1A c #730080", "2A c #4D0054", "3A c #47004E", "4A c #3D0041", "5A c #63006D", "6A c #71007C", "7A c #37003B", "8A c #2B122B", "9A c #4E3E4D", "+A c #545353", "/A c #565655", "AB c #565755", "BB c #575957", "CB c #585958", "DB c #4E4E4E", "EB c #535352", "FB c #514F50", "GB c #473F48", "HB c #552759", "IB c #4F0D53", "JB c #55025B", "KB c #3C0040", "LB c #6C0077", "MB c #450049", "NB c #220024", "OB c #0F000F", "PB c #63006C", "QB c #59125F", "RB c #524E51", "SB c #565656", "TB c #575757", "UB c #505050", "VB c #585858", "WB c #565756", "XB c #555754", "YB c #535152", "ZB c #514451", "aB c #3C1E3D", "bB c #4F0056", "cB c #740080", "dB c #5D0066", "eB c #140015", "fB c #45004B", "gB c #6E007A", "hB c #580E5E", "iB c #454144", "jB c #4B4D4B", "kB c #575857", "lB c #585857", "mB c #555655", "nB c #525253", "oB c #595B59", "pB c #444244", "qB c #360038", "rB c #70007C", "sB c #2C0030", "tB c #5A0061", "uB c #71007D", "vB c #590860", "wB c #494349", "xB c #545354", "yB c #493F49", "zB c #4C1E4E", "0B c #4C304C", "1B c #4F464F", "2B c #555555", "3B c #524852", "4B c #5C0063", "5B c #57005E", "6B c #6E0079", "7B c #2B002E", "8B c #61006A", "9B c #6B0075", "+B c #5E0066", "/B c #4B0051", "AC c #291929", "BC c #323432", "CC c #352734", "DC c #56085E", "EC c #670072", "FC c #56095C", "GC c #4A4849", "HC c #535453", "IC c #5C1463", "JC c #740081", "KC c #70007B", "LC c #2B002D", "MC c #28002A", "NC c #38003C", "OC c #180018", "PC c #0A0908", "QC c #160314", "RC c #56005D", "SC c #600E68", "TC c #444544", "UC c #565956", "VC c #552A59", "WC c #62006C", "XC c #400044", "YC c #000100", "ZC c #050004", "aC c #2E002F", "bC c #301B30", "cC c #3F403F", "dC c #3B3B3B", "eC c #504F4F", "fC c #3B363A", "gC c #090007", "hC c #090306", "iC c #2D302C", "jC c #3C3C3C", "kC c #444444", "lC c #383838", "mC c #161613", "nC c #010001", "oC c #000404", "pC c #002222", "qC c #003F3F", "rC c #005353", "sC c #080806", "tC c #252524", "uC c #3A3B3B", "vC c #3A3A3A", "wC c #262423", "xC c #002B2B", "yC c #005151", "zC c #006262", "0C c #006D6D", "1C c #007272", "2C c #007373", "3C c #006767", "4C c #002727", "5C c #000202", "6C c #004343", "7C c #2D3939", "8C c #3D3C3C", "9C c #414141", "+C c #4C4B4B", "/C c #3C3838", "AD c #2B2726", "BD c #095757", "CD c #006161", "DD c #004F4F", "ED c #002D2D", "FD c #007070", "GD c #007171", "HD c #006F6F", "ID c #007474", "JD c #005959", "KD c #040000", "LD c #1D1C1C", "MD c #434A4A", "ND c #575858", "OD c #4B4B4B", "PD c #434D4D", "QD c #204747", "RD c #082D2C", "SD c #007575", "TD c #006969", "UD c #000B0B", "VD c #004B4B", "WD c #006C6C", "XD c #145252", "YD c #434343", "ZD c #535353", "aD c #4B4F4F", "bD c #282A29", "cD c #065757", "dD c #006666", "eD c #003535", "fD c #006A6A", "gD c #001212", "hD c #005B5B", "iD c #0A5C5C", "jD c #374E4E", "kD c #515353", "lD c #595959", "mD c #4A5151", "nD c #1C4444", "oD c #1B2827", "pD c #065858", "qD c #006565", "rD c #015555", "sD c #032727", "tD c #006868", "uD c #001010", "vD c #005C5C", "wD c #0F5D5D", "xD c #4D4F4F", "yD c #5A5858", "zD c #585757", "0D c #565757", "1D c #555656", "2D c #474B4B", "3D c #455050", "4D c #393F3F", "5D c #313333", "6D c #304E4E", "7D c #264C4C", "8D c #1F2323", "9D c #020000", "+D c #001818", "/D c #000303", "AE c #375252", "BE c #545454", "CE c #595858", "DE c #434242", "EE c #3F3E3E", "FE c #575656", "GE c #33302F", "HE c #011918", "IE c #004C4C", "JE c #070605", "KE c #4A4B4B", "LE c #525252", "ME c #3E3E3E", "NE c #2E2928", "OE c #005252", "PE c #191817", "QE c #454545", "RE c #515151", "SE c #4A4A4A", "TE c #4D4D4D", "UE c #585656", "VE c #314140", "WE c #1F1E1D", "XE c #2E2929", "YE c #333434", "ZE c #353737", "aE c #373737", "bE c #363535", "cE c #323232", "dE c #313131", "eE c #363737", "fE c #3D3D3D", "gE c #393939", "hE c #3E3B3B", "iE c #234F4F", "jE c #050000", "kE c #033534", "lE c #264949", "mE c #425E5E", "nE c #556363", "oE c #1F2222", "pE c #172F2F", "qE c #445757", "rE c #5D6666", "sE c #4F5050", "tE c #3F4747", "uE c #696A6A", "vE c #626161", "wE c #232424", "xE c #282828", "yE c #2A2929", "zE c #272727", "0E c #2A2727", "1E c #0E5454", "2E c #006060", "3E c #001515", "4E c #005656", "5E c #0F4748", "6E c #436060", "7E c #3E4444", "8E c #112A2A", "9E c #244646", "+E c #586D6D", "/E c #646E6D", "AF c #515C5C", "BF c #3E4D4D", "CF c #6D7979", "DF c #687575", "EF c #042323", "FF c #082020", "GF c #071A1A", "HF c #111919", "IF c #1B2222", "JF c #075D5D", "KF c #005F5F", "LF c #003838", "MF c #2E3333", "NF c #040909", "OF c #222323", "PF c #5A5959", "QF c #616060", "RF c #5D5E5E", "SF c #394141", "TF c #537070", "UF c #607E7E", "VF c #375A5A", "WF c #224B4B", "XF c #476868", "YF c #3B5656", "ZF c #0D1010", "aF c #015151", "bF c #005E5E", "cF c #001919", "dF c #3E3C3C", "eF c #070707", "fF c #050404", "gF c #222121", "hF c #616161", "iF c #676767", "jF c #555858", "kF c #4E5353", "lF c #5E6464", "mF c #525A5A", "nF c #666F6F", "oF c #181818", "pF c #002E2E", "qF c #004848", "rF c #000505", "sF c #050505", "tF c #1F1F1F", "uF c #5D5D5D", "vF c #636363", "wF c #5A5A5A", "xF c #4F4E4E", "yF c #4E4D4D", "zF c #4A4949", "0F c #151515", "1F c #090909", "2F c #040404", "3F c #1E1E1E", "4F c #4F4F4F", "5F c #343434", "6F c #0A0A0A", "7F c #121212", "8F c #030303", "9F c #232323", "+F c #5F5F5F", "/F c #5B5B5B", "AG c #0B0B0B", "BG c #010101", "CG c #2C2C2C", "DG c #4C4C4C", "EG c #292929", "FG c #484848", "GG c #252525", "HG c #5E5E5E", "IG c #060606", "JG c #3F3F3F", "KG c #222222", "LG c #2F2F2F", "MG c #202020", "NG c #2B2B2B", "OG c #363636", "PG c #191919", " BACA DA EAFAGAHAIAJA ", " KALAMANA OA PAQARASATAUAVAWAXA ", " YAZAaAbAcAdAeAfAgAhAiAjAkAlAmAnAoApA ", " qArAsAtAuAvAwAxAyAzA0A1A2A3AlA4A5A6A7A ", " 8A9A+A/AABBBCBDBEBFBGBHBIBJBUAKBLBMBNB ", " OBPBQBRBCBSBSBTBUBSBVBWBXBYBZBaBbBcBdBeB ", " fBlAgBhBiBjBVBkBlBmBCBkBnBTBoBpBqB2ArBsB ", " FAtBrBuBvBwBkBxByBzB0B1BUB2BkB3B4B5B6B7B ", " OB8B9B+B/BACBCCCDCgBECFCGC2BTBHCICJCKCLC ", " MCNCOC PCQCRC+BLBSCTCUB2BUCVCWCXCEA ", " YC ZCaCnAbCcCdCeC2BfCgC ", " hCiCdCjCkClCmC nC ", " oCpCqCrCpC sCtCdCuCdCvCwC ", " xCyCzC0C1C2C3C4C 5C6C7C8CjC9C+C/CADBDCDDDoC ", " EDFD1CGDFDHDIDJDKDLDMDNDVBOD9CPDQDRDrCSDTDUD ", " VD2CFDFD1CWDXDkCYDZDVBVBaDbDcD1CdDeDGDfDgD ", " UDhDHDHDiDjDkDlD2BZDVBmDnDoDpDqDrDsD0CtDuD ", " vDwDxDyDzDTBTB2B2B0D1DOD2D3D4D5D6D7D8D9D+D/D ", " EDAEyDTBTBTBTB2B2BVBVBBEBECEDEEEFEFEGEHEIE ", " JEKEVBTBTBTBTBBE2BZDTBSBLEBEdCMEUBTBNEOEvD ", " PEQElDlDCEVBBEVBRESElDlDBELETE2BLEUEVEHDJD ", " WEXEYEZEZEaEbEjCcEdE8CaEeEdCMEfEgEhEiE2ChD ", " jEkElEmEnEoEpEqErEsEtEuEvEwExEyEzE0E1EID2E ", " 3E4EWD5E6E7E8E9E+E/EAFBFCFDFEFFFGFHFIFJFIDKF ", " +D3CFDLFMF NFOFPFQFRFSFTFUFVFWFXFYFZFaFGDCD ", " pCbFcFdFeFfFgFhFiFiF0DjFkFlFmFnFnFoF pFqF/D ", " rF uCeFsFtFuFvFwFwFlDxFPFyFzFyF0F ", " IA ME1F2F3FuFSB4FlD5F9COD6F ", " 7FTE3F8F9F+F/FREZD9CAG BGBG ", " CGDGEG 0FZDFGGGZDHG9F ", " IGJGOD 4FREKG3F2BZDLESBLGMG9CBG ", " eFgEdEdCNGOGPGsFLGOGgEdCaExEzE " }; debian/source/0000755000000000000000000000000012075451103010464 5ustar debian/source/include-binaries0000644000000000000000000000006612075451103013626 0ustar debian/supertransball2.png debian/supertransball2.xpm debian/source/format0000644000000000000000000000001412075451103011672 0ustar 3.0 (quilt) debian/supertransball2-data.dirs0000644000000000000000000000033212075451103014077 0ustar usr/share/games/supertransball2/demos usr/share/games/supertransball2/graphics usr/share/games/supertransball2/maps/sample-pack usr/share/games/supertransball2/maps/second-assault usr/share/games/supertransball2/sound debian/patches/0000755000000000000000000000000012075451103010613 5ustar debian/patches/series0000644000000000000000000000004712075451103012031 0ustar 0001-Fix-unix-paths-and-Makefile.patch debian/patches/0001-Fix-unix-paths-and-Makefile.patch0000644000000000000000000005131212075451103017313 0ustar From: Markus Koschany Date: Thu, 1 Nov 2012 01:38:45 +0100 Subject: Fix unix paths and Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes various path issues and the Makefile. It was created by merging all patches which existed before version 1.5-5. The original authors of those patches were Gürkan Sengün and jusTiCe8. Since version 1.5-5 the patch which added commandline options to supertransball2 is gone. It didn't work anyway. The Makefile has been further improved. Now supertransball2 doesn't link against libsdl_sound anymore which was superfluous. --- sources/Makefile | 21 ++++++++++++++++----- sources/configuration.cpp | 7 +++++++ sources/encoder.cpp | 12 +++++++++++- sources/game.cpp | 10 +++++++++- sources/main.cpp | 32 +++++++++++++++++++++++++++++++- sources/maps.cpp | 4 ++++ sources/replays.cpp | 8 ++++++++ sources/state_changepack.cpp | 8 ++++++-- sources/state_chooseship.cpp | 2 +- sources/state_endsequence.cpp | 2 +- sources/state_game.cpp | 10 +++++----- sources/state_gameover.cpp | 2 +- sources/state_instructions.cpp | 2 +- sources/state_interphase.cpp | 7 ++++++- sources/state_keyredefinition.cpp | 2 +- sources/state_levelfinished.cpp | 2 +- sources/state_logo.cpp | 2 +- sources/state_mainmenu.cpp | 6 +++++- sources/state_replay.cpp | 10 +++++----- sources/state_replaymanager.cpp | 11 ++++++++++- sources/state_typetext.cpp | 2 +- 21 files changed, 131 insertions(+), 31 deletions(-) diff --git a/sources/Makefile b/sources/Makefile index 08a898f..c8d7a72 100644 --- a/sources/Makefile +++ b/sources/Makefile @@ -1,3 +1,4 @@ +TARGET=supertransball2 OBJS := \ auxiliar.o configuration.o encoder.o \ enemies.o fonts.o game.o \ @@ -9,16 +10,26 @@ OBJS := \ state_replay.o state_replaymanager.o \ state_typetext.o tiles.o transball.o \ -all: stransball2 +all: $(TARGET) + %.o: %.cpp c++ -c -g3 -O3 $< -o $@ `sdl-config --cflags` -I/usr/local/include/SDL # dynamically linked binary: -stransball2: $(OBJS) - c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_sound -lSGE -I/usr/local/include/SDL - mv ./stransball2 .. +$(TARGET): $(OBJS) + c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSGE -I/usr/local/include/SDL + mv ./$(TARGET) .. clean: - rm -f stransball2 + rm -f ../$(TARGET) rm -f *.o + +install: + install -o root -g games -m 755 ../$(TARGET) $(DESTDIR)/usr/games + +install-data: + install -o root -g games -m 644 ../demos/* $(DESTDIR)/usr/share/games/supertransball2/demos/ + install -o root -g games -m 644 ../sound/* $(DESTDIR)/usr/share/games/supertransball2/sound/ + cp -r ../maps/* $(DESTDIR)/usr/share/games/supertransball2/maps/ + install -o root -g games -m 644 ../graphics/* $(DESTDIR)/usr/share/games/supertransball2/graphics/ diff --git a/sources/configuration.cpp b/sources/configuration.cpp index cb19a04..a84410b 100644 --- a/sources/configuration.cpp +++ b/sources/configuration.cpp @@ -1,4 +1,5 @@ #include "stdio.h" +#include #include "SDL.h" @@ -9,13 +10,17 @@ extern SDLKey PAUSE_KEY; extern bool fullscreen; extern int PIXEL_SIZE; +extern char *datadir; +extern char *confdir; bool load_configuration(void) { int a,b,c,d,e,f,g; FILE *fp; + chdir(confdir); fp=fopen("transball.cfg","r"); + chdir(datadir); if (fp==0) return false; @@ -46,7 +51,9 @@ void save_configuration(void) { FILE *fp; + chdir(confdir); fp=fopen("transball.cfg","w"); + chdir(datadir); if (fp==0) return; diff --git a/sources/encoder.cpp b/sources/encoder.cpp index 1ed931f..b718f3a 100644 --- a/sources/encoder.cpp +++ b/sources/encoder.cpp @@ -1,5 +1,9 @@ #include "stdio.h" - +#include "unistd.h" + +extern char *confdir; +extern char *datadir; + void encode(char *in,char *out) { int seed[16]={1,7,3,9,34,1,24,1, @@ -9,8 +13,11 @@ void encode(char *in,char *out) FILE *fpin; FILE *fpout; + chdir(datadir); fpin=fopen(in,"rb"); + chdir(confdir); fpout=fopen(out,"wb"); + chdir(datadir); if (fpin==0 || fpout==0) return; do{ @@ -40,8 +47,11 @@ void decode(char *in,char *out) FILE *fpin; FILE *fpout; + chdir(datadir); fpin=fopen(in,"rb"); + chdir(confdir); fpout=fopen(out,"wb"); + chdir(datadir); if (fpin==0 || fpout==0) return; do{ diff --git a/sources/game.cpp b/sources/game.cpp index 7547faf..a8cb728 100644 --- a/sources/game.cpp +++ b/sources/game.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include #include #include "SDL/SDL.h" @@ -84,6 +85,9 @@ extern TRANSBALL *game; /* Frames per second counter: */ extern int frames_per_sec; +extern char *datadir; +extern char *confdir; + FILE *replayfile; int replaynum; int replay_source=0; @@ -92,7 +96,7 @@ int replay_source=0; SDLKey THRUST_KEY=SDLK_q,ANTITHRUST_KEY=SDLK_a,LEFT_KEY=SDLK_o,RIGHT_KEY=SDLK_p; SDLKey FIRE_KEY=SDLK_SPACE,ATRACTOR_KEY=SDLK_RETURN; SDLKey PAUSE_KEY=SDLK_F1; -bool pause=false; +bool pause2=false; unsigned char old_keyboard[SDLK_LAST]; SDL_Surface *image=0,*image2=0; /* For the tittle screen, etc. */ @@ -133,8 +137,10 @@ bool gamecycle(SDL_Surface *screen,int sx,int sy) strcpy(tmp,"maps/"); strcat(tmp,levelpack); + chdir(datadir); decode(tmp,"decoding.tmp"); + chdir(confdir); fp=fopen("decoding.tmp","r+"); if (fp!=0) { fscanf(fp,"%i",&NLEVELS); @@ -167,6 +173,8 @@ bool gamecycle(SDL_Surface *screen,int sx,int sy) if (NLEVELS==-1) return false; + chdir(datadir); + switch(STATE) { case 0: if (!state_logo_cycle(screen,sx,sy,keyboard)) return false; break; diff --git a/sources/main.cpp b/sources/main.cpp index 6aac085..7f94891 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -11,6 +11,11 @@ #include "SDL/SDL.h" #include "SDL_mixer.h" #include "sge.h" + +#include +#include +#include +#include #include "fonts.h" #include "list.h" @@ -26,7 +31,7 @@ int SCREEN_X=320; int SCREEN_Y=240; int PIXEL_SIZE=1; int COLOUR_DEPTH=32; - + #ifdef _WIN32 //bool fullscreen=true; bool fullscreen=true; @@ -42,6 +47,8 @@ int frames_per_sec=0; int frames_per_sec_tmp=0; int init_time=0; +char *datadir="/usr/share/games/supertransball2/"; +char *confdir; /* Surfaces: */ SDL_Surface *screen_sfc=0,*buffer_screen_sfc=0; @@ -125,6 +132,29 @@ int main(int argc, char** argv) { setupTickCount(); #endif + + mode_t mode; + FILE *cfg; + confdir=(char*)malloc(strlen(getenv("HOME"))+50); strcpy(confdir,getenv("HOME")); + strcat(confdir,"/.supertransball2"); + mode=S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP; + mkdir(confdir,mode); + chdir(confdir); + mkdir("replays",mode); + mkdir("high",mode); + + cfg=fopen("transball.cfg", "r"); + if (!cfg) + { + cfg=fopen("transball.cfg", "w"); + fprintf(cfg,"%s","113 97 111 112 32 13 282"); + } + + fclose(cfg); + + printf("Configuration: %s\n",confdir); + printf("Data: %s\n",datadir); + chdir(datadir); int time,act_time; SDL_Event event; diff --git a/sources/maps.cpp b/sources/maps.cpp index 4c6a278..fa95368 100644 --- a/sources/maps.cpp +++ b/sources/maps.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "SDL/SDL.h" #include "SDL_mixer.h" @@ -13,6 +14,8 @@ #define EMPTY_ROWS 8 #define FACTOR 512 +extern char *datadir; +extern char *confdir; TRANSBALL_MAP::TRANSBALL_MAP(char *file) { @@ -25,6 +28,7 @@ TRANSBALL_MAP::TRANSBALL_MAP(char *file) S_enemyhit=0; S_switch=0; + chdir(datadir); fp=fopen(file,"r"); if (fp==0) { sx=0; diff --git a/sources/replays.cpp b/sources/replays.cpp index 1d4e885..5d95fc5 100644 --- a/sources/replays.cpp +++ b/sources/replays.cpp @@ -1,5 +1,8 @@ #include "stdio.h" +#include "unistd.h" +extern char* datadir; +extern char* confdir; int replay_parameters(char *file, int *ship, int *length, char *levelname) { @@ -8,7 +11,9 @@ int replay_parameters(char *file, int *ship, int *length, char *levelname) int l,end; int v1,v2,fuel; + chdir(confdir); fp=fopen(file,"rb"); + chdir(datadir); if (fp==0) return -1; v1=fgetc(fp); v2=fgetc(fp); @@ -35,8 +40,11 @@ void replay_copy(char *f1,char *f2) FILE *fp1,*fp2; + chdir(confdir); fp1=fopen(f1,"rb"); + /* chdir(confdir); */ fp2=fopen(f2,"wb"); + chdir(datadir); do{ fputc(fgetc(fp1),fp2); diff --git a/sources/state_changepack.cpp b/sources/state_changepack.cpp index 41c28da..ec73aba 100644 --- a/sources/state_changepack.cpp +++ b/sources/state_changepack.cpp @@ -8,6 +8,7 @@ #endif #include +#include "unistd.h" #include #include #include "SDL/SDL.h" @@ -43,7 +44,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS]; extern char *levelcode[MAXLEVELS]; extern int initialfuel[MAXLEVELS]; +extern char *confdir; +extern char *datadir; bool state_changepack_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) { @@ -97,7 +100,8 @@ bool state_changepack_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *key #else DIR *dp; struct dirent *ep; - + + chdir(datadir); dp = opendir ("maps"); if (dp != NULL) { diff --git a/sources/state_chooseship.cpp b/sources/state_chooseship.cpp index 6de61e2..5a25c04 100644 --- a/sources/state_chooseship.cpp +++ b/sources/state_chooseship.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_endsequence.cpp b/sources/state_endsequence.cpp index 963a9f7..813ae67 100644 --- a/sources/state_endsequence.cpp +++ b/sources/state_endsequence.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_game.cpp b/sources/state_game.cpp index 10f515f..56f2321 100644 --- a/sources/state_game.cpp +++ b/sources/state_game.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -69,11 +69,11 @@ bool state_game_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) int retval=0; if (keyboard[PAUSE_KEY] && !old_keyboard[PAUSE_KEY]) { - if (pause) pause=false; - else pause=true; + if (pause2) pause2=false; + else pause2=true; } /* if */ - if (!pause) { + if (!pause2) { retval=game->cycle(keyboard); if (replayfile!=0) { fputc(keyboard[THRUST_KEY],replayfile); @@ -88,7 +88,7 @@ bool state_game_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) game->render(screen,sx,sy); - if (pause) { + if (pause2) { surface_fader(screen,0.5F,0.5F,0.5F,-1,0); font_print(sx/2,sy/2-16,"PAUSE",screen); } else { diff --git a/sources/state_gameover.cpp b/sources/state_gameover.cpp index 7c02012..4d9f5c4 100644 --- a/sources/state_gameover.cpp +++ b/sources/state_gameover.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_instructions.cpp b/sources/state_instructions.cpp index acd6e03..fb67d09 100644 --- a/sources/state_instructions.cpp +++ b/sources/state_instructions.cpp @@ -41,7 +41,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_interphase.cpp b/sources/state_interphase.cpp index 41a7810..52d10bd 100644 --- a/sources/state_interphase.cpp +++ b/sources/state_interphase.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include #include #include "SDL/SDL.h" @@ -43,7 +44,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS]; extern char *levelcode[MAXLEVELS]; extern int initialfuel[MAXLEVELS]; +extern char *datadir; +extern char *confdir; bool state_interphase_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) { @@ -92,7 +95,9 @@ bool state_interphase_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *key if (game=0) delete game; game=new TRANSBALL("graphics/","sound/","maps/",initialfuel[level],levelnames[level],ship_type); sprintf(tmp,"replays/replay%.3i.rpl",replaynum++); + chdir(confdir); replayfile=fopen(tmp,"wb+"); + chdir(datadir); fputc(32,replayfile); fputc(0,replayfile); /* level name: */ diff --git a/sources/state_keyredefinition.cpp b/sources/state_keyredefinition.cpp index b062e62..64b7709 100644 --- a/sources/state_keyredefinition.cpp +++ b/sources/state_keyredefinition.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_levelfinished.cpp b/sources/state_levelfinished.cpp index 31ccd8a..863efdc 100644 --- a/sources/state_levelfinished.cpp +++ b/sources/state_levelfinished.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_logo.cpp b/sources/state_logo.cpp index 1487e8b..600f305 100644 --- a/sources/state_logo.cpp +++ b/sources/state_logo.cpp @@ -41,7 +41,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; diff --git a/sources/state_mainmenu.cpp b/sources/state_mainmenu.cpp index e689caf..79f9f67 100644 --- a/sources/state_mainmenu.cpp +++ b/sources/state_mainmenu.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include #include #include "SDL/SDL.h" @@ -41,7 +42,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -57,6 +58,8 @@ extern List levelpacks; extern int act_levelpack; extern char levelpack[256]; +extern char *datadir; +extern char *confdir; bool state_mainmenu_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) { @@ -157,6 +160,7 @@ bool state_mainmenu_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keybo tittle_alpha=255; sprintf(tmp,"demos/demo%i.rpl",((rand()%40)/10)+1); + chdir(datadir); replayfile=fopen(tmp,"rb"); v1=fgetc(replayfile); v2=fgetc(replayfile); // To maintain compatibility with a previous version diff --git a/sources/state_replay.cpp b/sources/state_replay.cpp index a38ac37..d8c172f 100644 --- a/sources/state_replay.cpp +++ b/sources/state_replay.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -71,11 +71,11 @@ bool state_replay_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboar SUBSTATE++; if (keyboard[PAUSE_KEY] && !old_keyboard[PAUSE_KEY]) { - if (pause) pause=false; - else pause=true; + if (pause2) pause2=false; + else pause2=true; } /* if */ - if (!pause) { + if (!pause2) { int i; unsigned char tmp[SDLK_LAST]; for(i=0;irender(screen,sx,sy); - if (pause) { + if (pause2) { surface_fader(screen,0.5F,0.5F,0.5F,-1,0); font_print(sx/2,sy/2-16,"PAUSE",screen); } else { diff --git a/sources/state_replaymanager.cpp b/sources/state_replaymanager.cpp index e767de2..14a7e05 100644 --- a/sources/state_replaymanager.cpp +++ b/sources/state_replaymanager.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include #include #include "SDL/SDL.h" @@ -43,7 +44,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80]; @@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS]; extern char *levelcode[MAXLEVELS]; extern int initialfuel[MAXLEVELS]; +extern char *datadir; +extern char *confdir; bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard) { @@ -103,6 +106,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char * DIR *dp; struct dirent *ep; + chdir(confdir); if (replay_source==0) dp = opendir ("replays"); else dp = opendir ("high"); if (dp != NULL) @@ -124,6 +128,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char * } (void) closedir (dp); } + chdir(datadir); #endif first_file=0; act_file=0; @@ -210,7 +215,9 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char * if (replay_source==0) sprintf(tmp,"replays/%s",files[act_file]); else sprintf(tmp,"high/%s",files[act_file]); + chdir(confdir); replayfile=fopen(tmp,"rb"); + chdir(datadir); v1=fgetc(replayfile); v2=fgetc(replayfile); // To maintain compatibility with a previous version @@ -309,6 +316,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char * DIR *dp; struct dirent *ep; + chdir(confdir); dp = opendir ("replays"); if (dp != NULL) { @@ -329,6 +337,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char * } (void) closedir (dp); } + chdir(datadir); #endif /* Check if this replay is a highscore: */ diff --git a/sources/state_typetext.cpp b/sources/state_typetext.cpp index da45793..c9c7995 100644 --- a/sources/state_typetext.cpp +++ b/sources/state_typetext.cpp @@ -43,7 +43,7 @@ extern int replay_source; extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY; extern SDLKey FIRE_KEY,ATRACTOR_KEY; extern SDLKey PAUSE_KEY; -extern bool pause; +extern bool pause2; extern unsigned char old_keyboard[SDLK_LAST]; extern SDL_Surface *image,*image2; extern char edit_text[80];