[Picross-commit] SF.net SVN: picross: [64] trunk
Status: Pre-Alpha
Brought to you by:
yvan_norsa
|
From: <yva...@us...> - 2008-04-24 13:36:01
|
Revision: 64
http://picross.svn.sourceforge.net/picross/?rev=64&view=rev
Author: yvan_norsa
Date: 2008-04-24 06:36:06 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
support for more XBM files
Modified Paths:
--------------
trunk/data/contents.txt
trunk/src/picross/game/simple/XBMModel.java
trunk/src/picross/menus/LevelMenuUI.java
Added Paths:
-----------
trunk/data/star.xbm
Modified: trunk/data/contents.txt
===================================================================
--- trunk/data/contents.txt 2008-04-23 19:13:48 UTC (rev 63)
+++ trunk/data/contents.txt 2008-04-24 13:36:06 UTC (rev 64)
@@ -3,3 +3,4 @@
bunny.xbm : 16x16
halloween.xbm : 16x16
squares.xbm : 16x16
+star.xbm : 16x16
Added: trunk/data/star.xbm
===================================================================
--- trunk/data/star.xbm (rev 0)
+++ trunk/data/star.xbm 2008-04-24 13:36:06 UTC (rev 64)
@@ -0,0 +1,7 @@
+#define group_width 16
+#define group_height 16
+static char group_bits[] = {
+ 0x0, 0x0, 0x80, 0x1, 0x80, 0x1, 0xc0, 0x3,
+ 0xc0, 0x3, 0xff, 0xff, 0xfe, 0x7f, 0xfc, 0x3f,
+ 0xf8, 0x1f, 0xf0, 0xf, 0xf0, 0xf, 0xf8, 0x1f,
+ 0x78, 0x1e, 0x3c, 0x3c, 0xc, 0x30, 0x0, 0x0};
Modified: trunk/src/picross/game/simple/XBMModel.java
===================================================================
--- trunk/src/picross/game/simple/XBMModel.java 2008-04-23 19:13:48 UTC (rev 63)
+++ trunk/src/picross/game/simple/XBMModel.java 2008-04-24 13:36:06 UTC (rev 64)
@@ -148,12 +148,30 @@
String[] values = line.split(XBMModel.VALUE_SEPARATOR);
for (int i = 0; i < values.length; i++) {
- //XBMModel.log.debug("values[" + i + "] = "
- //+ values[i]);
+ if (values[i].contains(XBMModel.HEX_LEADING)) {
+ values[i] = values[i].trim();
- if (values[i].contains(XBMModel.HEX_LEADING)) {
+ //XBMModel.log.debug("values[" + i + "] = "
+ // + values[i]);
+
+ if ((values[i].length()
+ < XBMModel.VALUE_END_POS)
+ || !Character
+ .isLetterOrDigit(values[i]
+ .charAt(XBMModel
+ .VALUE_END_POS
+ - 1))) {
+ values[i] = values[i]
+ .substring(0,
+ XBMModel.VALUE_BEGINNING_POS)
+ + 0
+ + values[i]
+ .substring(XBMModel
+ .VALUE_BEGINNING_POS);
+ }
+
String byteStr =
- values[i].trim()
+ values[i]
.substring(XBMModel.VALUE_BEGINNING_POS,
XBMModel.VALUE_END_POS);
byteValues.add(byteStr);
Modified: trunk/src/picross/menus/LevelMenuUI.java
===================================================================
--- trunk/src/picross/menus/LevelMenuUI.java 2008-04-23 19:13:48 UTC (rev 63)
+++ trunk/src/picross/menus/LevelMenuUI.java 2008-04-24 13:36:06 UTC (rev 64)
@@ -90,7 +90,7 @@
void displayLevels(SimpleListener listener, List<String> levels) {
this.removeAll();
- int x = 150;
+ int x = 50;
int y = 150;
for (String level : levels) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|