debian/0000755000000000000000000000000012164133726007173 5ustar debian/source/0000755000000000000000000000000012164133726010473 5ustar debian/source/format0000644000000000000000000000001412164133726011701 0ustar 3.0 (quilt) debian/docs0000644000000000000000000000003012164133726010037 0ustar readme.txt readme_e.txt debian/ii-esu.manpages0000644000000000000000000000002012164133726012073 0ustar debian/ii-esu.6 debian/README.Debian0000644000000000000000000000106012164133726011231 0ustar ES for Debian ------------- The original music has been removed because its license had non-DFSG-free clauses. The files that have been removed are: . `-- voice |-- FREQ_A500_0.wav |-- FREQ_A500_1.wav |-- FREQ_A500_2.wav |-- FREQ_A500_3.wav |-- FREQ_A500_4.wav |-- FREQ_A500_5.wav |-- FREQ_A500_6.wav |-- FREQ_A500_7.wav |-- FREQ_A500_8.wav `-- FREQ_A500_9.wav And were copyrighted by: Music: HumanPark (http://www.human-park.net/index.htm) -- Miriam Ruiz Sat, 25 Aug 2007 19:58:40 +0000 debian/ii-esu.desktop0000644000000000000000000000022412164133726011757 0ustar [Desktop Entry] Type=Application Name=ii-esu GenericName=ii-esu Comment=HIZ's ES Icon=ii-esu Exec=ii-esu Terminal=false Categories=Game;ArcadeGame; debian/ii-esu-data.install0000644000000000000000000000012712164133726012665 0ustar music usr/share/games/ii-esu/ se usr/share/games/ii-esu/ voice usr/share/games/ii-esu/ debian/copyright0000644000000000000000000001313112164133726011125 0ustar This package was debianized by Miriam Ruiz . It was downloaded from http://hizuoka.web.fc2.com/game/ES/index_en.html Upstream Author: HIZ Copyright: Copyright (C) 2007, HIZ import/SDL*: Copyright (C) 1997, 1998, 1999, 2000, 2001, Sam Lantinga import/bulletml.d: Copyright (C) 2004, Kenta Cho import/smpeg.d: import/MPEGfilter.d: Copyright (C) 1999 Loki Entertainment Software src/util/rand.d: Copyright (C) 2004, Kenta Cho Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, Copyright (C) 2003, Andrew C. Edwards License, converted from the original sjis encoding to utf8: 免責・著作・配布 柔かいコト  本ゲームは「みんなで楽しく」やわらかいです。  本ゲームを改造したりイジったバージョンを配布しても、何らOKです。改造たのしーい!  改造したところや改造した人の名前を、分かりやすいところに書いておくと  いいかもしれません。  ナイスな改造が出来たら メールなどで教えて。俺にも遊ばせてください。  改造とか一切してないものは好きにコピーして配布しちゃって結構結構。 Translation: This game is under the "Yawaraka(flexible)" license. You can freely modify and redistribute it. Conversions are really Fun! You should write the changes and the person who did them in the readme file or in a place that was obvious to find. If you could make a cool modification, please tell me via mail or by any other means. Let me enjoy your changes too. If you have not done any modifications, you can freely distribute without problems. According to the author of the game: "Their licenses are permitting everything if you write my name anywhere on the readme." "Sending E-mails is not a duty. This license has no duty. It says, 'You can do you likes.' It's not a strict license, it's like the word of 'game hell'(game creater's community I belong to). Please feel free to modify and distribute." 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 Library General Public License version 2 can be found in `/usr/share/common-licenses/LGPL-2'. import/smpeg.d: import/MPEGfilter.d: 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 General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. src/util/rand.d: 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. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. The Debian packaging is Copyright 2007 Miriam Ruiz and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. debian/menu0000644000000000000000000000022012164133726010054 0ustar ?package(ii-esu):needs="X11" section="Games/Action"\ title="ES (ii-esu)" command="/usr/games/ii-esu" \ icon="/usr/share/pixmaps/ii-esu.xpm" debian/changelog0000644000000000000000000000462712164133726011056 0ustar ii-esu (1.0a.dfsg1-6) unstable; urgency=low * Added build-depends on libphobos-dev -- Peter De Wachter Sun, 30 Jun 2013 13:09:08 +0200 ii-esu (1.0a.dfsg1-5) unstable; urgency=low [ Barry deFreese ] * Add patch to build with D v2. (Closes: #707265) - Remove -d (deprecated) flag. * Update Homepage tag to new address. * Remove deprecated DM-Upload-allowed. * Replace dh_clean -k with dh_prep. * Add empty watch file. (Upstream tarball not versioned). * Bump Standards Version to 3.9.4. [ Peter De Wachter ] * Switch dh-style minimal rules file. -- Peter De Wachter Sun, 19 May 2013 15:44:36 -0400 ii-esu (1.0a.dfsg1-4) unstable; urgency=medium * Team upload [ Peter De Wachter ] * Copyright file: fix incorrect reference to the "Lesser General Public License version 2" [ Vincent Fourmond ] * Explicitly build with D version 1 (closes: #653085) * 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:39:39 +0100 ii-esu (1.0a.dfsg1-3) unstable; urgency=low * Fix FTBFS with newer gdc by using the right return type in addEnemy(). Thanks to Iain Buclaw and Johann Felix Soden (Closes: #594382) * Clean up copyright file * Bump Standards-Version to 3.9.1. No changes needed. -- Peter De Wachter Tue, 12 Oct 2010 08:13:45 +0200 ii-esu (1.0a.dfsg1-2) unstable; urgency=low [ Miriam Ruiz ] * Removed unneeded link against GLU library * Replaced XS-DM-Upload-Allowed by DM-Upload-Allowed in debian/control. [ Peter De Wachter ] * Patched for changes in the D language. (Closes: #574311) -- Peter De Wachter Wed, 17 Mar 2010 23:48:25 +0100 ii-esu (1.0a.dfsg1-1) unstable; urgency=low [ Miriam Ruiz ] * Initial release (Closes: #440925) * Thanks to Junichi Uekawa and to 角田慎一 for their help translating the license text. * Added XS-DM-Upload-Allowed tag to control to allow uploads from Debian Maintainers. [ Barry deFreese ] * Package rename to ii-esu * Update desktop file * Remove non-free music in get-orig-source target * Update get-orig-source to create new package name tarball -- Miriam Ruiz Fri, 04 Jan 2008 16:16:00 +0000 debian/compat0000644000000000000000000000000212164133726010371 0ustar 9 debian/watch0000644000000000000000000000013012164133726010216 0ustar #Upstream has mostly abandoned maintenance and the upstream tarball is not versioned. debian/rules0000755000000000000000000000077612164133726010265 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://hizuoka.web.fc2.com/game/ES/ES_d.zip unzip ES_d.zip rm ES_d/music/* rm ES_d/*.dll rm ES_d/*.exe rm ES_d/lib/*.lib rm ES_d/resource/*.RES rm `find ES_d -name "*.obj"` rm ES_d/voice/* tar cvfz ../ii-esu_1.0a.dfsg1.orig.tar.gz ES_d rm -rf ES_d.zip ES_d debian/control0000644000000000000000000000167512164133726010607 0ustar Source: ii-esu Section: games Priority: extra Maintainer: Debian Games Team Uploaders: Miriam Ruiz , Peter De Wachter Build-Depends: debhelper (>= 9), gdc (>= 4.8.1), libphobos-dev, libglu1-mesa-dev | libglu-dev, libgl1-mesa-dev | libgl-dev, libsdl1.2-dev, libsdl-mixer1.2-dev Build-Conflicts: libphobos-4.4-dev Standards-Version: 3.9.4 Homepage: http://hiz.fool.jp/hp/index_en.html Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/ii-esu/ Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-games/packages/trunk/ii-esu/ Package: ii-esu Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: shooter game Your ship is surrounded by two circles. You shoot in the direction of your mouse points, and you move if the mouse pointer is outside the inner circle. . The original name of the game is ES, which is pronounced ii-esu in Japanese. debian/ii-esu.60000644000000000000000000000232612164133726010460 0ustar .\" (c) 2007 Miriam Ruiz .\" (c) 2006 HIZ .\" .\" 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 "II-ESU" "6" "" "" "" .SH "NAME" ii-esu \- abstract shooter .SH "DESCRIPTION" Your ship is surrounded by two circles. You shoot in the direction of your mouse points, and you move if the mouse pointer is outside the inner circle. .SH "SEE ALSO" You can find more about the game on its homepage: http://hizuoka.web.fc2.com/game/ES/index_en.html .SH "AUTHOR" This game has been written by HIZ debian/patches/0000755000000000000000000000000012164133726010622 5ustar debian/patches/series0000644000000000000000000000014012164133726012032 0ustar imports.patch fixes.patch makefile.patch directories.patch fix-return-type.patch dlang_v2.patch debian/patches/makefile.patch0000644000000000000000000000077112164133726013425 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,11 @@ +GDC=gdc +DSRC=$(shell find import src -name "*.d" -not -iname '*mpeg*' | sort) +EXE=ii-esu + +all: $(EXE) + +$(EXE): $(DSRC) + $(GDC) -o $@ -Iimport -Isrc -Wno-deprecated $(DFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DSRC) -lSDL -lGL -lSDL_mixer + +clean: + rm -f $(EXE) debian/patches/directories.patch0000644000000000000000000000114712164133726014162 0ustar # Copyright (C) 2007 Miriam Ruiz # Distributed under the same license as the game. See debian/copyright. Index: es-1.0a.dfsg1/src/es/sound.d =================================================================== --- es-1.0a.dfsg1.orig/src/es/sound.d 2007-09-05 14:08:47.000000000 +0000 +++ es-1.0a.dfsg1/src/es/sound.d 2007-09-05 14:09:09.000000000 +0000 @@ -29,7 +29,7 @@ } Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); - music1 = Mix_LoadMUS("music/loop1.ogg"); + music1 = Mix_LoadMUS("/usr/share/games/es/music/loop1.ogg"); _Sound_PlayingMusic = -1; } debian/patches/dlang_v2.patch0000644000000000000000000003531712164133726013350 0ustar # Copyright (C) 2013 Barry deFreese # Distributed under the same license as the game. See debian/copyright. --- a/src/es/enemy.d +++ b/src/es/enemy.d @@ -227,11 +227,11 @@ shape = cast(Shape)BULLET_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){} - public void bonk(real fr){ + public override void attack(int attackTerm ,int attackCnt){} + public override void bonk(real fr){ vanish(); } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI, 0,0,1); glRotated(360.0 * cast(real)(cnt % 60) / 60 ,1,0,0); } @@ -252,10 +252,10 @@ shape = cast(Shape)MISSILE_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){} - public void bonk(real fr){ + public override void attack(int attackTerm ,int attackCnt){} + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI, 0,0,1); glRotated(360.0 * cast(real)(cnt % 60) / 60 ,1,0,0); } @@ -276,8 +276,8 @@ shape = cast(Shape)BOUND_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){} - public void bonk(real fr){ + public override void attack(int attackTerm ,int attackCnt){} + public override void bonk(real fr){ real vr = dist(0 ,0 ,vx ,vy); real theta = atan2(fy ,fx); real rad = atan2(vy ,vx); @@ -287,7 +287,7 @@ fx = fx / fr * field.radius; fy = fy / fr * field.radius; } - public void roll(){ + public override void roll(){ glRotated(90.0, 0, 1, 0); glRotated(360.0 * cast(real)(cnt % 60) / 60, 1, 0, 0); } @@ -312,7 +312,7 @@ shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ if(attackCnt % 30 == 1){ real aim = atan2(ship.fy - fy ,ship.fx -fx); @@ -324,9 +324,9 @@ } } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(90.0, 0, 1, 0); glRotated(360.0 * cast(real)(cnt % 60) / 60, 1, 0, 0); } @@ -353,7 +353,7 @@ shape = cast(Shape)FOURWAY_SHAPE.clone(); shape.multi(largeness * 1.5); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ if(attackCnt % 30 == 1){ real aim = 2.0 * PI * cast(real)(cnt % 180) / 180.0; @@ -364,9 +364,9 @@ } } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(90.0 ,0,1,0); glRotated(360.0 * cast(real)(cnt % 180) / 180,1,0,0); } @@ -393,7 +393,7 @@ shape = cast(Shape)SCATTER_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ if(attackCnt % 10 == 0){ real drad = PI / 30.0; real aim = atan2(vy ,vx); @@ -412,9 +412,9 @@ } } } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI, 0, 0, 1); glRotated(360.0 * cast(real)(cnt % 60) / 60,1,0,0); @@ -442,15 +442,15 @@ shape = cast(Shape)PLANE_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ if(attackCnt % 5 == 0 && 15 < attackCnt ){ real vr = dist(0 ,0 ,vx ,vy); ep.addEnemy(this ,BULLET ,new Straight() ,5 ,fx ,fy ,fz ,vx / vr * 6.0 ,vy / vr *6.0); } } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI ,0,0,1); } } @@ -476,7 +476,7 @@ shape = cast(Shape)NIGHTWING_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ if(20 < attackCnt){ if(attackCnt < 40){ if(attackCnt % 3 == 0){ @@ -489,9 +489,9 @@ } } } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI ,0,0,1); glRotated(- 90.0 * fmax((1 - cast(real)(fmax(cnt - 80,0)) / 30.0) ,0),0,1,0); glRotated(360.0 * cast(real)(cnt % 60) / 60 ,1,0,0); @@ -520,15 +520,15 @@ shape = cast(Shape)ICEBERG_SHAPE.clone(); shape.multi(largeness); } - void attack(int attackTerm ,int attackCnt){ + override void attack(int attackTerm ,int attackCnt){ if(attackCnt % 10 == 0){ real fr = dist(fx ,fy ,ship.fx ,ship.fy); ep.addEnemy(this ,BOUND ,new Straight() ,5 ,fx ,fy ,fz , (ship.fx -fx) / fr * 5.0 ,(ship.fy -fy) / fr * 5.0); } } - void bonk(real fr){ + override void bonk(real fr){ } - void roll(){ + override void roll(){ glRotated(-90.0 ,0,1,0); glRotated(360 * cast(real)(cnt % 60) / 60 ,1,0,0); @@ -556,11 +556,11 @@ shape = cast(Shape)SWINE_SHAPE.clone(); shape.multi(largeness); } - public void attack(int attackTerm ,int attackCnt){ + public override void attack(int attackTerm ,int attackCnt){ } - public void bonk(real fr){ + public override void bonk(real fr){ } - public void roll(){ + public override void roll(){ glRotated(aim()*180.0/PI ,0,0,1); glRotated(360 * cast(real)(cnt % 60) / 60 ,1,0,0); @@ -585,7 +585,7 @@ enemyIdx = 0; } public void clear(){ - foreach(inout Enemy e;enemy){ + foreach(ref Enemy e;enemy){ if(e !is null){ e.setExist(false); } @@ -648,7 +648,7 @@ } public void allDamage(real power){ - foreach(inout Enemy e;enemy){ + foreach(ref Enemy e;enemy){ if(e !is null && e.isExist()){ e.damage(power); } @@ -710,4 +710,4 @@ } } } -*/ \ No newline at end of file +*/ --- a/src/es/rand.d +++ b/src/es/rand.d @@ -6,7 +6,7 @@ module es.rand; private import std.stream; -private import std.date; +private import std.datetime; /** * Random number generator. @@ -14,7 +14,7 @@ public class Rand { public this() { - d_time timer = getUTCtime(); + long timer = Clock.currStdTime(); init_genrand(cast(uint)timer); } --- a/src/es/gamemanager.d +++ b/src/es/gamemanager.d @@ -145,7 +145,7 @@ setNextState("titleState"); } - public void setNextState(char[] name){ + public void setNextState(string name){ switch(name){ case "gameState":nextState = inGameState;break; case "titleState":nextState = inTitleState;break; @@ -173,7 +173,7 @@ public void start(); public void move(); public void draw(); - public char[] name(); + public string name(); } public class InGameState:GameState{ private: @@ -181,11 +181,11 @@ int count; Shape BULLET_SHAPE; - const char[] _name = "gameState"; + const string _name = "gameState"; public this(){ } - public void start(){ + public override void start(){ ship.start(); pointer.start(); @@ -201,7 +201,7 @@ count = 0; } - public void move(){ + public override void move(){ // ship.fx ++; SDL_ShowCursor(SDL_DISABLE); stage.update(); @@ -219,7 +219,7 @@ count ++; } - public void draw(){ + public override void draw(){ screen.setProjection(); glPushMatrix(); cam.update(); @@ -236,7 +236,7 @@ } - public char[] name(){ + public override string name(){ return _name; } } @@ -248,18 +248,18 @@ bool onStart; bool onMusic; - const char[] _name = "titleState"; + const string _name = "titleState"; public this(){ } - public void start(){ + public override void start(){ SDL_ShowCursor(SDL_ENABLE); ship.shield = ship.MAXSHIELD; pointer.fx = ship.fx; pointer.fy = ship.fy; } - public void move(){ + public override void move(){ if(dist(screen.SCREEN_WIDTH / 2 ,screen.SCREEN_HEIGHT / 2 ,mousex,mousey) < 20 * screen.SCREEN_HEIGHT / 480){ // cursor(HAND); @@ -295,7 +295,7 @@ } - public void draw(){ + public override void draw(){ screen.setProjection(); @@ -351,7 +351,7 @@ */ } - public char[] name(){ + public override string name(){ return _name; } } @@ -396,4 +396,4 @@ // camera(eyeX ,eyeY ,eyeZ ,centerX ,centerY ,centerZ ,upX ,upY ,upZ); } } - \ No newline at end of file + --- a/src/es/screen.d +++ b/src/es/screen.d @@ -1,6 +1,7 @@ module es.screen; private import opengl; private import SDL; +private import std.conv; private import std.string; private import std.c.stdlib; @@ -29,7 +30,7 @@ if(SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) { throw new Exception( - "Unable to init SDL video: " ~ std.string.toString(SDL_GetError())); + "Unable to init SDL video: " ~ to!string(SDL_GetError())); } //info = SDL_GetVideoInfo( ); @@ -89,7 +90,7 @@ if (error == GL_NO_ERROR) return; closeSDL(); - throw new Exception("OpenGL error(" ~ std.string.toString(error) ~ ")"); + throw new Exception("OpenGL error(" ~ to!string(error) ~ ")"); } public void closeSDL() { close(); @@ -112,4 +113,4 @@ public void saveBMP(char[] name){ SDL_SaveBMP(gScreenSurface, "screenshot.bmp"); } -} \ No newline at end of file +} --- a/src/es/shot.d +++ b/src/es/shot.d @@ -60,7 +60,7 @@ this.z = field.transZ(fx ,fy ,fz); Enemy lock = null; - for(int i = ep.enemy.length - 1;0 <= i;i --){ + for(ptrdiff_t i = ep.enemy.length - 1;0 <= i;i --){ Enemy e = cast(Enemy)ep.enemy[i]; if(e !is null){ if(dist(e.x ,e.y ,e.z ,x ,y ,z) < (SHOT_SIZE + e.largeness)){ @@ -146,7 +146,7 @@ } public void clear(){ - foreach(inout Shot s;shots){ + foreach(ref Shot s;shots){ if(s !is null){ s.vanish(); } @@ -199,7 +199,7 @@ } public void release(){ - int i = shots.length - 1; + ptrdiff_t i = shots.length - 1; while(0 <=i){ Shot s = shots[i]; if(s !is null){ @@ -255,4 +255,4 @@ } } } -*/ \ No newline at end of file +*/ --- a/src/es/shape.d +++ b/src/es/shape.d @@ -7,7 +7,7 @@ real[] multiple(real[] a,real mul){ real[] b; b.length = a.length; - for(int i = a.length - 1;0 <= i;i --){ + for(ptrdiff_t i = a.length - 1;0 <= i;i --){ b[i] = a[i] * mul; } return b; @@ -15,9 +15,9 @@ real[][] multiple(real[][] a,real mul){ real[][] b; b.length = a.length; - for(int i = a.length - 1;0 <= i;i --){ + for(ptrdiff_t i = a.length - 1;0 <= i;i --){ b[i].length = a[i].length; - for(int j = a[i].length - 1;0 <= j;j --){ + for(ptrdiff_t j = a[i].length - 1;0 <= j;j --){ b[i][j] = a[i][j] * mul; } } @@ -52,14 +52,14 @@ if(a.length != b.length || a.length < 1){ assert(1); } - int maxNum = 0; - for(int i = a.length -1;0 <= i;i --){ + ptrdiff_t maxNum = 0; + for(ptrdiff_t i = a.length -1;0 <= i;i --){ if(a[i].length != b[i].length || a[i].length < 1){ assert(1); } if(maxNum < a[i].length)maxNum = a[i].length; } - int k,l; + ptrdiff_t k,l; k = 0; real[][] x0; @@ -82,7 +82,7 @@ k ++; if(a.length <= k)k = 0; } - int number = (2 * segment + 1) * maxNum; + ptrdiff_t number = (2 * segment + 1) * maxNum; x = new real[number]; y = new real[number]; z = new real[number]; @@ -110,7 +110,7 @@ while(true){ seg ++; if(segment <= seg)break; - for(int j = maxNum - 1;0 <= j ;j --){ + for(ptrdiff_t j = maxNum - 1;0 <= j ;j --){ x[num] = x0[seg][j]; y[num] = y0[seg][j]; z[num] = z0[seg][j]; @@ -147,7 +147,7 @@ z0[i][j] = b[j] * sin(cast(real)i / cast(real)segment * PI * 2.0); } } - int number = (2 * segment + 1) * a.length; + ptrdiff_t number = (2 * segment + 1) * a.length; x.length = number; y.length = number; z.length = number; @@ -175,7 +175,7 @@ while(true){ seg ++; if(segment <= seg)break; - for(int j = a.length - 1;0 <= j ;j --){ + for(ptrdiff_t j = a.length - 1;0 <= j ;j --){ x[num] = x0[seg][j]; y[num] = y0[seg][j]; z[num] = z0[seg][j]; @@ -214,7 +214,7 @@ z0[i][j] = b[j] * sin(cast(real)i / cast(real)segment * PI * 2.0); } } - int number = segment * a.length; + ptrdiff_t number = segment * a.length; x = new real[number]; y = new real[number]; z = new real[number]; @@ -224,7 +224,7 @@ while(true){ if(segment <= seg)break; - for(int j = a.length - 1;0 <= j ;j --){ + for(ptrdiff_t j = a.length - 1;0 <= j ;j --){ x[num] = x0[seg][j]; y[num] = y0[seg][j]; z[num] = z0[seg][j]; --- a/src/es/mouse.d +++ b/src/es/mouse.d @@ -3,7 +3,7 @@ * * Copyright 2005 Kenta Cho. Some rights reserved. */ -module util.mouse; +module es.mouse; private import std.string; private import std.stream; --- a/src/es/ship.d +++ b/src/es/ship.d @@ -30,9 +30,9 @@ public int recCnt; public int damCnt; public bool recovering; - public private Shape shape; - public private real dam; - public private int invTime; + private Shape shape; + private real dam; + private int invTime; public this(){ gun = new Gun(); start(); --- a/src/es/moving.d +++ b/src/es/moving.d @@ -20,7 +20,7 @@ public class Straight:Moving{ - public void update(bool attacking){ + public override void update(bool attacking){ if(attacking ==false){ e.fx += e.vx; e.fy += e.vy; @@ -35,7 +35,7 @@ co = cos(drad); } - public void update(bool attacking){ + public override void update(bool attacking){ real temp; real in1 = (ship.fx - e.fx) * -e.vy + (ship.fy - e.fy) * e.vx; @@ -68,7 +68,7 @@ si = sin(drad); co = cos(drad); } - public void update(bool attacking){ + public override void update(bool attacking){ if(attacking ==false){ e.fx += e.vx; e.fy += e.vy; --- a/src/es/boot.d +++ b/src/es/boot.d @@ -51,14 +51,14 @@ } int user_start(){ - double d; - +/* version (X86) { short cw; asm { fnstcw cw; } cw &= ~1; asm { fldcw cw; } } +*/ mouse = new Mouse(); mainloop = new Mainloop(mouse); mainloop.loop(); debian/patches/fix-return-type.patch0000644000000000000000000000111112164133726014717 0ustar Description: Fix the return type of addEnemy() in src/es/enemy.d Author: Johann Felix Soden Bug-Debian: http://bugs.debian.org/594382 --- a/src/es/enemy.d +++ b/src/es/enemy.d @@ -593,7 +593,7 @@ enemyIdx = 0; } - public void addEnemy(Enemy parent ,int type ,Moving moving ,real hp ,real x ,real y ,real z ,real vx ,real vy){ + public bool addEnemy(Enemy parent ,int type ,Moving moving ,real hp ,real x ,real y ,real z ,real vx ,real vy){ Enemy e; switch(type){ case BULLET: e =new Bullet(parent ,moving ,hp ,x ,y ,z ,vx ,vy);break; debian/patches/imports.patch0000644000000000000000000014071012164133726013343 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_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) { --- 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 --- a/import/SDL_mixer.d +++ b/import/SDL_mixer.d @@ -9,12 +9,12 @@ 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 + 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 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@libsdl.org @@ -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,32 +128,30 @@ 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(); /* * Add your own callback when a channel has finished playing. NULL - * to disable callback. The callback may be called from the mixer's audio - * callback or it could be called as a result of Mix_HaltChannel(), etc. - * do not call SDL_LockAudio() from this callback; you will either be - * inside the audio callback, or SDL_mixer will explicitly lock the audio - * before calling your callback. + * to disable callback. The callback may be called from the mixer's audio + * callback or it could be called as a result of Mix_HaltChannel(), etc. + * do not call SDL_LockAudio() from this callback; you will either be + * 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) */ @@ -162,106 +160,106 @@ /* This is the format of a special effect callback: * - * myeffect(int chan, void *stream, int len, void *udata); + * myeffect(int chan, void *stream, int len, void *udata); * * (chan) is the channel number that your effect is affecting. (stream) is - * the buffer of data to work upon. (len) is the size of (stream), and - * (udata) is a user-defined bit of data, which you pass as the last arg of - * Mix_RegisterEffect(), and is passed back unmolested to your callback. - * Your effect changes the contents of (stream) based on whatever parameters - * are significant, or just leaves it be, if you prefer. You can do whatever - * you like to the buffer, though, and it will continue in its changed state - * down the mixing pipeline, through any other effect functions, then finally - * to be mixed with the rest of the channels and music for the final output - * stream. + * the buffer of data to work upon. (len) is the size of (stream), and + * (udata) is a user-defined bit of data, which you pass as the last arg of + * Mix_RegisterEffect(), and is passed back unmolested to your callback. + * Your effect changes the contents of (stream) based on whatever parameters + * are significant, or just leaves it be, if you prefer. You can do whatever + * you like to the buffer, though, and it will continue in its changed state + * down the mixing pipeline, through any other effect functions, then finally + * to be mixed with the rest of the channels and music for the final output + * stream. * * 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 - * loops and has completed playback. This gets called if the buffer - * plays out normally, or if you call Mix_HaltChannel(), implicitly stop - * a channel via Mix_AllocateChannels(), or unregister a callback while - * it's still playing. + * loops and has completed playback. This gets called if the buffer + * plays out normally, or if you call Mix_HaltChannel(), implicitly stop + * a channel via Mix_AllocateChannels(), or unregister a callback while + * it's still playing. * * 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 - * copied into a buffer and passed through each registered effect function. - * After it passes through all the functions, it is mixed into the final - * output stream. The copy to buffer is performed once, then each effect - * function performs on the output of the previous effect. Understand that - * this extra copy to a buffer is not performed if there are no effects - * registered for a given chunk, which saves CPU cycles, and any given - * effect will be extra cycles, too, so it is crucial that your code run - * fast. Also note that the data that your function is given is in the - * format of the sound device, and not the format you gave to Mix_OpenAudio(), - * although they may in reality be the same. This is an unfortunate but - * necessary speed concern. Use Mix_QuerySpec() to determine if you can - * handle the data before you register your effect, and take appropriate - * actions. + * copied into a buffer and passed through each registered effect function. + * After it passes through all the functions, it is mixed into the final + * output stream. The copy to buffer is performed once, then each effect + * function performs on the output of the previous effect. Understand that + * this extra copy to a buffer is not performed if there are no effects + * registered for a given chunk, which saves CPU cycles, and any given + * effect will be extra cycles, too, so it is crucial that your code run + * fast. Also note that the data that your function is given is in the + * format of the sound device, and not the format you gave to Mix_OpenAudio(), + * although they may in reality be the same. This is an unfortunate but + * necessary speed concern. Use Mix_QuerySpec() to determine if you can + * handle the data before you register your effect, and take appropriate + * actions. * You may also specify a callback (Mix_EffectDone_t) that is called when - * the channel finishes playing. This gives you a more fine-grained control - * than Mix_ChannelFinished(), in case you need to free effect-specific - * resources, etc. If you don't need this, you can specify NULL. + * the channel finishes playing. This gives you a more fine-grained control + * than Mix_ChannelFinished(), in case you need to free effect-specific + * resources, etc. If you don't need this, you can specify NULL. * You may set the callbacks before or after calling Mix_PlayChannel(). * Things like Mix_SetPanning() are just internal special effect functions, - * so if you are using that, you've already incurred the overhead of a copy - * to a separate buffer, and that these effects will be in the queue with - * any functions you've registered. The list of registered effects for a - * channel is reset when a chunk finishes playing, so you need to explicitly - * set them with each call to Mix_PlayChannel*(). + * so if you are using that, you've already incurred the overhead of a copy + * to a separate buffer, and that these effects will be in the queue with + * any functions you've registered. The list of registered effects for a + * channel is reset when a chunk finishes playing, so you need to explicitly + * set them with each call to Mix_PlayChannel*(). * You may also register a special effect function that is to be run after - * final mixing occurs. The rules for these callbacks are identical to those - * in Mix_RegisterEffect, but they are run after all the channels and the - * music have been mixed into a single stream, whereas channel-specific - * effects run on a given channel before any other mixing occurs. These - * global effect callbacks are call "posteffects". Posteffects only have - * their Mix_EffectDone_t function called when they are unregistered (since - * the main output stream is never "done" in the same sense as a channel). - * You must unregister them manually when you've had enough. Your callback - * will be told that the channel being mixed is (MIX_CHANNEL_POST) if the - * processing is considered a posteffect. + * final mixing occurs. The rules for these callbacks are identical to those + * in Mix_RegisterEffect, but they are run after all the channels and the + * music have been mixed into a single stream, whereas channel-specific + * effects run on a given channel before any other mixing occurs. These + * global effect callbacks are call "posteffects". Posteffects only have + * their Mix_EffectDone_t function called when they are unregistered (since + * the main output stream is never "done" in the same sense as a channel). + * You must unregister them manually when you've had enough. Your callback + * will be told that the channel being mixed is (MIX_CHANNEL_POST) if the + * processing is considered a posteffect. * * After all these effects have finished processing, the callback registered - * through Mix_SetPostMix() runs, and then the stream goes to the audio - * device. + * through Mix_SetPostMix() runs, and then the stream goes to the audio + * device. * * DO NOT EVER call SDL_LockAudio() from your callback function! * * returns zero if error (no such channel), nonzero if added. - * Error messages can be retrieved from Mix_GetError(). + * Error messages can be retrieved from Mix_GetError(). */ int Mix_RegisterEffect(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg); /* You may not need to call this explicitly, unless you need to stop an - * effect from processing in the middle of a chunk's playback. + * effect from processing in the middle of a chunk's playback. * Posteffects are never implicitly unregistered as they are for channels, - * but they may be explicitly unregistered through this function by - * specifying MIX_CHANNEL_POST for a channel. + * but they may be explicitly unregistered through this function by + * specifying MIX_CHANNEL_POST for a channel. * returns zero if error (no such channel or effect), nonzero if removed. - * Error messages can be retrieved from Mix_GetError(). + * Error messages can be retrieved from Mix_GetError(). */ int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f); /* You may not need to call this explicitly, unless you need to stop all - * effects from processing in the middle of a chunk's playback. Note that - * this will also shut off some internal effect processing, since - * Mix_SetPanning() and others may use this API under the hood. This is - * called internally when a channel completes playback. + * effects from processing in the middle of a chunk's playback. Note that + * this will also shut off some internal effect processing, since + * Mix_SetPanning() and others may use this API under the hood. This is + * called internally when a channel completes playback. * Posteffects are never implicitly unregistered as they are for channels, - * but they may be explicitly unregistered through this function by - * specifying MIX_CHANNEL_POST for a channel. + * but they may be explicitly unregistered through this function by + * specifying MIX_CHANNEL_POST for a channel. * returns zero if error (no such channel), nonzero if all effects removed. - * Error messages can be retrieved from Mix_GetError(). + * Error messages can be retrieved from Mix_GetError(). */ int Mix_UnregisterAllEffects(int channel); @@ -270,131 +268,131 @@ /* * These are the internally-defined mixing effects. They use the same API that - * effects defined in the application use, but are provided here as a - * convenience. Some effects can reduce their quality or use more memory in - * the name of speed; to enable this, make sure the environment variable - * MIX_EFFECTSMAXSPEED (see above) is defined before you call - * Mix_OpenAudio(). + * effects defined in the application use, but are provided here as a + * convenience. Some effects can reduce their quality or use more memory in + * the name of speed; to enable this, make sure the environment variable + * MIX_EFFECTSMAXSPEED (see above) is defined before you call + * Mix_OpenAudio(). */ /* Set the panning of a channel. The left and right channels are specified - * as integers between 0 and 255, quietest to loudest, respectively. + * as integers between 0 and 255, quietest to loudest, respectively. * * Technically, this is just individual volume control for a sample with - * two (stereo) channels, so it can be used for more than just panning. - * If you want real panning, call it like this: + * two (stereo) channels, so it can be used for more than just panning. + * If you want real panning, call it like this: * - * Mix_SetPanning(channel, left, 255 - left); + * Mix_SetPanning(channel, left, 255 - left); * * ...which isn't so hard. * * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and - * the panning will be done to the final mixed stream before passing it on - * to the audio device. + * the panning will be done to the final mixed stream before passing it on + * to the audio device. * * This uses the Mix_RegisterEffect() API internally, and returns without - * registering the effect function if the audio device is not configured - * for stereo output. Setting both (left) and (right) to 255 causes this - * effect to be unregistered, since that is the data's normal state. + * registering the effect function if the audio device is not configured + * for stereo output. Setting both (left) and (right) to 255 causes this + * effect to be unregistered, since that is the data's normal state. * * returns zero if error (no such channel or Mix_RegisterEffect() fails), - * nonzero if panning effect enabled. Note that an audio device in mono - * mode is a no-op, but this call will return successful in that case. - * Error messages can be retrieved from Mix_GetError(). + * nonzero if panning effect enabled. Note that an audio device in mono + * mode is a no-op, but this call will return successful in that case. + * Error messages can be retrieved from Mix_GetError(). */ int Mix_SetPanning(int channel, Uint8 left, Uint8 right); /* Set the position of a channel. (angle) is an integer from 0 to 360, that - * specifies the location of the sound in relation to the listener. (angle) - * will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260). - * Angle 0 is due north, and rotates clockwise as the value increases. - * For efficiency, the precision of this effect may be limited (angles 1 - * through 7 might all produce the same effect, 8 through 15 are equal, etc). - * (distance) is an integer between 0 and 255 that specifies the space - * between the sound and the listener. The larger the number, the further - * away the sound is. Using 255 does not guarantee that the channel will be - * culled from the mixing process or be completely silent. For efficiency, - * the precision of this effect may be limited (distance 0 through 5 might - * all produce the same effect, 6 through 10 are equal, etc). Setting (angle) - * and (distance) to 0 unregisters this effect, since the data would be - * unchanged. + * specifies the location of the sound in relation to the listener. (angle) + * will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260). + * Angle 0 is due north, and rotates clockwise as the value increases. + * For efficiency, the precision of this effect may be limited (angles 1 + * through 7 might all produce the same effect, 8 through 15 are equal, etc). + * (distance) is an integer between 0 and 255 that specifies the space + * between the sound and the listener. The larger the number, the further + * away the sound is. Using 255 does not guarantee that the channel will be + * culled from the mixing process or be completely silent. For efficiency, + * the precision of this effect may be limited (distance 0 through 5 might + * all produce the same effect, 6 through 10 are equal, etc). Setting (angle) + * and (distance) to 0 unregisters this effect, since the data would be + * unchanged. * * If you need more precise positional audio, consider using OpenAL for - * spatialized effects instead of SDL_mixer. This is only meant to be a - * basic effect for simple "3D" games. + * spatialized effects instead of SDL_mixer. This is only meant to be a + * basic effect for simple "3D" games. * * If the audio device is configured for mono output, then you won't get - * any effectiveness from the angle; however, distance attenuation on the - * channel will still occur. While this effect will function with stereo - * voices, it makes more sense to use voices with only one channel of sound, - * so when they are mixed through this effect, the positioning will sound - * correct. You can convert them to mono through SDL before giving them to - * the mixer in the first place if you like. + * any effectiveness from the angle; however, distance attenuation on the + * channel will still occur. While this effect will function with stereo + * voices, it makes more sense to use voices with only one channel of sound, + * so when they are mixed through this effect, the positioning will sound + * correct. You can convert them to mono through SDL before giving them to + * the mixer in the first place if you like. * * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and - * the positioning will be done to the final mixed stream before passing it - * on to the audio device. + * the positioning will be done to the final mixed stream before passing it + * on to the audio device. * * This is a convenience wrapper over Mix_SetDistance() and Mix_SetPanning(). * * returns zero if error (no such channel or Mix_RegisterEffect() fails), - * nonzero if position effect is enabled. - * Error messages can be retrieved from Mix_GetError(). + * nonzero if position effect is enabled. + * Error messages can be retrieved from Mix_GetError(). */ int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance); /* Set the "distance" of a channel. (distance) is an integer from 0 to 255 - * that specifies the location of the sound in relation to the listener. - * Distance 0 is overlapping the listener, and 255 is as far away as possible - * A distance of 255 does not guarantee silence; in such a case, you might - * want to try changing the chunk's volume, or just cull the sample from the - * mixing process with Mix_HaltChannel(). + * that specifies the location of the sound in relation to the listener. + * Distance 0 is overlapping the listener, and 255 is as far away as possible + * A distance of 255 does not guarantee silence; in such a case, you might + * want to try changing the chunk's volume, or just cull the sample from the + * mixing process with Mix_HaltChannel(). * For efficiency, the precision of this effect may be limited (distances 1 - * through 7 might all produce the same effect, 8 through 15 are equal, etc). - * (distance) is an integer between 0 and 255 that specifies the space - * between the sound and the listener. The larger the number, the further - * away the sound is. + * through 7 might all produce the same effect, 8 through 15 are equal, etc). + * (distance) is an integer between 0 and 255 that specifies the space + * between the sound and the listener. The larger the number, the further + * away the sound is. * Setting (distance) to 0 unregisters this effect, since the data would be - * unchanged. + * unchanged. * If you need more precise positional audio, consider using OpenAL for - * spatialized effects instead of SDL_mixer. This is only meant to be a - * basic effect for simple "3D" games. + * spatialized effects instead of SDL_mixer. This is only meant to be a + * basic effect for simple "3D" games. * * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and - * the distance attenuation will be done to the final mixed stream before - * passing it on to the audio device. + * the distance attenuation will be done to the final mixed stream before + * passing it on to the audio device. * * This uses the Mix_RegisterEffect() API internally. * * returns zero if error (no such channel or Mix_RegisterEffect() fails), - * nonzero if position effect is enabled. - * Error messages can be retrieved from Mix_GetError(). + * nonzero if position effect is enabled. + * Error messages can be retrieved from Mix_GetError(). */ int Mix_SetDistance(int channel, Uint8 distance); /* Causes a channel to reverse its stereo. This is handy if the user has his - * speakers hooked up backwards, or you would like to have a minor bit of - * psychedelia in your sound code. :) Calling this function with (flip) - * set to non-zero reverses the chunks's usual channels. If (flip) is zero, - * the effect is unregistered. + * speakers hooked up backwards, or you would like to have a minor bit of + * psychedelia in your sound code. :) Calling this function with (flip) + * set to non-zero reverses the chunks's usual channels. If (flip) is zero, + * the effect is unregistered. * * This uses the Mix_RegisterEffect() API internally, and thus is probably - * more CPU intensive than having the user just plug in his speakers - * correctly. Mix_SetReverseStereo() returns without registering the effect - * function if the audio device is not configured for stereo output. + * more CPU intensive than having the user just plug in his speakers + * correctly. Mix_SetReverseStereo() returns without registering the effect + * function if the audio device is not configured for stereo output. * * If you specify MIX_CHANNEL_POST for (channel), then this the effect is used - * on the final mixed stream before sending it on to the audio device (a - * posteffect). + * on the final mixed stream before sending it on to the audio device (a + * posteffect). * * returns zero if error (no such channel or Mix_RegisterEffect() fails), - * nonzero if reversing effect is enabled. Note that an audio device in mono - * mode is a no-op, but this call will return successful in that case. - * Error messages can be retrieved from Mix_GetError(). + * nonzero if reversing effect is enabled. Note that an audio device in mono + * mode is a no-op, but this call will return successful in that case. + * Error messages can be retrieved from Mix_GetError(). */ int Mix_SetReverseStereo(int channel, int flip); @@ -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_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 cast(bit)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 @@ -28,11 +28,6 @@ extern(C): -typedef int (*_seek_func_t)(SDL_RWops *context, int offset, int whence); -typedef int (*_read_func_t)(SDL_RWops *context, void *ptr, int size, int maxnum); -typedef int (*_write_func_t)(SDL_RWops *context, void *ptr, int size, int num); -typedef int (*_close_func_t)(SDL_RWops *context); - /* This is the read/write operation structure -- very basic */ struct SDL_RWops { @@ -40,26 +35,22 @@ SEEK_SET, SEEK_CUR, SEEK_END Returns the final offset in the data source. */ - _seek_func_t seek; -// 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. */ - _read_func_t read; -// 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. */ - _write_func_t write; -// 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 */ - _close_func_t close; -// int (*close)(SDL_RWops *context); + int function(SDL_RWops *context) close; Uint32 type; union { @@ -81,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); @@ -93,40 +84,25 @@ /* Macros to easily read and write from an SDL_RWops structure */ int SDL_RWseek(SDL_RWops *ctx, int offset, int whence) { - _seek_func_t seek; -// 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) { - _seek_func_t seek; -// 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) { - _read_func_t read; -// 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) { - _write_func_t write; -// 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) { - _close_func_t close; -// int (*close)(SDL_RWops *context); - close = ctx.close; - return (*close)(ctx); + return ctx.close(ctx); } --- 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_version_.d +++ b/import/SDL_version_.d @@ -63,7 +63,7 @@ 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) +bool SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z) { return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)); } --- 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,7 +1,7 @@ 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; @@ -10,22 +10,22 @@ 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,10 +1,4 @@ -version (Win32) { - private import std.c.windows.windows; - extern(Windows): -} -else { - extern(C): -} +extern(System): alias uint GLenum; alias ubyte GLboolean; @@ -165,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 */ @@ -1116,7 +1111,7 @@ /*************************************************************/ void /*APIENTRY*/glAccum (GLenum op, GLfloat value); -void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref); +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); @@ -1369,7 +1364,7 @@ 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*/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); @@ -1454,35 +1449,30 @@ /* 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; --- a/import/openglu.d +++ b/import/openglu.d @@ -1,11 +1,6 @@ import opengl; -version (Win32) { - extern(Windows): -} -else { - extern(C): -} +extern(System): GLubyte* gluErrorString ( GLenum errCode); @@ -33,7 +28,7 @@ GLdouble y, GLdouble width, GLdouble height, - GLint[4] viewport); + ref GLint[4] viewport); void gluLookAt ( GLdouble eyex, @@ -50,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); @@ -61,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, @@ -162,7 +157,7 @@ void gluQuadricCallback ( GLUquadric *qobj, GLenum which, - void (* fn)()); + void function() fn); GLUtesselator* gluNewTess( ); @@ -179,7 +174,7 @@ void gluTessVertex( GLUtesselator *tess, - GLdouble[3] coords, + ref GLdouble[3] coords, void *data ); void gluTessEndContour( @@ -202,7 +197,7 @@ void gluTessCallback( GLUtesselator *tess, GLenum which, - void ( *fn)()); + void function() fn); void gluGetTessProperty( GLUtesselator *tess, @@ -265,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 ( @@ -285,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 ****/ --- a/import/MPEGfilter.d +++ b/import/MPEGfilter.d @@ -36,8 +36,8 @@ } /* Callback functions for the filter */ - typedef void (* SMPEG_FilterCallback)( SDL_Overlay * dest, SDL_Overlay * source, SDL_Rect * region, SMPEG_FilterInfo * filter_info, void * data ); - typedef void (* SMPEG_FilterDestroy)( SMPEG_Filter * filter ); + alias void function( SDL_Overlay * dest, SDL_Overlay * source, SDL_Rect * region, SMPEG_FilterInfo * filter_info, void * data ) SMPEG_FilterCallback; + alias void function( SMPEG_Filter * filter ) SMPEG_FilterDestroy; /* The filter definition itself */ struct SMPEG_Filter { --- a/import/smpeg.d +++ b/import/smpeg.d @@ -75,8 +75,8 @@ /* Matches the declaration of SDL_UpdateRect() */ - typedef void(*SMPEG_DisplayCallback)(SDL_Surface* dst, int x, int y, - uint w, uint h); + alias void function(SDL_Surface* dst, int x, int y, + uint w, uint h) SMPEG_DisplayCallback; /* Create a new SMPEG object from an MPEG file. On return, if 'info' is not NULL, it will be filled with information @@ -135,7 +135,7 @@ void SMPEG_scaleXY( SMPEG* mpeg, int width, int height ); void SMPEG_scale( SMPEG* mpeg, int scale ); /* */ - void SMPEG_double(SMPEG* mpeg, bit on) { + void SMPEG_double(SMPEG* mpeg, bool on) { SMPEG_scale(mpeg, (on) ? 2 : 1); } debian/patches/fixes.patch0000644000000000000000000000142012164133726012756 0ustar # Copyright (C) 2007 Marcel Unbehaun # Distributed under the same license as the game. See debian/copyright. --- a/src/es/boot.d +++ b/src/es/boot.d @@ -5,6 +5,10 @@ private import es.mouse; private Mainloop mainloop; +private Mouse mouse; + +version (Win32_release) { + private: import std.c.windows.windows; @@ -39,6 +43,12 @@ gc_term(); return result; } +} else { + // Boot as the general executable. + public int main(char[][] args) { + return user_start(); + } +} int user_start(){ double d; --- a/src/es/sound.d +++ b/src/es/sound.d @@ -73,4 +73,4 @@ public int Sound_PlayingMusic(){ if(Mix_PlayingMusic() == 0)_Sound_PlayingMusic = -1; return _Sound_PlayingMusic; -} \ No newline at end of file +} debian/ii-esu.install0000644000000000000000000000013312164133726011753 0ustar ii-esu usr/games/ debian/*.xpm usr/share/pixmaps/ debian/*.desktop usr/share/applications/ debian/ii-esu.xpm0000644000000000000000000001263212164133726011120 0ustar /* XPM */ static char * es_shooter_xpm[] = { "32 32 206 2", " c None", ". c #00323C", "+ c #063741", "@ c #19464F", "# c #4C6F76", "$ c #9FB2B6", "% c #0B3B44", "& c #315962", "* c #69868C", "= c #9FB1B5", "- c #B2C1C5", "; c #C2CED1", "> c #0A3A44", ", c #476C74", "' c #8BA2A6", ") c #B2C1C3", "! c #91A6AA", "~ c #648288", "{ c #2C5660", "] c #789399", "^ c #103E47", "/ c #4C6F75", "( c #B2C0C3", "_ c #C9D4D6", ": c #89A1A8", "< c #42676F", "[ c #13424B", "} c #063640", "| c #728D93", "1 c #224D57", "2 c #859DA2", "3 c #D9E0E1", "4 c #E7EBED", "5 c #95AAAE", "6 c #496D74", "7 c #335B63", "8 c #98ACB0", "9 c #1F4B54", "0 c #8FA6AC", "a c #F8F9F9", "b c #DBE2E4", "c c #A1B4B7", "d c #9BAEB2", "e c #B7C4C7", "f c #ECF0F0", "g c #F4F6F6", "h c #F2F4F5", "i c #A4B6B9", "j c #E3E8EA", "k c #839BA0", "l c #17444D", "m c #C7D2D4", "n c #9EB2B7", "o c #C1CDCF", "p c #5C7C82", "q c #3A6068", "r c #9AADB1", "s c #B1C0C3", "t c #ADBDC0", "u c #ABBBBF", "v c #6E8A90", "w c #C8D3D5", "x c #A3B5B9", "y c #C3CFD1", "z c #628187", "A c #1D4953", "B c #D5DDDF", "C c #466B72", "D c #083842", "E c #CBD5D7", "F c #9BAFB2", "G c #345C64", "H c #769197", "I c #5B7B82", "J c #DAE1E3", "K c #1E4A53", "L c #BBC8CB", "M c #13414B", "N c #B3C1C3", "O c #4E7177", "P c #769095", "Q c #8FA4A9", "R c #CBD5D8", "S c #5D7D84", "T c #D4DCDF", "U c #859CA1", "V c #BFCBCE", "W c #0B3A43", "X c #AABABE", "Y c #FBFBFB", "Z c #496E77", "` c #4C7079", " . c #D3DBDD", ".. c #103F48", "+. c #859EA5", "@. c #1D4A54", "#. c #789297", "$. c #BDCACD", "%. c #C4CFD2", "&. c #5D7D83", "*. c #6F8B91", "=. c #CCD6D8", "-. c #718D92", ";. c #AEBEC1", ">. c #365E66", ",. c #03343E", "'. c #355D65", "). c #AABBBF", "!. c #BAC8CA", "~. c #456971", "{. c #52737A", "]. c #B8C6C9", "^. c #093942", "/. c #748E93", "(. c #92A7AB", "_. c #254F58", ":. c #759095", "<. c #C6D1D3", "[. c #879EA3", "}. c #1C4951", "|. c #093943", "1. c #0B3B45", "2. c #88A0A4", "3. c #BECBCE", "4. c #234E57", "5. c #1B4851", "6. c #A2B4B8", "7. c #839A9F", "8. c #97ABAF", "9. c #B2C1C4", "0. c #5E7D83", "a. c #7A949A", "b. c #7D969C", "c. c #6D898F", "d. c #13424C", "e. c #618087", "f. c #B7C5C8", "g. c #91A6AB", "h. c #8CA2A7", "i. c #A1B3B7", "j. c #4E7077", "k. c #A5B6BA", "l. c #305861", "m. c #083841", "n. c #BCC8CB", "o. c #355D64", "p. c #A6B7BB", "q. c #D6DEE0", "r. c #EDF0F0", "s. c #B9C6C9", "t. c #EDF0F1", "u. c #F0F2F2", "v. c #8CA3A8", "w. c #BDCACE", "x. c #EFF2F3", "y. c #BAC7CA", "z. c #89A1A6", "A. c #BCC9CC", "B. c #C5D0D2", "C. c #9FB3B8", "D. c #C2CED0", "E. c #879DA2", "F. c #124049", "G. c #B1C0C4", "H. c #BDCACC", "I. c #43676F", "J. c #14424B", "K. c #7D969B", "L. c #C4D0D2", "M. c #0F3E47", "N. c #CED7D9", "O. c #4A6F78", "P. c #9AAEB2", "Q. c #93A8AC", "R. c #CAD4D7", "S. c #8DA3A8", "T. c #2C555E", "U. c #759096", "V. c #1C4851", "W. c #C6D1D4", "X. c #9DB1B6", "Y. c #426871", "Z. c #A2B3B6", "`. c #AEBDC1", " + c #A9BABE", ".+ c #C3CED1", "++ c #96AAAE", "@+ c #F6F8F8", "#+ c #BAC6C9", "$+ c #EFF2F2", "%+ c #829BA0", "&+ c #2B555D", "*+ c #DEE4E5", "=+ c #DFE4E5", "-+ c #8AA0A5", ";+ c #54767C", ">+ c #40656C", ",+ c #244F57", "'+ c #13414A", ")+ c #04353F", "!+ c #5A7A80", "~+ c #29535B", "{+ c #779197", "]+ c #B3C2C5", "^+ c #C1CDD0", "/+ c #A9BABD", ". . . . . . . . . . . . + @ # $ $ # @ + . . . . . . . . . . . . ", ". . . . . . . . . . % & * = - ; ; - = * & % . . . . . . . . . . ", ". . . . . . . . > , ' ) ! ~ { ] ] { ~ ! ) ' , > . . . . . . . . ", ". . . . . . ^ / ( _ : < [ } . | | . } [ < : _ ( / ^ . . . . . . ", ". . . . 1 2 3 4 5 6 7 7 7 7 7 8 8 7 7 7 7 7 6 5 4 3 2 9 . . . . ", ". . . . 0 a b c 8 8 8 8 d e f g h f e d 8 8 8 8 i j a k . . . . ", ". . . l m n o p . . . . q r s t u s r q . . . . v w x y ^ . . . ", ". . . z ( A v B C . D 6 E F G H H G F E C . . I J v K L / . . . ", ". . M N O . . I B P Q R S D . | | . D S T Q U J I . . z ( > . . ", ". . # V l . . W X Y E Z . . . | | . . . ` .Y X W . . l _ , . . ", ". ..5 +.. . @.#.$.X %.&.. . . | | . . . *.=.X $.-.@.. . : ' % . ", ". 7 ;.>.,.'.).!.~.l v B C . . | | . . I J v l {.].).'.,.< ) & . ", "^./.(._.:.<.[.}.. . . I B p |.| | 1.v J I . . . }.2.3.-.4.! * + ", "5.6.7.8.9.0.... . . . . v o &.a.b.c.w v . . . . . d.e.f.g.h.i.@ ", "j.J o k.l.m.. . . . . . 1.c.o 9.n.w c.1.. . . . . . m.o.p.m q.# ", "R r.s.h.| | | | | | | | | b.n.t.u.n.b.| | | | | | | | | v.w.x.y.", "R r.s.z.| | | | | | | | | b.n.u.t.9.a.| | | | | | | | | h.A.x.y.", "j.J B.C.l.m.. . . . . . 1.c.w n.n.o &.|.. . . . . . m.o.k.D.q.# ", "5.6.E.8 9.0.... . . . . v w c.b.b.c.o p . . . . . d.e.f.g.h.i.@ ", "^./.(._.:.<.[.F.. . . I J v 1.| | 1.v B C . . . }.2.3.-.4.! * + ", ". 7 ;.>.,.'.G.H.I.l v J I . . | | . . I B p J.~.!.).'.,.< ) & . ", ". ..5 +.. . @.K.e X =.*.. . . | | . . . *.L.6.$.#.@.. . : ' % . ", ". . # V l . . M.X Y N.O.. . . | | . . . O.N.Y P.W . . l _ , . . ", ". . M N O . . I J ' Q.R.6 D . | | . D 6 R.Q.' B C . . z ( > . . ", ". . . z ( A v J I . D S R S.T.U.U.T.S.R S D . I B p V.L / . . . ", ". . . l W.X.w v . . . . Y.Z.`. + +`.Z.Y.. . . . v o d .+^ . . . ", ". . . . ++@+j i 8 8 8 8 d #+$+h h $+#+d 8 8 8 8 i j @+%+. . . . ", ". . . . &+$ *+=+-+;+>+>+>+>+>+P.P.>+>+>+>+>+;+-+=+*+8 ,+. . . . ", ". . . . . . l z N V +.>.'+)+. | | . )+'+>.+.V N z l . . . . . . ", ". . . . . . . . M # 5 ;.(.!+~+{+{+~+!+(.;.5 # M . . . . . . . . ", ". . . . . . . . . . ..7 /.$ ]+^+^+]+$ /.7 ... . . . . . . . . . ", ". . . . . . . . . . . . ^.5.j./+/+j.5.^.. . . . . . . . . . . . "};