r7752 - in packages/trunk/tumiki-fighters/debian: . patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Wed Jul 16 23:46:28 UTC 2008
Author: pdewacht-guest
Date: 2008-07-16 23:46:28 +0000 (Wed, 16 Jul 2008)
New Revision: 7752
Modified:
packages/trunk/tumiki-fighters/debian/changelog
packages/trunk/tumiki-fighters/debian/patches/fixes.patch
Log:
Fix the stage 4 boss fight.
Modified: packages/trunk/tumiki-fighters/debian/changelog
===================================================================
--- packages/trunk/tumiki-fighters/debian/changelog 2008-07-16 18:13:06 UTC (rev 7751)
+++ packages/trunk/tumiki-fighters/debian/changelog 2008-07-16 23:46:28 UTC (rev 7752)
@@ -7,6 +7,9 @@
[ Ansgar Burchardt ]
* Remove deprecated Encoding key from .desktop file
+ [ Peter De Wachter ]
+ * Fix "fixes.patch". The stage 4 boss fight now plays correctly.
+
-- Ansgar Burchardt <ansgar at 43-1.org> Fri, 29 Feb 2008 01:21:25 +0100
tumiki-fighters (0.2.dfsg1-2) unstable; urgency=low
Modified: packages/trunk/tumiki-fighters/debian/patches/fixes.patch
===================================================================
--- packages/trunk/tumiki-fighters/debian/patches/fixes.patch 2008-07-16 18:13:06 UTC (rev 7751)
+++ packages/trunk/tumiki-fighters/debian/patches/fixes.patch 2008-07-16 23:46:28 UTC (rev 7752)
@@ -2,10 +2,8 @@
# Copyright (C) 2007 Miriam Ruiz <little_miry at yahoo.es>
# Distributed under the same license as the game. See debian/copyright.
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/boot.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/boot.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/boot.d 2007-09-08 19:38:28.000000000 +0000
+--- a/src/abagames/tf/boot.d
++++ b/src/abagames/tf/boot.d
@@ -5,7 +5,7 @@
*/
module abagames.tf.boot;
@@ -15,151 +13,115 @@
private import std.c.stdlib;
private import abagames.util.logger;
private import abagames.util.sdl.mainloop;
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/enemy.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/enemy.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/enemy.d 2007-09-08 19:38:28.000000000 +0000
-@@ -142,13 +142,14 @@
- float speed;
- Vector[] pt;
- if (!mv.withdraw) {
-- pt = mv.pattern.point[barragePtnIdx];
-- if (!pt) {
-+// pt = mv.pattern.point[barragePtnIdx];
-+// if (!pt)
-+ {
- pt = mv.pattern.point[PointsMovePattern.BASIC_PATTERN_IDX];
- speed = mv.pattern.speed[PointsMovePattern.BASIC_PATTERN_IDX];
-- } else {
-- speed = mv.pattern.speed[barragePtnIdx];
-- }
-+ }// else {
-+// speed = mv.pattern.speed[barragePtnIdx];
-+// }
- if (!mv.reachFirstPointFirst)
- speed *= 3;
- else if (!mv.reachFirstPoint)
-@@ -272,7 +273,7 @@
- if (attackPtnIdx >= af.attackPeriod.length)
- attackPtnIdx = 0;
- if (!mv.moveBullet) {
-- if (mv.pattern.point[barragePtnIdx])
-+// if (mv.pattern.point[barragePtnIdx])
- movePatternChanged();
- }
- } else if (fireCnt < af.breakPeriod[attackPtnIdx]) {
-@@ -329,7 +330,7 @@
- if (ep.shield <= 0) {
- if (ep.spec.damageToMainBody > 0) {
- parts[0].shield -= ep.spec.damageToMainBody;
-- particles.add(5, pos, 0, PI * 2, 0.1, parts[0].spec.size / 4, Particle.TypeName.SMOKE);
-+ particles.add(5, pos, 0, PI * 2, 0.1, parts[0].spec.sizeof / 4, Particle.TypeName.SMOKE);
- }
- manager.addScore(ep.spec.tumikiSet.score, p);
- if (ep.firstShield <= 1)
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/enemyspec.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/enemyspec.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/enemyspec.d 2007-09-08 19:38:28.000000000 +0000
-@@ -89,11 +89,10 @@
+--- a/src/abagames/util/logger.d
++++ b/src/abagames/util/logger.d
+@@ -5,7 +5,7 @@
+ */
+ module abagames.util.logger;
+
+-private import std.stream;
++private import std.cstream;
+ private import std.string;
+
+ /**
+@@ -53,27 +53,27 @@
+ public class Logger {
+
+ public static void info(char[] msg) {
+- stderr.writeLine("Info: " ~ msg);
++ derr.writeLine("Info: " ~ msg);
}
- public static EnemySpec getInstance(char[] fileName) {
-- EnemySpec inst = instances[fileName];
-+ EnemySpec inst;
- if (!inst) {
-- Logger.info("Load enemy spec: " ~ fileName);
-- inst = new EnemySpec(fileName);
-- instances[fileName] = inst;
-+ inst = new EnemySpec(fileName);
-+ instances[fileName] = inst;
- }
- return inst;
+ public static void info(int n) {
+- stderr.writeLine("Info: " ~ std.string.toString(n));
++ derr.writeLine("Info: " ~ std.string.toString(n));
}
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/letterrender.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/letterrender.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/letterrender.d 2007-09-08 19:38:28.000000000 +0000
-@@ -32,7 +32,7 @@
- return s * LETTER_HEIGHT;
+
+ public static void info(float n) {
+- stderr.writeLine("Info: -" ~ std.string.toString(n));
++ derr.writeLine("Info: -" ~ std.string.toString(n));
}
-- private static void drawLetter(int n, float x, float y, float s, float d, int c) {
-+ public static void drawLetter(int n, float x, float y, float s, float d, int c) {
- glPushMatrix();
- glTranslatef(x, y, 0);
- glScalef(s, s, s);
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/ship.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/ship.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/ship.d 2007-09-08 19:38:28.000000000 +0000
-@@ -70,7 +70,7 @@
- bool btnPrsd;
- bool pullIn;
+ public static void error(char[] msg) {
+- stderr.writeLine("Error: " ~ msg);
++ derr.writeLine("Error: " ~ msg);
+ }
-- public static this() {
-+ public this() {
- rand = new Rand;
+ public static void error(Exception e) {
+- stderr.writeLine("Error: " ~ e.toString());
++ derr.writeLine("Error: " ~ e.toString());
}
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/tf/tumikiset.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/tf/tumikiset.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/tf/tumikiset.d 2007-09-08 19:39:00.000000000 +0000
-@@ -44,7 +44,7 @@
+ public static void error(Error e) {
+- stderr.writeLine("Error: " ~ e.toString());
++ derr.writeLine("Error: " ~ e.toString());
+ if (e.next)
+ error(e.next);
+ }
+--- /dev/null
++++ b/src/dirent.d
+@@ -0,0 +1,10 @@
++import std.string;
++
++extern (C) {
++ alias void DIR;
++ alias void dirent;
++ DIR* opendir(char* name);
++ dirent* readdir(DIR* dir);
++ int closedir(DIR* dir);
++ char* readdir_filename(DIR* ent);
++}
+--- a/src/abagames/tf/tumikiset.d
++++ b/src/abagames/tf/tumikiset.d
+@@ -44,7 +44,9 @@
static char[][] BULLET_COLOR_STR =
["r", "a", "p"];
- public static this() {
-+ public static void randInit() {
++ private static void init() {
++ if (shapeStr.length != 0) return; // already initialized
++
int i = 0;
foreach (char[] s; SHAPE_STR) {
shapeStr[s] = i;
-@@ -75,7 +75,8 @@
- // [BulletML, rank, speed]],
+@@ -76,6 +78,7 @@
// (end when BulletML == e, shape == e)(set a empty barrage when shape == s),
// ],
-- private this(char[][] data) {
-+ public this(char[][] data) {
-+ randInit();
+ private this(char[][] data) {
++ init();
sizeXm = sizeYm = float.max;
sizeXp = sizeYp = float.min;
StringIterator si = new StringIterator(data);
-@@ -87,9 +88,11 @@
+@@ -87,9 +90,9 @@
if (!si.hasNext)
break;
char[] v = si.next;
- int shape = shapeStr[v];
-+ int shape;
-+ try { if ((v in shapeStr) != null) shape = shapeStr[v]; } catch (Exception e) {}
++ int shape = ((v in shapeStr) != null) ? shapeStr[v] : 0; //the data files contain undefined codes
v = si.next;
- int color = colorStr[v];
-+ int color;
-+ try { if ((v in colorStr) != null) color = colorStr[v]; } catch (Exception e) {}
++ int color = ((v in colorStr) != null) ? colorStr[v] : 0;
float x = atof(si.next);
float y = atof(si.next);
float sizex = atof(si.next);
-@@ -111,9 +114,11 @@
+@@ -111,9 +114,9 @@
ti.addBarrage(new Barrage);
continue;
}
- int shape = bulletShapeStr[v];
-+ int shape;
-+ try { if ((v in bulletShapeStr) != null) shape = bulletShapeStr[v]; } catch (Exception e) {}
++ int shape = ((v in bulletShapeStr) != null) ? bulletShapeStr[v] : 0;
v = si.next;
- int color = bulletColorStr[v];
-+ int color;
-+ try { if ((v in bulletColorStr) != null) color = bulletColorStr[v]; } catch (Exception e) {}
++ int color = ((v in bulletColorStr) != null) ? bulletColorStr[v] : 0;
float size = atof(si.next);
float yReverse = atof(si.next);
int prevWait = atoi(si.next);
-@@ -136,14 +141,15 @@
+@@ -136,19 +139,17 @@
}
// Initialize TumikiSet from the file.
- private this(char[] fileName) {
+ public this(char[] fileName) {
-+ randInit();
Logger.info("Load tumiki set: " ~ fileName);
char[][] data = CSVTokenizer.readFile(TUMIKI_DIR_NAME ~ "/" ~ fileName);
this(data);
@@ -167,69 +129,91 @@
public static TumikiSet getInstance(char[] fileName) {
- TumikiSet inst = instances[fileName];
-+ TumikiSet inst; // = instances[fileName];
- if (!inst) {
- inst = new TumikiSet(fileName);
- instances[fileName] = inst;
-Index: tumiki-fighters-0.2.dfsg1/src/abagames/util/logger.d
-===================================================================
---- tumiki-fighters-0.2.dfsg1.orig/src/abagames/util/logger.d 2007-09-08 19:38:21.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/abagames/util/logger.d 2007-09-08 19:38:28.000000000 +0000
-@@ -5,7 +5,7 @@
- */
- module abagames.util.logger;
-
--private import std.stream;
-+private import std.cstream;
- private import std.string;
-
- /**
-@@ -53,27 +53,27 @@
- public class Logger {
-
- public static void info(char[] msg) {
-- stderr.writeLine("Info: " ~ msg);
-+ derr.writeLine("Info: " ~ msg);
+- if (!inst) {
+- inst = new TumikiSet(fileName);
+- instances[fileName] = inst;
++ if ((fileName in instances) == null) {
++ instances[fileName] = new TumikiSet(fileName);
+ }
+- return inst;
++ return instances[fileName];
}
- public static void info(int n) {
-- stderr.writeLine("Info: " ~ std.string.toString(n));
-+ derr.writeLine("Info: " ~ std.string.toString(n));
+ public int addTopBullets(int barragePtnIdx, BulletActorPool bullets, EnemyTopBullet[] etb,
+--- a/src/abagames/tf/enemy.d
++++ b/src/abagames/tf/enemy.d
+@@ -142,11 +142,11 @@
+ float speed;
+ Vector[] pt;
+ if (!mv.withdraw) {
+- pt = mv.pattern.point[barragePtnIdx];
+- if (!pt) {
++ if ((barragePtnIdx in mv.pattern.point) == null) {
+ pt = mv.pattern.point[PointsMovePattern.BASIC_PATTERN_IDX];
+ speed = mv.pattern.speed[PointsMovePattern.BASIC_PATTERN_IDX];
+ } else {
++ pt = mv.pattern.point[barragePtnIdx];
+ speed = mv.pattern.speed[barragePtnIdx];
+ }
+ if (!mv.reachFirstPointFirst)
+@@ -272,7 +272,7 @@
+ if (attackPtnIdx >= af.attackPeriod.length)
+ attackPtnIdx = 0;
+ if (!mv.moveBullet) {
+- if (mv.pattern.point[barragePtnIdx])
++ if ((barragePtnIdx in mv.pattern.point) != null)
+ movePatternChanged();
+ }
+ } else if (fireCnt < af.breakPeriod[attackPtnIdx]) {
+@@ -329,7 +329,7 @@
+ if (ep.shield <= 0) {
+ if (ep.spec.damageToMainBody > 0) {
+ parts[0].shield -= ep.spec.damageToMainBody;
+- particles.add(5, pos, 0, PI * 2, 0.1, parts[0].spec.size / 4, Particle.TypeName.SMOKE);
++ particles.add(5, pos, 0, PI * 2, 0.1, parts[0].spec.sizeof / 4, Particle.TypeName.SMOKE);
+ }
+ manager.addScore(ep.spec.tumikiSet.score, p);
+ if (ep.firstShield <= 1)
+--- a/src/abagames/tf/letterrender.d
++++ b/src/abagames/tf/letterrender.d
+@@ -32,7 +32,7 @@
+ return s * LETTER_HEIGHT;
}
- public static void info(float n) {
-- stderr.writeLine("Info: -" ~ std.string.toString(n));
-+ derr.writeLine("Info: -" ~ std.string.toString(n));
- }
+- private static void drawLetter(int n, float x, float y, float s, float d, int c) {
++ public static void drawLetter(int n, float x, float y, float s, float d, int c) {
+ glPushMatrix();
+ glTranslatef(x, y, 0);
+ glScalef(s, s, s);
+--- a/src/abagames/tf/ship.d
++++ b/src/abagames/tf/ship.d
+@@ -70,8 +70,8 @@
+ bool btnPrsd;
+ bool pullIn;
- public static void error(char[] msg) {
-- stderr.writeLine("Error: " ~ msg);
-+ derr.writeLine("Error: " ~ msg);
+- public static this() {
+- rand = new Rand;
++ public this() {
++ if (rand is null) rand = new Rand;
}
- public static void error(Exception e) {
-- stderr.writeLine("Error: " ~ e.toString());
-+ derr.writeLine("Error: " ~ e.toString());
+ public void init(Pad pad, Field field, ParticlePool particles, ActorPool fragments,
+--- a/src/abagames/tf/enemyspec.d
++++ b/src/abagames/tf/enemyspec.d
+@@ -89,13 +89,11 @@
}
- public static void error(Error e) {
-- stderr.writeLine("Error: " ~ e.toString());
-+ derr.writeLine("Error: " ~ e.toString());
- if (e.next)
- error(e.next);
+ public static EnemySpec getInstance(char[] fileName) {
+- EnemySpec inst = instances[fileName];
+- if (!inst) {
++ if ((fileName in instances) == null) {
+ Logger.info("Load enemy spec: " ~ fileName);
+- inst = new EnemySpec(fileName);
+- instances[fileName] = inst;
++ instances[fileName] = new EnemySpec(fileName);
+ }
+- return inst;
++ return instances[fileName];
}
-Index: tumiki-fighters-0.2.dfsg1/src/dirent.d
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ tumiki-fighters-0.2.dfsg1/src/dirent.d 2007-09-08 19:38:28.000000000 +0000
-@@ -0,0 +1,10 @@
-+import std.string;
-+
-+extern (C) {
-+ alias void DIR;
-+ alias void dirent;
-+ DIR* opendir(char* name);
-+ dirent* readdir(DIR* dir);
-+ int closedir(DIR* dir);
-+ char* readdir_filename(DIR* ent);
-+}
+ }
+
More information about the Pkg-games-commits
mailing list