debian/0000755000000000000000000000000012164232453007170 5ustar debian/source/0000755000000000000000000000000012164232453010470 5ustar debian/source/format0000644000000000000000000000001412164232453011676 0ustar 3.0 (quilt) debian/parsec47.60000644000000000000000000000547612164232453010723 0ustar .\" (c) 2007 Miriam Ruiz .\" (c) 2003 Kenta Cho .\" .\" This document 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 package 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 package; if not, write to the Free Software .\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA .TH "PARSEC47" "6" "" "" "" .SH "NAME" parsec47 \- retromodern hispeed shmup .SH "DESCRIPTION" Defeat retro enemies modernly. PARSEC47 is a retromodern hi\-speed shoot 'em up where you get to defeat retro enemies modernly. The player must destroy enemies while avoiding their projectiles and collecting green clusters of boxes for points. .SH "OPTIONS" These options are available: .TP \fB\-brightness n\fR Set the brightness of the screen.(n = 0 \- 100, default = 100) .TP \fB\-luminous n\fR Set the luminous intensity.(n = 0 \- 100, default = 0) .TP \fB\-lowres\fR Use the low resolution mode. .TP \fB\-nosound\fR Stop the sound. .TP \fB\-window\fR Launch the game in a window. .TP \fB\-fullscreen\fR Launch the game in fullscreen. .TP \fB\-reverse\fR Reverse the shot key and the slow key. .TP \fB\-slowship\fR Use the slow speed ship in all game modes. .TP \fB\-nowait\fR Disable the intentional slowdown. .SH "USAGE" How to play: .TP \fBMovement\fR Arrow/Num key / Joystick .TP \fBShot\fR [Z][L\-Ctrl] / Trigger 1, 4, 5, 8 .TP \fBSlow / Roll, Lock\fR [X][L\-Alt][L\-Shift] / Trigger 2, 3, 6, 7 .TP \fBPause\fR [P] .P Select the stage by a keyboard or a joystick. Press a shot key to start the game. All stages are endless and created randomly each time. The game continues until you lose all ships. Control your ship and destroy enemies. While holding a slow key, the ship becomes slow. You can also select the game mode from 2 types. Press a slow key in the title screen to change the game mode. Each mode has a different barrage pattern. Roll mode: Hold a slow key to charge the roll shot energy. The roll shot is fired when you release the key. Lock mode: While holding a slow key, you can shot the lock\-on laser that aims an enemy in the front of your ship. The ship extends 200,000 and every 500,000 points. .SH "SEE ALSO" You can find more about the game on its homepage: http://www.asahi\-net.or.jp/~cs8k\-cyu/windows/p47_e.html .SH "AUTHOR" This game has been written by Kenta Cho debian/docs0000644000000000000000000000003012164232453010034 0ustar readme_e.txt readme.txt debian/parsec47.manpages0000644000000000000000000000002212164232453012327 0ustar debian/parsec47.6 debian/copyright0000644000000000000000000000521612164232453011127 0ustar This package was debianized by Miriam Ruiz on Sat, 25 Aug 2007 19:58:40 +0000. It was downloaded from http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_e.html Upstream Author: Kenta Cho Copyright: Copyright 2003 Kenta Cho import/SDL* : Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import/SDL*: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2'. The Debian packaging is Copyright 2007, Miriam Ruiz and is licensed under the GPL, see `/usr/share/common-licenses/GPL-3'. debian/README.source0000644000000000000000000000021112164232453011341 0ustar This package uses quilt for patch management, for more information see the file /usr/share/doc/quilt/README.source in the quilt package. debian/parsec47.xpm0000644000000000000000000001110112164232453011340 0ustar /* XPM */ static char *dummy[]={ "32 32 153 2", ".g c #000000", "#t c #020202", "#u c #040404", ".X c #050505", ".O c #060606", ".J c #070707", ".W c #080808", "#l c #090909", ".f c #0b0b0b", ".8 c #0c0c0c", "#N c #0e0e0e", ".# c #0f0f0f", "#6 c #101010", "#F c #111111", ".M c #121212", ".1 c #131313", "aw c #141414", "av c #151515", "al c #161616", ".c c #171717", "#d c #181818", ".v c #191919", ".P c #1a1a1a", "## c #1b1b1b", "Qt c #1e1e1e", ".j c #202020", ".K c #212121", "#. c #222222", ".h c #232323", ".N c #242424", ".3 c #282828", "an c #292929", "#g c #2a2a2a", "at c #2c2c2c", "#O c #2d2d2d", ".d c #2e2e2e", ".U c #2f2f2f", "#R c #313131", ".u c #323232", "#C c #333333", "#q c #373737", "#J c #393939", ".a c #3b3b3b", "ah c #3c3c3c", ".I c #3e3e3e", ".6 c #3f3f3f", ".m c #424242", "#M c #444444", "ai c #454545", "ak c #464646", "#9 c #474747", "#w c #484848", ".Q c #494949", "#5 c #505050", "#h c #515151", "#Q c #525252", ".t c #555555", "#y c #575757", ".5 c #595959", "#X c #5a5a5a", ".n c #5b5b5b", "#r c #5f5f5f", "#2 c #606060", "#a c #616161", "ae c #626262", "#c c #636363", "#Z c #656565", "#I c #666666", "#Y c #696969", "#x c #6a6a6a", ".l c #6b6b6b", ".2 c #6c6c6c", ".s c #6d6d6d", ".o c #6e6e6e", "as c #6f6f6f", "#3 c #727272", "#j c #747474", "aq c #757575", ".T c #767676", "#A c #777777", "#U c #787878", ".r c #797979", "#1 c #7e7e7e", ".H c #7f7f7f", "#E c #808080", ".0 c #828282", "aj c #838383", ".R c #848484", "#n c #858585", "#T c #898989", "#8 c #8a8a8a", "ad c #8b8b8b", ".B c #8c8c8c", "#0 c #8d8d8d", ".p c #8f8f8f", ".y c #909090", "#4 c #919191", ".9 c #929292", ".C c #939393", ".Y c #979797", ".4 c #989898", "#L c #999999", ".x c #9c9c9c", ".z c #9d9d9d", ".7 c #9e9e9e", "ap c #9f9f9f", ".D c #a2a2a2", "#m c #a5a5a5", "#P c #a6a6a6", "ab c #a7a7a7", "#W c #a8a8a8", "ac c #a9a9a9", ".G c #ababab", "#z c #b1b1b1", "a# c #b2b2b2", "#K c #b4b4b4", "#s c #b5b5b5", ".S c #b8b8b8", ".w c #b9b9b9", "#k c #bababa", "#v c #bbbbbb", ".E c #bcbcbc", ".i c #bfbfbf", ".F c #c0c0c0", "#B c #c2c2c2", ".V c #c3c3c3", "#b c #c4c4c4", ".Z c #c6c6c6", ".b c #c7c7c7", ".k c #c8c8c8", ".L c #c9c9c9", "#o c #cacaca", "ao c #cbcbcb", "#H c #cccccc", "am c #cdcdcd", "#p c #cecece", "#i c #cfcfcf", "ar c #d1d1d1", "#7 c #d4d4d4", ".e c #d5d5d5", "#e c #d7d7d7", "ag c #d9d9d9", "a. c #dcdcdc", "#G c #dddddd", ".q c #e0e0e0", ".A c #e2e2e2", "aa c #e5e5e5", "#f c #e8e8e8", "au c #eaeaea", "#V c #ececec", "#S c #eeeeee", "af c #f8f8f8", "#D c #ffffff", "Qt.#.#.a.b.c.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.d.e", ".f.g.g.h.i.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.j.k.l", ".m.n.o.p.q.r.s.t.u.v.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.j.k.s.g", ".w.x.y.z.A.B.C.D.E.F.G.H.I.J.g.g.g.g.g.g.g.g.g.g.g.g.g.K.L.o.g.g", ".M.g.g.N.F.g.g.g.O.P.Q.R.S.w.T.P.g.g.g.g.g.g.g.g.g.g.K.L.s.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.X.a.Y.Z.0.1.g.g.g.g.g.g.g.j.L.2.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.3.4.Z.5.g.g.g.g.g.j.L.s.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.6.F.7.M.g.g.K.L.2.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.g.8.9.b#.##.L.s.g.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.g.g.g#a#b.L#c.g.g.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.g.g.g#d#e#f#g.g.g.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.g.g#..k#a#h#i.h.g.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g.g#..L.2.g.g#j#k#l.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g.g#..L.2.g.g.g.g#m#n.g.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g.g#.#o.l.g.g.g.g.g#d#p#q.g.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.g#..L.l.g.g.g.g.g.g.g#r#s#t.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g.g.K#o.l.g.g.g.g.g.g.g.g#u#v#w.g.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g.g#.#o#x.g.g.g.g.g.g.g.g.g.g#y#z#t.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.g#.#o#x#A#v#v.g.g#v#v#v#v#v#v.s#B.U.g.g.g", ".#.g.g.U.V.W.g.g.g.g.g.h.L.l#C#D#D#D.g.g#v#v#v#v#D#D#A.0#E.g.g.g", ".#.g.g.U.V.W.g.g.g.g.h.L.l#F#G#H#D#D.g.g.g.g.g#I#D#D#.#J#K#u.g.g", ".#.g.g.U.V.W.g.g.g.h.L#x.g#L#H#M#D#D.g.g.g.g.g#G#D#L.g#N.F.N.g.g", ".#.g.g#O#B.O.g.g.h#o.l.g.t#D#C#M#D#D.g.g.g.g#I#D#D#..g.g#P#Q.g.g", ".#.g.g#R.b#l.g.N#o.l.g.g#S#H#A#L#D#D#A#..g#F#G#D#L.g.g.g#T#U.g.g", ".#.g#c#B#V#W#X#v#Y.g.g.g#D#D#D#D#D#D#D#M.g#A#D#D#..g.g.g#Z#0.g.g", ".##1.E#2#k#3#D#4.g.g.g.g.g.g.g#M#D#D.g.g#F#S#D#A.g.g.g.g#5#L.g.g", "#J.b#6.P#7#K#8#z.#.g.g.g.g.g.g#M#D#D.g.g#A#D#S#F.g.g.g.g#9.D.g.g", "#ia.#La##Daa.x#f.Sabacacacacacacacacacacacacacacacacac#m.i.Aab#W", "ad.Eaeafagah#9#eaeai#9#9#9#9#9#9#9#9#9#9#9#9#9#9#9#9#9#Maj#saiak", "al.wamaj#K.g.o.G.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g#a#8.g.g", "anaoa.ap#7.D.i.h.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g#Taq.g.g", "arasat.Yau#1.havavavavavavavavavavavavavavavavavavavavalac.navaw"}; debian/menu0000644000000000000000000000022312164232453010054 0ustar ?package(parsec47):needs="X11" section="Games/Action"\ title="PARSEC47" command="/usr/games/parsec47" \ icon="/usr/share/pixmaps/parsec47.xpm" debian/changelog0000644000000000000000000000425612164232453011051 0ustar parsec47 (0.2.dfsg1-6) unstable; urgency=low * Added build-depends on libphobos-dev -- Peter De Wachter Sun, 30 Jun 2013 13:09:08 +0200 parsec47 (0.2.dfsg1-5) unstable; urgency=low * Ported to D language version 2 (closes: #707267) * Switch dh-style minimal rules file * Mark -data package as Multi-Arch: foreign * Conforms to standards 3.9.4 -- Peter De Wachter Mon, 20 May 2013 18:48:44 +0200 parsec47 (0.2.dfsg1-4) unstable; urgency=low * Team upload. * Explicitly build with D version 1 (closes: #653087) * Switch to format 3.0 (quilt) and drop build-dep on quilt * Provide build-arch and build-indep targets * Conforms to standards 3.9.2 -- Vincent Fourmond Sat, 07 Jan 2012 10:27:49 +0100 parsec47 (0.2.dfsg1-3) unstable; urgency=low [ Peter De Wachter ] * Hard-coded link order to avoid "circular initialization dependency" error (Closes: #583638). See also #521582. * Bumped Standards-Version to 3.8.4: - Added README.source. [ Paul Wise ] * Drop DMUA since Miriam Ruiz is a DD and Peter is not a DM * Point at the right version of the LGPL in copyright information * No ELF binaries in parsec47-data, don't need ${shlibs:Depends} * Explicitly use dpkg-source format 1.0 for now * Drop GLU from the Makefile and Build-Depends since it isn't used -- Peter De Wachter Sat, 29 May 2010 11:20:26 +0200 parsec47 (0.2.dfsg1-2) unstable; urgency=low [ Peter De Wachter ] * Corrected a few typos. * Patched for changes in the D language. (Closes: #574323) * Linking with -lGL to make binutils-gold happy. (Closes: #556050) [ Miriam Ruiz ] * Added DM-Upload-Allowed tag to control to allow uploads from Debian Maintainers. * Removed Homepage from long description and added Homepage tag to control [ Ansgar Burchardt ] * Remove deprecated Encoding key from .desktop file -- Peter De Wachter Wed, 17 Mar 2010 23:57:42 +0100 parsec47 (0.2.dfsg1-1) unstable; urgency=low * Initial release (Closes: #439714) [ Barry deFreese ] * Add watch file -- Miriam Ruiz Sat, 25 Aug 2007 19:58:40 +0000 debian/compat0000644000000000000000000000000212164232453010366 0ustar 9 debian/watch0000644000000000000000000000023612164232453010222 0ustar version=3 opts="uversionmangle=s/_/\./,dversionmangle=s/[+.]dfsg(.?\d+)?$//" \ http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_e.html p47_([\d]_[\d]+)\.zip debian/rules0000755000000000000000000000072212164232453010251 0ustar #!/usr/bin/make -f ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) DFLAGS = -fdebug else DFLAGS = -frelease endif %: dh $@ override_dh_auto_build: dh_auto_build -- DFLAGS="$(DFLAGS)" get-orig-source: dh_testdir dh_testroot wget http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_0_2.zip unzip p47_0_2.zip rm p47/*.dll rm p47/*.exe rm p47/lib/*.lib rm p47/resource/*.RES tar cvfz ../parsec47_0.2.dfsg1.orig.tar.gz p47 rm -rf p47_0_2.zip parsec47 debian/control0000644000000000000000000000274612164232453010604 0ustar Source: parsec47 Section: games Priority: extra Maintainer: Debian Games Team Uploaders: Miriam Ruiz , Peter De Wachter Build-Depends: debhelper (>= 9), gdc (>= 4.8.1), libphobos-dev, libgl1-mesa-dev | libgl-dev, libsdl1.2-dev, libsdl-mixer1.2-dev, libbulletml-dev Build-Conflicts: libphobos-4.4-dev Standards-Version: 3.9.4 Homepage: http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_e.html Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/parsec47/ Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-games/packages/trunk/parsec47/ Package: parsec47 Architecture: any Depends: parsec47-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Description: retromodern hispeed shmup PARSEC47 is a retromodern hi-speed shoot 'em up where you get to defeat retro enemies modernly. The player must destroy enemies while avoiding their projectiles and collecting green clusters of boxes for points. . PARSEC47 is another gem among many by Kenta Cho. Package: parsec47-data Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Recommends: parsec47 Description: retromodern hispeed shmup - game data PARSEC47 is a retromodern hi-speed shoot 'em up where you get to defeat retro enemies modernly. The player must destroy enemies while avoiding their projectiles and collecting green clusters of boxes for points. . This package includes the architecture-independent data for the game PARSEC47. debian/patches/0000755000000000000000000000000012164232453010617 5ustar debian/patches/series0000644000000000000000000000017512164232453012037 0ustar imports.patch fixes.patch directories.patch windowed.patch dotfile.patch makefile.patch window-resizing.patch dlang_v2.patch debian/patches/dotfile.patch0000644000000000000000000000354212164232453013272 0ustar # Copyright (C) 2007 Peter De Wachter # Distributed under the same license as the game. See debian/copyright. --- a/src/abagames/p47/P47PrefManager.d +++ b/src/abagames/p47/P47PrefManager.d @@ -7,6 +7,8 @@ private: import std.stream; +import std.string; +import std.c.stdlib; import abagames.util.PrefManager; /** @@ -16,7 +18,7 @@ public: static const int PREV_VERSION_NUM = 10; static const int VERSION_NUM = 20; - static const char[] PREF_FILE = "p47.prf"; + static const char[] PREF_FILE = ".p47.prf"; static const int MODE_NUM = 2; static const int DIFFICULTY_NUM = 4; static const int REACHED_PARSEC_SLOT_NUM = 10; @@ -24,6 +26,13 @@ int reachedParsec[MODE_NUM][DIFFICULTY_NUM]; int selectedDifficulty, selectedParsecSlot, selectedMode; + public static char[] home_dir() { + char * home = getenv("HOME"); + if (home is null) + throw new Error("HOME environment variable is not defined"); + return std.string.toString(home); + } + private void init() { for (int k = 0; k < MODE_NUM; k++) { for (int i = 0; i < DIFFICULTY_NUM; i++) { @@ -53,7 +62,7 @@ auto File fd = new File; try { int ver; - fd.open(PREF_FILE); + fd.open(home_dir() ~ "/" ~ PREF_FILE); fd.read(ver); if (ver == PREV_VERSION_NUM) { init(); @@ -74,7 +83,7 @@ fd.read(selectedDifficulty); fd.read(selectedParsecSlot); fd.read(selectedMode); - } catch (Error e) { + } catch (Exception e) { init(); } finally { fd.close(); @@ -83,7 +92,7 @@ public void save() { auto File fd = new File; - fd.create(PREF_FILE); + fd.create(home_dir ~ "/" ~ PREF_FILE); fd.write(VERSION_NUM); for (int k = 0; k < MODE_NUM; k++) { for (int i = 0; i < DIFFICULTY_NUM; i++) { debian/patches/windowed.patch0000644000000000000000000000223612164232453013463 0ustar # Copyright (C) 2007 Miriam Ruiz # Distributed under the same license as the game. See debian/copyright. --- a/src/abagames/p47/P47Boot.d +++ b/src/abagames/p47/P47Boot.d @@ -30,7 +30,7 @@ private void usage(char[] args0) { Logger.error - ("Usage: " ~ args0 ~ " [-brightness [0-100]] [-luminous [0-100]] [-nosound] [-window] [-reverse] [-lowres] [-slowship] [-nowait]"); + ("Usage: " ~ args0 ~ " [-brightness [0-100]] [-luminous [0-100]] [-nosound] [-window] [-fullscreen] [-reverse] [-lowres] [-slowship] [-nowait]"); } private void parseArgs(char[][] args) { @@ -68,6 +68,9 @@ case "-window": Screen3D.windowMode = true; break; + case "-fullscreen": + Screen3D.windowMode = false; + break; case "-reverse": pad.buttonReversed = true; break; --- a/src/abagames/util/sdl/Screen3D.d +++ b/src/abagames/util/sdl/Screen3D.d @@ -22,7 +22,7 @@ static int width = 640; static int height = 480; static bool lowres = false; - static bool windowMode = false; + static bool windowMode = true; static float nearPlane = 0.1; static float farPlane = 1000; debian/patches/makefile.patch0000644000000000000000000000100512164232453013411 0ustar # Copyright (C) 2007 Marcel Unbehaun # Copyright (C) 2007 Miriam Ruiz # Distributed under the same license as the game. See debian/copyright. --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +GDC=gdc +DSRC=src/mt.d $(shell find import src/abagames -name "*.d" | sort) +EXE=parsec47 + +all: $(EXE) + +$(EXE): $(DSRC) + $(GDC) -o $@ -Iimport -Isrc -Wno-deprecated $(DFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DSRC) -lSDL -lGL -lSDL_mixer -lbulletml + +clean: + rm -f $(EXE) + debian/patches/directories.patch0000644000000000000000000000361512164232453014161 0ustar # Copyright (C) 2007 Miriam Ruiz # Distributed under the same license as the game. See debian/copyright. --- a/src/abagames/util/sdl/Sound.d +++ b/src/abagames/util/sdl/Sound.d @@ -18,8 +18,8 @@ public: static bool noSound = false; static int fadeOutSpeed = 1280; - static char[] soundsDir = "sounds/"; - static char[] chunksDir = "sounds/"; + static char[] soundsDir = "/usr/share/games/parsec47/sounds/"; + static char[] chunksDir = "/usr/share/games/parsec47/sounds/"; public static void init() { if (noSound) return; --- a/src/abagames/util/sdl/Texture.d +++ b/src/abagames/util/sdl/Texture.d @@ -16,7 +16,7 @@ */ public class Texture { public: - static char[] imagesDir = "images/"; + static char[] imagesDir = "/usr/share/games/parsec47/images/"; private: GLuint num; --- a/src/abagames/p47/BarrageManager.d +++ b/src/abagames/p47/BarrageManager.d @@ -30,10 +30,20 @@ int parserNum[BARRAGE_TYPE]; private: const char[][BARRAGE_TYPE] dirName = - ["morph", "small", "smallmove", "smallsidemove", - "middle", "middlesub", "middlemove", "middlebackmove", - "large", "largemove", - "morph_lock", "small_lock", "middlesub_lock"]; + ["/usr/share/games/parsec47/morph", + "/usr/share/games/parsec47/small", + "/usr/share/games/parsec47/smallmove", + "/usr/share/games/parsec47/smallsidemove", + "/usr/share/games/parsec47/middle", + "/usr/share/games/parsec47/middlesub", + "/usr/share/games/parsec47/middlemove", + "/usr/share/games/parsec47/middlebackmove", + "/usr/share/games/parsec47/large", + "/usr/share/games/parsec47/largemove", + "/usr/share/games/parsec47/morph_lock", + "/usr/share/games/parsec47/small_lock", + "/usr/share/games/parsec47/middlesub_lock" + ]; public void loadBulletMLs() { for (int i = 0; i< BARRAGE_TYPE; i++) { debian/patches/window-resizing.patch0000644000000000000000000000174712164232453015010 0ustar # Copyright (C) 2007 Peter De Wachter # Distributed under the same license as the game. See debian/copyright. --- a/src/abagames/util/sdl/Screen3D.d +++ b/src/abagames/util/sdl/Screen3D.d @@ -28,6 +28,8 @@ private: + static Uint32 videoFlags; + protected abstract void init(); protected abstract void close(); @@ -42,7 +44,6 @@ "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError())); } // Create an OpenGL screen. - Uint32 videoFlags; if (windowMode) { videoFlags = SDL_OPENGL | SDL_RESIZABLE; } else { @@ -61,6 +62,11 @@ // Reset viewport when the screen is resized. private void screenResized() { + if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) { + throw new Exception + ("Unable to resize SDL screen: " ~ std.string.toString(SDL_GetError())); + } + glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); debian/patches/dlang_v2.patch0000644000000000000000000011040412164232453013334 0ustar Description: port to D language version 2 With this patch the code is accapted by gdc-4.6 0.29.1-4.6.4-3 without triggering deprecated feature warnings/errors. Author: Peter De Wachter --- a/src/abagames/p47/BarrageManager.d +++ b/src/abagames/p47/BarrageManager.d @@ -7,8 +7,9 @@ private: import std.string; +import std.conv; import std.path; -import dirent; +import std.file; import bulletml; import abagames.p47.MorphBullet; import abagames.util.Logger; @@ -29,7 +30,7 @@ BulletMLParserTinyXML* parser[BARRAGE_TYPE][BARRAGE_MAX]; int parserNum[BARRAGE_TYPE]; private: - const char[][BARRAGE_TYPE] dirName = + const string[BARRAGE_TYPE] dirName = ["/usr/share/games/parsec47/morph", "/usr/share/games/parsec47/small", "/usr/share/games/parsec47/smallmove", @@ -47,22 +48,17 @@ public void loadBulletMLs() { for (int i = 0; i< BARRAGE_TYPE; i++) { - DIR* d = opendir(dirName[i]); - int j; - for (j = 0;;) { - char* fn = readdir_filename(d); - if (!fn) - break; - char[] fileName = std.string.toString(fn); - if (getExt(fileName) != "xml") + int j = 0; + auto files = dirEntries(dirName[i], SpanMode.shallow); + foreach (string fileName; files) { + if (extension(fileName) != ".xml") continue; - Logger.info("Load BulletML: " ~ dirName[i] ~ "/" ~ fileName); + Logger.info("Load BulletML: " ~ fileName); parser[i][j] = - BulletMLParserTinyXML_new(std.string.toStringz(dirName[i] ~ "/" ~ fileName)); + BulletMLParserTinyXML_new(std.string.toStringz(fileName)); BulletMLParserTinyXML_parse(parser[i][j]); j++; } - closedir(d); parserNum[i] = j; } } --- a/src/abagames/p47/BulletActor.d +++ b/src/abagames/p47/BulletActor.d @@ -254,7 +254,7 @@ if (!isVisible) return; float d; - switch (bullet.shape) { + switch (bullet.shape) { default: break; case 0: case 2: case 5: @@ -311,7 +311,7 @@ for (int j = 0; j < BULLET_SHAPE_NUM + 1; j++) { glNewList(displayListIdx + idx, GL_COMPILE); Screen3D.setColor(r, g, b, 1); - switch (j) { + switch (j) { default: break; case 0: glBegin(GL_TRIANGLE_FAN); glVertex3f(-SHAPE_POINT_SIZE, -SHAPE_POINT_SIZE, 0); --- a/src/abagames/p47/BulletActorPool.d +++ b/src/abagames/p47/BulletActorPool.d @@ -24,7 +24,7 @@ int cnt; public this(int n, ActorInitializer ini) { - auto BulletActor bulletActorClass = new BulletActor; + scope BulletActor bulletActorClass = new BulletActor; super(n, bulletActorClass, ini); Bullet.setBulletsManager(this); BulletActor.init(); @@ -109,7 +109,7 @@ return ba; } - public void move() { + public override void move() { super.move(); cnt++; } --- a/src/abagames/p47/EnemyType.d +++ b/src/abagames/p47/EnemyType.d @@ -217,7 +217,7 @@ } private void createEnemyColor() { - switch (ect) { + switch (ect) { default: break; case 0: er = 1; eg = rand.nextFloat(0.7) + 0.3; @@ -267,7 +267,7 @@ bodyShapePos[3].x = -x2; bodyShapePos[3].y = -y2; retroSize = enemySize[size][4]; - switch (size) { + switch (size) { default: break; case SMALL: case MIDDLE: case MIDDLEBOSS: @@ -309,7 +309,7 @@ md = rand.nextFloat(std.math.PI / 2) + std.math.PI / 4 * 3; mpx = px / 2 + sin(md) * (enemySize[size][8] / 2 + rand.nextFloat(enemySize[size][8]/2)); mpy = py / 2 + cos(md) * (enemySize[size][8] / 2 + rand.nextFloat(enemySize[size][8]/2)); - switch (size) { + switch (size) { default: break; case SMALL: case MIDDLE: case LARGE: @@ -335,7 +335,7 @@ collisionSize.y = cpy; } } - switch (wrl) { + switch (wrl) { default: break; case 1: bt.wingShapePos[0].x = px / 4 * wrl; bt.wingShapePos[0].y = py / 4; @@ -441,7 +441,7 @@ setBarrageType(br, BarrageManager.MIDDLE, mode); float cr, sr; if (mode == ROLL) { - switch (rand.nextInt(6)) { + switch (rand.nextInt(6)) { default: break; case 0: case 1: cr = rank / 3 * 2; @@ -459,7 +459,7 @@ break; } } else { - switch (rand.nextInt(6)) { + switch (rand.nextInt(6)) { default: break; case 0: case 1: cr = rank / 5; @@ -502,7 +502,7 @@ setBarrageType(br, BarrageManager.LARGE, mode); float cr, sr1, sr2; if (mode == ROLL) { - switch (rand.nextInt(9)) { + switch (rand.nextInt(9)) { default: break; case 0: case 1: case 2: @@ -529,7 +529,7 @@ break; } } else { - switch (rand.nextInt(9)) { + switch (rand.nextInt(9)) { default: break; case 0: cr = rank / 4 * 3; sr1 = sr2 = 0; @@ -587,7 +587,7 @@ Barrage br = barrage[i]; setBarrageType(br, BarrageManager.LARGE, mode); float cr, sr; - switch (rand.nextInt(3)) { + switch (rand.nextInt(3)) { default: break; case 0: cr = rank; sr = 0; @@ -625,7 +625,7 @@ Barrage br = barrage[i]; setBarrageType(br, BarrageManager.LARGE, mode); float cr, sr1, sr2; - switch (rand.nextInt(3)) { + switch (rand.nextInt(3)) { default: break; case 0: cr = rank; sr1 = sr2 = 0; --- a/src/abagames/p47/Field.d +++ b/src/abagames/p47/Field.d @@ -46,7 +46,7 @@ } public void setColor(int mode) { - switch (mode){ + switch (mode){ default: break; case P47GameManager.ROLL: r = 0.2; g = 0.2; @@ -72,7 +72,7 @@ } public void setType(int type) { - switch (type) { + switch (type) { default: break; case 0: aimYawYBase = 30; aimYawZBase = 0; --- a/src/abagames/p47/LetterRender.d +++ b/src/abagames/p47/LetterRender.d @@ -23,7 +23,7 @@ WHITE, RED } - private static void changeColor(int c) { + public static void changeColor(int c) { colorIdx = c * LETTER_NUM; } @@ -40,12 +40,12 @@ TO_RIGHT, TO_DOWN, TO_LEFT, TO_UP, } - public static void drawString(char[] str, float lx, float y, float s, int d) { + public static void drawString(string str, float lx, float y, float s, int d) { float x = lx; int c; int idx; float ld; - switch (d) { + switch (d) { default: break; case TO_RIGHT: ld = 0; break; @@ -79,7 +79,7 @@ } drawLetter(idx, x, y, s, ld); } - switch(d) { + switch(d) { default: break; case TO_RIGHT: x += s * 1.7f; break; @@ -100,7 +100,7 @@ int n = num; float x = lx; float ld; - switch (d) { + switch (d) { default: break; case TO_RIGHT: ld = 0; break; @@ -116,7 +116,7 @@ } for (;;) { drawLetter(n % 10, x, y, s, ld); - switch(d) { + switch(d) { default: break; case TO_RIGHT: x -= s * 1.7f; break; @@ -147,7 +147,7 @@ n /= 6; } if ((i & 1) == 1 || i == 0) { - switch (i) { + switch (i) { default: break; case 3: drawLetter(41, x + s * 1.16f, y, s); break; --- a/src/abagames/p47/Lock.d +++ b/src/abagames/p47/Lock.d @@ -106,7 +106,7 @@ lockedPos.y = lockedEnemy.pos.y + lockedEnemy.type.batteryType[lockedPart].collisionPos.y; } } - switch (state) { + switch (state) { default: break; case LOCKING: if (cnt >= LOCK_CNT) { state = LOCKED; @@ -175,7 +175,7 @@ } public override void draw() { - switch (state) { + switch (state) { default: break; case LOCKING: float y = lockedPos.y - (LOCK_CNT - cnt) * 0.5; float d = (LOCK_CNT - cnt) * 0.1; --- a/src/abagames/p47/P47Boot.d +++ b/src/abagames/p47/P47Boot.d @@ -7,6 +7,7 @@ private: import std.string; +private import std.conv; import std.c.stdlib; import abagames.util.Logger; import abagames.util.sdl.Pad; @@ -28,12 +29,12 @@ P47PrefManager prefManager; MainLoop mainLoop; -private void usage(char[] args0) { +private void usage(string args0) { Logger.error ("Usage: " ~ args0 ~ " [-brightness [0-100]] [-luminous [0-100]] [-nosound] [-window] [-fullscreen] [-reverse] [-lowres] [-slowship] [-nowait]"); } -private void parseArgs(char[][] args) { +private void parseArgs(string[] args) { for (int i = 1; i < args.length; i++) { switch (args[i]) { case "-brightness": @@ -42,7 +43,7 @@ throw new Exception("Invalid options"); } i++; - float b = cast(float) atoi(args[i]) / 100; + float b = cast(float) to!int(args[i]) / 100; if (b < 0 || b > 1) { usage(args[0]); throw new Exception("Invalid options"); @@ -55,7 +56,7 @@ throw new Exception("Invalid options"); } i++; - float l = cast(float) atoi(args[i]) / 100; + float l = cast(float) to!int(args[i]) / 100; if (l < 0 || l > 1) { usage(args[0]); throw new Exception("Invalid options"); @@ -93,7 +94,7 @@ } } -public int boot(char[][] args) { +public int boot(string[] args) { screen = new P47Screen; pad = new Pad; try { @@ -135,10 +136,10 @@ _moduleCtor(); char exe[4096]; GetModuleFileNameA(null, exe, 4096); - char[][1] prog; - prog[0] = std.string.toString(exe); - result = boot(prog ~ std.string.split(std.string.toString(lpCmdLine))); - } catch (Object o) { + string[1] prog; + prog[0] = to!string(exe); + result = boot(prog ~ std.string.split(to!string(lpCmdLine))); + } catch (Throwable o) { //Logger.error("Exception: " ~ o.toString()); Logger.info("Exception: " ~ o.toString()); result = EXIT_FAILURE; @@ -150,7 +151,7 @@ } else { // Boot as the general executable. -public int main(char[][] args) { +public int main(string[] args) { return boot(args); } --- a/src/abagames/p47/P47GameManager.d +++ b/src/abagames/p47/P47GameManager.d @@ -98,33 +98,33 @@ Ship.createDisplayLists(); ship = new Ship; ship.init(pad, field, this); - auto Particle particleClass = new Particle; - auto ParticleInitializer pi = new ParticleInitializer; + scope Particle particleClass = new Particle; + scope ParticleInitializer pi = new ParticleInitializer; particles = new LuminousActorPool(128, particleClass, pi); - auto Fragment fragmentClass = new Fragment; - auto FragmentInitializer fi = new FragmentInitializer; + scope Fragment fragmentClass = new Fragment; + scope FragmentInitializer fi = new FragmentInitializer; fragments = new LuminousActorPool(128, fragmentClass, fi); BulletActor.createDisplayLists(); - auto BulletActorInitializer bi = new BulletActorInitializer(field, ship); + scope BulletActorInitializer bi = new BulletActorInitializer(field, ship); bullets = new BulletActorPool(512, bi); LetterRender.createDisplayLists(); - auto Shot shotClass = new Shot; - auto ShotInitializer shi = new ShotInitializer(field); + scope Shot shotClass = new Shot; + scope ShotInitializer shi = new ShotInitializer(field); shots = new ActorPool(32, shotClass, shi); - auto Roll rollClass = new Roll; - auto RollInitializer ri = new RollInitializer(ship, field, this); + scope Roll rollClass = new Roll; + scope RollInitializer ri = new RollInitializer(ship, field, this); rolls = new ActorPool(4, rollClass, ri); Lock.init(); - auto Lock lockClass = new Lock; - auto LockInitializer li = new LockInitializer(ship, field, this); + scope Lock lockClass = new Lock; + scope LockInitializer li = new LockInitializer(ship, field, this); locks = new ActorPool(4, lockClass, li); - auto Enemy enemyClass = new Enemy; - auto EnemyInitializer ei = new EnemyInitializer + scope Enemy enemyClass = new Enemy; + scope EnemyInitializer ei = new EnemyInitializer (field, bullets, shots, rolls, locks, ship, this); enemies = new ActorPool(ENEMY_MAX, enemyClass, ei); Bonus.init(); - auto Bonus bonusClass = new Bonus; - auto BonusInitializer bni = new BonusInitializer(field, ship, this); + scope Bonus bonusClass = new Bonus; + scope BonusInitializer bni = new BonusInitializer(field, ship, this); bonuses = new ActorPool(128, bonusClass, bni); barrageManager = new BarrageManager; barrageManager.loadBulletMLs(); @@ -281,7 +281,7 @@ this.parsecSlot = parsecSlot; this.mode = mode; int stageType = rand.nextInt(99999); - switch (difficulty) { + switch (difficulty) { default: break; case PRACTICE: stageManager.setRank(1, 4, startParsec, stageType); ship.setSpeedRate(0.7); @@ -610,7 +610,7 @@ drawBox(165, 6, bossShield, 6); int y = 24; for (int i = 0; i < BOSS_WING_NUM; i++) { - switch (i % 2) { + switch (i % 2) { default: break; case 0: drawBox(165, y, bossWingShield[i], 6); break; --- a/src/abagames/p47/P47PrefManager.d +++ b/src/abagames/p47/P47PrefManager.d @@ -8,6 +8,7 @@ private: import std.stream; import std.string; +private import std.conv; import std.c.stdlib; import abagames.util.PrefManager; @@ -18,7 +19,7 @@ public: static const int PREV_VERSION_NUM = 10; static const int VERSION_NUM = 20; - static const char[] PREF_FILE = ".p47.prf"; + static const string PREF_FILE = ".p47.prf"; static const int MODE_NUM = 2; static const int DIFFICULTY_NUM = 4; static const int REACHED_PARSEC_SLOT_NUM = 10; @@ -26,11 +27,11 @@ int reachedParsec[MODE_NUM][DIFFICULTY_NUM]; int selectedDifficulty, selectedParsecSlot, selectedMode; - public static char[] home_dir() { - char * home = getenv("HOME"); + public static string home_dir() { + const(char)* home = getenv("HOME"); if (home is null) throw new Error("HOME environment variable is not defined"); - return std.string.toString(home); + return to!string(home); } private void init() { @@ -58,8 +59,8 @@ fd.read(selectedParsecSlot); } - public void load() { - auto File fd = new File; + public override void load() { + scope File fd = new File; try { int ver; fd.open(home_dir() ~ "/" ~ PREF_FILE); @@ -90,8 +91,8 @@ } } - public void save() { - auto File fd = new File; + public override void save() { + scope File fd = new File; fd.create(home_dir ~ "/" ~ PREF_FILE); fd.write(VERSION_NUM); for (int k = 0; k < MODE_NUM; k++) { --- a/src/abagames/p47/P47Screen.d +++ b/src/abagames/p47/P47Screen.d @@ -17,7 +17,7 @@ */ public class P47Screen: Screen3D { public: - static const char[] CAPTION = "PARSEC47"; + static const string CAPTION = "PARSEC47"; static float luminous = 0; private: static Rand rand; @@ -63,7 +63,7 @@ luminousScreen.draw(); } - public void resized(int width, int height) { + public override void resized(int width, int height) { if (luminousScreen) luminousScreen.resized(width, height); super.resized(width, height); --- a/src/abagames/p47/Ship.d +++ b/src/abagames/p47/Ship.d @@ -58,11 +58,8 @@ int rollLockCnt; bool rollCharged; - public static this() { - rand = new Rand; - } - public void init(Pad pad, Field field, P47GameManager manager) { + if (rand is null) rand = new Rand; this.pad = pad; this.field = field; this.manager = manager; @@ -177,7 +174,7 @@ pos.y = fieldLimitY; if (btn & Pad.PAD_BUTTON1) { float td; - switch (fireCnt % 4) { + switch (fireCnt % 4) { default: break; case 0: firePos.x = pos.x + TURRET_INTERVAL_LENGTH; firePos.y = pos.y; --- a/src/abagames/p47/SoundManager.d +++ b/src/abagames/p47/SoundManager.d @@ -26,9 +26,9 @@ Sound bgm[BGM_NUM]; Sound se[SE_NUM]; - const char[][] bgmFileName = + const string[] bgmFileName = ["ptn0.ogg", "ptn1.ogg", "ptn2.ogg", "ptn3.ogg"]; - const char[][] seFileName = + const string[] seFileName = ["shot.wav", "rollchg.wav", "rollrls.wav", "shipdst.wav", "getbonus.wav", "extend.wav", "enemydst.wav", "largedst.wav", "bossdst.wav", "lock.wav", "laser.wav"]; const int[] seChannel = --- a/src/abagames/p47/StageManager.d +++ b/src/abagames/p47/StageManager.d @@ -104,7 +104,7 @@ } private void setAppearancePattern(EnemyAppearance* ap) { - switch (rand.nextInt(5)) { + switch (rand.nextInt(5)) { default: break; case 0: ap.pattern = ONE_SIDE; break; @@ -117,7 +117,7 @@ ap.pattern = BOTH_SIDES; break; } - switch (rand.nextInt(3)) { + switch (rand.nextInt(3)) { default: break; case 0: ap.sequence = RANDOM; break; @@ -142,7 +142,7 @@ setAppearancePattern(ap); if (ap.pattern == ONE_SIDE) ap.pattern = ALTERNATE; - switch (rand.nextInt(4)) { + switch (rand.nextInt(4)) { default: break; case 0: ap.num = 7 + rand.nextInt(5); ap.groupInterval = 72 + rand.nextInt(15); @@ -177,7 +177,7 @@ mt = BarrageManager.MIDDLEMOVE; ap.moveParser = barrageManager.parser[mt][rand.nextInt(barrageManager.parserNum[mt])]; setAppearancePattern(ap); - switch (rand.nextInt(3)) { + switch (rand.nextInt(3)) { default: break; case 0: ap.num = 4; ap.groupInterval = 240 + rand.nextInt(150); @@ -203,7 +203,7 @@ mt = BarrageManager.LARGEMOVE; ap.moveParser = barrageManager.parser[mt][rand.nextInt(barrageManager.parserNum[mt])]; setAppearancePattern(ap); - switch (rand.nextInt(3)) { + switch (rand.nextInt(3)) { default: break; case 0: ap.num = 3; ap.groupInterval = 400 + rand.nextInt(100); @@ -223,7 +223,7 @@ } private void setAppearance(EnemyAppearance* ap, int type) { - switch (type) { + switch (type) { default: break; case SMALL: setSmallAppearance(ap); break; @@ -255,7 +255,7 @@ field.aimSpeed = 0.1 + section * 0.02; if (section == 4) { // Set the middle boss. - auto Vector pos = new Vector; + scope Vector pos = new Vector; pos.x = 0; pos.y = field.size.y / 4 * 3; gameManager.addBoss(pos, std.math.PI, middleBossType); bossSection = true; @@ -264,7 +264,7 @@ return; } else if (section == 9) { // Set the large boss. - auto Vector pos = new Vector; + scope Vector pos = new Vector; pos.x = 0; pos.y = field.size.y / 4 * 3; gameManager.addBoss(pos, std.math.PI, largeBossType); bossSection = true; @@ -295,16 +295,16 @@ else if (middleRushSection) ap = MIDDLE_RUSH_SECTION_PATTERN; for (int i = 0; i < apparancePattern[gameManager.mode][ap][0]; i++, apNum++) { - EnemyAppearance* ap = &(appearance[apNum]); - setAppearance(ap, SMALL); + EnemyAppearance* eap = &(appearance[apNum]); + setAppearance(eap, SMALL); } for (int i = 0; i < apparancePattern[gameManager.mode][ap][1]; i++, apNum++) { - EnemyAppearance* ap = &(appearance[apNum]); - setAppearance(ap, MIDDLE); + EnemyAppearance* eap = &(appearance[apNum]); + setAppearance(eap, MIDDLE); } for (int i = 0; i < apparancePattern[gameManager.mode][ap][2]; i++, apNum++) { - EnemyAppearance* ap = &(appearance[apNum]); - setAppearance(ap, LARGE); + EnemyAppearance* eap = &(appearance[apNum]); + setAppearance(eap, LARGE); } } @@ -364,7 +364,7 @@ continue; } float p; - switch (ap.sequence) { + switch (ap.sequence) { default: break; case RANDOM: p = rand.nextFloat(1); break; @@ -373,7 +373,7 @@ break; } float d; - switch (ap.point) { + switch (ap.point) { default: break; case TOP: switch (ap.pattern) { case BOTH_SIDES: --- a/src/abagames/p47/Title.d +++ b/src/abagames/p47/Title.d @@ -153,9 +153,9 @@ } private const int BOX_SMALL_SIZE = 24; - private const char[][] DIFFICULTY_SHORT_STR = ["P", "N", "H", "E", "Q"]; - private const char[][] DIFFICULTY_STR = ["PRACTICE", "NORMAL", "HARD", "EXTREME", "QUIT"]; - private const char[][] MODE_STR = ["ROLL", "LOCK"]; + private const string[] DIFFICULTY_SHORT_STR = ["P", "N", "H", "E", "Q"]; + private const string[] DIFFICULTY_STR = ["PRACTICE", "NORMAL", "HARD", "EXTREME", "QUIT"]; + private const string[] MODE_STR = ["ROLL", "LOCK"]; private void drawTitleBoard() { glEnable(GL_TEXTURE_2D); --- a/src/abagames/util/ActorPool.d +++ b/src/abagames/util/ActorPool.d @@ -16,7 +16,7 @@ public: Actor[] actor; protected: - int actorIdx; + ptrdiff_t actorIdx; public this(int n, Actor act, ActorInitializer ini) { actor = new Actor[n]; --- a/src/abagames/util/Logger.d +++ b/src/abagames/util/Logger.d @@ -6,7 +6,8 @@ module abagames.util.Logger; private: -import std.stream; +import std.stdio; +import std.conv; /** * Logger(error/info). @@ -14,35 +15,32 @@ version(Win32_release) { import std.string; +private import std.conv; import std.c.windows.windows; public class Logger { - public static void info(char[] msg) { + public static void info(string msg) { // Win32 exe file crashes if it writes something to stderr. - //stderr.writeLine("Info: " ~ msg); + //stderr.writeln("Info: " ~ msg); } public static void info(int n) { /*if (n >= 0) - stderr.writeLine("Info: " ~ std.string.toString(n)); + stderr.writeln("Info: " ~ to!string(n)); else - stderr.writeLine("Info: -" ~ std.string.toString(-n));*/ + stderr.writeln("Info: -" ~ to!string(-n));*/ } - private static void putMessage(char[] msg) { + private static void putMessage(string msg) { MessageBoxA(null, std.string.toStringz(msg), "Error", MB_OK | MB_ICONEXCLAMATION); } - public static void error(char[] msg) { + public static void error(string msg) { putMessage("Error: " ~ msg); } - public static void error(Exception e) { - putMessage("Error: " ~ e.toString()); - } - - public static void error(Error e) { + public static void error(Throwable e) { putMessage("Error: " ~ e.toString()); } } @@ -51,27 +49,23 @@ public class Logger { - public static void info(char[] msg) { - stderr.writeLine("Info: " ~ msg); + public static void info(string msg) { + stderr.writeln("Info: " ~ msg); } public static void info(int n) { if (n >= 0) - stderr.writeLine("Info: " ~ std.string.toString(n)); + stderr.writeln("Info: " ~ to!string(n)); else - stderr.writeLine("Info: -" ~ std.string.toString(-n)); - } - - public static void error(char[] msg) { - stderr.writeLine("Error: " ~ msg); + stderr.writeln("Info: -" ~ to!string(-n)); } - public static void error(Exception e) { - stderr.writeLine("Error: " ~ e.toString()); + public static void error(string msg) { + stderr.writeln("Error: " ~ msg); } - public static void error(Error e) { - stderr.writeLine("Error: " ~ e.toString()); + public static void error(Throwable e) { + stderr.writeln("Error: " ~ e.toString()); if (e.next) error(e.next); } --- a/src/abagames/util/Rand.d +++ b/src/abagames/util/Rand.d @@ -6,7 +6,7 @@ module abagames.util.Rand; private: -import std.date; +import std.datetime; import mt; /** @@ -15,12 +15,12 @@ public class Rand { public this() { - d_time timer = getUTCtime(); - init_genrand(timer); + long timer = Clock.currStdTime(); + init_genrand(cast(uint)timer); } public void setSeed(long n) { - init_genrand(n); + init_genrand(cast(uint)n); } public int nextInt(int n) { --- a/src/abagames/util/sdl/MainLoop.d +++ b/src/abagames/util/sdl/MainLoop.d @@ -91,7 +91,7 @@ frame = cast(int) (nowTick-prvTickCount) / interval; if (frame <= 0) { frame = 1; - SDL_Delay(prvTickCount+interval-nowTick); + SDL_Delay(cast(uint)(prvTickCount+interval-nowTick)); if (accframe) { prvTickCount = SDL_GetTicks(); } else { --- a/src/abagames/util/sdl/Pad.d +++ b/src/abagames/util/sdl/Pad.d @@ -7,6 +7,7 @@ private: import std.string; +private import std.conv; import SDL; import abagames.util.sdl.Input; import abagames.util.sdl.SDLInitFailedException; @@ -32,12 +33,12 @@ public void openJoystick() { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) { throw new SDLInitFailedException( - "Unable to init SDL joystick: " ~ std.string.toString(SDL_GetError())); + "Unable to init SDL joystick: " ~ to!string(SDL_GetError())); } stick = SDL_JoystickOpen(0); } - public void handleEvent(SDL_Event *event) { + public override void handleEvent(SDL_Event *event) { keys = SDL_GetKeyState(null); } --- a/src/abagames/util/sdl/SDLInitFailedException.d +++ b/src/abagames/util/sdl/SDLInitFailedException.d @@ -9,7 +9,7 @@ * SDL initialize failed. */ public class SDLInitFailedException: Exception { - public this(char[] msg) { + public this(string msg) { super(msg); } } --- a/src/abagames/util/sdl/Screen3D.d +++ b/src/abagames/util/sdl/Screen3D.d @@ -7,6 +7,7 @@ private: import std.string; +private import std.conv; import SDL; import opengl; import abagames.util.Logger; @@ -41,7 +42,7 @@ // Initialize SDL. if (SDL_Init(SDL_INIT_VIDEO) < 0) { throw new SDLInitFailedException( - "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError())); + "Unable to initialize SDL: " ~ to!string(SDL_GetError())); } // Create an OpenGL screen. if (windowMode) { @@ -51,7 +52,7 @@ } if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) { throw new SDLInitFailedException - ("Unable to create SDL screen: " ~ std.string.toString(SDL_GetError())); + ("Unable to create SDL screen: " ~ to!string(SDL_GetError())); } glClearColor(0.0f, 0.0f, 0.0f, 0.0f); resized(width, height); @@ -64,7 +65,7 @@ private void screenResized() { if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) { throw new Exception - ("Unable to resize SDL screen: " ~ std.string.toString(SDL_GetError())); + ("Unable to resize SDL screen: " ~ to!string(SDL_GetError())); } glViewport(0, 0, width, height); @@ -105,7 +106,7 @@ throw new Exception("OpenGL error"); } - protected void setCaption(char[] name) { + protected void setCaption(string name) { SDL_WM_SetCaption(std.string.toStringz(name), null); } --- a/src/abagames/util/sdl/Sound.d +++ b/src/abagames/util/sdl/Sound.d @@ -7,6 +7,7 @@ private: import std.string; +private import std.conv; import SDL; import SDL_mixer; import abagames.util.sdl.SDLInitFailedException; @@ -18,8 +19,8 @@ public: static bool noSound = false; static int fadeOutSpeed = 1280; - static char[] soundsDir = "/usr/share/games/parsec47/sounds/"; - static char[] chunksDir = "/usr/share/games/parsec47/sounds/"; + static string soundsDir = "/usr/share/games/parsec47/sounds/"; + static string chunksDir = "/usr/share/games/parsec47/sounds/"; public static void init() { if (noSound) return; @@ -32,7 +33,7 @@ if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) { noSound = 1; throw new SDLInitFailedException - ("Unable to initialize SDL_AUDIO: " ~ std.string.toString(SDL_GetError())); + ("Unable to initialize SDL_AUDIO: " ~ to!string(SDL_GetError())); } audio_rate = 44100; @@ -42,7 +43,7 @@ if (Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) < 0) { noSound = 1; throw new SDLInitFailedException - ("Couldn't open audio: " ~ std.string.toString(SDL_GetError())); + ("Couldn't open audio: " ~ to!string(SDL_GetError())); } Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); } @@ -64,25 +65,25 @@ // Load a sound or a chunk. - public void loadSound(char[] name) { + public void loadSound(string name) { if (noSound) return; - char[] fileName = soundsDir ~ name; + string fileName = soundsDir ~ name; music = Mix_LoadMUS(std.string.toStringz(fileName)); if (!music) { noSound = true; throw new SDLInitFailedException("Couldn't load: " ~ fileName ~ - " (" ~ std.string.toString(Mix_GetError()) ~ ")"); + " (" ~ to!string(Mix_GetError()) ~ ")"); } } - public void loadChunk(char[] name, int ch) { + public void loadChunk(string name, int ch) { if (noSound) return; - char[] fileName = chunksDir ~ name; + string fileName = chunksDir ~ name; chunk = Mix_LoadWAV(std.string.toStringz(fileName)); if (!chunk) { noSound = true; throw new SDLInitFailedException("Couldn't load: " ~ fileName ~ - " (" ~ std.string.toString(Mix_GetError()) ~ ")"); + " (" ~ to!string(Mix_GetError()) ~ ")"); } chunkChannel = ch; } --- a/src/abagames/util/sdl/Texture.d +++ b/src/abagames/util/sdl/Texture.d @@ -16,13 +16,13 @@ */ public class Texture { public: - static char[] imagesDir = "/usr/share/games/parsec47/images/"; + static string imagesDir = "/usr/share/games/parsec47/images/"; private: GLuint num; - public this(char[] name) { - char[] fileName = imagesDir ~ name; + public this(string name) { + string fileName = imagesDir ~ name; SDL_Surface *surface; surface = SDL_LoadBMP(std.string.toStringz(fileName)); if (!surface) { --- a/src/dirent.d +++ b/src/dirent.d @@ -3,8 +3,8 @@ extern (C) { alias void DIR; alias void dirent; - DIR* opendir(char* name); + DIR* opendir(const(char)* name); dirent* readdir(DIR* dir); int closedir(DIR* dir); - char* readdir_filename(DIR* ent); + const(char)* readdir_filename(DIR* ent); } --- a/src/mt.d +++ b/src/mt.d @@ -5,7 +5,7 @@ Matthe Bellew, and Isaku Wada Andrew C. Edwards v0.1 30 September 2003 edwardsac@ieee.org - Before using, initialize the state by using init_genrand(seed) + Before using, initialize the state by using init_genrand(cast(uint)seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, @@ -48,7 +48,7 @@ Please CC: edwardsac@ieee.org on all correspondence */ -module MersenneTwister; +module mt; import std.stream; /* Period parameters */ @@ -70,7 +70,7 @@ { state[0]= s & 0xffffffffUL; for (int j=1; j> 30)) + j); + state[j] = (1812433253U * (state[j-1] ^ (state[j-1] >> 30)) + j); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array state[]. */ @@ -88,11 +88,11 @@ void init_by_array(uint init_key[], uint key_length) { int i, j, k; - init_genrand(19650218UL); + init_genrand(cast(uint)19650218UL); i=1; j=0; k = (N>key_length ? N : key_length); for (; k; k--) { - state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1664525UL)) + state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1664525U)) + init_key[j] + j; /* non linear */ state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; @@ -100,7 +100,7 @@ if (j>=key_length) j=0; } for (k=N-1; k; k--) { - state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL)) + state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1566083941U)) - i; /* non linear */ state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; @@ -113,14 +113,14 @@ static void next_state() { - uint *p=state; + uint *p=state.ptr; - /* if init_genrand() has not been called, */ + /* if init_genrand(cast(uint)) has not been called, */ /* a default initial seed is used */ - if (initf==0) init_genrand(5489UL); + if (initf==0) init_genrand(cast(uint)5489UL); left = N; - next = state; + next = state.ptr; for (int j=N-M+1; --j; p++) *p = p[M] ^ TWIST(p[0], p[1]); @@ -233,7 +233,7 @@ uint length=4; init_by_array(init, length); /* This is an example of initializing by an array. */ - /* You may use init_genrand(seed) with any 32bit integer */ + /* You may use init_genrand(cast(uint)seed) with any 32bit integer */ /* as a seed for a simpler initialization */ printf("1000 outputs of genrand_int32()\n"); for (int i=0; i<1000; i++) { --- a/src/abagames/p47/Enemy.d +++ b/src/abagames/p47/Enemy.d @@ -79,15 +79,12 @@ bool damaged; int bossTimer; - public static this() { - rand = new Rand; - } - public override Actor newActor() { return new Enemy; } public override void init(ActorInitializer ini) { + if (rand is null) rand = new Rand; EnemyInitializer ei = cast(EnemyInitializer) ini; field = ei.field; bullets = ei.bullets; @@ -410,7 +407,7 @@ Roll rl = cast(Roll) rolls.actor[i]; ch = checkHit(rl.pos[0], 1.0, 1.0); if (ch >= HIT) { - for (int i = 0; i < 4; i++) + for (int ii = 0; ii < 4; ii++) manager.addParticle(rl.pos[0], rand.nextFloat(std.math.PI * 2), 0, Shot.SPEED / 10); float rd = ROLL_DAMAGE; if (rl.released) { @@ -442,7 +439,7 @@ } else if (lk.state == Lock.FIRED && lk.lockedEnemy == this) { ch = checkHit(lk.pos[0], 1.5, 1.5); if (ch >= HIT && ch == lk.lockedPart) { - for (int i = 0; i < 4; i++) + for (int ii = 0; ii < 4; ii++) manager.addParticle(lk.pos[0], rand.nextFloat(std.math.PI * 2), 0, Shot.SPEED / 10); if (ch == HIT) addDamage(LOCK_DAMAGE); @@ -694,21 +691,21 @@ P47Screen.drawLineRetro(pos.x + bt.wingShapePos[0].x, pos.y + bt.wingShapePos[0].y, pos.x + bt.wingShapePos[1].x, pos.y + bt.wingShapePos[1].y); } else { - for (int i = 0; i < BatteryType.WING_SHAPE_POINT_NUM; i++, ni++) { + for (int ii = 0; ii < BatteryType.WING_SHAPE_POINT_NUM; ii++, ni++) { if (ni >= BatteryType.WING_SHAPE_POINT_NUM) ni = 0; - P47Screen.drawLineRetro(pos.x + bt.wingShapePos[i].x, pos.y + bt.wingShapePos[i].y, + P47Screen.drawLineRetro(pos.x + bt.wingShapePos[ii].x, pos.y + bt.wingShapePos[ii].y, pos.x + bt.wingShapePos[ni].x, pos.y + bt.wingShapePos[ni].y); } if (type.type != EnemyType.SMALL) { glBegin(GL_TRIANGLE_FAN); Screen3D.setColor (P47Screen.retroR, P47Screen.retroG, P47Screen.retroB, P47Screen.retroA); - for (int i = 0; i < BatteryType.WING_SHAPE_POINT_NUM; i++) { - if (i == 2) + for (int ii = 0; ii < BatteryType.WING_SHAPE_POINT_NUM; ii++) { + if (ii == 2) Screen3D.setColor (P47Screen.retroR, P47Screen.retroG, P47Screen.retroB, 0); - glVertex3f(pos.x + bt.wingShapePos[i].x, pos.y + bt.wingShapePos[i].y, z); + glVertex3f(pos.x + bt.wingShapePos[ii].x, pos.y + bt.wingShapePos[ii].y, z); } glEnd(); } --- a/src/abagames/p47/Fragment.d +++ b/src/abagames/p47/Fragment.d @@ -34,15 +34,12 @@ float retro; int cnt; - public static this() { - rand = new Rand; - } - public override Actor newActor() { return new Fragment; } public override void init(ActorInitializer ini) { + if (rand is null) rand = new Rand; FragmentInitializer fi = cast(FragmentInitializer) ini; for (int i = 0; i < POINT_NUM; i++) { pos[i] = new Vector; --- a/src/abagames/p47/LuminousScreen.d +++ b/src/abagames/p47/LuminousScreen.d @@ -25,9 +25,9 @@ float luminous; private void makeLuminousTexture() { - uint *data = td; + uint *data = td.ptr; int i; - memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.sizeof); + td[] = 0; glGenTextures(1, &luminousTexture); glBindTexture(GL_TEXTURE_2D, luminousTexture); glTexImage2D(GL_TEXTURE_2D, 0, 4, luminousTextureWidth, luminousTextureHeight, 0, --- a/src/abagames/p47/Particle.d +++ b/src/abagames/p47/Particle.d @@ -30,15 +30,12 @@ float lumAlp; int cnt; - public static this() { - rand = new Rand; - } - public override Actor newActor() { return new Particle; } public override void init(ActorInitializer ini) { + if (rand is null) rand = new Rand; pos = new Vector; ppos = new Vector; vel = new Vector; debian/patches/imports.patch0000644000000000000000000026011712164232453013344 0ustar Description: port import/ code to D language version 2 With this patch the code is accapted by GDC 4.8 without triggering deprecation warnings/errors. Author: Peter De Wachter --- a/import/SDL.d +++ b/import/SDL.d @@ -20,18 +20,28 @@ slouken@devolution.com */ -import SDL_types; -import SDL_getenv; -import SDL_error; -import SDL_rwops; -import SDL_timer; -import SDL_audio; -import SDL_cdrom; -import SDL_joystick; -import SDL_events; -import SDL_video; -import SDL_byteorder; -import SDL_version; +public import SDL_keysym_; +public import SDL_version_; +public import SDL_active; +public import SDL_audio; +public import SDL_byteorder; +public import SDL_cdrom; +public import SDL_copying; +public import SDL_endian; +public import SDL_error; +public import SDL_events; +public import SDL_getenv; +public import SDL_joystick; +public import SDL_keyboard; +public import SDL_mouse; +public import SDL_mutex; +public import SDL_quit; +public import SDL_rwops; +public import SDL_syswm; +public import SDL_thread; +public import SDL_timer; +public import SDL_types; +public import SDL_video; extern(C): @@ -73,18 +83,3 @@ */ void SDL_Quit(); -void SDL_SetModuleHandle(void *hInst); -extern(Windows) void* GetModuleHandle(char*); - -static this() -{ - /* Load SDL dynamic link library */ - if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) - throw new Error("Error loading SDL"); - SDL_SetModuleHandle(GetModuleHandle(null)); -} - -static ~this() -{ - SDL_Quit(); -} \ No newline at end of file --- a/import/SDL_audio.d +++ b/import/SDL_audio.d @@ -24,6 +24,7 @@ import SDL_error; import SDL_rwops; import SDL_byteorder; +import std.string; extern(C): @@ -42,7 +43,7 @@ Once the callback returns, the buffer will no longer be valid. Stereo samples are stored in a LRLRLR ordering. */ - void (*callback)(void *userdata, Uint8 *stream, int len); + void function(void *userdata, Uint8 *stream, int len) callback; void *userdata; } @@ -74,7 +75,7 @@ int len_cvt; /* Length of converted audio buffer */ int len_mult; /* buffer must be len*len_mult big */ double len_ratio; /* Given len, final size is len*len_ratio */ - void (*filters[10])(SDL_AudioCVT *cvt, Uint16 format); + void function(SDL_AudioCVT *cvt, Uint16 format)[10] filters; int filter_index; /* Current audio conversion function */ } @@ -161,7 +162,7 @@ * This function loads a WAVE from the data source, automatically freeing * that source if 'freesrc' is non-zero. For example, to load a WAVE file, * you could do: - * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); + * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", toStringz("rb")), 1, ...); * * If this function succeeds, it returns the given SDL_AudioSpec, * filled with the audio data format of the wave data, and sets @@ -178,7 +179,7 @@ SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len); /* Compatibility convenience function -- loads a WAV from a file */ -SDL_AudioSpec *SDL_LoadWAV(char* file, SDL_AudioSpec* spec, +SDL_AudioSpec *SDL_LoadWAV(const(char)* file, SDL_AudioSpec* spec, Uint8 **audio_buf, Uint32 *audio_len) { return SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1, spec, --- a/import/SDL_cdrom.d +++ b/import/SDL_cdrom.d @@ -49,7 +49,7 @@ } /* Given a status, returns true if there's a disk in the drive */ -bit CD_INDRIVE(int status) { return status > 0; } +bool CD_INDRIVE(int status) { return status > 0; } struct SDL_CDtrack { Uint8 id; /* Track number */ --- a/import/SDL_endian.d +++ b/import/SDL_endian.d @@ -47,7 +47,7 @@ */ Uint16 SDL_Swap16(Uint16 D) { - return((D<<8)|(D>>8)); + return cast(Uint16)((D<<8)|(D>>8)); } Uint32 SDL_Swap32(Uint32 D) { @@ -57,9 +57,9 @@ Uint64 SDL_Swap64(Uint64 val) { Uint32 hi, lo; /* Separate into high and low 32-bit values and swap them */ - lo = (Uint32)(val&0xFFFFFFFF); + lo = cast(Uint32)(val&0xFFFFFFFF); val >>= 32; - hi = (Uint32)(val&0xFFFFFFFF); + hi = cast(Uint32)(val&0xFFFFFFFF); val = SDL_Swap32(lo); val <<= 32; val |= SDL_Swap32(hi); --- a/import/SDL_events.d +++ b/import/SDL_events.d @@ -271,7 +271,7 @@ The filter is protypted as: */ -alias int (*SDL_EventFilter)(SDL_Event *event); +alias int function(SDL_Event *event) SDL_EventFilter; /* If the filter returns 1, then the event will be added to the internal queue. If it returns 0, then the event will be dropped from the queue, but the @@ -304,8 +304,8 @@ If 'state' is set to SDL_QUERY, SDL_EventState() will return the current processing state of the specified event. */ -const uint SDL_QUERY = -1; -const uint SDL_IGNORE = 0; -const uint SDL_DISABLE = 0; -const uint SDL_ENABLE = 1; +const int SDL_QUERY = -1; +const int SDL_IGNORE = 0; +const int SDL_DISABLE = 0; +const int SDL_ENABLE = 1; Uint8 SDL_EventState(Uint8 type, int state); --- a/import/SDL_getenv.d +++ b/import/SDL_getenv.d @@ -2,6 +2,7 @@ extern(C): +/+ /* Put a variable of the form "name=value" into the environment */ int SDL_putenv(char *variable); int putenv(char* X) { return SDL_putenv(X); } @@ -9,3 +10,4 @@ /* Retrieve a variable named "name" from the environment */ char *SDL_getenv(char *name); char *getenv(char* X) { return SDL_getenv(X); } ++/ --- a/import/SDL_keyboard.d +++ b/import/SDL_keyboard.d @@ -26,7 +26,7 @@ // !!! A hack! struct SDL_keysym is defined in this module, // !!! so we need to resolve the nameclash... // !!! Definitely won't work on *NIX but for now will do. -import SDL_Keysym; +import SDL_keysym_; extern(C): --- a/import/SDL_mixer.d +++ b/import/SDL_mixer.d @@ -22,7 +22,7 @@ // convert to D by shinichiro.h -/* $Id: SDL_mixer.d,v 1.1.1.1 2003/11/28 17:26:28 kenta Exp $ */ +/* $Id: SDL_mixer.d,v 1.1.1.1 2006/11/19 07:54:54 kenta Exp $ */ import SDL; @@ -104,10 +104,10 @@ /* Load a wave file or a music (.mod .s3m .it .xm) file */ Mix_Chunk * Mix_LoadWAV_RW(SDL_RWops *src, int freesrc); - Mix_Chunk * Mix_LoadWAV(char *file) { + Mix_Chunk * Mix_LoadWAV(const(char) *file) { return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1); } - Mix_Music * Mix_LoadMUS(char *file); + Mix_Music * Mix_LoadMUS(const(char) *file); /* Load a wave file of the mixer format from a memory buffer */ Mix_Chunk * Mix_QuickLoad_WAV(Uint8 *mem); @@ -128,19 +128,17 @@ This can be used to provide real-time visual display of the audio stream or add a custom mixer filter for the stream data. */ - void Mix_SetPostMix(void (*mix_func) - (void *udata, Uint8 *stream, int len), void *arg); + void Mix_SetPostMix(void function(void *udata, Uint8 *stream, int len) mix_func, void *arg); /* Add your own music player or additional mixer function. If 'mix_func' is NULL, the default music player is re-enabled. */ - void Mix_HookMusic(void (*mix_func) - (void *udata, Uint8 *stream, int len), void *arg); + void Mix_HookMusic(void function(void *udata, Uint8 *stream, int len) mix_func, void *arg); /* Add your own callback when the music has finished playing. This callback is only called if the music finishes naturally. */ - void Mix_HookMusicFinished(void (*music_finished)()); + void Mix_HookMusicFinished(void function() music_finished); /* Get a pointer to the user data for the current music hook */ void * Mix_GetMusicHookData(); @@ -153,7 +151,7 @@ * inside the audio callback, or SDL_mixer will explicitly lock the audio * before calling your callback. */ - void Mix_ChannelFinished(void (*channel_finished)(int channel)); + void Mix_ChannelFinished(void function(int channel) channel_finished); /* Special Effects API by ryan c. gordon. (icculus@linuxgames.com) */ @@ -177,7 +175,7 @@ * * DO NOT EVER call SDL_LockAudio() from your callback function! */ - typedef void (*Mix_EffectFunc_t)(int chan, void *stream, int len, void *udata); + alias void function(int chan, void *stream, int len, void *udata) Mix_EffectFunc_t; /* * This is a callback that signifies that a channel has finished all its @@ -188,7 +186,7 @@ * * DO NOT EVER call SDL_LockAudio() from your callback function! */ - typedef void (*Mix_EffectDone_t)(int chan, void *udata); + alias void function(int chan, void *udata) Mix_EffectDone_t; /* Register a special effect function. At mixing time, the channel data is @@ -510,7 +508,7 @@ int Mix_PlayingMusic(); /* Stop music and set external music playback command */ - int Mix_SetMusicCMD(char *command); + int Mix_SetMusicCMD(const(char) *command); /* Synchro value is set by MikMod from modules while playing */ int Mix_SetSynchroValue(int value); --- a/import/SDL_mouse.d +++ b/import/SDL_mouse.d @@ -109,6 +109,8 @@ const uint SDL_BUTTON_LEFT = 1; const uint SDL_BUTTON_MIDDLE = 2; const uint SDL_BUTTON_RIGHT = 3; +const uint SDL_BUTTON_WHEELUP = 4; +const uint SDL_BUTTON_WHEELDOWN = 5; const uint SDL_BUTTON_LMASK = SDL_PRESSED << (SDL_BUTTON_LEFT - 1); const uint SDL_BUTTON_MMASK = SDL_PRESSED << (SDL_BUTTON_MIDDLE - 1); const uint SDL_BUTTON_RMASK = SDL_PRESSED << (SDL_BUTTON_RIGHT - 1); --- a/import/SDL_quit.d +++ b/import/SDL_quit.d @@ -40,8 +40,8 @@ */ /* There are no functions directly affecting the quit event */ -bit SDL_QuitRequested() +bool SDL_QuitRequested() { SDL_PumpEvents(); - return SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK); + return 0 != SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK); } --- a/import/SDL_rwops.d +++ b/import/SDL_rwops.d @@ -35,22 +35,22 @@ SEEK_SET, SEEK_CUR, SEEK_END Returns the final offset in the data source. */ - int (*seek)(SDL_RWops *context, int offset, int whence); + int function(SDL_RWops *context, int offset, int whence) seek; /* Read up to 'num' objects each of size 'objsize' from the data source to the area pointed at by 'ptr'. Returns the number of objects read, or -1 if the read failed. */ - int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum); + int function(SDL_RWops *context, void *ptr, int size, int maxnum) read; /* Write exactly 'num' objects each of size 'objsize' from the area pointed at by 'ptr' to data source. Returns 'num', or -1 if the write failed. */ - int (*write)(SDL_RWops *context, void *ptr, int size, int num); + int function(SDL_RWops *context, void *ptr, int size, int num) write; /* Close and free an allocated SDL_FSops structure */ - int (*close)(SDL_RWops *context); + int function(SDL_RWops *context) close; Uint32 type; union { @@ -72,7 +72,7 @@ /* Functions to create SDL_RWops structures from various data sources */ -SDL_RWops * SDL_RWFromFile(char *file, char *mode); +SDL_RWops * SDL_RWFromFile(const(char)* file, const(char)* mode); SDL_RWops * SDL_RWFromFP(void *fp, int autoclose); @@ -84,35 +84,25 @@ /* Macros to easily read and write from an SDL_RWops structure */ int SDL_RWseek(SDL_RWops *ctx, int offset, int whence) { - int (*seek)(SDL_RWops *context, int offset, int whence); - seek = ctx.seek; - return (*seek)(ctx, offset, whence); + return ctx.seek(ctx, offset, whence); } int SDL_RWtell(SDL_RWops *ctx) { - int (*seek)(SDL_RWops *context, int offset, int whence); - seek = ctx.seek; - return (*seek)(ctx, 0, 1); + return ctx.seek(ctx, 0, 1); } int SDL_RWread(SDL_RWops *ctx, void* ptr, int size, int n) { - int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum); - read = ctx.read; - return (*read)(ctx, ptr, size, n); + return ctx.read(ctx, ptr, size, n); } int SDL_RWwrite(SDL_RWops *ctx, void* ptr, int size, int n) { - int (*write)(SDL_RWops *context, void *ptr, int size, int num); - write = ctx.write; - return (*write)(ctx, ptr, size, n); + return ctx.write(ctx, ptr, size, n); } int SDL_RWclose(SDL_RWops *ctx) { - int (*close)(SDL_RWops *context); - close = ctx.close; - return (*close)(ctx); + return ctx.close(ctx); } --- a/import/SDL_syswm.d +++ b/import/SDL_syswm.d @@ -22,7 +22,7 @@ /* Include file for SDL custom system window manager hooks */ -import SDL_version; +import SDL_version_; extern(C): --- a/import/SDL_thread.d +++ b/import/SDL_thread.d @@ -34,7 +34,7 @@ struct SDL_Thread { } /* Create a thread */ -SDL_Thread * SDL_CreateThread(int (*fn)(void *), void *data); +SDL_Thread * SDL_CreateThread(int function(void *) fn, void *data); /* Get the 32-bit thread identifier for the current thread */ Uint32 SDL_ThreadID(); --- a/import/SDL_timer.d +++ b/import/SDL_timer.d @@ -39,7 +39,7 @@ void SDL_Delay(Uint32 ms); /* Function prototype for the timer callback function */ -alias Uint32 (*SDL_TimerCallback)(Uint32 interval); +alias Uint32 function(Uint32 interval) SDL_TimerCallback; /* Set a callback to run after the specified number of milliseconds has * elapsed. The callback function is passed the current timer interval @@ -79,7 +79,7 @@ * passed in, the periodic alarm continues, otherwise a new alarm is * scheduled. If the callback returns 0, the periodic alarm is cancelled. */ -alias Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param); +alias Uint32 function(Uint32 interval, void *param) SDL_NewTimerCallback; /* Definition of the timer ID type */ alias void *SDL_TimerID; --- a/import/SDL_types.d +++ b/import/SDL_types.d @@ -33,7 +33,7 @@ alias ushort Uint16; alias short Sint16; alias uint Uint32; -alias int Sint32; +alias int Sint32; alias ulong Uint64; alias long Sint64; --- a/import/SDL_video.d +++ b/import/SDL_video.d @@ -74,9 +74,9 @@ Uint8 alpha; } -/* typedef for private surface blitting functions */ -typedef int (*SDL_blit)(SDL_Surface *src, SDL_Rect *srcrect, - SDL_Surface *dst, SDL_Rect *dstrect); +/* alias for private surface blitting functions */ +alias int function(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) SDL_blit; /* This structure should be treated as read-only, except for 'pixels', which, if not NULL, contains the raw pixel data for the surface. @@ -132,7 +132,7 @@ const uint SDL_PREALLOC = 0x01000000; /* Surface uses preallocated memory */ /* Evaluates to true if the surface needs to be locked before access */ -bit SDL_MUSTLOCK(SDL_Surface *surface) +bool SDL_MUSTLOCK(SDL_Surface *surface) { return surface.offset || ((surface.flags & (SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_RLEACCEL)) != 0); @@ -186,7 +186,7 @@ /* Special flags */ union { - bit hw_overlay; + bool hw_overlay; Uint32 _dummy; } // Uint32 hw_overlay :1; /* Flag: This overlay hardware accelerated? */ @@ -540,7 +540,7 @@ SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc); /* Convenience macro -- load a surface from a file */ -SDL_Surface * SDL_LoadBMP(char* file) +SDL_Surface * SDL_LoadBMP(const(char)* file) { return SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1); } @@ -554,7 +554,7 @@ (SDL_Surface *surface, SDL_RWops *dst, int freedst); /* Convenience macro -- save a surface to a file */ -int SDL_SaveBMP(SDL_Surface *surface, char* file) +int SDL_SaveBMP(SDL_Surface *surface, const(char)* file) { return SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1); } @@ -837,7 +837,7 @@ /* * Sets/Gets the title and icon text of the display window */ -void SDL_WM_SetCaption(char *title, char *icon); +void SDL_WM_SetCaption(const(char) *title, char *icon); void SDL_WM_GetCaption(char **title, char **icon); /* --- a/import/bulletml.d +++ b/import/bulletml.d @@ -1,35 +1,31 @@ extern (C) { alias int BulletMLParserTinyXML; -int* BulletMLParserTinyXML_new(char*); -void BulletMLParserTinyXML_parse(int* ); +int* BulletMLParserTinyXML_new(const(char)*); +void BulletMLParserTinyXML_parse(int*); void BulletMLParserTinyXML_delete(int*); alias int BulletMLParser; alias int BulletMLState; alias int BulletMLRunner; alias int BulletMLRunnerD; -//typedef int BulletMLParser; -//typedef int BulletMLState; -//typedef int BulletMLRunner; -//typedef int BulletMLRunnerD; int* BulletMLRunner_new_parser(BulletMLParser*); int* BulletMLRunner_new_state(BulletMLState*); void BulletMLRunner_delete(int*); -void BulletMLRunner_run(int* ); -bool BulletMLRunner_isEnd(int* ); -void BulletMLRunner_set_getBulletDirection(int*, double (*fp) (int* )); -void BulletMLRunner_set_getAimDirection(int*, double (*fp) (int* )); -void BulletMLRunner_set_getBulletSpeed(int*, double (*fp) (int* )); -void BulletMLRunner_set_getDefaultSpeed(int*, double (*fp) (int* )); -void BulletMLRunner_set_getRank(int*, double (*fp) (int* )); -void BulletMLRunner_set_createSimpleBullet(int*, void (*fp) (int* , double, double)); -void BulletMLRunner_set_createBullet(int*, void (*fp) (int* , BulletMLState*, double, double)); -void BulletMLRunner_set_getTurn(int*, int (*fp) (int* )); -void BulletMLRunner_set_doVanish(int*, void (*fp) (int* )); -void BulletMLRunner_set_doChangeDirection(int*, void (*fp) (int* , double)); -void BulletMLRunner_set_doChangeSpeed(int*, void (*fp) (int* , double)); -void BulletMLRunner_set_doAccelX(int*, void (*fp) (int* , double)); -void BulletMLRunner_set_doAccelY(int*, void (*fp) (int* , double)); -void BulletMLRunner_set_getBulletSpeedX(int*, double (*fp) (int* )); -void BulletMLRunner_set_getBulletSpeedY(int*, double (*fp) (int* )); -void BulletMLRunner_set_getRand(int*, double (*fp) (int* )); +void BulletMLRunner_run(int*); +bool BulletMLRunner_isEnd(int*); +void BulletMLRunner_set_getBulletDirection(int*, double function(int*) fp); +void BulletMLRunner_set_getAimDirection(int*, double function(int*) fp); +void BulletMLRunner_set_getBulletSpeed(int*, double function(int*) fp); +void BulletMLRunner_set_getDefaultSpeed(int*, double function(int*) fp); +void BulletMLRunner_set_getRank(int*, double function(int*) fp); +void BulletMLRunner_set_createSimpleBullet(int*, void function(int*, double, double) fp); +void BulletMLRunner_set_createBullet(int*, void function(int*, BulletMLState*, double, double) fp); +void BulletMLRunner_set_getTurn(int*, int function(int*) fp); +void BulletMLRunner_set_doVanish(int*, void function(int*) fp); +void BulletMLRunner_set_doChangeDirection(int*, void function(int*, double) fp); +void BulletMLRunner_set_doChangeSpeed(int*, void function(int*, double) fp); +void BulletMLRunner_set_doAccelX(int*, void function(int*, double) fp); +void BulletMLRunner_set_doAccelY(int*, void function(int*, double) fp); +void BulletMLRunner_set_getBulletSpeedX(int*, double function(int*) fp); +void BulletMLRunner_set_getBulletSpeedY(int*, double function(int*) fp); +void BulletMLRunner_set_getRand(int*, double function(int*) fp); } --- a/import/opengl.d +++ b/import/opengl.d @@ -1,6 +1,4 @@ -import std.c.windows.windows; - -extern(Windows): +extern(System): alias uint GLenum; alias ubyte GLboolean; @@ -161,6 +159,7 @@ const uint GL_3_BYTES = 0x1408; const uint GL_4_BYTES = 0x1409; const uint GL_DOUBLE = 0x140A; +const uint GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; /* DepthFunction */ /* GL_NEVER */ @@ -1111,376 +1110,369 @@ /*************************************************************/ -extern(Windows) void /*APIENTRY*/glAccum (GLenum op, GLfloat value); -extern(Windows) void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref); -extern(Windows) GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences); -extern(Windows) void /*APIENTRY*/glArrayElement (GLint i); -extern(Windows) void /*APIENTRY*/glBegin (GLenum mode); -extern(Windows) void /*APIENTRY*/glBindTexture (GLenum target, GLuint texture); -extern(Windows) void /*APIENTRY*/glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap); -extern(Windows) void /*APIENTRY*/glBlendFunc (GLenum sfactor, GLenum dfactor); -extern(Windows) void /*APIENTRY*/glCallList (GLuint list); -extern(Windows) void /*APIENTRY*/glCallLists (GLsizei n, GLenum type, GLvoid *lists); -extern(Windows) void /*APIENTRY*/glClear (GLbitfield mask); -extern(Windows) void /*APIENTRY*/glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern(Windows) void /*APIENTRY*/glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -extern(Windows) void /*APIENTRY*/glClearDepth (GLclampd depth); -extern(Windows) void /*APIENTRY*/glClearIndex (GLfloat c); -extern(Windows) void /*APIENTRY*/glClearStencil (GLint s); -extern(Windows) void /*APIENTRY*/glClipPlane (GLenum plane, GLdouble *equation); -extern(Windows) void /*APIENTRY*/glColor3b (GLbyte red, GLbyte green, GLbyte blue); -extern(Windows) void /*APIENTRY*/glColor3bv (GLbyte *v); -extern(Windows) void /*APIENTRY*/glColor3d (GLdouble red, GLdouble green, GLdouble blue); -extern(Windows) void /*APIENTRY*/glColor3dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glColor3f (GLfloat red, GLfloat green, GLfloat blue); -extern(Windows) void /*APIENTRY*/glColor3fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glColor3i (GLint red, GLint green, GLint blue); -extern(Windows) void /*APIENTRY*/glColor3iv (GLint *v); -extern(Windows) void /*APIENTRY*/glColor3s (GLshort red, GLshort green, GLshort blue); -extern(Windows) void /*APIENTRY*/glColor3sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glColor3ub (GLubyte red, GLubyte green, GLubyte blue); -extern(Windows) void /*APIENTRY*/glColor3ubv (GLubyte *v); -extern(Windows) void /*APIENTRY*/glColor3ui (GLuint red, GLuint green, GLuint blue); -extern(Windows) void /*APIENTRY*/glColor3uiv (GLuint *v); -extern(Windows) void /*APIENTRY*/glColor3us (GLushort red, GLushort green, GLushort blue); -extern(Windows) void /*APIENTRY*/glColor3usv (GLushort *v); -extern(Windows) void /*APIENTRY*/glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -extern(Windows) void /*APIENTRY*/glColor4bv (GLbyte *v); -extern(Windows) void /*APIENTRY*/glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -extern(Windows) void /*APIENTRY*/glColor4dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern(Windows) void /*APIENTRY*/glColor4fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glColor4i (GLint red, GLint green, GLint blue, GLint alpha); -extern(Windows) void /*APIENTRY*/glColor4iv (GLint *v); -extern(Windows) void /*APIENTRY*/glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha); -extern(Windows) void /*APIENTRY*/glColor4sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -extern(Windows) void /*APIENTRY*/glColor4ubv (GLubyte *v); -extern(Windows) void /*APIENTRY*/glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha); -extern(Windows) void /*APIENTRY*/glColor4uiv (GLuint *v); -extern(Windows) void /*APIENTRY*/glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha); -extern(Windows) void /*APIENTRY*/glColor4usv (GLushort *v); -extern(Windows) void /*APIENTRY*/glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -extern(Windows) void /*APIENTRY*/glColorMaterial (GLenum face, GLenum mode); -extern(Windows) void /*APIENTRY*/glColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -extern(Windows) void /*APIENTRY*/glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -extern(Windows) void /*APIENTRY*/glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -extern(Windows) void /*APIENTRY*/glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -extern(Windows) void /*APIENTRY*/glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -extern(Windows) void /*APIENTRY*/glCullFace (GLenum mode); -extern(Windows) void /*APIENTRY*/glDeleteLists (GLuint list, GLsizei range); -extern(Windows) void /*APIENTRY*/glDeleteTextures (GLsizei n, GLuint *textures); -extern(Windows) void /*APIENTRY*/glDepthFunc (GLenum func); -extern(Windows) void /*APIENTRY*/glDepthMask (GLboolean flag); -extern(Windows) void /*APIENTRY*/glDepthRange (GLclampd zNear, GLclampd zFar); -extern(Windows) void /*APIENTRY*/glDisable (GLenum cap); -extern(Windows) void /*APIENTRY*/glDisableClientState (GLenum array); -extern(Windows) void /*APIENTRY*/glDrawArrays (GLenum mode, GLint first, GLsizei count); -extern(Windows) void /*APIENTRY*/glDrawBuffer (GLenum mode); -extern(Windows) void /*APIENTRY*/glDrawElements (GLenum mode, GLsizei count, GLenum type, GLvoid *indices); -extern(Windows) void /*APIENTRY*/glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glEdgeFlag (GLboolean flag); -extern(Windows) void /*APIENTRY*/glEdgeFlagPointer (GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glEdgeFlagv (GLboolean *flag); -extern(Windows) void /*APIENTRY*/glEnable (GLenum cap); -extern(Windows) void /*APIENTRY*/glEnableClientState (GLenum array); -extern(Windows) void /*APIENTRY*/glEnd (); -extern(Windows) void /*APIENTRY*/glEndList (); -extern(Windows) void /*APIENTRY*/glEvalCoord1d (GLdouble u); -extern(Windows) void /*APIENTRY*/glEvalCoord1dv (GLdouble *u); -extern(Windows) void /*APIENTRY*/glEvalCoord1f (GLfloat u); -extern(Windows) void /*APIENTRY*/glEvalCoord1fv (GLfloat *u); -extern(Windows) void /*APIENTRY*/glEvalCoord2d (GLdouble u, GLdouble v); -extern(Windows) void /*APIENTRY*/glEvalCoord2dv (GLdouble *u); -extern(Windows) void /*APIENTRY*/glEvalCoord2f (GLfloat u, GLfloat v); -extern(Windows) void /*APIENTRY*/glEvalCoord2fv (GLfloat *u); -extern(Windows) void /*APIENTRY*/glEvalMesh1 (GLenum mode, GLint i1, GLint i2); -extern(Windows) void /*APIENTRY*/glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -extern(Windows) void /*APIENTRY*/glEvalPoint1 (GLint i); -extern(Windows) void /*APIENTRY*/glEvalPoint2 (GLint i, GLint j); -extern(Windows) void /*APIENTRY*/glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer); -extern(Windows) void /*APIENTRY*/glFinish (); -extern(Windows) void /*APIENTRY*/glFlush (); -extern(Windows) void /*APIENTRY*/glFogf (GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glFogfv (GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glFogi (GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glFogiv (GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glFrontFace (GLenum mode); -extern(Windows) void /*APIENTRY*/glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern(Windows) GLuint /*APIENTRY*/glGenLists (GLsizei range); -extern(Windows) void /*APIENTRY*/glGenTextures (GLsizei n, GLuint *textures); -extern(Windows) void /*APIENTRY*/glGetBooleanv (GLenum pname, GLboolean *params); -extern(Windows) void /*APIENTRY*/glGetClipPlane (GLenum plane, GLdouble *equation); -extern(Windows) void /*APIENTRY*/glGetDoublev (GLenum pname, GLdouble *params); -extern(Windows) GLenum /*APIENTRY*/glGetError (); -extern(Windows) void /*APIENTRY*/glGetFloatv (GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetIntegerv (GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetLightiv (GLenum light, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetMapdv (GLenum target, GLenum query, GLdouble *v); -extern(Windows) void /*APIENTRY*/glGetMapfv (GLenum target, GLenum query, GLfloat *v); -extern(Windows) void /*APIENTRY*/glGetMapiv (GLenum target, GLenum query, GLint *v); -extern(Windows) void /*APIENTRY*/glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetMaterialiv (GLenum face, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetPixelMapfv (GLenum map, GLfloat *values); -extern(Windows) void /*APIENTRY*/glGetPixelMapuiv (GLenum map, GLuint *values); -extern(Windows) void /*APIENTRY*/glGetPixelMapusv (GLenum map, GLushort *values); -extern(Windows) void /*APIENTRY*/glGetPointerv (GLenum pname, GLvoid* *params); -extern(Windows) void /*APIENTRY*/glGetPolygonStipple (GLubyte *mask); -extern(Windows) GLubyte * /*APIENTRY*/glGetString (GLenum name); -extern(Windows) void /*APIENTRY*/glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetTexEnviv (GLenum target, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params); -extern(Windows) void /*APIENTRY*/glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetTexGeniv (GLenum coord, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glHint (GLenum target, GLenum mode); -extern(Windows) void /*APIENTRY*/glIndexMask (GLuint mask); -extern(Windows) void /*APIENTRY*/glIndexPointer (GLenum type, GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glIndexd (GLdouble c); -extern(Windows) void /*APIENTRY*/glIndexdv (GLdouble *c); -extern(Windows) void /*APIENTRY*/glIndexf (GLfloat c); -extern(Windows) void /*APIENTRY*/glIndexfv (GLfloat *c); -extern(Windows) void /*APIENTRY*/glIndexi (GLint c); -extern(Windows) void /*APIENTRY*/glIndexiv (GLint *c); -extern(Windows) void /*APIENTRY*/glIndexs (GLshort c); -extern(Windows) void /*APIENTRY*/glIndexsv (GLshort *c); -extern(Windows) void /*APIENTRY*/glIndexub (GLubyte c); -extern(Windows) void /*APIENTRY*/glIndexubv (GLubyte *c); -extern(Windows) void /*APIENTRY*/glInitNames (); -extern(Windows) void /*APIENTRY*/glInterleavedArrays (GLenum format, GLsizei stride, GLvoid *pointer); -extern(Windows) GLboolean /*APIENTRY*/glIsEnabled (GLenum cap); -extern(Windows) GLboolean /*APIENTRY*/glIsList (GLuint list); -extern(Windows) GLboolean /*APIENTRY*/glIsTexture (GLuint texture); -extern(Windows) void /*APIENTRY*/glLightModelf (GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glLightModelfv (GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glLightModeli (GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glLightModeliv (GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glLightf (GLenum light, GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glLightfv (GLenum light, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glLighti (GLenum light, GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glLightiv (GLenum light, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glLineStipple (GLint factor, GLushort pattern); -extern(Windows) void /*APIENTRY*/glLineWidth (GLfloat width); -extern(Windows) void /*APIENTRY*/glListBase (GLuint base); -extern(Windows) void /*APIENTRY*/glLoadIdentity (); -extern(Windows) void /*APIENTRY*/glLoadMatrixd (GLdouble *m); -extern(Windows) void /*APIENTRY*/glLoadMatrixf (GLfloat *m); -extern(Windows) void /*APIENTRY*/glLoadName (GLuint name); -extern(Windows) void /*APIENTRY*/glLogicOp (GLenum opcode); -extern(Windows) void /*APIENTRY*/glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points); -extern(Windows) void /*APIENTRY*/glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points); -extern(Windows) void /*APIENTRY*/glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points); -extern(Windows) void /*APIENTRY*/glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points); -extern(Windows) void /*APIENTRY*/glMapGrid1d (GLint un, GLdouble u1, GLdouble u2); -extern(Windows) void /*APIENTRY*/glMapGrid1f (GLint un, GLfloat u1, GLfloat u2); -extern(Windows) void /*APIENTRY*/glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -extern(Windows) void /*APIENTRY*/glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -extern(Windows) void /*APIENTRY*/glMaterialf (GLenum face, GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glMaterialfv (GLenum face, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glMateriali (GLenum face, GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glMaterialiv (GLenum face, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glMatrixMode (GLenum mode); -extern(Windows) void /*APIENTRY*/glMultMatrixd (GLdouble *m); -extern(Windows) void /*APIENTRY*/glMultMatrixf (GLfloat *m); -extern(Windows) void /*APIENTRY*/glNewList (GLuint list, GLenum mode); -extern(Windows) void /*APIENTRY*/glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz); -extern(Windows) void /*APIENTRY*/glNormal3bv (GLbyte *v); -extern(Windows) void /*APIENTRY*/glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz); -extern(Windows) void /*APIENTRY*/glNormal3dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -extern(Windows) void /*APIENTRY*/glNormal3fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glNormal3i (GLint nx, GLint ny, GLint nz); -extern(Windows) void /*APIENTRY*/glNormal3iv (GLint *v); -extern(Windows) void /*APIENTRY*/glNormal3s (GLshort nx, GLshort ny, GLshort nz); -extern(Windows) void /*APIENTRY*/glNormal3sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glNormalPointer (GLenum type, GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern(Windows) void /*APIENTRY*/glPassThrough (GLfloat token); -extern(Windows) void /*APIENTRY*/glPixelMapfv (GLenum map, GLsizei mapsize, GLfloat *values); -extern(Windows) void /*APIENTRY*/glPixelMapuiv (GLenum map, GLsizei mapsize, GLuint *values); -extern(Windows) void /*APIENTRY*/glPixelMapusv (GLenum map, GLsizei mapsize, GLushort *values); -extern(Windows) void /*APIENTRY*/glPixelStoref (GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glPixelStorei (GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glPixelTransferf (GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glPixelTransferi (GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glPixelZoom (GLfloat xfactor, GLfloat yfactor); -extern(Windows) void /*APIENTRY*/glPointSize (GLfloat size); -extern(Windows) void /*APIENTRY*/glPolygonMode (GLenum face, GLenum mode); -extern(Windows) void /*APIENTRY*/glPolygonOffset (GLfloat factor, GLfloat units); -extern(Windows) void /*APIENTRY*/glPolygonStipple (GLubyte *mask); -extern(Windows) void /*APIENTRY*/glPopAttrib (); -extern(Windows) void /*APIENTRY*/glPopClientAttrib (); -extern(Windows) void /*APIENTRY*/glPopMatrix (); -extern(Windows) void /*APIENTRY*/glPopName (); -extern(Windows) void /*APIENTRY*/glPrioritizeTextures (GLsizei n, GLuint *textures, GLclampf *priorities); -extern(Windows) void /*APIENTRY*/glPushAttrib (GLbitfield mask); -extern(Windows) void /*APIENTRY*/glPushClientAttrib (GLbitfield mask); -extern(Windows) void /*APIENTRY*/glPushMatrix (); -extern(Windows) void /*APIENTRY*/glPushName (GLuint name); -extern(Windows) void /*APIENTRY*/glRasterPos2d (GLdouble x, GLdouble y); -extern(Windows) void /*APIENTRY*/glRasterPos2dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glRasterPos2f (GLfloat x, GLfloat y); -extern(Windows) void /*APIENTRY*/glRasterPos2fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glRasterPos2i (GLint x, GLint y); -extern(Windows) void /*APIENTRY*/glRasterPos2iv (GLint *v); -extern(Windows) void /*APIENTRY*/glRasterPos2s (GLshort x, GLshort y); -extern(Windows) void /*APIENTRY*/glRasterPos2sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glRasterPos3d (GLdouble x, GLdouble y, GLdouble z); -extern(Windows) void /*APIENTRY*/glRasterPos3dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); -extern(Windows) void /*APIENTRY*/glRasterPos3fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glRasterPos3i (GLint x, GLint y, GLint z); -extern(Windows) void /*APIENTRY*/glRasterPos3iv (GLint *v); -extern(Windows) void /*APIENTRY*/glRasterPos3s (GLshort x, GLshort y, GLshort z); -extern(Windows) void /*APIENTRY*/glRasterPos3sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern(Windows) void /*APIENTRY*/glRasterPos4dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern(Windows) void /*APIENTRY*/glRasterPos4fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glRasterPos4i (GLint x, GLint y, GLint z, GLint w); -extern(Windows) void /*APIENTRY*/glRasterPos4iv (GLint *v); -extern(Windows) void /*APIENTRY*/glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w); -extern(Windows) void /*APIENTRY*/glRasterPos4sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glReadBuffer (GLenum mode); -extern(Windows) void /*APIENTRY*/glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -extern(Windows) void /*APIENTRY*/glRectdv (GLdouble *v1, GLdouble *v2); -extern(Windows) void /*APIENTRY*/glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -extern(Windows) void /*APIENTRY*/glRectfv (GLfloat *v1, GLfloat *v2); -extern(Windows) void /*APIENTRY*/glRecti (GLint x1, GLint y1, GLint x2, GLint y2); -extern(Windows) void /*APIENTRY*/glRectiv (GLint *v1, GLint *v2); -extern(Windows) void /*APIENTRY*/glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2); -extern(Windows) void /*APIENTRY*/glRectsv (GLshort *v1, GLshort *v2); -extern(Windows) GLint /*APIENTRY*/glRenderMode (GLenum mode); -extern(Windows) void /*APIENTRY*/glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -extern(Windows) void /*APIENTRY*/glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -extern(Windows) void /*APIENTRY*/glScaled (GLdouble x, GLdouble y, GLdouble z); -extern(Windows) void /*APIENTRY*/glScalef (GLfloat x, GLfloat y, GLfloat z); -extern(Windows) void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -extern(Windows) void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer); -extern(Windows) void /*APIENTRY*/glShadeModel (GLenum mode); -extern(Windows) void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask); -extern(Windows) void /*APIENTRY*/glStencilMask (GLuint mask); -extern(Windows) void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -extern(Windows) void /*APIENTRY*/glTexCoord1d (GLdouble s); -extern(Windows) void /*APIENTRY*/glTexCoord1dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glTexCoord1f (GLfloat s); -extern(Windows) void /*APIENTRY*/glTexCoord1fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glTexCoord1i (GLint s); -extern(Windows) void /*APIENTRY*/glTexCoord1iv (GLint *v); -extern(Windows) void /*APIENTRY*/glTexCoord1s (GLshort s); -extern(Windows) void /*APIENTRY*/glTexCoord1sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glTexCoord2d (GLdouble s, GLdouble t); -extern(Windows) void /*APIENTRY*/glTexCoord2dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glTexCoord2f (GLfloat s, GLfloat t); -extern(Windows) void /*APIENTRY*/glTexCoord2fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glTexCoord2i (GLint s, GLint t); -extern(Windows) void /*APIENTRY*/glTexCoord2iv (GLint *v); -extern(Windows) void /*APIENTRY*/glTexCoord2s (GLshort s, GLshort t); -extern(Windows) void /*APIENTRY*/glTexCoord2sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glTexCoord3d (GLdouble s, GLdouble t, GLdouble r); -extern(Windows) void /*APIENTRY*/glTexCoord3dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glTexCoord3f (GLfloat s, GLfloat t, GLfloat r); -extern(Windows) void /*APIENTRY*/glTexCoord3fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glTexCoord3i (GLint s, GLint t, GLint r); -extern(Windows) void /*APIENTRY*/glTexCoord3iv (GLint *v); -extern(Windows) void /*APIENTRY*/glTexCoord3s (GLshort s, GLshort t, GLshort r); -extern(Windows) void /*APIENTRY*/glTexCoord3sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q); -extern(Windows) void /*APIENTRY*/glTexCoord4dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q); -extern(Windows) void /*APIENTRY*/glTexCoord4fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glTexCoord4i (GLint s, GLint t, GLint r, GLint q); -extern(Windows) void /*APIENTRY*/glTexCoord4iv (GLint *v); -extern(Windows) void /*APIENTRY*/glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q); -extern(Windows) void /*APIENTRY*/glTexCoord4sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glTexCoordPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glTexEnvf (GLenum target, GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glTexEnvfv (GLenum target, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glTexEnvi (GLenum target, GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glTexEnviv (GLenum target, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glTexGend (GLenum coord, GLenum pname, GLdouble param); -extern(Windows) void /*APIENTRY*/glTexGendv (GLenum coord, GLenum pname, GLdouble *params); -extern(Windows) void /*APIENTRY*/glTexGenf (GLenum coord, GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glTexGenfv (GLenum coord, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glTexGeni (GLenum coord, GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glTexGeniv (GLenum coord, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glTexParameterf (GLenum target, GLenum pname, GLfloat param); -extern(Windows) void /*APIENTRY*/glTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -extern(Windows) void /*APIENTRY*/glTexParameteri (GLenum target, GLenum pname, GLint param); -extern(Windows) void /*APIENTRY*/glTexParameteriv (GLenum target, GLenum pname, GLint *params); -extern(Windows) void /*APIENTRY*/glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -extern(Windows) void /*APIENTRY*/glTranslated (GLdouble x, GLdouble y, GLdouble z); -extern(Windows) void /*APIENTRY*/glTranslatef (GLfloat x, GLfloat y, GLfloat z); -extern(Windows) void /*APIENTRY*/glVertex2d (GLdouble x, GLdouble y); -extern(Windows) void /*APIENTRY*/glVertex2dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glVertex2f (GLfloat x, GLfloat y); -extern(Windows) void /*APIENTRY*/glVertex2fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glVertex2i (GLint x, GLint y); -extern(Windows) void /*APIENTRY*/glVertex2iv (GLint *v); -extern(Windows) void /*APIENTRY*/glVertex2s (GLshort x, GLshort y); -extern(Windows) void /*APIENTRY*/glVertex2sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glVertex3d (GLdouble x, GLdouble y, GLdouble z); -extern(Windows) void /*APIENTRY*/glVertex3dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glVertex3f (GLfloat x, GLfloat y, GLfloat z); -extern(Windows) void /*APIENTRY*/glVertex3fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glVertex3i (GLint x, GLint y, GLint z); -extern(Windows) void /*APIENTRY*/glVertex3iv (GLint *v); -extern(Windows) void /*APIENTRY*/glVertex3s (GLshort x, GLshort y, GLshort z); -extern(Windows) void /*APIENTRY*/glVertex3sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern(Windows) void /*APIENTRY*/glVertex4dv (GLdouble *v); -extern(Windows) void /*APIENTRY*/glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern(Windows) void /*APIENTRY*/glVertex4fv (GLfloat *v); -extern(Windows) void /*APIENTRY*/glVertex4i (GLint x, GLint y, GLint z, GLint w); -extern(Windows) void /*APIENTRY*/glVertex4iv (GLint *v); -extern(Windows) void /*APIENTRY*/glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w); -extern(Windows) void /*APIENTRY*/glVertex4sv (GLshort *v); -extern(Windows) void /*APIENTRY*/glVertexPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); -extern(Windows) void /*APIENTRY*/glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - +void /*APIENTRY*/glAccum (GLenum op, GLfloat value); +void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref_); +GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences); +void /*APIENTRY*/glArrayElement (GLint i); +void /*APIENTRY*/glBegin (GLenum mode); +void /*APIENTRY*/glBindTexture (GLenum target, GLuint texture); +void /*APIENTRY*/glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap); +void /*APIENTRY*/glBlendFunc (GLenum sfactor, GLenum dfactor); +void /*APIENTRY*/glCallList (GLuint list); +void /*APIENTRY*/glCallLists (GLsizei n, GLenum type, GLvoid *lists); +void /*APIENTRY*/glClear (GLbitfield mask); +void /*APIENTRY*/glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +void /*APIENTRY*/glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +void /*APIENTRY*/glClearDepth (GLclampd depth); +void /*APIENTRY*/glClearIndex (GLfloat c); +void /*APIENTRY*/glClearStencil (GLint s); +void /*APIENTRY*/glClipPlane (GLenum plane, GLdouble *equation); +void /*APIENTRY*/glColor3b (GLbyte red, GLbyte green, GLbyte blue); +void /*APIENTRY*/glColor3bv (GLbyte *v); +void /*APIENTRY*/glColor3d (GLdouble red, GLdouble green, GLdouble blue); +void /*APIENTRY*/glColor3dv (GLdouble *v); +void /*APIENTRY*/glColor3f (GLfloat red, GLfloat green, GLfloat blue); +void /*APIENTRY*/glColor3fv (GLfloat *v); +void /*APIENTRY*/glColor3i (GLint red, GLint green, GLint blue); +void /*APIENTRY*/glColor3iv (GLint *v); +void /*APIENTRY*/glColor3s (GLshort red, GLshort green, GLshort blue); +void /*APIENTRY*/glColor3sv (GLshort *v); +void /*APIENTRY*/glColor3ub (GLubyte red, GLubyte green, GLubyte blue); +void /*APIENTRY*/glColor3ubv (GLubyte *v); +void /*APIENTRY*/glColor3ui (GLuint red, GLuint green, GLuint blue); +void /*APIENTRY*/glColor3uiv (GLuint *v); +void /*APIENTRY*/glColor3us (GLushort red, GLushort green, GLushort blue); +void /*APIENTRY*/glColor3usv (GLushort *v); +void /*APIENTRY*/glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); +void /*APIENTRY*/glColor4bv (GLbyte *v); +void /*APIENTRY*/glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); +void /*APIENTRY*/glColor4dv (GLdouble *v); +void /*APIENTRY*/glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +void /*APIENTRY*/glColor4fv (GLfloat *v); +void /*APIENTRY*/glColor4i (GLint red, GLint green, GLint blue, GLint alpha); +void /*APIENTRY*/glColor4iv (GLint *v); +void /*APIENTRY*/glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha); +void /*APIENTRY*/glColor4sv (GLshort *v); +void /*APIENTRY*/glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +void /*APIENTRY*/glColor4ubv (GLubyte *v); +void /*APIENTRY*/glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha); +void /*APIENTRY*/glColor4uiv (GLuint *v); +void /*APIENTRY*/glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha); +void /*APIENTRY*/glColor4usv (GLushort *v); +void /*APIENTRY*/glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +void /*APIENTRY*/glColorMaterial (GLenum face, GLenum mode); +void /*APIENTRY*/glColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +void /*APIENTRY*/glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); +void /*APIENTRY*/glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +void /*APIENTRY*/glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +void /*APIENTRY*/glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +void /*APIENTRY*/glCullFace (GLenum mode); +void /*APIENTRY*/glDeleteLists (GLuint list, GLsizei range); +void /*APIENTRY*/glDeleteTextures (GLsizei n, GLuint *textures); +void /*APIENTRY*/glDepthFunc (GLenum func); +void /*APIENTRY*/glDepthMask (GLboolean flag); +void /*APIENTRY*/glDepthRange (GLclampd zNear, GLclampd zFar); +void /*APIENTRY*/glDisable (GLenum cap); +void /*APIENTRY*/glDisableClientState (GLenum array); +void /*APIENTRY*/glDrawArrays (GLenum mode, GLint first, GLsizei count); +void /*APIENTRY*/glDrawBuffer (GLenum mode); +void /*APIENTRY*/glDrawElements (GLenum mode, GLsizei count, GLenum type, GLvoid *indices); +void /*APIENTRY*/glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glEdgeFlag (GLboolean flag); +void /*APIENTRY*/glEdgeFlagPointer (GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glEdgeFlagv (GLboolean *flag); +void /*APIENTRY*/glEnable (GLenum cap); +void /*APIENTRY*/glEnableClientState (GLenum array); +void /*APIENTRY*/glEnd (); +void /*APIENTRY*/glEndList (); +void /*APIENTRY*/glEvalCoord1d (GLdouble u); +void /*APIENTRY*/glEvalCoord1dv (GLdouble *u); +void /*APIENTRY*/glEvalCoord1f (GLfloat u); +void /*APIENTRY*/glEvalCoord1fv (GLfloat *u); +void /*APIENTRY*/glEvalCoord2d (GLdouble u, GLdouble v); +void /*APIENTRY*/glEvalCoord2dv (GLdouble *u); +void /*APIENTRY*/glEvalCoord2f (GLfloat u, GLfloat v); +void /*APIENTRY*/glEvalCoord2fv (GLfloat *u); +void /*APIENTRY*/glEvalMesh1 (GLenum mode, GLint i1, GLint i2); +void /*APIENTRY*/glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); +void /*APIENTRY*/glEvalPoint1 (GLint i); +void /*APIENTRY*/glEvalPoint2 (GLint i, GLint j); +void /*APIENTRY*/glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer); +void /*APIENTRY*/glFinish (); +void /*APIENTRY*/glFlush (); +void /*APIENTRY*/glFogf (GLenum pname, GLfloat param); +void /*APIENTRY*/glFogfv (GLenum pname, GLfloat *params); +void /*APIENTRY*/glFogi (GLenum pname, GLint param); +void /*APIENTRY*/glFogiv (GLenum pname, GLint *params); +void /*APIENTRY*/glFrontFace (GLenum mode); +void /*APIENTRY*/glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLuint /*APIENTRY*/glGenLists (GLsizei range); +void /*APIENTRY*/glGenTextures (GLsizei n, GLuint *textures); +void /*APIENTRY*/glGetBooleanv (GLenum pname, GLboolean *params); +void /*APIENTRY*/glGetClipPlane (GLenum plane, GLdouble *equation); +void /*APIENTRY*/glGetDoublev (GLenum pname, GLdouble *params); +GLenum /*APIENTRY*/glGetError (); +void /*APIENTRY*/glGetFloatv (GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetIntegerv (GLenum pname, GLint *params); +void /*APIENTRY*/glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetLightiv (GLenum light, GLenum pname, GLint *params); +void /*APIENTRY*/glGetMapdv (GLenum target, GLenum query, GLdouble *v); +void /*APIENTRY*/glGetMapfv (GLenum target, GLenum query, GLfloat *v); +void /*APIENTRY*/glGetMapiv (GLenum target, GLenum query, GLint *v); +void /*APIENTRY*/glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetMaterialiv (GLenum face, GLenum pname, GLint *params); +void /*APIENTRY*/glGetPixelMapfv (GLenum map, GLfloat *values); +void /*APIENTRY*/glGetPixelMapuiv (GLenum map, GLuint *values); +void /*APIENTRY*/glGetPixelMapusv (GLenum map, GLushort *values); +void /*APIENTRY*/glGetPointerv (GLenum pname, GLvoid* *params); +void /*APIENTRY*/glGetPolygonStipple (GLubyte *mask); +GLubyte * /*APIENTRY*/glGetString (GLenum name); +void /*APIENTRY*/glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +void /*APIENTRY*/glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params); +void /*APIENTRY*/glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetTexGeniv (GLenum coord, GLenum pname, GLint *params); +void /*APIENTRY*/glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +void /*APIENTRY*/glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +void /*APIENTRY*/glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +void /*APIENTRY*/glHint (GLenum target, GLenum mode); +void /*APIENTRY*/glIndexMask (GLuint mask); +void /*APIENTRY*/glIndexPointer (GLenum type, GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glIndexd (GLdouble c); +void /*APIENTRY*/glIndexdv (GLdouble *c); +void /*APIENTRY*/glIndexf (GLfloat c); +void /*APIENTRY*/glIndexfv (GLfloat *c); +void /*APIENTRY*/glIndexi (GLint c); +void /*APIENTRY*/glIndexiv (GLint *c); +void /*APIENTRY*/glIndexs (GLshort c); +void /*APIENTRY*/glIndexsv (GLshort *c); +void /*APIENTRY*/glIndexub (GLubyte c); +void /*APIENTRY*/glIndexubv (GLubyte *c); +void /*APIENTRY*/glInitNames (); +void /*APIENTRY*/glInterleavedArrays (GLenum format, GLsizei stride, GLvoid *pointer); +GLboolean /*APIENTRY*/glIsEnabled (GLenum cap); +GLboolean /*APIENTRY*/glIsList (GLuint list); +GLboolean /*APIENTRY*/glIsTexture (GLuint texture); +void /*APIENTRY*/glLightModelf (GLenum pname, GLfloat param); +void /*APIENTRY*/glLightModelfv (GLenum pname, GLfloat *params); +void /*APIENTRY*/glLightModeli (GLenum pname, GLint param); +void /*APIENTRY*/glLightModeliv (GLenum pname, GLint *params); +void /*APIENTRY*/glLightf (GLenum light, GLenum pname, GLfloat param); +void /*APIENTRY*/glLightfv (GLenum light, GLenum pname, GLfloat *params); +void /*APIENTRY*/glLighti (GLenum light, GLenum pname, GLint param); +void /*APIENTRY*/glLightiv (GLenum light, GLenum pname, GLint *params); +void /*APIENTRY*/glLineStipple (GLint factor, GLushort pattern); +void /*APIENTRY*/glLineWidth (GLfloat width); +void /*APIENTRY*/glListBase (GLuint base); +void /*APIENTRY*/glLoadIdentity (); +void /*APIENTRY*/glLoadMatrixd (GLdouble *m); +void /*APIENTRY*/glLoadMatrixf (GLfloat *m); +void /*APIENTRY*/glLoadName (GLuint name); +void /*APIENTRY*/glLogicOp (GLenum opcode); +void /*APIENTRY*/glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points); +void /*APIENTRY*/glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points); +void /*APIENTRY*/glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points); +void /*APIENTRY*/glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points); +void /*APIENTRY*/glMapGrid1d (GLint un, GLdouble u1, GLdouble u2); +void /*APIENTRY*/glMapGrid1f (GLint un, GLfloat u1, GLfloat u2); +void /*APIENTRY*/glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); +void /*APIENTRY*/glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); +void /*APIENTRY*/glMaterialf (GLenum face, GLenum pname, GLfloat param); +void /*APIENTRY*/glMaterialfv (GLenum face, GLenum pname, GLfloat *params); +void /*APIENTRY*/glMateriali (GLenum face, GLenum pname, GLint param); +void /*APIENTRY*/glMaterialiv (GLenum face, GLenum pname, GLint *params); +void /*APIENTRY*/glMatrixMode (GLenum mode); +void /*APIENTRY*/glMultMatrixd (GLdouble *m); +void /*APIENTRY*/glMultMatrixf (GLfloat *m); +void /*APIENTRY*/glNewList (GLuint list, GLenum mode); +void /*APIENTRY*/glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz); +void /*APIENTRY*/glNormal3bv (GLbyte *v); +void /*APIENTRY*/glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz); +void /*APIENTRY*/glNormal3dv (GLdouble *v); +void /*APIENTRY*/glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +void /*APIENTRY*/glNormal3fv (GLfloat *v); +void /*APIENTRY*/glNormal3i (GLint nx, GLint ny, GLint nz); +void /*APIENTRY*/glNormal3iv (GLint *v); +void /*APIENTRY*/glNormal3s (GLshort nx, GLshort ny, GLshort nz); +void /*APIENTRY*/glNormal3sv (GLshort *v); +void /*APIENTRY*/glNormalPointer (GLenum type, GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +void /*APIENTRY*/glPassThrough (GLfloat token); +void /*APIENTRY*/glPixelMapfv (GLenum map, GLsizei mapsize, GLfloat *values); +void /*APIENTRY*/glPixelMapuiv (GLenum map, GLsizei mapsize, GLuint *values); +void /*APIENTRY*/glPixelMapusv (GLenum map, GLsizei mapsize, GLushort *values); +void /*APIENTRY*/glPixelStoref (GLenum pname, GLfloat param); +void /*APIENTRY*/glPixelStorei (GLenum pname, GLint param); +void /*APIENTRY*/glPixelTransferf (GLenum pname, GLfloat param); +void /*APIENTRY*/glPixelTransferi (GLenum pname, GLint param); +void /*APIENTRY*/glPixelZoom (GLfloat xfactor, GLfloat yfactor); +void /*APIENTRY*/glPointSize (GLfloat size); +void /*APIENTRY*/glPolygonMode (GLenum face, GLenum mode); +void /*APIENTRY*/glPolygonOffset (GLfloat factor, GLfloat units); +void /*APIENTRY*/glPolygonStipple (GLubyte *mask); +void /*APIENTRY*/glPopAttrib (); +void /*APIENTRY*/glPopClientAttrib (); +void /*APIENTRY*/glPopMatrix (); +void /*APIENTRY*/glPopName (); +void /*APIENTRY*/glPrioritizeTextures (GLsizei n, GLuint *textures, GLclampf *priorities); +void /*APIENTRY*/glPushAttrib (GLbitfield mask); +void /*APIENTRY*/glPushClientAttrib (GLbitfield mask); +void /*APIENTRY*/glPushMatrix (); +void /*APIENTRY*/glPushName (GLuint name); +void /*APIENTRY*/glRasterPos2d (GLdouble x, GLdouble y); +void /*APIENTRY*/glRasterPos2dv (GLdouble *v); +void /*APIENTRY*/glRasterPos2f (GLfloat x, GLfloat y); +void /*APIENTRY*/glRasterPos2fv (GLfloat *v); +void /*APIENTRY*/glRasterPos2i (GLint x, GLint y); +void /*APIENTRY*/glRasterPos2iv (GLint *v); +void /*APIENTRY*/glRasterPos2s (GLshort x, GLshort y); +void /*APIENTRY*/glRasterPos2sv (GLshort *v); +void /*APIENTRY*/glRasterPos3d (GLdouble x, GLdouble y, GLdouble z); +void /*APIENTRY*/glRasterPos3dv (GLdouble *v); +void /*APIENTRY*/glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); +void /*APIENTRY*/glRasterPos3fv (GLfloat *v); +void /*APIENTRY*/glRasterPos3i (GLint x, GLint y, GLint z); +void /*APIENTRY*/glRasterPos3iv (GLint *v); +void /*APIENTRY*/glRasterPos3s (GLshort x, GLshort y, GLshort z); +void /*APIENTRY*/glRasterPos3sv (GLshort *v); +void /*APIENTRY*/glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +void /*APIENTRY*/glRasterPos4dv (GLdouble *v); +void /*APIENTRY*/glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +void /*APIENTRY*/glRasterPos4fv (GLfloat *v); +void /*APIENTRY*/glRasterPos4i (GLint x, GLint y, GLint z, GLint w); +void /*APIENTRY*/glRasterPos4iv (GLint *v); +void /*APIENTRY*/glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w); +void /*APIENTRY*/glRasterPos4sv (GLshort *v); +void /*APIENTRY*/glReadBuffer (GLenum mode); +void /*APIENTRY*/glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); +void /*APIENTRY*/glRectdv (GLdouble *v1, GLdouble *v2); +void /*APIENTRY*/glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); +void /*APIENTRY*/glRectfv (GLfloat *v1, GLfloat *v2); +void /*APIENTRY*/glRecti (GLint x1, GLint y1, GLint x2, GLint y2); +void /*APIENTRY*/glRectiv (GLint *v1, GLint *v2); +void /*APIENTRY*/glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2); +void /*APIENTRY*/glRectsv (GLshort *v1, GLshort *v2); +GLint /*APIENTRY*/glRenderMode (GLenum mode); +void /*APIENTRY*/glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +void /*APIENTRY*/glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +void /*APIENTRY*/glScaled (GLdouble x, GLdouble y, GLdouble z); +void /*APIENTRY*/glScalef (GLfloat x, GLfloat y, GLfloat z); +void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer); +void /*APIENTRY*/glShadeModel (GLenum mode); +void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref_, GLuint mask); +void /*APIENTRY*/glStencilMask (GLuint mask); +void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +void /*APIENTRY*/glTexCoord1d (GLdouble s); +void /*APIENTRY*/glTexCoord1dv (GLdouble *v); +void /*APIENTRY*/glTexCoord1f (GLfloat s); +void /*APIENTRY*/glTexCoord1fv (GLfloat *v); +void /*APIENTRY*/glTexCoord1i (GLint s); +void /*APIENTRY*/glTexCoord1iv (GLint *v); +void /*APIENTRY*/glTexCoord1s (GLshort s); +void /*APIENTRY*/glTexCoord1sv (GLshort *v); +void /*APIENTRY*/glTexCoord2d (GLdouble s, GLdouble t); +void /*APIENTRY*/glTexCoord2dv (GLdouble *v); +void /*APIENTRY*/glTexCoord2f (GLfloat s, GLfloat t); +void /*APIENTRY*/glTexCoord2fv (GLfloat *v); +void /*APIENTRY*/glTexCoord2i (GLint s, GLint t); +void /*APIENTRY*/glTexCoord2iv (GLint *v); +void /*APIENTRY*/glTexCoord2s (GLshort s, GLshort t); +void /*APIENTRY*/glTexCoord2sv (GLshort *v); +void /*APIENTRY*/glTexCoord3d (GLdouble s, GLdouble t, GLdouble r); +void /*APIENTRY*/glTexCoord3dv (GLdouble *v); +void /*APIENTRY*/glTexCoord3f (GLfloat s, GLfloat t, GLfloat r); +void /*APIENTRY*/glTexCoord3fv (GLfloat *v); +void /*APIENTRY*/glTexCoord3i (GLint s, GLint t, GLint r); +void /*APIENTRY*/glTexCoord3iv (GLint *v); +void /*APIENTRY*/glTexCoord3s (GLshort s, GLshort t, GLshort r); +void /*APIENTRY*/glTexCoord3sv (GLshort *v); +void /*APIENTRY*/glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q); +void /*APIENTRY*/glTexCoord4dv (GLdouble *v); +void /*APIENTRY*/glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q); +void /*APIENTRY*/glTexCoord4fv (GLfloat *v); +void /*APIENTRY*/glTexCoord4i (GLint s, GLint t, GLint r, GLint q); +void /*APIENTRY*/glTexCoord4iv (GLint *v); +void /*APIENTRY*/glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q); +void /*APIENTRY*/glTexCoord4sv (GLshort *v); +void /*APIENTRY*/glTexCoordPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glTexEnvf (GLenum target, GLenum pname, GLfloat param); +void /*APIENTRY*/glTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +void /*APIENTRY*/glTexEnvi (GLenum target, GLenum pname, GLint param); +void /*APIENTRY*/glTexEnviv (GLenum target, GLenum pname, GLint *params); +void /*APIENTRY*/glTexGend (GLenum coord, GLenum pname, GLdouble param); +void /*APIENTRY*/glTexGendv (GLenum coord, GLenum pname, GLdouble *params); +void /*APIENTRY*/glTexGenf (GLenum coord, GLenum pname, GLfloat param); +void /*APIENTRY*/glTexGenfv (GLenum coord, GLenum pname, GLfloat *params); +void /*APIENTRY*/glTexGeni (GLenum coord, GLenum pname, GLint param); +void /*APIENTRY*/glTexGeniv (GLenum coord, GLenum pname, GLint *params); +void /*APIENTRY*/glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glTexParameterf (GLenum target, GLenum pname, GLfloat param); +void /*APIENTRY*/glTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +void /*APIENTRY*/glTexParameteri (GLenum target, GLenum pname, GLint param); +void /*APIENTRY*/glTexParameteriv (GLenum target, GLenum pname, GLint *params); +void /*APIENTRY*/glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +void /*APIENTRY*/glTranslated (GLdouble x, GLdouble y, GLdouble z); +void /*APIENTRY*/glTranslatef (GLfloat x, GLfloat y, GLfloat z); +void /*APIENTRY*/glVertex2d (GLdouble x, GLdouble y); +void /*APIENTRY*/glVertex2dv (GLdouble *v); +void /*APIENTRY*/glVertex2f (GLfloat x, GLfloat y); +void /*APIENTRY*/glVertex2fv (GLfloat *v); +void /*APIENTRY*/glVertex2i (GLint x, GLint y); +void /*APIENTRY*/glVertex2iv (GLint *v); +void /*APIENTRY*/glVertex2s (GLshort x, GLshort y); +void /*APIENTRY*/glVertex2sv (GLshort *v); +void /*APIENTRY*/glVertex3d (GLdouble x, GLdouble y, GLdouble z); +void /*APIENTRY*/glVertex3dv (GLdouble *v); +void /*APIENTRY*/glVertex3f (GLfloat x, GLfloat y, GLfloat z); +void /*APIENTRY*/glVertex3fv (GLfloat *v); +void /*APIENTRY*/glVertex3i (GLint x, GLint y, GLint z); +void /*APIENTRY*/glVertex3iv (GLint *v); +void /*APIENTRY*/glVertex3s (GLshort x, GLshort y, GLshort z); +void /*APIENTRY*/glVertex3sv (GLshort *v); +void /*APIENTRY*/glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +void /*APIENTRY*/glVertex4dv (GLdouble *v); +void /*APIENTRY*/glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +void /*APIENTRY*/glVertex4fv (GLfloat *v); +void /*APIENTRY*/glVertex4i (GLint x, GLint y, GLint z, GLint w); +void /*APIENTRY*/glVertex4iv (GLint *v); +void /*APIENTRY*/glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w); +void /*APIENTRY*/glVertex4sv (GLshort *v); +void /*APIENTRY*/glVertexPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +void /*APIENTRY*/glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -extern(Windows): /* EXT_vertex_array */ -typedef void (* PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (* PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (* PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); -typedef void (* PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); -typedef void (* PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); -typedef void (* PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); -typedef void (* PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); -typedef void (* PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, GLboolean *pointer); -typedef void (* PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (* PFNGLARRAYELEMENTARRAYEXTPROC)(GLenum mode, GLsizei count, GLvoid* pi); +alias void function(GLint i) PFNGLARRAYELEMENTEXTPROC; +alias void function(GLenum mode, GLint first, GLsizei count) PFNGLDRAWARRAYSEXTPROC; +alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLVERTEXPOINTEREXTPROC; +alias void function(GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLNORMALPOINTEREXTPROC; +alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLCOLORPOINTEREXTPROC; +alias void function(GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLINDEXPOINTEREXTPROC; +alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLTEXCOORDPOINTEREXTPROC; +alias void function(GLsizei stride, GLsizei count, GLboolean *pointer) PFNGLEDGEFLAGPOINTEREXTPROC; +alias void function(GLenum pname, GLvoid* *params) PFNGLGETPOINTERVEXTPROC; +alias void function(GLenum mode, GLsizei count, GLvoid* pi) PFNGLARRAYELEMENTARRAYEXTPROC; /* WIN_draw_range_elements */ -typedef void (* PFNGLDRAWRANGEELEMENTSWINPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices); +alias void function(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices) PFNGLDRAWRANGEELEMENTSWINPROC; /* WIN_swap_hint */ -typedef void (* PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +alias void function(GLint x, GLint y, GLsizei width, GLsizei height) PFNGLADDSWAPHINTRECTWINPROC; /* EXT_paletted_texture */ -typedef void (* PFNGLCOLORTABLEEXTPROC) - (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, - GLenum type, GLvoid *data); -typedef void (* PFNGLCOLORSUBTABLEEXTPROC) - (GLenum target, GLsizei start, GLsizei count, GLenum format, - GLenum type, GLvoid *data); -typedef void (* PFNGLGETCOLORTABLEEXTPROC) - (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (* PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) - (GLenum target, GLenum pname, GLint *params); -typedef void (* PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) - (GLenum target, GLenum pname, GLfloat *params); +alias void function(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, + GLenum type, GLvoid *data) PFNGLCOLORTABLEEXTPROC; +alias void function(GLenum target, GLsizei start, GLsizei count, GLenum format, + GLenum type, GLvoid *data) PFNGLCOLORSUBTABLEEXTPROC; +alias void function(GLenum target, GLenum format, GLenum type, GLvoid *data) PFNGLGETCOLORTABLEEXTPROC; +alias void function(GLenum target, GLenum pname, GLint *params) PFNGLGETCOLORTABLEPARAMETERIVEXTPROC; +alias void function(GLenum target, GLenum pname, GLfloat *params) PFNGLGETCOLORTABLEPARAMETERFVEXTPROC; -import openglu; +//import openglu; --- a/import/openglu.d +++ b/import/openglu.d @@ -1,6 +1,6 @@ import opengl; -extern(Windows): +extern(System): GLubyte* gluErrorString ( GLenum errCode); @@ -28,7 +28,7 @@ GLdouble y, GLdouble width, GLdouble height, - GLint[4] viewport); + ref GLint[4] viewport); void gluLookAt ( GLdouble eyex, @@ -45,9 +45,9 @@ GLdouble objx, GLdouble objy, GLdouble objz, - GLdouble[16] modelMatrix, - GLdouble[16] projMatrix, - GLint[4] viewport, + ref GLdouble[16] modelMatrix, + ref GLdouble[16] projMatrix, + ref GLint[4] viewport, GLdouble *winx, GLdouble *winy, GLdouble *winz); @@ -56,8 +56,8 @@ GLdouble winx, GLdouble winy, GLdouble winz, - GLdouble[16] modelMatrix, - GLdouble[16] projMatrix, + ref GLdouble[16] modelMatrix, + ref GLdouble[16] projMatrix, GLint[4] viewport, GLdouble *objx, GLdouble *objy, @@ -157,7 +157,7 @@ void gluQuadricCallback ( GLUquadric *qobj, GLenum which, - void (* fn)()); + void function() fn); GLUtesselator* gluNewTess( ); @@ -174,7 +174,7 @@ void gluTessVertex( GLUtesselator *tess, - GLdouble[3] coords, + ref GLdouble[3] coords, void *data ); void gluTessEndContour( @@ -197,7 +197,7 @@ void gluTessCallback( GLUtesselator *tess, GLenum which, - void ( *fn)()); + void function() fn); void gluGetTessProperty( GLUtesselator *tess, @@ -260,9 +260,9 @@ void gluLoadSamplingMatrices ( GLUnurbs *nobj, - GLfloat[16] modelMatrix, - GLfloat[16] projMatrix, - GLint[4] viewport ); + ref GLfloat[16] modelMatrix, + ref GLfloat[16] projMatrix, + ref GLint[4] viewport ); void gluNurbsProperty ( @@ -280,37 +280,37 @@ gluNurbsCallback ( GLUnurbs *nobj, GLenum which, - void (* fn)() ); + void function() fn ); /**** function prototypes ****/ /* gluQuadricCallback */ -typedef void (* GLUquadricErrorProc) (GLenum); +alias void function(GLenum) GLUquadricErrorProc; /* gluTessCallback */ -typedef void (* GLUtessBeginProc) (GLenum); -typedef void (* GLUtessEdgeFlagProc) (GLboolean); -typedef void (* GLUtessVertexProc) (void *); -typedef void (* GLUtessEndProc) (); -typedef void (* GLUtessErrorProc) (GLenum); -typedef void (* GLUtessCombineProc) (GLdouble[3], - void*[4], - GLfloat[4], - void** ); -typedef void (* GLUtessBeginDataProc) (GLenum, void *); -typedef void (* GLUtessEdgeFlagDataProc) (GLboolean, void *); -typedef void (* GLUtessVertexDataProc) (void *, void *); -typedef void (* GLUtessEndDataProc) (void *); -typedef void (* GLUtessErrorDataProc) (GLenum, void *); -typedef void (* GLUtessCombineDataProc) (GLdouble[3], - void*[4], - GLfloat[4], - void**, - void* ); +alias void function(GLenum) GLUtessBeginProc; +alias void function(GLboolean) GLUtessEdgeFlagProc; +alias void function(void *) GLUtessVertexProc; +alias void function() GLUtessEndProc; +alias void function(GLenum) GLUtessErrorProc; +alias void function(ref GLdouble[3], + ref void*[4], + ref GLfloat[4], + void**) GLUtessCombineProc; +alias void function(GLenum, void *) GLUtessBeginDataProc; +alias void function(GLboolean, void *) GLUtessEdgeFlagDataProc; +alias void function(void *, void *) GLUtessVertexDataProc; +alias void function(void *) GLUtessEndDataProc; +alias void function(GLenum, void *) GLUtessErrorDataProc; +alias void function(ref GLdouble[3], + ref void*[4], + ref GLfloat[4], + void**, + void*) GLUtessCombineDataProc; /* gluNurbsCallback */ -typedef void (* GLUnurbsErrorProc) (GLenum); +alias void function(GLenum) GLUnurbsErrorProc; /**** Generic constants ****/ @@ -357,7 +357,6 @@ /**** Tesselation constants ****/ -//const extended GLU_TESS_MAX_COORD = 1.0e150; const real GLU_TESS_MAX_COORD = 1.0e150; /* TessProperty */ --- /dev/null +++ b/import/SDL_keysym_.d @@ -0,0 +1,308 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +/* What we really want is a mapping of every raw key on the keyboard. + To support international keyboards, we use the range 0xA1 - 0xFF + as international virtual keycodes. We'll follow in the footsteps of X11... + The names of the keys + */ + +alias int SDLKey; +enum { + /* The keyboard syms have been cleverly chosen to map to ASCII */ + SDLK_UNKNOWN = 0, + SDLK_FIRST = 0, + SDLK_BACKSPACE = 8, + SDLK_TAB = 9, + SDLK_CLEAR = 12, + SDLK_RETURN = 13, + SDLK_PAUSE = 19, + SDLK_ESCAPE = 27, + SDLK_SPACE = 32, + SDLK_EXCLAIM = 33, + SDLK_QUOTEDBL = 34, + SDLK_HASH = 35, + SDLK_DOLLAR = 36, + SDLK_AMPERSAND = 38, + SDLK_QUOTE = 39, + SDLK_LEFTPAREN = 40, + SDLK_RIGHTPAREN = 41, + SDLK_ASTERISK = 42, + SDLK_PLUS = 43, + SDLK_COMMA = 44, + SDLK_MINUS = 45, + SDLK_PERIOD = 46, + SDLK_SLASH = 47, + SDLK_0 = 48, + SDLK_1 = 49, + SDLK_2 = 50, + SDLK_3 = 51, + SDLK_4 = 52, + SDLK_5 = 53, + SDLK_6 = 54, + SDLK_7 = 55, + SDLK_8 = 56, + SDLK_9 = 57, + SDLK_COLON = 58, + SDLK_SEMICOLON = 59, + SDLK_LESS = 60, + SDLK_EQUALS = 61, + SDLK_GREATER = 62, + SDLK_QUESTION = 63, + SDLK_AT = 64, + /* + Skip uppercase letters + */ + SDLK_LEFTBRACKET = 91, + SDLK_BACKSLASH = 92, + SDLK_RIGHTBRACKET = 93, + SDLK_CARET = 94, + SDLK_UNDERSCORE = 95, + SDLK_BACKQUOTE = 96, + SDLK_a = 97, + SDLK_b = 98, + SDLK_c = 99, + SDLK_d = 100, + SDLK_e = 101, + SDLK_f = 102, + SDLK_g = 103, + SDLK_h = 104, + SDLK_i = 105, + SDLK_j = 106, + SDLK_k = 107, + SDLK_l = 108, + SDLK_m = 109, + SDLK_n = 110, + SDLK_o = 111, + SDLK_p = 112, + SDLK_q = 113, + SDLK_r = 114, + SDLK_s = 115, + SDLK_t = 116, + SDLK_u = 117, + SDLK_v = 118, + SDLK_w = 119, + SDLK_x = 120, + SDLK_y = 121, + SDLK_z = 122, + SDLK_DELETE = 127, + /* End of ASCII mapped keysyms */ + + /* International keyboard syms */ + SDLK_WORLD_0 = 160, /* 0xA0 */ + SDLK_WORLD_1 = 161, + SDLK_WORLD_2 = 162, + SDLK_WORLD_3 = 163, + SDLK_WORLD_4 = 164, + SDLK_WORLD_5 = 165, + SDLK_WORLD_6 = 166, + SDLK_WORLD_7 = 167, + SDLK_WORLD_8 = 168, + SDLK_WORLD_9 = 169, + SDLK_WORLD_10 = 170, + SDLK_WORLD_11 = 171, + SDLK_WORLD_12 = 172, + SDLK_WORLD_13 = 173, + SDLK_WORLD_14 = 174, + SDLK_WORLD_15 = 175, + SDLK_WORLD_16 = 176, + SDLK_WORLD_17 = 177, + SDLK_WORLD_18 = 178, + SDLK_WORLD_19 = 179, + SDLK_WORLD_20 = 180, + SDLK_WORLD_21 = 181, + SDLK_WORLD_22 = 182, + SDLK_WORLD_23 = 183, + SDLK_WORLD_24 = 184, + SDLK_WORLD_25 = 185, + SDLK_WORLD_26 = 186, + SDLK_WORLD_27 = 187, + SDLK_WORLD_28 = 188, + SDLK_WORLD_29 = 189, + SDLK_WORLD_30 = 190, + SDLK_WORLD_31 = 191, + SDLK_WORLD_32 = 192, + SDLK_WORLD_33 = 193, + SDLK_WORLD_34 = 194, + SDLK_WORLD_35 = 195, + SDLK_WORLD_36 = 196, + SDLK_WORLD_37 = 197, + SDLK_WORLD_38 = 198, + SDLK_WORLD_39 = 199, + SDLK_WORLD_40 = 200, + SDLK_WORLD_41 = 201, + SDLK_WORLD_42 = 202, + SDLK_WORLD_43 = 203, + SDLK_WORLD_44 = 204, + SDLK_WORLD_45 = 205, + SDLK_WORLD_46 = 206, + SDLK_WORLD_47 = 207, + SDLK_WORLD_48 = 208, + SDLK_WORLD_49 = 209, + SDLK_WORLD_50 = 210, + SDLK_WORLD_51 = 211, + SDLK_WORLD_52 = 212, + SDLK_WORLD_53 = 213, + SDLK_WORLD_54 = 214, + SDLK_WORLD_55 = 215, + SDLK_WORLD_56 = 216, + SDLK_WORLD_57 = 217, + SDLK_WORLD_58 = 218, + SDLK_WORLD_59 = 219, + SDLK_WORLD_60 = 220, + SDLK_WORLD_61 = 221, + SDLK_WORLD_62 = 222, + SDLK_WORLD_63 = 223, + SDLK_WORLD_64 = 224, + SDLK_WORLD_65 = 225, + SDLK_WORLD_66 = 226, + SDLK_WORLD_67 = 227, + SDLK_WORLD_68 = 228, + SDLK_WORLD_69 = 229, + SDLK_WORLD_70 = 230, + SDLK_WORLD_71 = 231, + SDLK_WORLD_72 = 232, + SDLK_WORLD_73 = 233, + SDLK_WORLD_74 = 234, + SDLK_WORLD_75 = 235, + SDLK_WORLD_76 = 236, + SDLK_WORLD_77 = 237, + SDLK_WORLD_78 = 238, + SDLK_WORLD_79 = 239, + SDLK_WORLD_80 = 240, + SDLK_WORLD_81 = 241, + SDLK_WORLD_82 = 242, + SDLK_WORLD_83 = 243, + SDLK_WORLD_84 = 244, + SDLK_WORLD_85 = 245, + SDLK_WORLD_86 = 246, + SDLK_WORLD_87 = 247, + SDLK_WORLD_88 = 248, + SDLK_WORLD_89 = 249, + SDLK_WORLD_90 = 250, + SDLK_WORLD_91 = 251, + SDLK_WORLD_92 = 252, + SDLK_WORLD_93 = 253, + SDLK_WORLD_94 = 254, + SDLK_WORLD_95 = 255, /* 0xFF */ + + /* Numeric keypad */ + SDLK_KP0 = 256, + SDLK_KP1 = 257, + SDLK_KP2 = 258, + SDLK_KP3 = 259, + SDLK_KP4 = 260, + SDLK_KP5 = 261, + SDLK_KP6 = 262, + SDLK_KP7 = 263, + SDLK_KP8 = 264, + SDLK_KP9 = 265, + SDLK_KP_PERIOD = 266, + SDLK_KP_DIVIDE = 267, + SDLK_KP_MULTIPLY = 268, + SDLK_KP_MINUS = 269, + SDLK_KP_PLUS = 270, + SDLK_KP_ENTER = 271, + SDLK_KP_EQUALS = 272, + + /* Arrows + Home/End pad */ + SDLK_UP = 273, + SDLK_DOWN = 274, + SDLK_RIGHT = 275, + SDLK_LEFT = 276, + SDLK_INSERT = 277, + SDLK_HOME = 278, + SDLK_END = 279, + SDLK_PAGEUP = 280, + SDLK_PAGEDOWN = 281, + + /* Function keys */ + SDLK_F1 = 282, + SDLK_F2 = 283, + SDLK_F3 = 284, + SDLK_F4 = 285, + SDLK_F5 = 286, + SDLK_F6 = 287, + SDLK_F7 = 288, + SDLK_F8 = 289, + SDLK_F9 = 290, + SDLK_F10 = 291, + SDLK_F11 = 292, + SDLK_F12 = 293, + SDLK_F13 = 294, + SDLK_F14 = 295, + SDLK_F15 = 296, + + /* Key state modifier keys */ + SDLK_NUMLOCK = 300, + SDLK_CAPSLOCK = 301, + SDLK_SCROLLOCK = 302, + SDLK_RSHIFT = 303, + SDLK_LSHIFT = 304, + SDLK_RCTRL = 305, + SDLK_LCTRL = 306, + SDLK_RALT = 307, + SDLK_LALT = 308, + SDLK_RMETA = 309, + SDLK_LMETA = 310, + SDLK_LSUPER = 311, /* Left "Windows" key */ + SDLK_RSUPER = 312, /* Right "Windows" key */ + SDLK_MODE = 313, /* "Alt Gr" key */ + SDLK_COMPOSE = 314, /* Multi-key compose key */ + + /* Miscellaneous function keys */ + SDLK_HELP = 315, + SDLK_PRINT = 316, + SDLK_SYSREQ = 317, + SDLK_BREAK = 318, + SDLK_MENU = 319, + SDLK_POWER = 320, /* Power Macintosh power key */ + SDLK_EURO = 321, /* Some european keyboards */ + SDLK_UNDO = 322, /* Atari keyboard has Undo */ + + /* Add any other keys here */ + + SDLK_LAST +} + +/* Enumeration of valid key mods (possibly OR'd together) */ +alias int SDLMod; +enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT= 0x0001, + KMOD_RSHIFT= 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LMETA = 0x0400, + KMOD_RMETA = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, + KMOD_RESERVED = 0x8000 +} + +const uint KMOD_CTRL = (KMOD_LCTRL|KMOD_RCTRL); +const uint KMOD_SHIFT = (KMOD_LSHIFT|KMOD_RSHIFT); +const uint KMOD_ALT = (KMOD_LALT|KMOD_RALT); +const uint KMOD_META = (KMOD_LMETA|KMOD_RMETA); --- /dev/null +++ b/import/SDL_version_.d @@ -0,0 +1,75 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +/* This header defines the current SDL version */ + +import SDL_types; + +extern(C): + +/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL +*/ +const uint SDL_MAJOR_VERSION = 1; +const uint SDL_MINOR_VERSION = 2; +const uint SDL_PATCHLEVEL = 6; + +struct SDL_version { + Uint8 major; + Uint8 minor; + Uint8 patch; +} + +/* This macro can be used to fill a version structure with the compile-time + * version of the SDL library. + */ +void SDL_VERSION(SDL_version* X) +{ + X.major = SDL_MAJOR_VERSION; + X.minor = SDL_MINOR_VERSION; + X.patch = SDL_PATCHLEVEL; +} + +/* This macro turns the version numbers into a numeric value: + (1,2,3) -> (1203) + This assumes that there will never be more than 100 patchlevels +*/ +uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z) +{ + return X * 1000 + Y * 100 + Z; +} + +/* This is the version number macro for the current SDL version */ +const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 + + SDL_MINOR_VERSION * 100 + + SDL_PATCHLEVEL; + +/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ +bool SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z) +{ + return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)); +} + +/* This function gets the version of the dynamically linked SDL library. + it should NOT be used to fill a version structure, instead you should + use the SDL_Version() macro. + */ +SDL_version * SDL_Linked_Version(); --- a/import/SDL_version.d +++ /dev/null @@ -1,75 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Sam Lantinga - slouken@devolution.com -*/ - -/* This header defines the current SDL version */ - -import SDL_types; - -extern(C): - -/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL -*/ -const uint SDL_MAJOR_VERSION = 1; -const uint SDL_MINOR_VERSION = 2; -const uint SDL_PATCHLEVEL = 3; - -struct SDL_version { - Uint8 major; - Uint8 minor; - Uint8 patch; -} - -/* This macro can be used to fill a version structure with the compile-time - * version of the SDL library. - */ -void SDL_VERSION(SDL_version* X) -{ - X.major = SDL_MAJOR_VERSION; - X.minor = SDL_MINOR_VERSION; - X.patch = SDL_PATCHLEVEL; -} - -/* This macro turns the version numbers into a numeric value: - (1,2,3) -> (1203) - This assumes that there will never be more than 100 patchlevels -*/ -uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z) -{ - return X * 1000 + Y * 100 + Z; -} - -/* This is the version number macro for the current SDL version */ -const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 + - SDL_MINOR_VERSION * 100 + - SDL_PATCHLEVEL; - -/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ -bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z) -{ - return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)); -} - -/* This function gets the version of the dynamically linked SDL library. - it should NOT be used to fill a version structure, instead you should - use the SDL_Version() macro. - */ -SDL_version * SDL_Linked_Version(); debian/patches/fixes.patch0000644000000000000000000005410212164232453012760 0ustar # Copyright (C) 2007 Marcel Unbehaun # Distributed under the same license as the game. See debian/copyright. --- a/src/abagames/p47/Bonus.d +++ b/src/abagames/p47/Bonus.d @@ -63,7 +63,7 @@ } public override void init(ActorInitializer ini) { - BonusInitializer bi = (BonusInitializer) ini; + BonusInitializer bi = cast(BonusInitializer) ini; field = bi.field; ship = bi.ship; manager = bi.manager; @@ -132,7 +132,7 @@ if (cnt < RETRO_CNT) return; float d = pos.dist(ship.pos); - if (d < ACQUIRE_WIDTH * (1 + (float) inhaleCnt * 0.2) && ship.cnt >= -Ship.INVINCIBLE_CNT) { + if (d < ACQUIRE_WIDTH * (1 + cast(float) inhaleCnt * 0.2) && ship.cnt >= -Ship.INVINCIBLE_CNT) { getBonus(); isExist = false; return; @@ -157,8 +157,8 @@ public override void draw() { float retro; if (cnt < RETRO_CNT) - retro = 1 - (float) cnt / RETRO_CNT; - else + retro = 1 - cast(float) cnt / RETRO_CNT; + else retro = 0; float d = cnt * 0.1; float ox = sin(d) * 0.3; --- a/src/abagames/p47/BulletActor.d +++ b/src/abagames/p47/BulletActor.d @@ -59,7 +59,7 @@ } public override void init(ActorInitializer ini) { - BulletActorInitializer bi = (BulletActorInitializer) ini; + BulletActorInitializer bi = cast(BulletActorInitializer) ini; field = bi.field; ship = bi.ship; bullet = new P47Bullet(nextId); --- a/src/abagames/p47/BulletActorPool.d +++ b/src/abagames/p47/BulletActorPool.d @@ -32,10 +32,10 @@ } public void addBullet(float deg, float speed) { - BulletActor ba = (BulletActor) getInstance(); + BulletActor ba = cast(BulletActor) getInstance(); if (!ba) return; - P47Bullet rb = (P47Bullet) Bullet.now; + P47Bullet rb = cast(P47Bullet) Bullet.now; if (rb.isMorph) { BulletMLRunner *runner = BulletMLRunner_new_parser(rb.morphParser[rb.morphIdx]); BulletActorPool.registFunctions(runner); @@ -51,12 +51,12 @@ } public void addBullet(BulletMLState *state, float deg, float speed) { - BulletActor ba = (BulletActor) getInstance(); + BulletActor ba = cast(BulletActor) getInstance(); if (!ba) return; BulletMLRunner* runner = BulletMLRunner_new_state(state); registFunctions(runner); - P47Bullet rb = (P47Bullet) Bullet.now; + P47Bullet rb = cast(P47Bullet) Bullet.now; if (rb.isMorph) ba.set(runner, Bullet.now.pos.x, Bullet.now.pos.y, deg, speed, Bullet.now.rank, @@ -72,7 +72,7 @@ float x, float y, float deg, float speed, float rank, float speedRank, int shape, int color, float size, float xReverse) { - BulletActor ba = (BulletActor) getInstance(); + BulletActor ba = cast(BulletActor) getInstance(); if (!ba) return null; ba.set(runner, x, y, deg, speed, rank, speedRank, shape, color, size, xReverse); @@ -99,7 +99,7 @@ float rank, float speedRank, int shape, int color, float size, float xReverse, BulletMLParser *morph[], int morphNum, int morphCnt) { - BulletActor ba = (BulletActor) getInstance(); + BulletActor ba = cast(BulletActor) getInstance(); if (!ba) return null; ba.set(runner, x, y, deg, speed, rank, @@ -119,14 +119,14 @@ } public void killMe(Bullet bullet) { - assert(((BulletActor) actor[bullet.id]).bullet.id == bullet.id); - ((BulletActor) actor[bullet.id]).remove(); + assert((cast(BulletActor) actor[bullet.id]).bullet.id == bullet.id); + (cast(BulletActor) actor[bullet.id]).remove(); } public override void clear() { for (int i = 0; i < actor.length; i++) { if (actor[i].isExist) - ((BulletActor) actor[i]).remove(); + (cast(BulletActor) actor[i]).remove(); } } @@ -155,7 +155,7 @@ double getAimDirectionWithXRev_(BulletMLRunner* r) { Vector b = Bullet.now.pos; Vector t = Bullet.target; - float xrev = ((P47Bullet) Bullet.now).xReverse; + float xrev = (cast(P47Bullet) Bullet.now).xReverse; return rtod(std.math.atan2(t.x - b.x, t.y - b.y) * xrev); } } --- a/src/abagames/p47/Enemy.d +++ b/src/abagames/p47/Enemy.d @@ -88,7 +88,7 @@ } public override void init(ActorInitializer ini) { - EnemyInitializer ei = (EnemyInitializer) ini; + EnemyInitializer ei = cast(EnemyInitializer) ini; field = ei.field; bullets = ei.bullets; shots = ei.shots; @@ -234,7 +234,7 @@ } private void addBonuses(Vector p, int sl) { - int bn = (float) sl * 3 / (((float) cnt / 30) + 1) * Bonus.rate + 0.9; + int bn = cast(int)(cast(float) sl * 3 / ((cast(float) cnt / 30) + 1) * Bonus.rate + 0.9); manager.addBonus(pos, p, bn); } @@ -389,7 +389,7 @@ for (int i = 0; i < shots.actor.length; i++) { if (!shots.actor[i].isExist) continue; - Vector sp = ((Shot) shots.actor[i]).pos; + Vector sp = (cast(Shot) shots.actor[i]).pos; ch = checkHit(sp, 0.7, 0); if (ch >= HIT) { manager.addParticle(sp, rand.nextSignedFloat(0.3), 0, Shot.SPEED / 4); @@ -407,7 +407,7 @@ for (int i = 0; i < rolls.actor.length; i++) { if (!rolls.actor[i].isExist) continue; - Roll rl = (Roll) rolls.actor[i]; + Roll rl = cast(Roll) rolls.actor[i]; ch = checkHit(rl.pos[0], 1.0, 1.0); if (ch >= HIT) { for (int i = 0; i < 4; i++) @@ -420,9 +420,9 @@ continue; } if (ch == HIT) - addDamage(rd); + addDamage(cast(int)rd); else - addDamageBattery(ch, rd); + addDamageBattery(ch, cast(int)rd); } } } else if (type.type != EnemyType.SMALL) { @@ -430,7 +430,7 @@ for (int i = 0; i < locks.actor.length; i++) { if (!locks.actor[i].isExist) continue; - Lock lk = (Lock) locks.actor[i]; + Lock lk = cast(Lock) locks.actor[i]; if (lk.state == Lock.SEARCH || lk.state == Lock.SEARCHED) { ch = checkLocked(lk.pos[0], 2.5, lk); if (ch >= HIT) { @@ -595,7 +595,7 @@ if (z < 0) z -= APPEARANCE_Z / 60; appCnt--; - mtr = 1.0 - (float)appCnt / APPEARANCE_CNT; + mtr = 1.0 - cast(float)appCnt / APPEARANCE_CNT; } else if (dstCnt > 0) { addFragments(1, z, 0.05, rand.nextSignedFloat(std.math.PI)); manager.clearBullets(); @@ -609,7 +609,7 @@ manager.setBossShieldMeter(0, 0, 0, 0, 0, 0); return; } - mtr = (float)dstCnt / DESTROYED_CNT; + mtr = cast(float)dstCnt / DESTROYED_CNT; } else if (timeoutCnt > 0) { z += DESTROYED_Z / 60; timeoutCnt--; @@ -641,16 +641,16 @@ if (appCnt > 0) { // Appearance effect of the boss. P47Screen.setRetroZ(z); - ap = (float) appCnt / APPEARANCE_CNT; + ap = cast(float) appCnt / APPEARANCE_CNT; P47Screen.setRetroParam(1, type.retroSize * (1 + ap * 10)); P47Screen.setRetroColor(type.r, type.g, type.b, (1 - ap)); } else if (dstCnt > 0) { P47Screen.setRetroZ(z); - ap = (float) dstCnt / DESTROYED_CNT / 2 + 0.5; + ap = cast(float) dstCnt / DESTROYED_CNT / 2 + 0.5; P47Screen.setRetroColor(type.r, type.g, type.b, ap); } else if (timeoutCnt > 0) { P47Screen.setRetroZ(z); - ap = (float) timeoutCnt / TIMEOUT_CNT; + ap = cast(float) timeoutCnt / TIMEOUT_CNT; P47Screen.setRetroColor(type.r, type.g, type.b, ap); } else { P47Screen.setRetroParam(1, type.retroSize); --- a/src/abagames/p47/EnemyType.d +++ b/src/abagames/p47/EnemyType.d @@ -244,9 +244,9 @@ [0.9, 0.3, 0.7, 0.2, 0.25, 5.0, 0.6, 3.0, 1.5], [1.2, 0.2, 0.9, 0.1, 0.3, 7.0, 0.8, 4.5, 1.5], ]; - private enum { - SMALL, MIDDLE, LARGE, MIDDLEBOSS, LARGEBOSS, - } +// private enum { +// SMALL, MIDDLE, LARGE, MIDDLEBOSS, LARGEBOSS, +// } // Set the shepe of the BatteryType. private void setEnemyShapeAndWings(int size) { @@ -482,12 +482,12 @@ shield = 40 + rand.nextInt(10); setBattery(sr, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode); fireInterval = 100 + rand.nextInt(60); - firePeriod = fireInterval / (1.8 + rand.nextFloat(0.7)); + firePeriod = cast(int)(fireInterval / (1.8 + rand.nextFloat(0.7))); } else { shield = 30 + rand.nextInt(8); setBattery(sr, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode); fireInterval = 72 + rand.nextInt(30); - firePeriod = fireInterval / (1.2 + rand.nextFloat(0.2)); + firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.2))); } if (rank < 10) firePeriod /= (2 - rank * 0.1); @@ -565,13 +565,13 @@ setBattery(sr1, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode); setBattery(sr2, 1, BarrageManager.MIDDLESUB, NORMAL, 2, 0, 1, mode); fireInterval = 150 + rand.nextInt(60); - firePeriod = fireInterval / (1.3 + rand.nextFloat(0.8)); + firePeriod = cast(int)(fireInterval / (1.3 + rand.nextFloat(0.8))); } else { shield = 45 + rand.nextInt(8); setBattery(sr1, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode); setBattery(sr2, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 2, 0, 1, mode); fireInterval = 100 + rand.nextInt(50); - firePeriod = fireInterval / (1.2 + rand.nextFloat(0.2)); + firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.2))); } if (rank < 10) firePeriod /= (2 - rank * 0.1); @@ -609,7 +609,7 @@ } shield = 300 + rand.nextInt(50); fireInterval = 200 + rand.nextInt(40); - firePeriod = fireInterval / (1.2 + rand.nextFloat(0.4)); + firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.4))); if (rank < 10) firePeriod /= (2 - rank * 0.1); } @@ -650,7 +650,7 @@ } shield = 400 + rand.nextInt(50); fireInterval = 220 + rand.nextInt(60); - firePeriod = fireInterval / (1.2 + rand.nextFloat(0.3)); + firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.3))); if (rank < 10) firePeriod /= (2 - rank * 0.1); } --- a/src/abagames/p47/Field.d +++ b/src/abagames/p47/Field.d @@ -97,7 +97,7 @@ float d = -RING_NUM * RING_ANGLE_INT / 2 + roll; for (int i = 0; i < RING_NUM; i++) { for (int j = 1; j < 8; j++) { - float sc = (float) j / 16 + 0.5; + float sc = cast(float) j / 16 + 0.5; glPushMatrix(); glTranslatef(0, 0, z); glRotatef(d, 1, 0, 0); @@ -126,7 +126,7 @@ private static const int RING_POS_NUM = 16; private static Vector ringPos[RING_POS_NUM]; - private static const float RING_DEG = std.math.PI / 3 / ((float) (RING_POS_NUM / 2) + 0.5); + private static const float RING_DEG = std.math.PI / 3 / (cast(float) (RING_POS_NUM / 2) + 0.5); private static const float RING_RADIUS = 10; private static const float RING_SIZE = 0.5; @@ -159,7 +159,7 @@ } public static void createDisplayLists() { - float d = -RING_DEG * ((float) (RING_POS_NUM / 2) - 0.5); + float d = -RING_DEG * (cast(float) (RING_POS_NUM / 2) - 0.5); for (int i = 0; i < RING_POS_NUM; i++, d += RING_DEG) { ringPos[i] = new Vector; ringPos[i].x = sin(d) * RING_RADIUS; --- a/src/abagames/p47/Fragment.d +++ b/src/abagames/p47/Fragment.d @@ -43,7 +43,7 @@ } public override void init(ActorInitializer ini) { - FragmentInitializer fi = (FragmentInitializer) ini; + FragmentInitializer fi = cast(FragmentInitializer) ini; for (int i = 0; i < POINT_NUM; i++) { pos[i] = new Vector; vel[i] = new Vector; --- a/src/abagames/p47/LetterRender.d +++ b/src/abagames/p47/LetterRender.d @@ -177,22 +177,22 @@ float x, y, length, size, t; int deg; for (int i = 0;; i++) { - deg = (int) spData[idx][i][4]; + deg = cast(int) spData[idx][i][4]; if (deg > 99990) break; - x = -spData[idx][i][0]; + x = -spData[idx][i][0]; y = -spData[idx][i][1]; - size = spData[idx][i][2]; + size = spData[idx][i][2]; length = spData[idx][i][3]; - size *= 0.66f; + size *= 0.66f; length *= 0.6f; - x = -x; + x = -x; y = y; deg %= 180; - if (deg <= 45 || deg > 135) + if (deg <= 45 || deg > 135) drawBox(x, y, size, length, r, g, b); - else + else drawBox(x, y, length, size, r, g, b); - } + } } private static const int LETTER_NUM = 42; --- a/src/abagames/p47/Lock.d +++ b/src/abagames/p47/Lock.d @@ -52,7 +52,7 @@ } public override void init(ActorInitializer ini) { - LockInitializer li = (LockInitializer) ini; + LockInitializer li = cast(LockInitializer) ini; ship = li.ship; field = li.field; manager = li.manager; --- a/src/abagames/p47/LuminousActorPool.d +++ b/src/abagames/p47/LuminousActorPool.d @@ -22,7 +22,7 @@ public void drawLuminous() { for (int i = 0; i < actor.length; i++) { if (actor[i].isExist) - ((LuminousActor) actor[i]).drawLuminous(); + (cast(LuminousActor) actor[i]).drawLuminous(); } } } --- a/src/abagames/p47/LuminousScreen.d +++ b/src/abagames/p47/LuminousScreen.d @@ -19,7 +19,7 @@ GLuint luminousTexture; const int LUMINOUS_TEXTURE_WIDTH_MAX = 64; const int LUMINOUS_TEXTURE_HEIGHT_MAX = 64; - GLuint td[LUMINOUS_TEXTURE_WIDTH_MAX * LUMINOUS_TEXTURE_HEIGHT_MAX * 4 * uint.size]; + GLuint td[LUMINOUS_TEXTURE_WIDTH_MAX * LUMINOUS_TEXTURE_HEIGHT_MAX * 4 * uint.sizeof]; int luminousTextureWidth = 64, luminousTextureHeight = 64; int screenWidth, screenHeight; float luminous; @@ -27,7 +27,7 @@ private void makeLuminousTexture() { uint *data = td; int i; - memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.size); + memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.sizeof); glGenTextures(1, &luminousTexture); glBindTexture(GL_TEXTURE_2D, luminousTexture); glTexImage2D(GL_TEXTURE_2D, 0, 4, luminousTextureWidth, luminousTextureHeight, 0, --- a/src/abagames/p47/P47Boot.d +++ b/src/abagames/p47/P47Boot.d @@ -42,7 +42,7 @@ throw new Exception("Invalid options"); } i++; - float b = (float) atoi(args[i]) / 100; + float b = cast(float) atoi(args[i]) / 100; if (b < 0 || b > 1) { usage(args[0]); throw new Exception("Invalid options"); @@ -55,7 +55,7 @@ throw new Exception("Invalid options"); } i++; - float l = (float) atoi(args[i]) / 100; + float l = cast(float) atoi(args[i]) / 100; if (l < 0 || l > 1) { usage(args[0]); throw new Exception("Invalid options"); --- a/src/abagames/p47/P47GameManager.d +++ b/src/abagames/p47/P47GameManager.d @@ -88,9 +88,9 @@ // Initialize actor pools, load BGMs/SEs and textures. public override void init() { - pad = (Pad) input; - prefManager = (P47PrefManager) abstPrefManager; - screen = (P47Screen) abstScreen; + pad = cast(Pad) input; + prefManager = cast(P47PrefManager) abstPrefManager; + screen = cast(P47Screen) abstScreen; rand = new Rand; Field.createDisplayLists(); field = new Field; @@ -177,7 +177,7 @@ } public void addParticle(Vector pos, float deg, float ofs, float speed) { - Particle pt = (Particle) particles.getInstanceForced(); + Particle pt = cast(Particle) particles.getInstanceForced(); assert(pt); pt.set(pos, deg, ofs, speed); } @@ -185,14 +185,14 @@ public void addFragments(int n, float x1, float y1, float x2, float y2, float z, float speed, float deg) { for (int i = 0; i < n; i++) { - Fragment ft = (Fragment) fragments.getInstanceForced(); + Fragment ft = cast(Fragment) fragments.getInstanceForced(); assert(ft); ft.set(x1, y1, x2, y2, z, speed, deg); } } public void addEnemy(Vector pos, float d, EnemyType type, BulletMLParser *moveParser) { - Enemy en = (Enemy) enemies.getInstance(); + Enemy en = cast(Enemy) enemies.getInstance(); if (!en) return; en.set(pos, d, type, moveParser); @@ -202,33 +202,33 @@ for (int i = 0; i < bullets.actor.length; i++) { if (!bullets.actor[i].isExist) continue; - ((BulletActor) bullets.actor[i]).toRetro(); + (cast(BulletActor) bullets.actor[i]).toRetro(); } } public void addBoss(Vector pos, float d, EnemyType type) { - Enemy en = (Enemy) enemies.getInstance(); + Enemy en = cast(Enemy) enemies.getInstance(); if (!en) return; en.setBoss(pos, d, type); } public void addShot(Vector pos, float deg) { - Shot shot = (Shot) shots.getInstance(); + Shot shot = cast(Shot) shots.getInstance(); if (!shot) return; shot.set(pos, deg); } public void addRoll() { - Roll roll = (Roll) rolls.getInstance(); + Roll roll = cast(Roll) rolls.getInstance(); if (!roll) return; roll.set(); } public void addLock() { - Lock lock = (Lock) locks.getInstance(); + Lock lock = cast(Lock) locks.getInstance(); if (!lock) return; lock.set(); @@ -238,7 +238,7 @@ for (int i = 0; i < rolls.actor.length; i++) { if (!rolls.actor[i].isExist) continue; - ((Roll) rolls.actor[i]).released = true; + (cast(Roll) rolls.actor[i]).released = true; } } @@ -246,14 +246,14 @@ for (int i = 0; i < locks.actor.length; i++) { if (!locks.actor[i].isExist) continue; - ((Lock) locks.actor[i]).released = true; + (cast(Lock) locks.actor[i]).released = true; } } public void addBonus(Vector pos, Vector ofs, int num) { for (int i = 0; i < num; i++) { - Bonus bonus = (Bonus) bonuses.getInstance(); + Bonus bonus = cast(Bonus) bonuses.getInstance(); if (!bonus) return; bonus.set(pos, ofs); @@ -262,11 +262,11 @@ public void setBossShieldMeter(int bs, int s1, int s2, int s3, int s4, float r) { r *= 0.7; - bossShield = bs * r; - bossWingShield[0] = s1 * r ; - bossWingShield[1] = s2 * r; - bossWingShield[2] = s3 * r; - bossWingShield[3] = s4 * r; + bossShield = cast(int)(bs * r); + bossWingShield[0] = cast(int)(s1 * r); + bossWingShield[1] = cast(int)(s2 * r); + bossWingShield[2] = cast(int)(s3 * r); + bossWingShield[3] = cast(int)(s4 * r); } // Difficulty. @@ -341,7 +341,7 @@ rolls.clear(); locks.clear(); setScreenShake(0, 0); - mainLoop.interval = interval = mainLoop.INTERVAL_BASE; + mainLoop.interval = cast(int)(interval = mainLoop.INTERVAL_BASE); cnt = 0; if (score > prefManager.hiScore[mode][difficulty][parsecSlot]) prefManager.hiScore[mode][difficulty][parsecSlot] = score; @@ -396,10 +396,10 @@ if (sm > 1.75) sm = 1.75; interval += (sm * mainLoop.INTERVAL_BASE - interval) * 0.1; - mainLoop.interval = interval; + mainLoop.interval = cast(int)(interval); } else { interval += (mainLoop.INTERVAL_BASE - interval) * 0.08; - mainLoop.interval = interval; + mainLoop.interval = cast(int)(interval); } } } @@ -578,7 +578,7 @@ LetterRender.drawNum(Bonus.bonusScore, 24, 20, 12, LetterRender.TO_UP); } - private void drawLeft() { + public void drawLeft() { if (left < 0) return; LetterRender.drawString("LEFT", 520, 260, 25, LetterRender.TO_DOWN); --- a/src/abagames/p47/P47Screen.d +++ b/src/abagames/p47/P47Screen.d @@ -128,7 +128,7 @@ float ly = std.math.fabs(y2 - y1); glBegin(GL_QUADS); if (lx < ly) { - int n = ly / ds; + int n = cast(int)(ly / ds); if (n > 0) { float xo = (x2 - x1) / n, xos = 0; float yo; @@ -152,7 +152,7 @@ } } } else { - int n = lx / ds; + int n = cast(int)(lx / ds); if (n > 0) { float yo = (y2 - y1) / n, yos = 0; float xo; --- a/src/abagames/p47/Roll.d +++ b/src/abagames/p47/Roll.d @@ -40,7 +40,7 @@ } public override void init(ActorInitializer ini) { - RollInitializer ri = (RollInitializer) ini; + RollInitializer ri = cast(RollInitializer) ini; ship = ri.ship; field = ri.field; manager = ri.manager; --- a/src/abagames/p47/Shot.d +++ b/src/abagames/p47/Shot.d @@ -35,7 +35,7 @@ } public override void init(ActorInitializer ini) { - ShotInitializer si = (ShotInitializer) ini; + ShotInitializer si = cast(ShotInitializer) ini; field = si.field; pos = new Vector; vel = new Vector; --- a/src/abagames/util/sdl/MainLoop.d +++ b/src/abagames/util/sdl/MainLoop.d @@ -88,7 +88,7 @@ if (event.type == SDL_QUIT) breakLoop(); nowTick = SDL_GetTicks(); - frame = (int) (nowTick-prvTickCount) / interval; + frame = cast(int) (nowTick-prvTickCount) / interval; if (frame <= 0) { frame = 1; SDL_Delay(prvTickCount+interval-nowTick); --- a/src/abagames/util/sdl/Screen3D.d +++ b/src/abagames/util/sdl/Screen3D.d @@ -67,8 +67,8 @@ //gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, nearPlane, farPlane); glFrustum(-nearPlane, nearPlane, - -nearPlane * (GLfloat)height / (GLfloat)width, - nearPlane * (GLfloat)height / (GLfloat)width, + -nearPlane * cast(GLfloat)height / cast(GLfloat)width, + nearPlane * cast(GLfloat)height / cast(GLfloat)width, 0.1f, farPlane); glMatrixMode(GL_MODELVIEW); } --- a/src/mt.d +++ b/src/mt.d @@ -162,7 +162,7 @@ y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); - return (long)(y>>1); + return cast(long)(y>>1); } /* generates a random number on [0,1]-real-interval */ @@ -179,7 +179,7 @@ y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); - return (double)y * (1.0/4294967295.0); + return cast(double)y * (1.0/4294967295.0); /* divided by 2^32-1 */ } @@ -197,7 +197,7 @@ y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); - return (double)y * (1.0/4294967296.0); + return cast(double)y * (1.0/4294967296.0); /* divided by 2^32 */ } @@ -215,7 +215,7 @@ y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); - return ((double)y + 0.5) * (1.0/4294967296.0); + return (cast(double)y + 0.5) * (1.0/4294967296.0); /* divided by 2^32 */ } debian/parsec47-data.install0000644000000000000000000000103012164232453013111 0ustar images usr/share/games/parsec47/ sounds usr/share/games/parsec47/ morph usr/share/games/parsec47/ small usr/share/games/parsec47/ smallmove usr/share/games/parsec47/ smallsidemove usr/share/games/parsec47/ middle usr/share/games/parsec47/ middlesub usr/share/games/parsec47/ middlemove usr/share/games/parsec47/ middlebackmove usr/share/games/parsec47/ large usr/share/games/parsec47/ largemove usr/share/games/parsec47/ morph_lock usr/share/games/parsec47/ small_lock usr/share/games/parsec47/ middlesub_lock usr/share/games/parsec47/ debian/parsec47.install0000644000000000000000000000013512164232453012207 0ustar parsec47 usr/games/ debian/*.xpm usr/share/pixmaps/ debian/*.desktop usr/share/applications/ debian/parsec47.desktop0000644000000000000000000000024012164232453012207 0ustar [Desktop Entry] Type=Application Name=PARSEC47 GenericName= Comment=Kenta Cho's PARSEC47 Icon=parsec47 Exec=parsec47 Terminal=false Categories=Game;ArcadeGame;