r1953 - in trunk

dslinux_gpf at dslinux.in-berlin.de dslinux_gpf at dslinux.in-berlin.de
Mon Oct 1 19:56:58 CEST 2007


Author: gpf
Date: 2007-10-01 19:56:53 +0200 (Mon, 01 Oct 2007)
New Revision: 1953

Log:
cNibbles for DSLinux, Patch contributed by Alessandro Lo-Presti

Modified: trunk/config/Configure.help
===================================================================
--- trunk/config/Configure.help	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/config/Configure.help	2007-10-01 17:56:53 UTC (rev 1953)
@@ -1667,6 +1667,11 @@
   The Colossal Cave Adventure game.  To play, telnet to port 8898 or run
   advent4 from the command line.
 
+CONFIG_USER_GAMES_CNIBBLES
+  cNibbles is a curses based version of the old nibbles game (also known
+  as snake).  Your object is to control the worm and help it eat apples
+  distributed on the playing area.
+
 CONFIG_USER_GAMES_DUNGEON
   The Dungeon Adventure game.  To play, telnet to port 8899 or run
   dungeon from the command line.

Modified: trunk/config/config.in
===================================================================
--- trunk/config/config.in	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/config/config.in	2007-10-01 17:56:53 UTC (rev 1953)
@@ -1715,6 +1715,7 @@
     bool 'worms'	CONFIG_USER_GAMES_BSDGAMES_WORMS
     bool 'wump'		CONFIG_USER_GAMES_BSDGAMES_WUMP
 fi
+bool 'cnibbles'		CONFIG_USER_GAMES_CNIBBLES
 bool 'dungeon'		CONFIG_USER_GAMES_DUNGEON
 # bool 'mame'		CONFIG_USER_GAMES_XMAME
 bool 'rubik'		CONFIG_USER_GAMES_RUBIK

Modified: trunk/user/games/Makefile
===================================================================
--- trunk/user/games/Makefile	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/user/games/Makefile	2007-10-01 17:56:53 UTC (rev 1953)
@@ -10,6 +10,7 @@
 
 dir_$(CONFIG_USER_GAMES_ADVENT4)        += advent4
 dir_$(CONFIG_USER_GAMES_BSDGAMES)	+= bsdgames
+dir_$(CONFIG_USER_GAMES_CNIBBLES)	+= cnibbles
 dir_$(CONFIG_USER_GAMES_DUNGEON)        += dungeon
 dir_$(CONFIG_USER_GAMES_RUBIK)          += rubik
 dir_$(CONFIG_USER_GAMES_SUDOKU)			+= sudoku

Copied: trunk/user/games/cnibbles (from rev 1952, tags/cNibbles/cNibbles-2.0.0)

Modified: trunk/user/games/cnibbles/Makefile
===================================================================
--- tags/cNibbles/cNibbles-2.0.0/Makefile	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/user/games/cnibbles/Makefile	2007-10-01 17:56:53 UTC (rev 1953)
@@ -1,20 +1,23 @@
-BIN		=	cNibbles
+BIN		=	cnibbles
 OBJ		=	main.o misc.o screen.o options.o highscore.o replay.o intro.o
-LDFLAGS		=	-lncurses 
-CC		=	gcc
-CFLAGS		=	-O0 -Wall -g
+LDFLAGS		+=	-lncurses 
+#CC		=	gcc
+#CFLAGS		=	-O0 -Wall -g
 HEADERS 	=	misc.h config.h screen.h options.h highscore.h replay.h intro.h
 
 all: $(BIN)
 
 clean:
-	rm -f $(BIN) $(OBJ) core
+	rm -f $(BIN) $(OBJ) core *.gdb *.elf
 
 static: $(BIN_S)
 
 install:
-	cp cNibbles /usr/local/bin/ ; cp man/man6/cNibbles.6.gz /usr/local/man/man6/
+	cp -f cnibbles /usr/local/bin/
 
+romfs: $(BIN)
+	$(ROMFSINST) /usr/games/$(BIN)
+
 $(BIN): $(OBJ)
 	$(CC) -o $(BIN) $(OBJ) $(LDFLAGS) $(CFLAGS)
 
@@ -35,3 +38,5 @@
 
 replay.o: replay.c $(HEADERS)
 	$(CC) $(CFLAGS) -c -o $@ $<
+
+.PHONY: all clean romfs

Modified: trunk/user/games/cnibbles/config.h
===================================================================
--- tags/cNibbles/cNibbles-2.0.0/config.h	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/user/games/cnibbles/config.h	2007-10-01 17:56:53 UTC (rev 1953)
@@ -23,7 +23,7 @@
 #define __CONFIG_H_
 
 // Size of the window used by nibbles
-#define		WINDOWX			80
+#define		WINDOWX			64
 #define		WINDOWY			25
 
 // Number of microseconds between each tick

Modified: trunk/user/games/cnibbles/intro.c
===================================================================
--- tags/cNibbles/cNibbles-2.0.0/intro.c	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/user/games/cnibbles/intro.c	2007-10-01 17:56:53 UTC (rev 1953)
@@ -37,6 +37,8 @@
      "Copyright (C) 2003 by Daniel Aarno - All rights reserved";
 const char *license_str =
      "Licensed under the Academic Free License version 1.2";
+const char *ported_str =
+     "(Ported by Agilo for DSLinux) ";
 
 void
 show_intro (WINDOW * w[])
@@ -227,6 +229,10 @@
      mvwprintw (w[Grid], GRIDY / 2 + 3, (GRIDX - strlen (license_str) / 2),
 		"%s", license_str);
      wrefresh (w[Grid]);
+     usleep (1000000);
+     mvwprintw (w[Grid], GRIDY / 2 + 4, (GRIDX - strlen (ported_str) / 2),
+                "%s", ported_str);
+     wrefresh (w[Grid]);
      usleep (2000000);
      clear ();
      refresh ();

Modified: trunk/user/games/cnibbles/main.c
===================================================================
--- tags/cNibbles/cNibbles-2.0.0/main.c	2007-10-01 17:39:14 UTC (rev 1952)
+++ trunk/user/games/cnibbles/main.c	2007-10-01 17:56:53 UTC (rev 1953)
@@ -131,7 +131,7 @@
      return dir;
 }
 
-bool
+int
 game_loop (WINDOW * w[])
 {
      // The grid, to make it easy to tell where the worm is




More information about the dslinux-commit mailing list