r9744 - packages/trunk/biniax2/debian/patches
Miriam Ruiz
miriam at alioth.debian.org
Sat May 16 01:08:48 UTC 2009
Author: miriam
Date: 2009-05-16 01:08:48 +0000 (Sat, 16 May 2009)
New Revision: 9744
Removed:
packages/trunk/biniax2/debian/patches/endianess.patch
Modified:
packages/trunk/biniax2/debian/patches/fixes.patch
packages/trunk/biniax2/debian/patches/series
Log:
Reestructure patches
Deleted: packages/trunk/biniax2/debian/patches/endianess.patch
===================================================================
--- packages/trunk/biniax2/debian/patches/endianess.patch 2009-05-16 01:03:20 UTC (rev 9743)
+++ packages/trunk/biniax2/debian/patches/endianess.patch 2009-05-16 01:08:48 UTC (rev 9744)
@@ -1,382 +0,0 @@
-# Copyright (C) 2008 by Miriam Ruiz <little_miry at yahoo.es>
-# Distributed under the same license as the game. See debian/copyright
-
---- biniax2.orig/biniax.c
-+++ biniax2/biniax.c
-@@ -61,8 +61,12 @@
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#include <stdint.h>
- #endif
-
-+#include <errno.h>
-+#include <string.h>
-+
- /* Global instance of GAME structure */
- BNX_GAME Game;
-
-@@ -157,6 +161,10 @@
- case cOptionContinue:
- if ( loadGame( &Game ) == BNX_FALSE )
- {
-+ if (errno)
-+ fprintf(stderr, "Error loading game data: %s\n", strerror(errno));
-+ else
-+ fprintf(stderr, "Error loading game data\n");
- enterState = cStateMainMenu;
- }
- else
-@@ -1259,6 +1267,157 @@
- #endif
- }
-
-+#ifndef _WIN32
-+uint16_t GetInt16(FILE *fp)
-+{
-+ uint16_t i = (uint16_t) (fgetc(fp) & 0xFF);
-+ i |= ((uint16_t) (fgetc(fp) & 0xFF) << 0x08);
-+ return i;
-+}
-+
-+uint32_t GetInt32(FILE *fp)
-+{
-+ uint32_t i = (uint32_t) (fgetc(fp) & 0xFF);
-+ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x08);
-+ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x10);
-+ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x18);
-+ return i;
-+}
-+
-+void PutInt16(uint16_t i, FILE *fp)
-+{
-+ fputc(i & 0xFF, fp);
-+ fputc((i >> 0x08) & 0xFF, fp);
-+}
-+
-+void PutInt32(uint32_t i, FILE *fp)
-+{
-+ fputc(i & 0xFF, fp);
-+ fputc((i >> 0x08) & 0xFF, fp);
-+ fputc((i >> 0x10) & 0xFF, fp);
-+ fputc((i >> 0x18) & 0xFF, fp);
-+}
-+
-+BNX_BOOL saveGame( BNX_GAME *game )
-+{
-+ FILE *file;
-+ int i, j;
-+
-+ fprintf(stderr, "Saving game data in \"%s\"\n", saveFileName());
-+ file = fopen( saveFileName(), "wb" );
-+ if ( file == (FILE *) NULL )
-+ return BNX_FALSE;
-+
-+ PutInt16( 0xB2D1 , file );
-+
-+ PutInt32( game->moment , file );
-+ PutInt16( game->mode , file );
-+ PutInt16( game->scroll , file );
-+ PutInt16( game->speed , file );
-+ PutInt16( game->moves , file );
-+ PutInt16( game->clears , file );
-+ fputc( game->ingame , file );
-+ PutInt32( game->sounds , file );
-+ fputc( game->message , file );
-+ PutInt32( game->lines , file );
-+ PutInt16( game->level , file );
-+ PutInt16( game->level_count , file );
-+
-+ PutInt16( cMaxPlayers , file );
-+
-+ for (i = 0; i < cMaxPlayers; i++)
-+ {
-+ fputc( game->player[i].x , file );
-+ fputc( game->player[i].y , file );
-+ fputc( game->player[i].e , file );
-+ PutInt32( game->score[i] , file );
-+ PutInt32( game->wins[i] , file );
-+ PutInt32( game->best[i] , file );
-+ }
-+
-+ PutInt32( cGridX , file );
-+ PutInt32( cGridY , file );
-+
-+ for (j = 0; j < cGridY; j++)
-+ for (i = 0; i < cGridX; i++)
-+ fputc( game->grid[i][j] , file );
-+
-+ PutInt16( 0xB2D0 , file );
-+
-+ fclose( file );
-+ return BNX_TRUE;
-+}
-+
-+BNX_BOOL loadGame( BNX_GAME *game )
-+{
-+ FILE *file = NULL;
-+ int i, j;
-+ uint16_t id, mp;
-+ uint32_t mx, my;
-+
-+ fprintf(stderr, "Loading game data from \"%s\"\n", saveFileName());
-+ file = fopen( saveFileName(), "rb" );
-+ if ( file == (FILE *) NULL )
-+ return BNX_FALSE;
-+
-+ errno = 0;
-+
-+ id = GetInt16(file);
-+ if (id != 0xB2D1)
-+ goto error;
-+
-+ game->moment = GetInt32(file);
-+ game->mode = GetInt16(file);
-+ game->scroll = GetInt16(file);
-+ game->speed = GetInt16(file);
-+ game->moves = GetInt16(file);
-+ game->clears = GetInt16(file);
-+ game->ingame = fgetc(file);
-+ game->sounds = GetInt32(file);
-+ game->message = fgetc(file);
-+ game->lines = GetInt32(file);
-+ game->level = GetInt16(file);
-+ game->level_count = GetInt16(file);
-+
-+ mp = GetInt16(file);
-+ if (mp != cMaxPlayers)
-+ goto error;
-+
-+ for (i = 0; i < cMaxPlayers; i++)
-+ {
-+ game->player[i].x = fgetc(file);
-+ game->player[i].y = fgetc(file);
-+ game->player[i].e = fgetc(file);
-+ game->score[i] = GetInt32(file);
-+ game->wins[i] = GetInt32(file);
-+ game->best[i] = GetInt32(file);
-+ }
-+
-+ mx = GetInt32(file);
-+ if (mx != cGridX)
-+ goto error;
-+ my = GetInt32(file);
-+ if (my != cGridY)
-+ goto error;
-+
-+ for (j = 0; j < cGridY; j++)
-+ for (i = 0; i < cGridX; i++)
-+ game->grid[i][j] = fgetc(file);
-+
-+ id = GetInt16(file);
-+ if (id != 0xB2D0)
-+ goto error;
-+
-+ fclose( file );
-+ return BNX_TRUE;
-+
-+error:
-+ if (file)
-+ fclose( file );
-+ return BNX_FALSE;
-+}
-+
-+#else /* WIN 32 */
- BNX_BOOL saveGame( BNX_GAME *game )
- {
- FILE *file;
-@@ -1378,6 +1537,7 @@
-
- return BNX_TRUE;
- }
-+#endif
-
- BNX_BOOL loadHiScore( BNX_GAME *game )
- {
-@@ -1385,4 +1545,3 @@
- game->best[ cModeTurn ] = hofGet()->tactic[ 0 ].score;
- return BNX_TRUE;
- }
--
---- biniax2.orig/hof.c
-+++ biniax2/hof.c
-@@ -43,6 +43,9 @@
- #include <sys/types.h>
- #endif
-
-+#include <errno.h>
-+#include <string.h>
-+
- #define chCursor '_' /* Cursor ON */
- #define chSpace ' ' /* Cursor OFF*/
-
-@@ -151,6 +154,136 @@
- #endif
- }
-
-+#ifndef _WIN32
-+BNX_BOOL hofInit()
-+{
-+ FILE *file = NULL;
-+ int i;
-+ uint16_t id, me, ml;
-+ const char *filename = NULL;
-+ char alt_filename[PATH_MAX+3];
-+
-+ file = fopen( (filename = hofFileName()), "rb" );
-+
-+ if ( file == (FILE *) NULL ) // Bug in previous version, see if data can be reached
-+ {
-+ char *ptr;
-+ strncpy(alt_filename, filename, PATH_MAX);
-+ ptr = strrchr(alt_filename, '/');
-+ if (ptr != NULL)
-+ {
-+ ptr++;
-+ filename = alt_filename;
-+ strcpy(ptr, "config");
-+ file = fopen( filename, "rb" );
-+ }
-+ }
-+
-+ if ( file == (FILE *) NULL )
-+ {
-+ goto error;
-+ }
-+
-+ fprintf(stderr, "Loading Hall of Fame data from \"%s\"\n", filename);
-+
-+ errno = 0;
-+
-+ id = GetInt16(file);
-+ if (id != 0xB2F1)
-+ goto error;
-+
-+ ml = GetInt16(file);
-+ if (ml != cHofNameLen)
-+ goto error;
-+
-+ me = GetInt16(file);
-+ if (me != cHofEntries)
-+ goto error;
-+
-+ for ( i = 0; i < cHofEntries; ++i )
-+ {
-+ fread( Hof.arcade[i].name, 1, cHofNameLen, file );
-+ Hof.arcade[i].score = GetInt32(file);
-+ }
-+
-+ for ( i = 0; i < cHofEntries; ++i )
-+ {
-+ fread( Hof.tactic[i].name, 1, cHofNameLen, file );
-+ Hof.tactic[i].score = GetInt32(file);
-+ }
-+
-+ id = GetInt16(file);
-+ if (id != 0xB2F0)
-+ goto error;
-+
-+ fclose( file );
-+
-+ return BNX_TRUE;
-+
-+error:
-+ if (errno)
-+ fprintf(stderr, "Could not load Hall of Fame data from \"%s\": %s\n", filename, strerror(errno));
-+ else
-+ fprintf(stderr, "Could not load Hall of Fame data from \"%s\"", filename);
-+
-+ if (file)
-+ fclose( file );
-+
-+ for ( i = 0; i < cHofEntries; ++i )
-+ {
-+ strcpy( Hof.arcade[ i ].name, "DEBIAN " );
-+ Hof.arcade[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
-+
-+ strcpy( Hof.tactic[ i ].name, "DEBIAN " );
-+ Hof.tactic[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
-+ }
-+
-+ return BNX_FALSE;
-+}
-+
-+BNX_BOOL hofSave()
-+{
-+ FILE *file;
-+ int i;
-+ const char *filename = NULL;
-+
-+ file = fopen( (filename=hofFileName()), "wb" );
-+
-+ if ( file == (FILE *) NULL )
-+ {
-+ if (errno)
-+ fprintf(stderr, "Could not save Hall of Fame data in \"%s\": %s\n", filename, strerror(errno));
-+ else
-+ fprintf(stderr, "Could not save Hall of Fame data in \"%s\"\n", filename);
-+ return BNX_FALSE;
-+ }
-+
-+ fprintf(stderr, "Saving Hall of Fame data in \"%s\"\n", filename);
-+
-+ PutInt16( 0xB2F1 , file );
-+ PutInt16( cHofNameLen , file );
-+ PutInt16( cHofEntries , file );
-+
-+ for ( i = 0; i < cHofEntries; ++i )
-+ {
-+ fwrite( Hof.arcade[i].name, 1, cHofNameLen, file );
-+ PutInt32(Hof.arcade[i].score, file);
-+ }
-+
-+ for ( i = 0; i < cHofEntries; ++i )
-+ {
-+ fwrite( Hof.tactic[i].name, 1, cHofNameLen, file );
-+ PutInt32(Hof.tactic[i].score, file);
-+ }
-+
-+ PutInt16( 0xB2F0 , file );
-+
-+ fclose( file );
-+
-+ return BNX_TRUE;
-+}
-+
-+#else /* WIN32 */
- BNX_BOOL hofInit()
- {
- FILE *file;
-@@ -210,7 +343,7 @@
- FILE *file;
- int i, j;
-
-- file = fopen( hofFileName(), "wb" );
-+ file = fopen( "hof.bnx2", "wb" );
-
- if ( file == (FILE *) NULL )
- return BNX_FALSE;
-@@ -239,6 +372,7 @@
-
- return BNX_TRUE;
- }
-+#endif /* WIN32 */
-
- BNX_BOOL hofEnter( BNX_GAME *game )
- {
---- biniax2.orig/inc.h
-+++ biniax2/inc.h
-@@ -68,5 +68,13 @@
- #include "symbian/sys.h"
- #endif
-
-+#ifndef _WIN32
-+#include <stdint.h>
-+#include <stdio.h>
-+uint16_t GetInt16(FILE *fp);
-+uint32_t GetInt32(FILE *fp);
-+void PutInt16(uint16_t i, FILE *fp);
-+void PutInt32(uint32_t i, FILE *fp);
-+#endif
-
- #endif
Modified: packages/trunk/biniax2/debian/patches/fixes.patch
===================================================================
--- packages/trunk/biniax2/debian/patches/fixes.patch 2009-05-16 01:03:20 UTC (rev 9743)
+++ packages/trunk/biniax2/debian/patches/fixes.patch 2009-05-16 01:08:48 UTC (rev 9744)
@@ -1,9 +1,9 @@
-# Copyright (C) 2008 by Miriam Ruiz <little_miry at yahoo.es>
+# Copyright (C) 2008-2009 by Miriam Ruiz <little_miry at yahoo.es>
# Distributed under the same license as the game. See debian/copyright
--- biniax2.orig/biniax.c
+++ biniax2/biniax.c
-@@ -51,6 +51,18 @@
+@@ -51,6 +51,22 @@
#include "lev.h"
#include "inc.h"
@@ -17,12 +17,16 @@
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
++#include <stdint.h>
+#endif
+
++#include <errno.h>
++#include <string.h>
++
/* Global instance of GAME structure */
BNX_GAME Game;
-@@ -100,13 +112,27 @@
+@@ -100,13 +116,27 @@
cfgInit();
hofInit();
if ( gfxInit() == BNX_FALSE )
@@ -51,7 +55,18 @@
/******************************************************************
SHOW INITIAL WELCOME SCREEN
-@@ -1178,13 +1204,68 @@
+@@ -131,6 +161,10 @@
+ case cOptionContinue:
+ if ( loadGame( &Game ) == BNX_FALSE )
+ {
++ if (errno)
++ fprintf(stderr, "Error loading game data: %s\n", strerror(errno));
++ else
++ fprintf(stderr, "Error loading game data\n");
+ enterState = cStateMainMenu;
+ }
+ else
+@@ -1178,13 +1212,219 @@
GAME AND HISCORE SAVE / RESTORE
******************************************************************************/
@@ -110,6 +125,157 @@
+#endif
+}
+
++#ifndef _WIN32
++uint16_t GetInt16(FILE *fp)
++{
++ uint16_t i = (uint16_t) (fgetc(fp) & 0xFF);
++ i |= ((uint16_t) (fgetc(fp) & 0xFF) << 0x08);
++ return i;
++}
++
++uint32_t GetInt32(FILE *fp)
++{
++ uint32_t i = (uint32_t) (fgetc(fp) & 0xFF);
++ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x08);
++ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x10);
++ i |= ((uint32_t) (fgetc(fp) & 0xFF) << 0x18);
++ return i;
++}
++
++void PutInt16(uint16_t i, FILE *fp)
++{
++ fputc(i & 0xFF, fp);
++ fputc((i >> 0x08) & 0xFF, fp);
++}
++
++void PutInt32(uint32_t i, FILE *fp)
++{
++ fputc(i & 0xFF, fp);
++ fputc((i >> 0x08) & 0xFF, fp);
++ fputc((i >> 0x10) & 0xFF, fp);
++ fputc((i >> 0x18) & 0xFF, fp);
++}
++
++BNX_BOOL saveGame( BNX_GAME *game )
++{
++ FILE *file;
++ int i, j;
++
++ fprintf(stderr, "Saving game data in \"%s\"\n", saveFileName());
++ file = fopen( saveFileName(), "wb" );
++ if ( file == (FILE *) NULL )
++ return BNX_FALSE;
++
++ PutInt16( 0xB2D1 , file );
++
++ PutInt32( game->moment , file );
++ PutInt16( game->mode , file );
++ PutInt16( game->scroll , file );
++ PutInt16( game->speed , file );
++ PutInt16( game->moves , file );
++ PutInt16( game->clears , file );
++ fputc( game->ingame , file );
++ PutInt32( game->sounds , file );
++ fputc( game->message , file );
++ PutInt32( game->lines , file );
++ PutInt16( game->level , file );
++ PutInt16( game->level_count , file );
++
++ PutInt16( cMaxPlayers , file );
++
++ for (i = 0; i < cMaxPlayers; i++)
++ {
++ fputc( game->player[i].x , file );
++ fputc( game->player[i].y , file );
++ fputc( game->player[i].e , file );
++ PutInt32( game->score[i] , file );
++ PutInt32( game->wins[i] , file );
++ PutInt32( game->best[i] , file );
++ }
++
++ PutInt32( cGridX , file );
++ PutInt32( cGridY , file );
++
++ for (j = 0; j < cGridY; j++)
++ for (i = 0; i < cGridX; i++)
++ fputc( game->grid[i][j] , file );
++
++ PutInt16( 0xB2D0 , file );
++
++ fclose( file );
++ return BNX_TRUE;
++}
++
++BNX_BOOL loadGame( BNX_GAME *game )
++{
++ FILE *file = NULL;
++ int i, j;
++ uint16_t id, mp;
++ uint32_t mx, my;
++
++ fprintf(stderr, "Loading game data from \"%s\"\n", saveFileName());
++ file = fopen( saveFileName(), "rb" );
++ if ( file == (FILE *) NULL )
++ return BNX_FALSE;
++
++ errno = 0;
++
++ id = GetInt16(file);
++ if (id != 0xB2D1)
++ goto error;
++
++ game->moment = GetInt32(file);
++ game->mode = GetInt16(file);
++ game->scroll = GetInt16(file);
++ game->speed = GetInt16(file);
++ game->moves = GetInt16(file);
++ game->clears = GetInt16(file);
++ game->ingame = fgetc(file);
++ game->sounds = GetInt32(file);
++ game->message = fgetc(file);
++ game->lines = GetInt32(file);
++ game->level = GetInt16(file);
++ game->level_count = GetInt16(file);
++
++ mp = GetInt16(file);
++ if (mp != cMaxPlayers)
++ goto error;
++
++ for (i = 0; i < cMaxPlayers; i++)
++ {
++ game->player[i].x = fgetc(file);
++ game->player[i].y = fgetc(file);
++ game->player[i].e = fgetc(file);
++ game->score[i] = GetInt32(file);
++ game->wins[i] = GetInt32(file);
++ game->best[i] = GetInt32(file);
++ }
++
++ mx = GetInt32(file);
++ if (mx != cGridX)
++ goto error;
++ my = GetInt32(file);
++ if (my != cGridY)
++ goto error;
++
++ for (j = 0; j < cGridY; j++)
++ for (i = 0; i < cGridX; i++)
++ game->grid[i][j] = fgetc(file);
++
++ id = GetInt16(file);
++ if (id != 0xB2D0)
++ goto error;
++
++ fclose( file );
++ return BNX_TRUE;
++
++error:
++ if (file)
++ fclose( file );
++ return BNX_FALSE;
++}
++
++#else /* WIN 32 */
BNX_BOOL saveGame( BNX_GAME *game )
{
FILE *file;
@@ -121,7 +287,7 @@
if ( file == (FILE *) NULL )
return BNX_FALSE;
-@@ -1242,9 +1323,12 @@
+@@ -1242,9 +1482,12 @@
BNX_INT32 i;
BNX_INT32 j;
@@ -136,6 +302,19 @@
if ( file == (FILE *) NULL )
return BNX_FALSE;
+@@ -1294,6 +1537,7 @@
+
+ return BNX_TRUE;
+ }
++#endif
+
+ BNX_BOOL loadHiScore( BNX_GAME *game )
+ {
+@@ -1301,4 +1545,3 @@
+ game->best[ cModeTurn ] = hofGet()->tactic[ 0 ].score;
+ return BNX_TRUE;
+ }
+-
--- biniax2.orig/desktop/cfg.c
+++ biniax2/desktop/cfg.c
@@ -30,13 +30,23 @@
@@ -253,7 +432,7 @@
#endif
--- biniax2.orig/hof.c
+++ biniax2/hof.c
-@@ -31,10 +31,21 @@
+@@ -31,10 +31,24 @@
#include "inc.h"
@@ -269,6 +448,9 @@
+#include <sys/types.h>
+#endif
+
++#include <errno.h>
++#include <string.h>
++
#define chCursor '_' /* Cursor ON */
#define chSpace ' ' /* Cursor OFF*/
@@ -276,7 +458,7 @@
#define cHOFFileSize 504 /* File size */
BNX_HALL Hof;
-@@ -85,6 +96,60 @@
+@@ -85,7 +99,191 @@
}
}
@@ -335,9 +517,140 @@
+#endif
+}
++#ifndef _WIN32
++BNX_BOOL hofInit()
++{
++ FILE *file = NULL;
++ int i;
++ uint16_t id, me, ml;
++ const char *filename = NULL;
++ char alt_filename[PATH_MAX+3];
++
++ file = fopen( (filename = hofFileName()), "rb" );
++
++ if ( file == (FILE *) NULL ) // Bug in previous version, see if data can be reached
++ {
++ char *ptr;
++ strncpy(alt_filename, filename, PATH_MAX);
++ ptr = strrchr(alt_filename, '/');
++ if (ptr != NULL)
++ {
++ ptr++;
++ filename = alt_filename;
++ strcpy(ptr, "config");
++ file = fopen( filename, "rb" );
++ }
++ }
++
++ if ( file == (FILE *) NULL )
++ {
++ goto error;
++ }
++
++ fprintf(stderr, "Loading Hall of Fame data from \"%s\"\n", filename);
++
++ errno = 0;
++
++ id = GetInt16(file);
++ if (id != 0xB2F1)
++ goto error;
++
++ ml = GetInt16(file);
++ if (ml != cHofNameLen)
++ goto error;
++
++ me = GetInt16(file);
++ if (me != cHofEntries)
++ goto error;
++
++ for ( i = 0; i < cHofEntries; ++i )
++ {
++ fread( Hof.arcade[i].name, 1, cHofNameLen, file );
++ Hof.arcade[i].score = GetInt32(file);
++ }
++
++ for ( i = 0; i < cHofEntries; ++i )
++ {
++ fread( Hof.tactic[i].name, 1, cHofNameLen, file );
++ Hof.tactic[i].score = GetInt32(file);
++ }
++
++ id = GetInt16(file);
++ if (id != 0xB2F0)
++ goto error;
++
++ fclose( file );
++
++ return BNX_TRUE;
++
++error:
++ if (errno)
++ fprintf(stderr, "Could not load Hall of Fame data from \"%s\": %s\n", filename, strerror(errno));
++ else
++ fprintf(stderr, "Could not load Hall of Fame data from \"%s\"", filename);
++
++ if (file)
++ fclose( file );
++
++ for ( i = 0; i < cHofEntries; ++i )
++ {
++ strcpy( Hof.arcade[ i ].name, "DEBIAN " );
++ Hof.arcade[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
++
++ strcpy( Hof.tactic[ i ].name, "DEBIAN " );
++ Hof.tactic[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
++ }
++
++ return BNX_FALSE;
++}
++
++BNX_BOOL hofSave()
++{
++ FILE *file;
++ int i;
++ const char *filename = NULL;
++
++ file = fopen( (filename=hofFileName()), "wb" );
++
++ if ( file == (FILE *) NULL )
++ {
++ if (errno)
++ fprintf(stderr, "Could not save Hall of Fame data in \"%s\": %s\n", filename, strerror(errno));
++ else
++ fprintf(stderr, "Could not save Hall of Fame data in \"%s\"\n", filename);
++ return BNX_FALSE;
++ }
++
++ fprintf(stderr, "Saving Hall of Fame data in \"%s\"\n", filename);
++
++ PutInt16( 0xB2F1 , file );
++ PutInt16( cHofNameLen , file );
++ PutInt16( cHofEntries , file );
++
++ for ( i = 0; i < cHofEntries; ++i )
++ {
++ fwrite( Hof.arcade[i].name, 1, cHofNameLen, file );
++ PutInt32(Hof.arcade[i].score, file);
++ }
++
++ for ( i = 0; i < cHofEntries; ++i )
++ {
++ fwrite( Hof.tactic[i].name, 1, cHofNameLen, file );
++ PutInt32(Hof.tactic[i].score, file);
++ }
++
++ PutInt16( 0xB2F0 , file );
++
++ fclose( file );
++
++ return BNX_TRUE;
++}
++
++#else /* WIN32 */
BNX_BOOL hofInit()
{
-@@ -94,18 +159,26 @@
+ FILE *file;
+@@ -94,18 +292,26 @@
for ( i = 0; i < cHofEntries; ++i )
{
@@ -368,16 +681,24 @@
for ( i = 0; i < cHofEntries; ++i )
{
-@@ -137,7 +210,7 @@
+@@ -137,7 +343,7 @@
FILE *file;
int i, j;
- file = fopen( sysGetFullFileName( csHOFName ), "wb" );
-+ file = fopen( hofFileName(), "wb" );
++ file = fopen( "hof.bnx2", "wb" );
if ( file == (FILE *) NULL )
return BNX_FALSE;
-@@ -292,4 +365,4 @@
+@@ -166,6 +372,7 @@
+
+ return BNX_TRUE;
+ }
++#endif /* WIN32 */
+
+ BNX_BOOL hofEnter( BNX_GAME *game )
+ {
+@@ -292,4 +499,4 @@
BNX_HALL *hofGet()
{
return (BNX_HALL *) &Hof;
@@ -395,3 +716,19 @@
/******************************************************************************
CONSTANTS
******************************************************************************/
+--- biniax2.orig/inc.h
++++ biniax2/inc.h
+@@ -68,5 +68,13 @@
+ #include "symbian/sys.h"
+ #endif
+
++#ifndef _WIN32
++#include <stdint.h>
++#include <stdio.h>
++uint16_t GetInt16(FILE *fp);
++uint32_t GetInt32(FILE *fp);
++void PutInt16(uint16_t i, FILE *fp);
++void PutInt32(uint32_t i, FILE *fp);
++#endif
+
+ #endif
Modified: packages/trunk/biniax2/debian/patches/series
===================================================================
--- packages/trunk/biniax2/debian/patches/series 2009-05-16 01:03:20 UTC (rev 9743)
+++ packages/trunk/biniax2/debian/patches/series 2009-05-16 01:08:48 UTC (rev 9744)
@@ -1,4 +1,3 @@
datadir.patch
fixes.patch
-endianess.patch
warnings.patch
More information about the Pkg-games-commits
mailing list