You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <chr...@us...> - 2006-09-24 12:56:32
|
Revision: 384 http://svn.sourceforge.net/gridarta/?rev=384&view=rev Author: christianhujer Date: 2006-09-24 05:56:12 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fix for SF #1564484 Can't add scripts from the script tab Modified Paths: -------------- trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 12:41:00 UTC (rev 383) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 12:56:12 UTC (rev 384) @@ -586,9 +586,10 @@ * @param filePath */ ScriptedEvent(final int eventType, final String pluginName, final String filePath, final String options) { - event = new ArchObject(); + event = new ArchObject(); // FIXME: This arch has no default arch event.setArchTypNr(118); event.setArchName("event_obj"); + event.setDefaultArch(CMainControl.getInstance().getArchObjectStack().getArch("event_obj")); event.setObjectFace(); setEventData(eventType, pluginName, filePath, options); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 12:41:07
|
Revision: 383 http://svn.sourceforge.net/gridarta/?rev=383&view=rev Author: akirschbaum Date: 2006-09-24 05:41:00 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Minor improvements: add annotation, rename variables, add default init values. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObject.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-24 12:11:20 UTC (rev 382) +++ trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-24 12:41:00 UTC (rev 383) @@ -117,19 +117,19 @@ * Data for multitile-arches. * Stays null for singlesquare-arches. */ - private MultiArchData multi; + @Nullable private MultiArchData multi = null; /** * The x-distance of this part to the head part. Set to zero for * single-part objects. */ - private int multiX; + private int multiX = 0; /** * The y-distance of this part to the head part. Set to zero for * single-part objects. */ - private int multiY; + private int multiY = 0; /** * Data for scripted events. @@ -174,7 +174,6 @@ /** Create an ArchObject. */ public ArchObject() { - multi = null; // this object stays 'null' for all single-tile arches script = null; // this object stays 'null' unless there are events defined myId = myIdCounter++; // increase ID counter for every new arch created @@ -673,7 +672,6 @@ return count; } - // ---- GET/SET methods for multi arches /** * Determine the horizontal extent in tiles. For single-part objects 1 is * returned. @@ -842,12 +840,12 @@ archType = type; } - public void setMapX(final int x) { - mapx = x; + public void setMapX(final int mapx) { + this.mapx = mapx; } - public void setMapY(final int y) { - mapy = y; + public void setMapY(final int mapy) { + this.mapy = mapy; } /** {@inheritDoc} */ @@ -1233,7 +1231,6 @@ if (multi != null) { clone.initMultiData(); } - clone.multiX = multiX; clone.multiY = multiY; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 12:11:25
|
Revision: 382 http://svn.sourceforge.net/gridarta/?rev=382&view=rev Author: akirschbaum Date: 2006-09-24 05:11:20 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Simplify if condition. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 12:09:57 UTC (rev 381) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 12:11:20 UTC (rev 382) @@ -724,7 +724,7 @@ } // if multi-head, we must attach the tail - if (arch.getMultiRefCount() > 0) { + if (arch.isMulti()) { // process the multipart tail: multiparts = arch.getMultiRefCount(); for (int j = 1; j <= multiparts; j++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 12:10:05
|
Revision: 381 http://svn.sourceforge.net/gridarta/?rev=381&view=rev Author: akirschbaum Date: 2006-09-24 05:09:57 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fix incorrect check for head part. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ReplaceDialog.java Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 12:06:34 UTC (rev 380) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 12:09:57 UTC (rev 381) @@ -328,7 +328,7 @@ final Iterator<ArchObject> it = mapControl.getArchObjectsDeleteMapArch(pos, false, false); while (it.hasNext()) { final ArchObject node = it.next(); - if ((!node.isMulti() || node.getMultiRefCount() > 0) && + if (node.isHead() && ((matchCriteria == MATCH_ARCH_NAME && node.getArchName() != null && node.getArchName().equalsIgnoreCase(matchString)) || (matchCriteria == MATCH_OBJ_NAME && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 12:06:40
|
Revision: 380 http://svn.sourceforge.net/gridarta/?rev=380&view=rev Author: akirschbaum Date: 2006-09-24 05:06:34 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Remove condition which is always true. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 11:19:10 UTC (rev 379) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 12:06:34 UTC (rev 380) @@ -566,7 +566,7 @@ final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); // default arch // is it a multi head? - if (arch != null && defarch != null && defarch.isMulti() && !arch.isMulti()) { + if (defarch != null && defarch.isMulti() && !arch.isMulti()) { // we have a multi head and need to insert his tail now // do insertion for all non-head parts of the multi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 11:19:18
|
Revision: 379 http://svn.sourceforge.net/gridarta/?rev=379&view=rev Author: akirschbaum Date: 2006-09-24 04:19:10 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Do not crash when pasting multi-part objects to the edge of a map. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CopyBuffer.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-24 09:41:24 UTC (rev 378) +++ trunk/crossfire/ChangeLog 2006-09-24 11:19:10 UTC (rev 379) @@ -1,3 +1,8 @@ +2006-09-24 Andreas Kirschbaum + + * Do not crash when pasting multi-part objects to the edge of a + map. + 2006-09-23 Andreas Kirschbaum * Make insertion and deletion in the map tile panel work Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 09:41:24 UTC (rev 378) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 11:19:10 UTC (rev 379) @@ -363,10 +363,19 @@ newHead = arch.createClone(pos.x, pos.y); for (ArchObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { final ArchObject newTail = mainControl.getArchObjectStack().newArchObjectInstance(tmp.getNodeNr()); + + final int mapx = pos.x + newTail.getMultiX(); + final int mapy = pos.y + newTail.getMultiY(); + + if (!mapControl.isPointValid(mapx, mapy)) { + // outside map + return; + } + newTail.setMultiX(tmp.getMultiX()); newTail.setMultiY(tmp.getMultiY()); - newTail.setMapX(pos.x + newTail.getMultiX()); - newTail.setMapY(pos.y + newTail.getMultiY()); + newTail.setMapX(mapx); + newTail.setMapY(mapy); newHead.addTailPart(newTail); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 09:41:30
|
Revision: 378 http://svn.sourceforge.net/gridarta/?rev=378&view=rev Author: akirschbaum Date: 2006-09-24 02:41:24 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fix NullPointerException when deleting more than one part of a multi-part object. Modified Paths: -------------- trunk/daimonin/src/daieditor/arch/ArchObject.java Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 09:12:23 UTC (rev 377) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 09:41:24 UTC (rev 378) @@ -507,7 +507,8 @@ } /** - * Remove this ArchObject from its container. + * Remove this ArchObject from its container. Do nothing if the object is + * not inside a container. * This method also takes perfectly well care of multihead arches. */ public void remove() { @@ -520,7 +521,9 @@ tail.setTailList(null); tail.setReferenced(false); } - head.container.remove(head); + if (head.container != null) { + head.container.remove(head); + } head.setTailList(null); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 09:12:27
|
Revision: 377 http://svn.sourceforge.net/gridarta/?rev=377&view=rev Author: akirschbaum Date: 2006-09-24 02:12:23 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 09:03:59 UTC (rev 376) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 09:12:23 UTC (rev 377) @@ -728,45 +728,45 @@ // process the multipart tail: multiparts = arch.getMultiRefCount(); for (int j = 1; j <= multiparts; j++) { - arch = mainControl.getArch(numList[i] + j); + final ArchObject tail = mainControl.getArch(numList[i] + j); - if (arch.isHead()) { + if (tail.isHead()) { log.warn("Multipart object is too short!"); final ArchObject before = mainControl.getArch(numList[i]); if (before != null) { log.warn("-> " + multiparts + " tails expected for multipart: '" + before.getArchName() + "',"); - log.warn(" but arch '" + arch.getArchName() + "' follows on position " + j + " and it's not a tail."); + log.warn(" but arch '" + tail.getArchName() + "' follows on position " + j + " and it's not a tail."); } } out.writeBytes("More\n"); - out.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + tail.getArchName() + "\n"); - if (arch.getObjName() != null) { - out.writeBytes("name " + arch.getObjName() + "\n"); + if (tail.getObjName() != null) { + out.writeBytes("name " + tail.getObjName() + "\n"); } - if (arch.getFaceName() != null) { - out.writeBytes("face " + arch.getFaceName() + "\n"); + if (tail.getFaceName() != null) { + out.writeBytes("face " + tail.getFaceName() + "\n"); } - if (arch.getArchTypNr() > 0) { - out.writeBytes("type " + arch.getArchTypNr() + "\n"); + if (tail.getArchTypNr() > 0) { + out.writeBytes("type " + tail.getArchTypNr() + "\n"); } // special: add a string-attribute with the display-category //out.writeBytes("editor_folder "+node.getTitle()+"/"+catList[i]+"\n"); - out.writeBytes(arch.getArchText()); - if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { + out.writeBytes(tail.getArchText()); + if (tail.getArchText().lastIndexOf(0x0a) != tail.getArchText().length() - 1) { out.writeBytes("\n"); } // position of multi relative to head - if (arch.getMultiX() != 0) { - out.writeBytes("x " + arch.getMultiX() + "\n"); + if (tail.getMultiX() != 0) { + out.writeBytes("x " + tail.getMultiX() + "\n"); } - if (arch.getMultiY() != 0) { - out.writeBytes("y " + arch.getMultiY() + "\n"); + if (tail.getMultiY() != 0) { + out.writeBytes("y " + tail.getMultiY() + "\n"); } out.writeBytes("end\n"); count++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 09:04:07
|
Revision: 376 http://svn.sourceforge.net/gridarta/?rev=376&view=rev Author: akirschbaum Date: 2006-09-24 02:03:59 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 08:59:22 UTC (rev 375) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-24 09:03:59 UTC (rev 376) @@ -668,7 +668,7 @@ } // now open the output-stream - final DataOutputStream binFile = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(dfile))); + final DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(dfile))); int count = 0; // count how much arches we've collected @@ -692,32 +692,32 @@ log.error("Collect Error: Multipart Tail in Panel found!"); } - binFile.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + arch.getArchName() + "\n"); if (arch.getObjName() != null) { - binFile.writeBytes("name " + arch.getObjName() + "\n"); + out.writeBytes("name " + arch.getObjName() + "\n"); } if (arch.getFaceName() != null) { - binFile.writeBytes("face " + arch.getFaceName() + "\n"); + out.writeBytes("face " + arch.getFaceName() + "\n"); } if (arch.getArchTypNr() > 0) { - binFile.writeBytes("type " + arch.getArchTypNr() + "\n"); + out.writeBytes("type " + arch.getArchTypNr() + "\n"); } // special: add a string-attribute with the display-category - binFile.writeBytes("editor_folder " + node.getTitle() + "/" + catList[i] + "\n"); + out.writeBytes("editor_folder " + node.getTitle() + "/" + catList[i] + "\n"); // add message text if (arch.getMsgText() != null && arch.getMsgText().trim().length() > 0) { - binFile.writeBytes("msg\n" + arch.getMsgText().trim() + "\nendmsg\n"); + out.writeBytes("msg\n" + arch.getMsgText().trim() + "\nendmsg\n"); } - binFile.writeBytes(arch.getArchText()); + out.writeBytes(arch.getArchText()); if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { - binFile.writeBytes("\n"); + out.writeBytes("\n"); } - binFile.writeBytes("end\n"); + out.writeBytes("end\n"); count++; if (count % 100 == 0) { pbar.setValue(count); @@ -739,36 +739,36 @@ } } - binFile.writeBytes("More\n"); + out.writeBytes("More\n"); - binFile.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + arch.getArchName() + "\n"); if (arch.getObjName() != null) { - binFile.writeBytes("name " + arch.getObjName() + "\n"); + out.writeBytes("name " + arch.getObjName() + "\n"); } if (arch.getFaceName() != null) { - binFile.writeBytes("face " + arch.getFaceName() + "\n"); + out.writeBytes("face " + arch.getFaceName() + "\n"); } if (arch.getArchTypNr() > 0) { - binFile.writeBytes("type " + arch.getArchTypNr() + "\n"); + out.writeBytes("type " + arch.getArchTypNr() + "\n"); } // special: add a string-attribute with the display-category - //binFile.writeBytes("editor_folder "+node.getTitle()+"/"+catList[i]+"\n"); + //out.writeBytes("editor_folder "+node.getTitle()+"/"+catList[i]+"\n"); - binFile.writeBytes(arch.getArchText()); + out.writeBytes(arch.getArchText()); if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { - binFile.writeBytes("\n"); + out.writeBytes("\n"); } // position of multi relative to head if (arch.getMultiX() != 0) { - binFile.writeBytes("x " + arch.getMultiX() + "\n"); + out.writeBytes("x " + arch.getMultiX() + "\n"); } if (arch.getMultiY() != 0) { - binFile.writeBytes("y " + arch.getMultiY() + "\n"); + out.writeBytes("y " + arch.getMultiY() + "\n"); } - binFile.writeBytes("end\n"); + out.writeBytes("end\n"); count++; if (count % 100 == 0) { pbar.setValue(count); @@ -787,32 +787,32 @@ maparchFound = true; count++; - binFile.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + arch.getArchName() + "\n"); // map object hack: x/y is normally a reference for multi // part arches - i include this hack until we rework the // arch objects with more useful script names if (arch.getArchName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { - binFile.writeBytes("x " + arch.getMultiX() + "\n"); - binFile.writeBytes("y " + arch.getMultiY() + "\n"); + out.writeBytes("x " + arch.getMultiX() + "\n"); + out.writeBytes("y " + arch.getMultiY() + "\n"); } if (arch.getObjName() != null) { - binFile.writeBytes("name " + arch.getObjName() + "\n"); + out.writeBytes("name " + arch.getObjName() + "\n"); } if (arch.getFaceName() != null) { - binFile.writeBytes("face " + arch.getFaceName() + "\n"); + out.writeBytes("face " + arch.getFaceName() + "\n"); } if (arch.getArchTypNr() > 0) { - binFile.writeBytes("type " + arch.getArchTypNr() + "\n"); + out.writeBytes("type " + arch.getArchTypNr() + "\n"); } - binFile.writeBytes(arch.getArchText()); + out.writeBytes(arch.getArchText()); if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { - binFile.writeBytes("\n"); + out.writeBytes("\n"); } - binFile.writeBytes("end\n"); + out.writeBytes("end\n"); } } @@ -822,7 +822,7 @@ } pbar.setValue(count); - binFile.close(); + out.close(); } catch (final IOException e) { log.error("Error: Exception collecting: archfile", e); return; @@ -831,7 +831,7 @@ /* try { CMainStatusbar.getInstance().setText("Collect Archfile: write animations"); - final DataOutputStream binFile = new DataOutputStream( + final DataOutputStream out = new DataOutputStream( new BufferedOutputStream(new FileOutputStream("animations"))); final int count = mainControl.animationObject.getAnimObjectCounter(); @@ -840,12 +840,12 @@ Arrays.sort(mainControl.animationObject.nameStringTable(), 0, count); for (int i = 0; i < count; i++) { nr = mainControl.animationObject.findAnimObject(mainControl.animationObject.getNameString(i)); - binFile.writeBytes("anim "+mainControl.animationObject.getAnimObjectName(nr)+"\n"); - binFile.writeBytes(mainControl.animationObject.getAnimObjectList(nr)); - binFile.writeBytes("mina\n"); + out.writeBytes("anim "+mainControl.animationObject.getAnimObjectName(nr)+"\n"); + out.writeBytes(mainControl.animationObject.getAnimObjectList(nr)); + out.writeBytes("mina\n"); } - binFile.close(); - binFile = null; + out.close(); + out = null; } catch (final IOException e) { System.out.println("Error: Exception collecting: animation file\n"); return; @@ -862,7 +862,7 @@ dfile = new File(IGUIConstants.PNG_FILE); } - final DataOutputStream binFile = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(dfile))); + final DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(dfile))); // write number 0 dummy entry final String num = Integer.toString(0); @@ -895,8 +895,8 @@ } fin1.close(); - binFile.writeBytes("IMAGE " + numstring + " " + numBytes + " ./arch/system/bug.111\n"); - binFile.write(b, 0, numBytes); + out.writeBytes("IMAGE " + numstring + " " + numBytes + " ./arch/system/bug.111\n"); + out.write(b, 0, numBytes); // now write all pngs into the file pbar.setLabel("Collecting Images...", 0, faceListCount); @@ -947,8 +947,8 @@ final String pname = "./" + pname1.substring(0, pname1.lastIndexOf("/") + 1); // now write this png data into the big collected png file - binFile.writeBytes("IMAGE " + numstring + " " + numBytes + " " + pname + faceObjects[i].getName() + "\n"); - binFile.write(b, 0, numBytes); + out.writeBytes("IMAGE " + numstring + " " + numBytes + " " + pname + faceObjects[i].getName() + "\n"); + out.write(b, 0, numBytes); if (i % 100 == 0) { pbar.setValue(i); @@ -958,7 +958,7 @@ pbar.finished(mainControl.getArchCount(), faceListCount); // close png file - binFile.close(); + out.close(); } catch (final IOException e) { log.error("Exception collecting images", e); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 08:59:29
|
Revision: 375 http://svn.sourceforge.net/gridarta/?rev=375&view=rev Author: akirschbaum Date: 2006-09-24 01:59:22 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Make insertion and deletion in the map tile panel work correctly. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-23 22:45:40 UTC (rev 374) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 08:59:22 UTC (rev 375) @@ -197,58 +197,36 @@ } } else if (e.getButton() == BUTTON3 && (e.getModifiers() & SHIFT_MASK) != SHIFT_MASK) { // RMB - if ((list.locationToIndex(e.getPoint()) >= 0 || list.getModel().getSize() > 0) && mainControl.getArchPanelHighlight() != null) { - - // get the selected arch from the map - final ArchObject entry; - if (list.locationToIndex(e.getPoint()) < 0) { - entry = (ArchObject) model.getElementAt(0); - } else { - entry = (ArchObject) model.getElementAt(list.locationToIndex(e.getPoint())); - } - - // find the lowest y-coord. in list, to see if selection points below it - // (We need this because JDK 1.4 doesn't give locationToIndex -1 when below) - int lowestY = 0; - if (list.getFirstVisibleIndex() != -1) { - try { - final Rectangle bounds = list.getCellBounds(list.getFirstVisibleIndex(), - list.getLastVisibleIndex()); - lowestY = (int) (bounds.getY() + bounds.getHeight()); - } catch (final NullPointerException ne) { - // and JDK 1.3 throws a NullpointerException here - real shit! - lowestY = -10; + if (currentSquare != null) { + ArchObject newarch = mainControl.getArchPanelHighlight(); + String archname = mainControl.getPanelArchName(); + if (newarch == null) { + newarch = CopyBuffer.getRandomMapArch(CPickmapPanel.getInstance().getCurrentPickmap(), 100); + if (newarch == null) { + archname = null; + } else { + archname = newarch.getArchName(); } } - // insert arch next to selected position - if (list.locationToIndex(e.getPoint()) < 0 || lowestY != -10 && (int) e.getPoint().getY() > lowestY) { - mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), null, entry.getMapX(), entry.getMapY()); + final int listIndex = getListIndex(e); + if (listIndex >= list.getModel().getSize()) { + mainControl.insertArchToMap(newarch, archname, null, currentSquare.getMapX(), currentSquare.getMapY()); } else { - mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), entry, entry.getMapX(), entry.getMapY()); + final ArchObject entry = (ArchObject) model.getElementAt(listIndex); + mainControl.insertArchToMap(newarch, archname, entry, currentSquare.getMapX(), currentSquare.getMapY()); } // refresh mainControl.refreshCurrentMap(); - } else { - if (currentSquare == null) { - // This means we don't have a valid selected square. - return; - } - ArchObject newarch = mainControl.getArchPanelHighlight(); - if (newarch == null) { - newarch = CopyBuffer.getRandomMapArch(CPickmapPanel.getInstance().getCurrentPickmap(), 100).createArch(); - } else { - newarch = newarch.createArch(); - } - currentSquare.addFirst(newarch); - newarch.setObjectFace(); - // TODO: insert arch if tilelist is empty } mainView.setMapTileList(mainControl.getCurrentMap(), null); } else if (e.getButton() == BUTTON2 || (e.getModifiers() & SHIFT_MASK) == SHIFT_MASK && e.getButton() == BUTTON3) { // MMB // --- middle mouse button: delete arch --- - deleteIndexFromList(list.locationToIndex(e.getPoint())); + final int listIndex = getListIndex(e); + if (listIndex < list.getModel().getSize()) { + deleteIndexFromList(listIndex); + } } } @@ -272,6 +250,33 @@ /* ignore */ } + /** + * Determine the list index for a given mouse event. This function differs + * from <code>list.locationTopIndex(e.getPoint())</code> in that it always + * returns a valid list index, or the list size (i.e., one element past the + * last list index) if the point is after the end of the list. + * + * @param e the mouse event containing the position to check + * + * @return the selected list index + */ + private int getListIndex(final MouseEvent e) { + final int lastIndex = list.getModel().getSize() - 1; + if (lastIndex < 0) { + return 0; + } + + final Rectangle bounds = list.getCellBounds(lastIndex, lastIndex); + final int lowestY = (int) (bounds.getY() + bounds.getHeight()); + if ((int) (e.getPoint().getY()) >= lowestY) { + return lastIndex + 1; + } + + final int listIndex = list.locationToIndex(e.getPoint()); + assert listIndex >= 0; // -1 is returned only if the list is empty, but this was already checked + return listIndex; + } + /** Get the selected arch within the list (currently selected tile). */ public ArchObject getMapTileSelection() { return (ArchObject) list.getSelectedValue(); @@ -323,6 +328,7 @@ model.removeAllElements(); if (map == null) { // mouse has been clicked outside the mapview + currentSquare = null; getTileArch(-1); list.setEnabled(true); mainView.refreshMapArchPanel(); Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-23 22:45:40 UTC (rev 374) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-24 08:59:22 UTC (rev 375) @@ -261,6 +261,8 @@ return false; } final ArchObject head = defaultArch.createArch(); + head.setMapX(pos.x); + head.setMapY(pos.y); if (insertBelow) { mapGrid[pos.x][pos.y].addFirst(head); } else { @@ -275,6 +277,8 @@ final ArchObject tail = tailArch.createArch(); head.addTail(tail); + tail.setMapX(posT.x); + tail.setMapY(posT.y); if (insertBelow) { mapGrid[posT.x][posT.y].addFirst(tail); } else { @@ -306,7 +310,7 @@ archname = newarch.getArchName(); } // insert a new instance of the default arch (number 'archnr') - if (addArchToMap(archname, pos, true, false)) { + if (!addArchToMap(archname, pos, true, false)) { return false; } } else { @@ -320,10 +324,14 @@ } final ArchObject node = mapGrid[pos.x][pos.y].getLast(); + int position = 0; for (final ArchObject search : mapGrid[pos.x][pos.y].reverse()) { if (search == next) { break; } + position++; + } + for(int i = 0; i < position - 1; i++) { node.moveDown(); } return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 22:45:44
|
Revision: 374 http://svn.sourceforge.net/gridarta/?rev=374&view=rev Author: akirschbaum Date: 2006-09-23 15:45:40 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Rename identifier names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 22:27:17 UTC (rev 373) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 22:45:40 UTC (rev 374) @@ -262,7 +262,7 @@ } } - public int getPanelArch(final int oldindex) { + public int getTileArch(final int oldindex) { final int index; if (oldindex == -1) { index = list.getFirstVisibleIndex(); @@ -305,7 +305,7 @@ if (map == null) { // mouse has been clicked outside the mapview currentSquare = null; - getPanelArch(-1); + getTileArch(-1); list.setEnabled(true); mainView.refreshMapArchPanel(); return; @@ -392,18 +392,13 @@ /* This is the only method defined by ListCellRenderer. We just * reconfigure the Jlabel each time we're called. */ - @Override public Component getListCellRendererComponent( - final JList list, - final Object value, // value to display - final int index, // cell index - final boolean iss, // is the cell selected - final boolean chf) { // the list and the cell have the focus + @Override public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { /* The DefaultListCellRenderer class will take care of * the JLabels text property, it's foreground and background *colors, and so on. */ - super.getListCellRendererComponent(list, value, index, iss, chf); + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (currentSquare == null) { return this; @@ -426,7 +421,7 @@ if (arch != null) { arch = arch.getHead(); - if (!iss && indent == 0) { + if (!isSelected && indent == 0) { this.setBackground(IGUIConstants.BG_COLOR); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 22:27:21
|
Revision: 373 http://svn.sourceforge.net/gridarta/?rev=373&view=rev Author: akirschbaum Date: 2006-09-23 15:27:17 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Make logic to select an action for a mouse event easier to understand. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapViewBasic.java Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-23 22:13:08 UTC (rev 372) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-23 22:27:17 UTC (rev 373) @@ -1088,12 +1088,16 @@ } // right mouse button: insert arch - if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0 || - ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { - insertObject(mapLoc); - } else if (e.getModifiers() == MouseEvent.BUTTON1_MASK && - !e.isShiftDown() && !e.isControlDown()) { - selectTile(mapLoc); + if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0) { + insertObject(mapLoc); + } else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { + if (e.isShiftDown()) { + insertObject(mapLoc); + } else if (e.isControlDown()) { + deleteObject(mapLoc); + } else { + selectTile(mapLoc); + } } else { // middle mouse button: delete arch // (I intenionally used "else" here. BUTTON2_MASK seems not to work for some systems) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 22:13:13
|
Revision: 372 http://svn.sourceforge.net/gridarta/?rev=372&view=rev Author: akirschbaum Date: 2006-09-23 15:13:08 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Refactoring: move actions for mouse events to separate functions. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapViewBasic.java Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-23 21:54:55 UTC (rev 371) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-23 22:13:08 UTC (rev 372) @@ -1049,6 +1049,10 @@ private String insertArchName = ""; // name of arch being inserted + private Rectangle previewRect = null; + + private Point[] needRedraw = null; // array of tile coords which need to be redrawn + public void mouseClicked(final MouseEvent e) { } @@ -1056,10 +1060,10 @@ changedFlagNotify(); // set flag: map has changed final Point clickPoint = e.getPoint(); final Point mapLoc = renderer.getTileLocationAt(clickPoint); - Point[] needRedraw = null; // array of tile coords which need to be redrawn + needRedraw = null; Point[] preRedraw = null; // array of tile coords which need to be redrawn boolean needFullRepaint = false; // true if full repaint of map needed - Rectangle previewRect = null; + previewRect = null; if (mapLoc != null) { // in "locked pickmaps" mode, pickmaps react only to leftclicks @@ -1086,125 +1090,14 @@ // right mouse button: insert arch if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0 || ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { - previewRect = new Rectangle(); - previewRect.x = mapLoc.x; - previewRect.y = mapLoc.y; - previewRect.width = 1; - previewRect.height = 1; - startMapLoc = mapLoc; - - if (highlightOn && !mapControl.isPickmap()) { - highlightOn = false; // no longer highlighting tiles - mainControl.getMainView().refreshMenus(); - } - - if (mapLoc.x != -1 && mapLoc.y != -1) { - if (mapControl.isPickmap()) { - // insert on pickmap - needRedraw = insertMapArchToPickmap(mapLoc); - } else { - // insert on normal map - mapMouseRightPos.x = mapLoc.x; - mapMouseRightPos.y = mapLoc.y; - - needRedraw = insertSelArchToMap(mapLoc, true); - - // get name of inserted arch (this is display in status bar while dragging) - ArchObject insArch; - if ((insArch = mainControl.getArchPanelSelection()) != null) { - if (insArch.getObjName() != null && insArch.getObjName().length() > 0) { - insertArchName = mainControl.getArchPanelSelection().getObjName(); - } else if (insArch.getArchName() != null && insArch.getArchName().length() > 0) { - insertArchName = mainControl.getArchPanelSelection().getArchName(); - } else if ((insArch = insArch.getDefaultArch()) != null) { - insertArchName = mainControl.getArchPanelSelection().getArchName(); - } else { - insertArchName = "unknown"; - } - } else { - insertArchName = "nothing"; - } - - mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); - } - } + insertObject(mapLoc); } else if (e.getModifiers() == MouseEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown()) { - - // left mouse button: select tiles - mapMouseRightPos.x = mapLoc.x; // position of selected tile - mapMouseRightPos.y = mapLoc.y; - mapMouseRightOff.x = 0; // dragging offset - mapMouseRightOff.y = 0; - - if (mapLoc.x == -1 || mapLoc.y == -1) { - if (!renderer.isPickmap()) { - mainControl.getMainView().setMapTileList(null, -1); - - if (highlightOn) { - highlightOn = false; - mainControl.getMainView().refreshMenus(); - } - } - } else { - if (!mapControl.isPickmap()) { - mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); - } - - if (!highlightOn) { - highlightOn = true; // highlight the selected area - mainControl.getMainView().refreshMenus(); - } - // paint the highlight-icon - renderer.setHighlightTile(/*((JComponent)renderer).getGraphics(), */mapLoc.x, mapLoc.y); - - if (renderer.isPickmap()) { - final ArchObject arch = mapControl.getBottomArchObject(mapLoc); - if (arch != null) { - // an arch of a pickmap was selected - mainControl.showArchPanelQuickObject(arch); - } - } - - } + selectTile(mapLoc); } else { // middle mouse button: delete arch // (I intenionally used "else" here. BUTTON2_MASK seems not to work for some systems) - - if (highlightOn && !mapControl.isPickmap()) { - highlightOn = false; // no longer highlighting tiles - mainControl.getMainView().refreshMenus(); - } - - if (mapLoc.x != -1 && mapLoc.y != -1) { - if (!mapControl.isPickmap()) { - mapMouseRightPos.x = mapLoc.x; - mapMouseRightPos.y = mapLoc.y; - } - - // delete the topmost arch (matching the view settings) on that square - // and redraw the map - ArchObject tmpArch = mapControl.getBottomArchObject(mapLoc); - if (tmpArch != null) { - // go to the topmost arch (end of the list) - for (; tmpArch.getNext() != null; tmpArch = tmpArch.getNext()) { - ; - } - - // now search backwards for matching view settings - for (; tmpArch != null && mainControl.getTileEdit() != 0 && - !mainControl.isTileEdit(tmpArch.getEditType()); tmpArch = tmpArch.getPrev()) { - ; - } - if (tmpArch != null) { - needRedraw = calcArchRedraw(tmpArch); // get redraw info - mapControl.deleteMapArch(tmpArch.getMyID(), mapLoc, false, MapModel.JOIN_ENABLE); - } - - // update mapArch panel - mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); - } - } + deleteObject(mapLoc); } } else { mainControl.getMainView().setMapTileList(null, -1); // for secure... @@ -1372,6 +1265,127 @@ paintTileArray(needRedraw); } + private void insertObject(final Point mapLoc) { + previewRect = new Rectangle(); + previewRect.x = mapLoc.x; + previewRect.y = mapLoc.y; + previewRect.width = 1; + previewRect.height = 1; + startMapLoc = mapLoc; + + if (highlightOn && !mapControl.isPickmap()) { + highlightOn = false; // no longer highlighting tiles + mainControl.getMainView().refreshMenus(); + } + + if (mapLoc.x != -1 && mapLoc.y != -1) { + if (mapControl.isPickmap()) { + // insert on pickmap + needRedraw = insertMapArchToPickmap(mapLoc); + } else { + // insert on normal map + mapMouseRightPos.x = mapLoc.x; + mapMouseRightPos.y = mapLoc.y; + + needRedraw = insertSelArchToMap(mapLoc, true); + + // get name of inserted arch (this is display in status bar while dragging) + ArchObject insArch; + if ((insArch = mainControl.getArchPanelSelection()) != null) { + if (insArch.getObjName() != null && insArch.getObjName().length() > 0) { + insertArchName = mainControl.getArchPanelSelection().getObjName(); + } else if (insArch.getArchName() != null && insArch.getArchName().length() > 0) { + insertArchName = mainControl.getArchPanelSelection().getArchName(); + } else if ((insArch = insArch.getDefaultArch()) != null) { + insertArchName = mainControl.getArchPanelSelection().getArchName(); + } else { + insertArchName = "unknown"; + } + } else { + insertArchName = "nothing"; + } + + mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); + } + } + } + + private void selectTile(final Point mapLoc) { + // left mouse button: select tiles + mapMouseRightPos.x = mapLoc.x; // position of selected tile + mapMouseRightPos.y = mapLoc.y; + mapMouseRightOff.x = 0; // dragging offset + mapMouseRightOff.y = 0; + + if (mapLoc.x == -1 || mapLoc.y == -1) { + if (!renderer.isPickmap()) { + mainControl.getMainView().setMapTileList(null, -1); + + if (highlightOn) { + highlightOn = false; + mainControl.getMainView().refreshMenus(); + } + } + } else { + if (!mapControl.isPickmap()) { + mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); + } + + if (!highlightOn) { + highlightOn = true; // highlight the selected area + mainControl.getMainView().refreshMenus(); + } + + // paint the highlight-icon + renderer.setHighlightTile(/*((JComponent)renderer).getGraphics(), */mapLoc.x, mapLoc.y); + + if (renderer.isPickmap()) { + final ArchObject arch = mapControl.getBottomArchObject(mapLoc); + if (arch != null) { + // an arch of a pickmap was selected + mainControl.showArchPanelQuickObject(arch); + } + } + } + } + + private void deleteObject(final Point mapLoc) { + if (highlightOn && !mapControl.isPickmap()) { + highlightOn = false; // no longer highlighting tiles + mainControl.getMainView().refreshMenus(); + } + + if (mapLoc.x != -1 && mapLoc.y != -1) { + if (!mapControl.isPickmap()) { + mapMouseRightPos.x = mapLoc.x; + mapMouseRightPos.y = mapLoc.y; + } + + // delete the topmost arch (matching the view settings) on that square + // and redraw the map + ArchObject tmpArch = mapControl.getBottomArchObject(mapLoc); + if (tmpArch != null) { + // go to the topmost arch (end of the list) + for (; tmpArch.getNext() != null; tmpArch = tmpArch.getNext()) { + ; + } + + // now search backwards for matching view settings + for (; tmpArch != null && mainControl.getTileEdit() != 0 && + !mainControl.isTileEdit(tmpArch.getEditType()); tmpArch = tmpArch.getPrev()) { + ; + } + if (tmpArch != null) { + needRedraw = calcArchRedraw(tmpArch); // get redraw info + mapControl.deleteMapArch(tmpArch.getMyID(), mapLoc, false, MapModel.JOIN_ENABLE); + } + + // update mapArch panel + mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), -1); + } + } + } + /** * Take the currently selected arch (from archlist or pickmap) and * insert it to the defined spot on the currently active map. Redraw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 21:55:04
|
Revision: 371 http://svn.sourceforge.net/gridarta/?rev=371&view=rev Author: akirschbaum Date: 2006-09-23 14:54:55 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Make insertion and deletion in the map tile panel work correctly. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/ChangeLog 2006-09-23 21:54:55 UTC (rev 371) @@ -1,3 +1,9 @@ +2006-09-23 Andreas Kirschbaum + + * Make insertion and deletion in the map tile panel work + correctly. (Note that multipart objects from pickmaps still cannot + be inserted in the map tile panel.) + 2006-09-18 Andreas Kirschbaum * Fix MultiArchData implementation. The main reason was code Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 21:54:55 UTC (rev 371) @@ -88,6 +88,9 @@ private int lastClickId = -1; + /** The currently selected MapSquare. */ + private Point currentSquare = null; + /** Build Panel */ CMapTileList(final CMainControl mainControl, final CMainView mainView) { this.mainControl = mainControl; @@ -183,83 +186,78 @@ ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { // --- right mouse button: insert arch --- - if ((list.locationToIndex(e.getPoint()) >= 0 || list.getModel().getSize() > 0) && - mainControl.getArchPanelSelection() != null) { - - // get the selected arch from the map - final String entry; - if (list.locationToIndex(e.getPoint()) < 0) { - entry = model.getElementAt(0).toString(); + if (currentSquare != null && mainControl.getArchPanelSelection() != null) { + final int listIndex = getListIndex(e); + if (listIndex >= list.getModel().getSize()) { + mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), null, currentSquare, MapModel.JOIN_ENABLE); } else { - entry = model.getElementAt(list.locationToIndex(e.getPoint())).toString(); + final String entry = model.getElementAt(listIndex).toString(); + final int num = Integer.parseInt(entry.substring(0, 10)); + mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), mainControl.getMapArch(num, currentSquare), currentSquare, MapModel.JOIN_ENABLE); } - final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - - // find the lowest Y-coord. in list, to see if selection points below it - // (We need this because JDK 1.4 doesn't give locationToIndex -1 when below) - int lowestY = 0; - if (list.getFirstVisibleIndex() != -1) { - try { - final Rectangle bounds = list.getCellBounds(list.getFirstVisibleIndex(), - list.getLastVisibleIndex()); - lowestY = (int) (bounds.getY() + bounds.getHeight()); - } catch (final NullPointerException ne) { - // and JDK 1.3 throws a NullpointerException here - real shit! - lowestY = -10; - } - } - - // insert arch next to selected position - if (list.locationToIndex(e.getPoint()) < 0 || (lowestY != -10 && (int) (e.getPoint().getY()) > lowestY)) { - mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), null, pos, MapModel.JOIN_ENABLE); - } else { - mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), mainControl.getMapArch(num, pos), pos, MapModel.JOIN_ENABLE); - } - // refresh mainControl.getCurrentMap().setLevelChangedFlag(); // the map has been modified mainControl.refreshCurrentMap(); } } else { // --- middle mouse button: delete arch --- - deleteIndexFromList(list.locationToIndex(e.getPoint())); + final int listIndex = getListIndex(e); + if (listIndex < list.getModel().getSize()) { + deleteIndexFromList(listIndex); + } } } }); } + /** + * Determine the list index for a given mouse event. This function differs + * from <code>list.locationTopIndex(e.getPoint())</code> in that it always + * returns a valid list index, or the list size (i.e., one element past the + * last list index) if the point is after the end of the list. + * + * @param e the mouse event containing the position to check + * + * @return the selected list index + */ + private int getListIndex(final MouseEvent e) { + final int lastIndex = list.getModel().getSize() - 1; + if (lastIndex < 0) { + return 0; + } + + final Rectangle bounds = list.getCellBounds(lastIndex, lastIndex); + final int lowestY = (int) (bounds.getY() + bounds.getHeight()); + if ((int) (e.getPoint().getY()) >= lowestY) { + return lastIndex + 1; + } + + final int listIndex = list.locationToIndex(e.getPoint()); + assert listIndex >= 0; // -1 is returned only if the list is empty, but this was already checked + return listIndex; + } + @Nullable public ArchObject getMapTileSelection() { // find the selected entry if one final int index = list.getSelectedIndex(); - if (index >= list.getModel().getSize() || index < 0 - || list.getModel().getSize() <= 0 || mainControl.getCurrentMap() == null) { + if (currentSquare == null || index >= list.getModel().getSize() || index < 0 || list.getModel().getSize() <= 0 || mainControl.getCurrentMap() == null) { return null; } // parse selected entry and get the arch object final String entry = model.getElementAt(index).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - - return mainControl.getMapArch(num, pos); + return mainControl.getMapArch(num, currentSquare); } /** Insert a tile index of list, this will delete it. */ void deleteIndexFromList(final int index) { - if (index != -1 && index < list.getModel().getSize()) { + if (currentSquare != null && index != -1 && index < list.getModel().getSize()) { final ArchObject temp = getMapTileSelection(); final String entry = model.getElementAt(index).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - mainControl.deleteMapArch(num, pos, true, MapModel.JOIN_ENABLE); + mainControl.deleteMapArch(num, currentSquare, true, MapModel.JOIN_ENABLE); mainView.setMapTileList(mainControl.getCurrentMap(), (temp == null ? -1 : temp.getMyID())); } } @@ -306,6 +304,7 @@ model.removeAllElements(); if (map == null) { // mouse has been clicked outside the mapview + currentSquare = null; getPanelArch(-1); list.setEnabled(true); mainView.refreshMapArchPanel(); @@ -314,6 +313,7 @@ postSelect = -1; listCounter = 0; + currentSquare = map.getMapModel().getMouseRightPos(); ArchObject node = map.getMapModel().getMouseRightPosObject(); // Jump to the end of the list @@ -330,10 +330,6 @@ } final String num = Integer.toString(node.getMyID()); String liststring = listDef.substring(0, 10 - num.length()) + num; - final String numx = Integer.toString(node.getMapX()); - liststring += listDef.substring(0, 10 - numx.length()) + numx; - final String numy = Integer.toString(node.getMapY()); - liststring += listDef.substring(0, 10 - numy.length()) + numy; liststring += listDef; listCounter++; model.addElement(liststring); @@ -344,7 +340,7 @@ foundSIndex = true; // this is it - don't select any other tile } - addInvObjects(node, numx, numy, archid, 1); // browse the inventory of the map object + addInvObjects(node, archid, 1); // browse the inventory of the map object } if (postSelect != -1) { @@ -364,22 +360,10 @@ /** * Add inventory objects to an arch in the MapTileList recursively. * @param node the arch where the inventory gets added - * @param x map location of 'node' as strings - * @param y map location of 'node' as strings * @param archid nodeNr of the highlighted arch (?) * @param indent indentation; 1=minimal indentation */ - public void addInvObjects(final ArchObject node, String x, String y, final int archid, final int indent) { - // if this is a multi-tile, we want to show the head's inventory - if (node.isTail()) { - final Iterator it2 = node.getHead().iterator(); // we go to heads inv. - if (it2.hasNext()) { - final ArchObject arch = (ArchObject) it2.next(); - x = Integer.toString(arch.getMapX()); - y = Integer.toString(arch.getMapY()); - } - } - + public void addInvObjects(final ArchObject node, final int archid, final int indent) { final String indentStr = Integer.toString(indent); final Iterator it = node.getHead().iterator(); @@ -391,13 +375,11 @@ } final String num = Integer.toString(arch.getMyID()); String liststring = listDef.substring(0, 10 - num.length()) + num; - liststring += listDef.substring(0, 10 - x.length()) + x; - liststring += listDef.substring(0, 10 - y.length()) + y; liststring += listDef.substring(0, 10 - indentStr.length()) + indentStr; listCounter++; model.addElement(liststring); - addInvObjects(arch, x, y, archid, indent + 1); + addInvObjects(arch, archid, indent + 1); } } @@ -423,14 +405,15 @@ */ super.getListCellRendererComponent(list, value, index, iss, chf); + if (currentSquare == null) { + return this; + } + final String entry = value.toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - final int indent = Integer.parseInt(entry.substring(30, 40)); + final int indent = Integer.parseInt(entry.substring(10, 20)); - ArchObject arch = mainControl.getMapArch(num, pos); + ArchObject arch = mainControl.getMapArch(num, currentSquare); //String label; // We must set a disabled Icon (even though we don't want it) @@ -441,6 +424,8 @@ // arch == null should not happen, but it *can* happen when the active // window gets changed by user and java is still blitting here if (arch != null) { + arch = arch.getHead(); + if (!iss && indent == 0) { this.setBackground(IGUIConstants.BG_COLOR); } @@ -458,7 +443,6 @@ // In the map-tile-window the object names are displayed // next to the icons mainControl.setPlainFont(this); - arch = arch.getHead(); if (arch.getObjName() != null && arch.getObjName().length() > 0) { setText(arch.getObjName()); // special name Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-23 21:54:55 UTC (rev 371) @@ -107,6 +107,20 @@ } /** + * Return the position of the displayed object in the map-tile panel. + * @return the position to show + */ + @Nullable public Point getMouseRightPos() { + final Point pos = mapControl.getMapView().getMapMouseRightPos(); + + if (pos.x == -1 || pos.y == -1 || !isPointValid(pos)) { + return null; + } + + return pos; + } + + /** * Update the map description text. * @param str the new description text */ Modified: trunk/crossfire/src/cfeditor/map/MapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-23 21:54:55 UTC (rev 371) @@ -35,6 +35,7 @@ @Deprecated void setArchObject(int x, int y, ArchObject arch); void setArchObject(Point pos, ArchObject arch); + @Nullable Point getMouseRightPos(); @Nullable ArchObject getMouseRightPosObject(); @Deprecated boolean addArchToMap(int archnr, int xx, int yy, int intern, boolean join, boolean insertBelow); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 13:38:47
|
Revision: 370 http://svn.sourceforge.net/gridarta/?rev=370&view=rev Author: akirschbaum Date: 2006-09-23 06:38:43 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Do not insert default arches by dragging the mouse in pickmaps. Modified Paths: -------------- trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java Modified: trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-09-23 13:26:10 UTC (rev 369) +++ trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-09-23 13:38:43 UTC (rev 370) @@ -59,7 +59,7 @@ final Point p = e.getMapLocation(); final MapCursor mapCursor = e.getMapCursor(); final MapControl mapControl = e.getMapControl(); - if (mapCursor.setLocationSafe(p)) { + if (!mapControl.isPickmap() && mapCursor.setLocationSafe(p)) { mapControl.insertSelArchToMap(p, false); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-23 13:26:15
|
Revision: 369 http://svn.sourceforge.net/gridarta/?rev=369&view=rev Author: christianhujer Date: 2006-09-23 06:26:10 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fixed bug: iterator for ArchObjectContainer had bogus remove operation. Modified Paths: -------------- trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java Modified: trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java 2006-09-23 13:25:29 UTC (rev 368) +++ trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java 2006-09-23 13:26:10 UTC (rev 369) @@ -93,10 +93,35 @@ /** * {@inheritDoc} * The Iterator returned does not recurse, it only containes objects on the first level. - * The Iterator returned is transparent, that means modifying the iterator's collection actually modifies the unterlying ArchObjectContainer. + * The Iterator returned is transparent, that means modifying the iterator's collection actually modifies the underlying ArchObjectContainer. */ @NotNull public final Iterator<ArchObject> iterator() { - return contents.iterator(); + // Do not return contents.iterator() directly because otherwise the remove() operation will not properly unlink the removed arch from its container. + return new Iterator<ArchObject>() { + + /** The basic iterator. */ + private Iterator<ArchObject> delegate = contents.iterator(); + private ArchObject current; + + /** {@inheritDoc} */ + public boolean hasNext() { + return delegate.hasNext(); + } + + /** {@inheritDoc} */ + public ArchObject next() { + return current = delegate.next(); + } + + /** {@inheritDoc} */ + public void remove() { + // keep this in sync with ArchObjectContainer#remove(ArchObject) + // we can't simply invoke ArchObjectContainer#remove(current) because that would result in a ConcurrentModificationException. + delegate.remove(); + current.setContainer(null); + squareChanged(); + } + }; } /** @@ -148,6 +173,7 @@ * @throws IllegalArgumentException if <var>arch</var> isn't in this container */ final void remove(@NotNull final ArchObject arch) { + // keep this in sync with iterator() if (!contents.remove(arch)) { throw new IllegalArgumentException(arch + " wasn't inside container " + this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-23 13:25:33
|
Revision: 368 http://svn.sourceforge.net/gridarta/?rev=368&view=rev Author: christianhujer Date: 2006-09-23 06:25:29 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Added new test cases. Modified Paths: -------------- trunk/teststuff/perfTest/PerfTestMapDecode.java Modified: trunk/teststuff/perfTest/PerfTestMapDecode.java =================================================================== --- trunk/teststuff/perfTest/PerfTestMapDecode.java 2006-09-23 13:10:37 UTC (rev 367) +++ trunk/teststuff/perfTest/PerfTestMapDecode.java 2006-09-23 13:25:29 UTC (rev 368) @@ -900,5 +900,87 @@ sum += state; } + @PerfTest("BufferedInputStream -> String, manual split") + public static void bufReadAll() throws IOException { + int state = 0; + final int size = (int) new File(testFileName).length(); + final byte[] buf = new byte[size]; + final BufferedInputStream in = new BufferedInputStream(new FileInputStream(testFileName)); + try { + for (int pos = 0, bytesRead; pos < size && (bytesRead = in.read(buf, pos, size - pos)) != -1; pos += bytesRead); + final String file = new String(buf); + final StringTokenizer tk = new StringTokenizer(file, "\n"); + while (tk.hasMoreTokens()) { + String line = tk.nextToken(); + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("Mapped File I/O nondirect -> String, StringTokenizer") + public static void nioByte() throws IOException { + int state = 0; + final FileChannel fileChannel = new FileInputStream(testFileName).getChannel(); + final ByteBuffer buffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size()); + try { + final byte[] buf = new byte[buffer.remaining()]; + buffer.get(buf); + final String file = new String(buf); + final StringTokenizer tk = new StringTokenizer(file, "\n"); + while (tk.hasMoreTokens()) { + String line = tk.nextToken(); + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + fileChannel.close(); + } + sum += state; + } + } // class PerfTestMapDecode This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-23 13:10:42
|
Revision: 367 http://svn.sourceforge.net/gridarta/?rev=367&view=rev Author: christianhujer Date: 2006-09-23 06:10:37 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Removed empty directory. Removed Paths: ------------- trunk/crossfire/src/cfeditor/textedit/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-23 13:10:27
|
Revision: 366 http://svn.sourceforge.net/gridarta/?rev=366&view=rev Author: christianhujer Date: 2006-09-23 06:10:16 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Removed empty directory. Removed Paths: ------------- trunk/daimonin/src/daieditor/textedit/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 13:02:17
|
Revision: 365 http://svn.sourceforge.net/gridarta/?rev=365&view=rev Author: akirschbaum Date: 2006-09-23 06:02:13 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fix quick info display for multi-part objects if a tail-part is selected. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchQuickView.java Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-23 12:57:25 UTC (rev 364) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-23 13:02:13 UTC (rev 365) @@ -111,9 +111,14 @@ add(scrollPane); // and add it to this panel object } - // show quick info of this arch - void showArchPanelQuickObject(final ArchObject arch) { - if (arch == null) { + /** + * Show quick info for an object. + * + * @param archPart the object to show; this may be any part of a multi-part + * object + */ + void showArchPanelQuickObject(final ArchObject archPart) { + if (archPart == null) { archArchNameText.setText("<html><font color=black>Arch:</font></html>"); archObjNameText.setText("<html><font color=black>Name:</font></html>"); archTypeText.setText("<html><font color=black>Type:</font></html>"); @@ -121,6 +126,7 @@ return; } + final ArchObject arch = archPart.getHead(); archArchNameText.setText("<html><font color=black>Arch: " + arch.getArchName() + "</font></html>"); if (arch.getObjName() == null || arch.getObjName().length() <= 0) { final ArchObject def = arch.getDefaultArch(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 12:57:31
|
Revision: 364 http://svn.sourceforge.net/gridarta/?rev=364&view=rev Author: akirschbaum Date: 2006-09-23 05:57:25 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fix quick info display for multi-part objects if a tail-part is selected. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchQuickView.java Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-23 11:31:03 UTC (rev 363) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-23 12:57:25 UTC (rev 364) @@ -87,9 +87,14 @@ add(archTileText, gcr); } - // show quick info of this arch - void showArchPanelQuickObject(final ArchObject arch) { - if (arch == null) { + /** + * Show quick info for an object. + * + * @param archPart the object to show; this may be any part of a multi-part + * object + */ + void showArchPanelQuickObject(final ArchObject archPart) { + if (archPart == null) { if (mainControl.getMainView().isPickmapActive()) { archObjNameText.setText(" -random pick- "); archObjNameText.setForeground(Color.BLUE); @@ -100,6 +105,7 @@ archTypeText.setText(null); archTileText.setText(null); } else { + final ArchObject arch = archPart.getHead(); String objName = arch.getObjName(); if (objName == null || objName.length() == 0) { final ArchObject def = arch.getDefaultArch(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-23 11:31:17
|
Revision: 363 http://svn.sourceforge.net/gridarta/?rev=363&view=rev Author: christianhujer Date: 2006-09-23 04:31:03 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Added performance test stuff. Added Paths: ----------- trunk/teststuff/ trunk/teststuff/perfTest/ trunk/teststuff/perfTest/PerfTest.java trunk/teststuff/perfTest/PerfTestMapDecode.java trunk/teststuff/perfTest/foo trunk/teststuff/perfTest/foo2 Added: trunk/teststuff/perfTest/PerfTest.java =================================================================== --- trunk/teststuff/perfTest/PerfTest.java (rev 0) +++ trunk/teststuff/perfTest/PerfTest.java 2006-09-23 11:31:03 UTC (rev 363) @@ -0,0 +1,9 @@ +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Retention; +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface PerfTest { + String value(); +} Property changes on: trunk/teststuff/perfTest/PerfTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/teststuff/perfTest/PerfTestMapDecode.java =================================================================== --- trunk/teststuff/perfTest/PerfTestMapDecode.java (rev 0) +++ trunk/teststuff/perfTest/PerfTestMapDecode.java 2006-09-23 11:31:03 UTC (rev 363) @@ -0,0 +1,904 @@ +import java.io.*; +import java.nio.*; +import java.nio.channels.*; +import java.nio.charset.*; +import java.util.*; +import java.lang.reflect.*; +import java.util.regex.*; + +class LongValueComparator implements Comparator<Map.Entry<Method, Long>> { + + public int compare(final Map.Entry<Method, Long> o1, final Map.Entry<Method, Long> o2) { + final long d = o1.getValue() - o2.getValue(); + return + d < 0 ? -1 : + d > 0 ? +2 : + o1.getKey().getName().compareTo(o2.getKey().getName()); + } + + private LongValueComparator() { + } + + private static LongValueComparator instance = new LongValueComparator(); + + public static Comparator<Map.Entry<Method, Long>> getInstance() { + return instance; + } +} + +public class PerfTestMapDecode { + + public static final int NUM_OF_TEST_REPETITIONS = 200; + + private static String testFileName; + public static int sum; + + private static Pattern lineSplit = Pattern.compile("\n"); + private static Pattern wordSplit = Pattern.compile("\\s+"); + + public static void main(final String... args) throws Throwable { + testFileName = args[0]; + final List<Method> performanceTestMethods = new ArrayList<Method>(); + for (final Method method : PerfTestMapDecode.class.getMethods()) { + if (method.getAnnotation(PerfTest.class) != null) { + performanceTestMethods.add(method); + } + } + Collections.shuffle(performanceTestMethods); + final Map<Method, Long> results = new HashMap<Method, Long>(); + final List<Integer> sums = new ArrayList<Integer>(); + for (final Method performanceTestMethod : performanceTestMethods) { + sum = 0; + performanceTestMethod.invoke(null); + final long start = System.currentTimeMillis(); + for (int i = 0; i < NUM_OF_TEST_REPETITIONS; i++) { + performanceTestMethod.invoke(null); + } + sums.add(sum); + final long end = System.currentTimeMillis(); + final long time = end - start; + results.put(performanceTestMethod, time); + //System.out.println(sum + " " + performanceTestMethod); + } + final SortedSet<Map.Entry<Method, Long>> sortedResults = new TreeSet<Map.Entry<Method, Long>>(LongValueComparator.getInstance()); + sortedResults.addAll(results.entrySet()); + for (final Map.Entry<Method, Long> result : sortedResults) { + final Method performanceTestMethod = result.getKey(); + final long time = result.getValue(); + System.out.printf("%24s %05dms %s%n", performanceTestMethod.getName(), time, performanceTestMethod.getAnnotation(PerfTest.class).value()); + } + //System.out.println(sums); + } + + @PerfTest("BufferedReader, regionMatches (old)") + public static void old() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + if (line.regionMatches(0, "arch ", 0, 5)) { + state += 1; + } else if (line.regionMatches(0, "endmsg", 0, 6)) { + state += 2; + } else if (line.regionMatches(0, "end", 0, 3)) { + state += 3; + } else if (line.regionMatches(0, "msg", 0, 3)) { + state += 4; + } else if (line.regionMatches(0, "x ", 0, 2)) { + state += 5; + } else if (line.regionMatches(0, "y ", 0, 2)) { + state += 6; + } else if (line.regionMatches(0, "type ", 0, 5)) { + state += 7; + } else if (line.regionMatches(0, "direction ", 0, 10)) { + state += 8; + } else if (line.regionMatches(0, "face ", 0, 5)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, startsWith (current)") + public static void current() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + if (line.startsWith("arch ")) { + state += 1; + } else if (line.startsWith("endmsg")) { + state += 2; + } else if (line.startsWith("end")) { + state += 3; + } else if (line.startsWith("msg")) { + state += 4; + } else if (line.startsWith("x ")) { + state += 5; + } else if (line.startsWith("y ")) { + state += 6; + } else if (line.startsWith("type ")) { + state += 7; + } else if (line.startsWith("direction ")) { + state += 8; + } else if (line.startsWith("face ")) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, word by regex split of java.lang.String") + public static void splitEqualsString() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = line.split("\\s+")[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, word by regex split of java.util.regex.Pattern") + public static void splitEqualsPattern() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = wordSplit.split(line)[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, manual word split using String.indexOf(' ')") + public static void manualEquals() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, manual word split using String.indexOf(' ') using hashCode") + public static void manualEqualsHash() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + final int hash = word.hashCode(); + if ("arch".hashCode() == hash) { + state += 1; + } else if ("endmsg".hashCode() == hash) { + state += 2; + } else if ("end".hashCode() == hash) { + state += 3; + } else if ("msg".hashCode() == hash) { + state += 4; + } else if ("x".hashCode() == hash) { + state += 5; + } else if ("y".hashCode() == hash) { + state += 6; + } else if ("type".hashCode() == hash) { + state += 7; + } else if ("direction".hashCode() == hash) { + state += 8; + } else if ("face".hashCode() == hash) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + private static final int hashArch = "arch".hashCode(); + private static final int hashEndmsg = "endmsg".hashCode(); + private static final int hashEnd = "end".hashCode(); + private static final int hashMsg = "msg".hashCode(); + private static final int hashX = "x".hashCode(); + private static final int hashY = "y".hashCode(); + private static final int hashType = "type".hashCode(); + private static final int hashDirection = "direction".hashCode(); + private static final int hashFace = "face".hashCode(); + + private static final int[] hashes = { + hashArch, + hashEndmsg, + hashEnd, + hashMsg, + hashX, + hashY, + hashType, + hashDirection, + hashFace + }; + + @PerfTest("BufferedReader, manual word split using String.indexOf(' ') using a cached hashCode") + public static void manualEqualsCashedHash() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + final int hash = word.hashCode(); + if (hash == hashArch) { + state += 1; + } else if (hash == hashEndmsg) { + state += 2; + } else if (hash == hashEnd) { + state += 3; + } else if (hash == hashMsg) { + state += 4; + } else if (hash == hashX) { + state += 5; + } else if (hash == hashY) { + state += 6; + } else if (hash == hashType) { + state += 7; + } else if (hash == hashDirection) { + state += 8; + } else if (hash == hashFace) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + + @PerfTest("BufferedReader, manual word split using String.indexOf(' ') using a cached hashCode via switch") + public static void manualEqualsCashedHashSwitch() throws IOException { + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1")); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + final int hash = word.hashCode(); + int hashIndex; + for (hashIndex = 0; hashIndex < hashes.length; hashIndex++) { + if (hashes[hashIndex] == hash) + break; + } + switch (hashIndex) { + case 0: + state += 1; break; + case 1: + state += 2; break; + case 2: + state += 3; break; + case 3: + state += 4; break; + case 4: + state += 5; break; + case 5: + state += 6; break; + case 6: + state += 7; break; + case 7: + state += 8; break; + case 8: + state += 9; break; + } + } + } finally { + in.close(); + } + sum += state; + } + + /*@PerfTest("RandomAccessFile, startsWith") + public static void currentRA() throws IOException { + final RandomAccessFile in = new RandomAccessFile(testFileName, "r"); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + if (line.startsWith("arch ")) { + state += 1; + } else if (line.startsWith("endmsg")) { + state += 2; + } else if (line.startsWith("end")) { + state += 3; + } else if (line.startsWith("msg")) { + state += 4; + } else if (line.startsWith("x ")) { + state += 5; + } else if (line.startsWith("y ")) { + state += 6; + } else if (line.startsWith("type ")) { + state += 7; + } else if (line.startsWith("direction ")) { + state += 8; + } else if (line.startsWith("face ")) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("RandomAccessFile, word by regex split of java.lang.String") + public static void splitEqualsStringRA() throws IOException { + final RandomAccessFile in = new RandomAccessFile(testFileName, "r"); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = line.split("\\s+")[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("RandomAccessFile, word by regex split of java.util.regex.Pattern") + public static void splitEqualsPatternRA() throws IOException { + final RandomAccessFile in = new RandomAccessFile(testFileName, "r"); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = wordSplit.split(line)[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("RandomAccessFile, manual word split using String.indexOf(' ')") + public static void manualEqualsRA() throws IOException { + final RandomAccessFile in = new RandomAccessFile(testFileName, "r"); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("DataInputStream, startsWith (current)") + public static void currentDI() throws IOException { + final DataInputStream in = new DataInputStream(new FileInputStream(testFileName)); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + if (line.startsWith("arch ")) { + state += 1; + } else if (line.startsWith("endmsg")) { + state += 2; + } else if (line.startsWith("end")) { + state += 3; + } else if (line.startsWith("msg")) { + state += 4; + } else if (line.startsWith("x ")) { + state += 5; + } else if (line.startsWith("y ")) { + state += 6; + } else if (line.startsWith("type ")) { + state += 7; + } else if (line.startsWith("direction ")) { + state += 8; + } else if (line.startsWith("face ")) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("DataInputStream, word by regex split of java.lang.String") + public static void splitEqualsStringDI() throws IOException { + final DataInputStream in = new DataInputStream(new FileInputStream(testFileName)); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = line.split("\\s+")[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("DataInputStream, word by regex split of java.util.regex.Pattern") + public static void splitEqualsPatternDI() throws IOException { + final DataInputStream in = new DataInputStream(new FileInputStream(testFileName)); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = wordSplit.split(line)[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("DataInputStream, manual word split using String.indexOf(' ')") + public static void manualEqualsDI() throws IOException { + final DataInputStream in = new DataInputStream(new FileInputStream(testFileName)); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("Buffered DataInputStream, startsWith (current)") + public static void currentBDI() throws IOException { + final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(testFileName))); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + if (line.startsWith("arch ")) { + state += 1; + } else if (line.startsWith("endmsg")) { + state += 2; + } else if (line.startsWith("end")) { + state += 3; + } else if (line.startsWith("msg")) { + state += 4; + } else if (line.startsWith("x ")) { + state += 5; + } else if (line.startsWith("y ")) { + state += 6; + } else if (line.startsWith("type ")) { + state += 7; + } else if (line.startsWith("direction ")) { + state += 8; + } else if (line.startsWith("face ")) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("Buffered DataInputStream, word by regex split of java.lang.String") + public static void splitEqualsStringBDI() throws IOException { + final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(testFileName))); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = line.split("\\s+")[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("Buffered DataInputStream, word by regex split of java.util.regex.Pattern") + public static void splitEqualsPatternBDI() throws IOException { + final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(testFileName))); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final String word = wordSplit.split(line)[0]; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + /*@PerfTest("Buffered DataInputStream, manual word split using String.indexOf(' ')") + public static void manualEqualsBDI() throws IOException { + final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(testFileName))); + int state = 0; + try { + for (String line; (line = in.readLine()) != null;) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + }*/ + + @PerfTest("New File I/O nondirect -> String, manual split of java.lang.String") + public static void nioManual() throws IOException { + int state = 0; + final FileChannel fileChannel = new FileInputStream(testFileName).getChannel(); + final ByteBuffer buffer = ByteBuffer.allocate((int) fileChannel.size()); + fileChannel.read(buffer); + try { + final String file = new String(buffer.array(), 0); + for (String line : lineSplit.split(file)) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + fileChannel.close(); + } + sum += state; + } + + private static final CharsetDecoder decoder = Charset.forName("iso-8859-1").newDecoder(); + + @PerfTest("Mapped File I/O nondirect -> charset, pattern split") + public static void nioChar() throws IOException { + int state = 0; + final FileChannel fileChannel = new FileInputStream(testFileName).getChannel(); + final ByteBuffer buffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size()); + final CharBuffer charBuffer = decoder.decode(buffer); + try { + for (String line : lineSplit.split(charBuffer)) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + fileChannel.close(); + } + sum += state; + } + + @PerfTest("BufferdReader -> StringBuilder, manual split of java.lang.String") + public static void bufReadManBuf() throws IOException { + int state = 0; + final BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(testFileName), "iso-8859-1"), 8192); + try { + final StringBuilder file = new StringBuilder(); + final char[] buf = new char[8192]; + for (int charsRead; (charsRead = in.read(buf)) != -1;) { + file.append(buf, 0, charsRead); + } + for (String line : lineSplit.split(file)) { + line = line.trim(); + final int indexOfSpace = line.indexOf(' '); + final String word = indexOfSpace > 0 ? line.substring(0, indexOfSpace) : line; + if ("arch".equals(word)) { + state += 1; + } else if ("endmsg".equals(word)) { + state += 2; + } else if ("end".equals(word)) { + state += 3; + } else if ("msg".equals(word)) { + state += 4; + } else if ("x".equals(word)) { + state += 5; + } else if ("y".equals(word)) { + state += 6; + } else if ("type".equals(word)) { + state += 7; + } else if ("direction".equals(word)) { + state += 8; + } else if ("face".equals(word)) { + state += 9; + } + } + } finally { + in.close(); + } + sum += state; + } + +} // class PerfTestMapDecode + Property changes on: trunk/teststuff/perfTest/PerfTestMapDecode.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/teststuff/perfTest/foo =================================================================== --- trunk/teststuff/perfTest/foo (rev 0) +++ trunk/teststuff/perfTest/foo 2006-09-23 11:31:03 UTC (rev 363) @@ -0,0 +1,2601 @@ +arch map +name desert_map_0200 +msg +Creator: omega +Date: 2006-05-28 +endmsg +width 24 +height 24 +tile_path_1 /omg_desert/desert_map_0201 +tile_path_2 /omg_desert/desert_map_0300 +tile_path_4 /omg_desert/desert_map_0100 +tile_path_5 /omg_desert/desert_map_0301 +tile_path_8 /omg_desert/desert_map_0101 +end +arch desert.102 +end +arch desert.104 +y 1 +end +arch thorns +y 1 +end +arch desert.102 +y 2 +end +arch thorns +y 2 +end +arch desert.104 +y 3 +end +arch desert.104 +y 4 +end +arch desert.101 +y 5 +end +arch desert.104 +y 6 +end +arch desert.103 +y 7 +end +arch desert.101 +y 8 +end +arch desert.103 +y 9 +end +arch desert.102 +y 10 +end +arch desert.103 +y 11 +end +arch desert.102 +y 12 +end +arch desert.103 +y 13 +end +arch desert.103 +y 14 +end +arch desert.107 +y 15 +end +arch cactus2 +y 15 +end +arch desert.102 +y 16 +end +arch desert.101 +y 17 +end +arch desert.102 +y 18 +end +arch desert.104 +y 19 +end +arch desert.103 +y 20 +end +arch desert.104 +y 21 +end +arch desert.103 +y 22 +end +arch desert.102 +y 23 +end +arch desert.103 +x 1 +end +arch thorns +x 1 +end +arch desert.104 +x 1 +y 1 +end +arch desert.101 +x 1 +y 2 +end +arch desert.102 +x 1 +y 3 +end +arch desert.102 +x 1 +y 4 +end +arch desert.105 +x 1 +y 5 +end +arch desert.103 +x 1 +y 6 +end +arch desert.101 +x 1 +y 7 +end +arch desert.101 +x 1 +y 8 +end +arch desert.101 +x 1 +y 9 +end +arch desert.104 +x 1 +y 10 +end +arch desert.107 +x 1 +y 11 +end +arch desert.101 +x 1 +y 12 +end +arch desert.104 +x 1 +y 13 +end +arch desert.104 +x 1 +y 14 +end +arch desert.105 +x 1 +y 15 +end +arch desert.104 +x 1 +y 16 +end +arch desert.103 +x 1 +y 17 +end +arch desert.101 +x 1 +y 18 +end +arch desert.101 +x 1 +y 19 +end +arch sand_dm1 +x 1 +y 19 +end +arch desert.102 +x 1 +y 20 +end +arch desert.102 +x 1 +y 21 +end +arch desert.104 +x 1 +y 22 +end +arch desert.107 +x 1 +y 23 +end +arch desert.106 +x 2 +end +arch desert.102 +x 2 +y 1 +end +arch desert.104 +x 2 +y 2 +end +arch desert.105 +x 2 +y 3 +end +arch desert.102 +x 2 +y 4 +end +arch desert.101 +x 2 +y 5 +end +arch desert.101 +x 2 +y 6 +end +arch desert.105 +x 2 +y 7 +end +arch desert.103 +x 2 +y 8 +end +arch rock2 +x 2 +y 8 +end +arch desert.103 +x 2 +y 9 +end +arch desert.102 +x 2 +y 10 +end +arch desert.102 +x 2 +y 11 +end +arch desert.104 +x 2 +y 12 +end +arch desert.103 +x 2 +y 13 +end +arch desert.102 +x 2 +y 14 +end +arch desert.102 +x 2 +y 15 +end +arch desert.106 +x 2 +y 16 +end +arch desert.105 +x 2 +y 17 +end +arch desert.102 +x 2 +y 18 +end +arch desert.103 +x 2 +y 19 +end +arch desert.103 +x 2 +y 20 +end +arch desert.105 +x 2 +y 21 +end +arch desert.101 +x 2 +y 22 +end +arch desert.104 +x 2 +y 23 +end +arch desert.102 +x 3 +end +arch desert.106 +x 3 +y 1 +end +arch desert.102 +x 3 +y 2 +end +arch desert.107 +x 3 +y 3 +end +arch cactus1 +x 3 +y 3 +end +arch desert.104 +x 3 +y 4 +end +arch desert.101 +x 3 +y 5 +end +arch desert.101 +x 3 +y 6 +end +arch desert.101 +x 3 +y 7 +end +arch desert.102 +x 3 +y 8 +end +arch desert.102 +x 3 +y 9 +end +arch desert.106 +x 3 +y 10 +end +arch desert.103 +x 3 +y 11 +end +arch desert.103 +x 3 +y 12 +end +arch desert.104 +x 3 +y 13 +end +arch desert.102 +x 3 +y 14 +end +arch desert.102 +x 3 +y 15 +end +arch desert.103 +x 3 +y 16 +end +arch desert.105 +x 3 +y 17 +end +arch desert.102 +x 3 +y 18 +end +arch desert.103 +x 3 +y 19 +end +arch desert.102 +x 3 +y 20 +end +arch desert.102 +x 3 +y 21 +end +arch desert.103 +x 3 +y 22 +end +arch desert.105 +x 3 +y 23 +end +arch desert.103 +x 4 +end +arch desert.103 +x 4 +y 1 +end +arch desert.104 +x 4 +y 2 +end +arch desert.103 +x 4 +y 3 +end +arch desert.102 +x 4 +y 4 +end +arch desert.104 +x 4 +y 5 +end +arch desert.102 +x 4 +y 6 +end +arch desert.103 +x 4 +y 7 +end +arch desert.101 +x 4 +y 8 +end +arch desert.102 +x 4 +y 9 +end +arch desert.102 +x 4 +y 10 +end +arch desert.102 +x 4 +y 11 +end +arch desert.102 +x 4 +y 12 +end +arch desert.101 +x 4 +y 13 +end +arch desert.101 +x 4 +y 14 +end +arch desert.101 +x 4 +y 15 +end +arch desert.102 +x 4 +y 16 +end +arch desert.103 +x 4 +y 17 +end +arch desert.103 +x 4 +y 18 +end +arch desert.101 +x 4 +y 19 +end +arch desert.102 +x 4 +y 20 +end +arch desert.104 +x 4 +y 21 +end +arch stone1 +x 4 +y 21 +end +arch desert.103 +x 4 +y 22 +end +arch desert.102 +x 4 +y 23 +end +arch desert.102 +x 5 +end +arch desert.102 +x 5 +y 1 +end +arch desert.101 +x 5 +y 2 +end +arch desert.102 +x 5 +y 3 +end +arch desert.103 +x 5 +y 4 +end +arch desert.104 +x 5 +y 5 +end +arch desert.101 +x 5 +y 6 +end +arch desert.103 +x 5 +y 7 +end +arch small_stones +x 5 +y 7 +end +arch desert.105 +x 5 +y 8 +end +arch desert.103 +x 5 +y 9 +end +arch desert.104 +x 5 +y 10 +end +arch desert.102 +x 5 +y 11 +end +arch desert.102 +x 5 +y 12 +end +arch desert.106 +x 5 +y 13 +end +arch desert.102 +x 5 +y 14 +end +arch plant22 +x 5 +y 14 +end +arch desert.102 +x 5 +y 15 +end +arch desert.101 +x 5 +y 16 +end +arch desert.103 +x 5 +y 17 +end +arch desert.101 +x 5 +y 18 +end +arch desert.104 +x 5 +y 19 +end +arch desert.102 +x 5 +y 20 +end +arch desert.107 +x 5 +y 21 +end +arch desert.104 +x 5 +y 22 +end +arch desert.102 +x 5 +y 23 +end +arch desert.106 +x 6 +end +arch desert.104 +x 6 +y 1 +end +arch desert.102 +x 6 +y 2 +end +arch desert.107 +x 6 +y 3 +end +arch desert.103 +x 6 +y 4 +end +arch desert.103 +x 6 +y 5 +end +arch desert.104 +x 6 +y 6 +end +arch desert.102 +x 6 +y 7 +end +arch desert.105 +x 6 +y 8 +end +arch desert.104 +x 6 +y 9 +end +arch desert.104 +x 6 +y 10 +end +arch desert.102 +x 6 +y 11 +end +arch desert.104 +x 6 +y 12 +end +arch desert.101 +x 6 +y 13 +end +arch desert.104 +x 6 +y 14 +end +arch desert.101 +x 6 +y 15 +end +arch desert.102 +x 6 +y 16 +end +arch desert.107 +x 6 +y 17 +end +arch desert.105 +x 6 +y 18 +end +arch desert.102 +x 6 +y 19 +end +arch desert.102 +x 6 +y 20 +end +arch desert.102 +x 6 +y 21 +end +arch desert.102 +x 6 +y 22 +end +arch desert.103 +x 6 +y 23 +end +arch desert.103 +x 7 +end +arch desert.107 +x 7 +y 1 +end +arch desert.102 +x 7 +y 2 +end +arch desert.102 +x 7 +y 3 +end +arch desert.102 +x 7 +y 4 +end +arch desert.102 +x 7 +y 5 +end +arch desert.102 +x 7 +y 6 +end +arch desert.105 +x 7 +y 7 +end +arch desert.103 +x 7 +y 8 +end +arch desert.101 +x 7 +y 9 +end +arch desert.104 +x 7 +y 10 +end +arch desert.101 +x 7 +y 11 +end +arch desert.102 +x 7 +y 12 +end +arch desert.102 +x 7 +y 13 +end +arch desert.102 +x 7 +y 14 +end +arch desert.104 +x 7 +y 15 +end +arch desert.101 +x 7 +y 16 +end +arch desert.103 +x 7 +y 17 +end +arch desert.102 +x 7 +y 18 +end +arch desert.101 +x 7 +y 19 +end +arch desert.104 +x 7 +y 20 +end +arch desert.102 +x 7 +y 21 +end +arch desert.102 +x 7 +y 22 +end +arch desert.103 +x 7 +y 23 +end +arch desert.101 +x 8 +end +arch desert.105 +x 8 +y 1 +end +arch desert.102 +x 8 +y 2 +end +arch desert.101 +x 8 +y 3 +end +arch desert.102 +x 8 +y 4 +end +arch desert.102 +x 8 +y 5 +end +arch desert.105 +x 8 +y 6 +end +arch desert.102 +x 8 +y 7 +end +arch desert.103 +x 8 +y 8 +end +arch desert.103 +x 8 +y 9 +end +arch desert.101 +x 8 +y 10 +end +arch desert.101 +x 8 +y 11 +end +arch desert.107 +x 8 +y 12 +end +arch cactus4 +x 8 +y 12 +end +arch desert.102 +x 8 +y 13 +end +arch desert.103 +x 8 +y 14 +end +arch desert.104 +x 8 +y 15 +end +arch desert.101 +x 8 +y 16 +end +arch desert.101 +x 8 +y 17 +end +arch desert.101 +x 8 +y 18 +end +arch desert.102 +x 8 +y 19 +end +arch desert.103 +x 8 +y 20 +end +arch desert.106 +x 8 +y 21 +end +arch desert.103 +x 8 +y 22 +end +arch desert.101 +x 8 +y 23 +end +arch desert.104 +x 9 +end +arch desert.101 +x 9 +y 1 +end +arch desert.101 +x 9 +y 2 +end +arch desert.106 +x 9 +y 3 +end +arch desert.103 +x 9 +y 4 +end +arch desert.106 +x 9 +y 5 +end +arch fmask_ruin1_s2.101 +x 9 +y 5 +end +arch desert.101 +x 9 +y 6 +end +arch desert.107 +x 9 +y 7 +end +arch desert.102 +x 9 +y 8 +end +arch desert.102 +x 9 +y 9 +end +arch desert.101 +x 9 +y 10 +end +arch desert.103 +x 9 +y 11 +end +arch desert.106 +x 9 +y 12 +end +arch desert.105 +x 9 +y 13 +end +arch desert.103 +x 9 +y 14 +end +arch desert.101 +x 9 +y 15 +end +arch desert.101 +x 9 +y 16 +end +arch desert.104 +x 9 +y 17 +end +arch desert.107 +x 9 +y 18 +end +arch cactus5 +x 9 +y 18 +end +arch desert.103 +x 9 +y 19 +end +arch desert.103 +x 9 +y 20 +end +arch desert.101 +x 9 +y 21 +end +arch desert.101 +x 9 +y 22 +end +arch desert.102 +x 9 +y 23 +end +arch desert.101 +x 10 +end +arch desert.103 +x 10 +y 1 +end +arch desert.103 +x 10 +y 2 +end +arch desert.102 +x 10 +y 3 +end +arch desert.104 +x 10 +y 4 +end +arch desert.104 +x 10 +y 5 +end +arch desert.102 +x 10 +y 6 +end +arch desert.105 +x 10 +y 7 +end +arch desert.104 +x 10 +y 8 +end +arch desert.103 +x 10 +y 9 +end +arch desert.101 +x 10 +y 10 +end +arch desert.102 +x 10 +y 11 +end +arch desert.104 +x 10 +y 12 +end +arch desert.103 +x 10 +y 13 +end +arch desert.101 +x 10 +y 14 +end +arch desert.104 +x 10 +y 15 +end +arch desert.105 +x 10 +y 16 +end +arch desert.104 +x 10 +y 17 +end +arch desert.104 +x 10 +y 18 +end +arch desert.103 +x 10 +y 19 +end +arch desert.104 +x 10 +y 20 +end +arch sand_dm2 +x 10 +y 20 +end +arch desert.101 +x 10 +y 21 +end +arch desert.103 +x 10 +y 22 +end +arch desert.107 +x 10 +y 23 +end +arch desert.102 +x 11 +end +arch desert.102 +x 11 +y 1 +end +arch desert.107 +x 11 +y 2 +end +arch cactus3 +x 11 +y 2 +end +arch desert.102 +x 11 +y 3 +end +arch desert.102 +x 11 +y 4 +end +arch desert.104 +x 11 +y 5 +end +arch desert.105 +x 11 +y 6 +end +arch desert.102 +x 11 +y 7 +end +arch desert.102 +x 11 +y 8 +end +arch desert.102 +x 11 +y 9 +end +arch desert.104 +x 11 +y 10 +end +arch wood_pile.101 +x 11 +y 10 +end +arch desert.102 +x 11 +y 11 +end +arch desert.104 +x 11 +y 12 +end +arch wood_pile.101 +x 11 +y 12 +end +arch desert.102 +x 11 +y 13 +end +arch dirt_floor2 +x 11 +y 13 +end +arch desert.104 +x 11 +y 14 +end +arch desert.102 +x 11 +y 15 +end +arch desert.106 +x 11 +y 16 +end +arch desert.103 +x 11 +y 17 +end +arch desert.101 +x 11 +y 18 +end +arch desert.101 +x 11 +y 19 +end +arch desert.103 +x 11 +y 20 +end +arch desert.102 +x 11 +y 21 +end +arch desert.104 +x 11 +y 22 +end +arch desert.102 +x 11 +y 23 +end +arch desert.103 +x 12 +end +arch desert.101 +x 12 +y 1 +end +arch desert.104 +x 12 +y 2 +end +arch desert.103 +x 12 +y 3 +end +arch desert.102 +x 12 +y 4 +end +arch sand_dm1 +x 12 +y 4 +end +arch desert.103 +x 12 +y 5 +end +arch desert.104 +x 12 +y 6 +end +arch desert.103 +x 12 +y 7 +end +arch desert.102 +x 12 +y 8 +end +arch archer +x 12 +y 8 +end +arch desert.102 +x 12 +y 9 +end +arch desert.103 +x 12 +y 10 +end +arch wood_pile.101 +x 12 +y 10 +end +arch desert.102 +x 12 +y 11 +end +arch desert.102 +x 12 +y 12 +end +arch wood_pile.101 +x 12 +y 12 +end +arch desert.102 +x 12 +y 13 +end +arch dirt_floor1 +x 12 +y 13 +end +arch desert.104 +x 12 +y 14 +end +arch dirt_floor3 +x 12 +y 14 +end +arch desert.104 +x 12 +y 15 +end +arch ranger +x 12 +y 15 +end +arch desert.106 +x 12 +y 16 +end +arch desert.102 +x 12 +y 17 +end +arch desert.102 +x 12 +y 18 +end +arch desert.103 +x 12 +y 19 +end +arch desert.107 +x 12 +y 20 +end +arch desert.103 +x 12 +y 21 +end +arch desert.103 +x 12 +y 22 +end +arch desert.102 +x 12 +y 23 +end +arch desert.102 +x 13 +end +arch desert.104 +x 13 +y 1 +end +arch desert.103 +x 13 +y 2 +end +arch desert.101 +x 13 +y 3 +end +arch desert.103 +x 13 +y 4 +end +arch desert.104 +x 13 +y 5 +end +arch desert.101 +x 13 +y 6 +end +arch metal_bucket.101 +x 13 +y 6 +end +arch desert.102 +x 13 +y 7 +end +arch desert.103 +x 13 +y 8 +end +arch box2.101 +x 13 +y 8 +end +arch desert.101 +x 13 +y 9 +end +arch desert.102 +x 13 +y 10 +end +arch desert.101 +x 13 +y 11 +end +arch desert.103 +x 13 +y 12 +end +arch pile_floor2 +x 13 +y 12 +end +arch desert.102 +x 13 +y 13 +end +arch desert.107 +x 13 +y 14 +end +arch desert.103 +x 13 +y 15 +end +arch desert.102 +x 13 +y 16 +end +arch desert.101 +x 13 +y 17 +end +arch desert.103 +x 13 +y 18 +end +arch desert.104 +x 13 +y 19 +end +arch desert.104 +x 13 +y 20 +end +arch desert.103 +x 13 +y 21 +end +arch desert.101 +x 13 +y 22 +end +arch desert.104 +x 13 +y 23 +end +arch desert.102 +x 14 +end +arch desert.107 +x 14 +y 1 +end +arch desert.101 +x 14 +y 2 +end +arch desert.102 +x 14 +y 3 +end +arch desert.102 +x 14 +y 4 +end +arch pile_floor2 +x 14 +y 4 +end +arch desert.103 +x 14 +y 5 +end +arch ranger +x 14 +y 5 +end +arch desert.106 +x 14 +y 6 +end +arch desert.102 +x 14 +y 7 +end +arch desert.103 +x 14 +y 8 +end +arch desert.102 +x 14 +y 9 +end +arch desert.106 +x 14 +y 10 +end +arch desert.103 +x 14 +y 11 +end +arch traveller_wife +x 14 +y 11 +end +arch desert.106 +x 14 +y 12 +end +arch desert.101 +x 14 +y 13 +end +arch desert.104 +x 14 +y 14 +end +arch desert.103 +x 14 +y 15 +end +arch desert.102 +x 14 +y 16 +end +arch desert.104 +x 14 +y 17 +end +arch fmask_ruin1_s1.101 +x 14 +y 17 +end +arch desert.101 +x 14 +y 18 +end +arch desert.101 +x 14 +y 19 +end +arch desert.101 +x 14 +y 20 +end +arch desert.101 +x 14 +y 21 +end +arch desert.103 +x 14 +y 22 +end +arch desert.101 +x 14 +y 23 +end +arch desert.102 +x 15 +end +arch desert.103 +x 15 +y 1 +end +arch desert.104 +x 15 +y 2 +end +arch desert.103 +x 15 +y 3 +end +arch desert.104 +x 15 +y 4 +end +arch desert.102 +x 15 +y 5 +end +arch desert.103 +x 15 +y 6 +end +arch desert.102 +x 15 +y 7 +end +arch dirt_floor1 +x 15 +y 7 +end +arch desert.105 +x 15 +y 8 +end +arch desert.102 +x 15 +y 9 +end +arch desert.104 +x 15 +y 10 +end +arch desert.102 +x 15 +y 11 +end +arch sand_dm1 +x 15 +y 11 +end +arch desert.102 +x 15 +y 12 +end +arch sand_dm5 +x 15 +y 12 +end +arch desert.101 +x 15 +y 13 +end +arch sand_dm2 +x 15 +y 13 +end +arch desert.104 +x 15 +y 14 +end +arch peasant +x 15 +y 14 +end +arch desert.104 +x 15 +y 15 +end +arch pile_floor2 +x 15 +y 15 +end +arch desert.102 +x 15 +y 16 +end +arch desert.101 +x 15 +y 17 +end +arch desert.102 +x 15 +y 18 +end +arch desert.103 +x 15 +y 19 +end +arch desert.101 +x 15 +y 20 +end +arch desert.103 +x 15 +y 21 +end +arch thorns +x 15 +y 21 +end +arch desert.102 +x 15 +y 22 +end +arch desert.104 +x 15 +y 23 +end +arch desert.102 +x 16 +end +arch desert.104 +x 16 +y 1 +end +arch desert.101 +x 16 +y 2 +end +arch desert.102 +x 16 +y 3 +end +arch desert.101 +x 16 +y 4 +end +arch desert.102 +x 16 +y 5 +end +arch desert.104 +x 16 +y 6 +end +arch desert.103 +x 16 +y 7 +end +arch pile_floor2 +x 16 +y 7 +end +arch desert.102 +x 16 +y 8 +end +arch desert.104 +x 16 +y 9 +end +arch desert.104 +x 16 +y 10 +end +arch desert.102 +x 16 +y 11 +end +arch sand_dm7 +x 16 +y 11 +end +arch desert.102 +x 16 +y 12 +end +arch floor_sand_d4 +x 16 +y 12 +end +arch fire_cauld.131 +x 16 +y 12 +end +arch desert.102 +x 16 +y 13 +end +arch sand_dm6 +x 16 +y 13 +end +arch desert.102 +x 16 +y 14 +end +arch desert.103 +x 16 +y 15 +end +arch desert.102 +x 16 +y 16 +end +arch desert.101 +x 16 +y 17 +end +arch desert.102 +x 16 +y 18 +end +arch desert.104 +x 16 +y 19 +end +arch desert.102 +x 16 +y 20 +end +arch desert.104 +x 16 +y 21 +end +arch thorns +x 16 +y 21 +end +arch desert.103 +x 16 +y 22 +end +arch desert.102 +x 16 +y 23 +end +arch desert.102 +x 17 +end +arch desert.102 +x 17 +y 1 +end +arch desert.101 +x 17 +y 2 +end +arch desert.102 +x 17 +y 3 +end +arch desert.103 +x 17 +y 4 +end +arch desert.102 +x 17 +y 5 +end +arch woman_old +x 17 +y 5 +end +arch desert.102 +x 17 +y 6 +end +arch pile_floor2 +x 17 +y 6 +end +arch desert.102 +x 17 +y 7 +end +arch pile_floor3 +x 17 +y 7 +end +arch desert.102 +x 17 +y 8 +end +arch desert.106 +x 17 +y 9 +end +arch desert.103 +x 17 +y 10 +end +arch desert.102 +x 17 +y 11 +end +arch sand_dm4 +x 17 +y 11 +end +arch desert.101 +x 17 +y 12 +end +arch sand_dm8 +x 17 +y 12 +end +arch desert.105 +x 17 +y 13 +end +arch sand_dm3 +x 17 +y 13 +end +arch desert.102 +x 17 +y 14 +end +arch desert.102 +x 17 +y 15 +end +arch desert.102 +x 17 +y 16 +end +arch desert.101 +x 17 +y 17 +end +arch desert.102 +x 17 +y 18 +end +arch desert.102 +x 17 +y 19 +end +arch desert.106 +x 17 +y 20 +end +arch desert.102 +x 17 +y 21 +end +arch desert.102 +x 17 +y 22 +end +arch thorns +x 17 +y 22 +end +arch desert.102 +x 17 +y 23 +end +arch desert.104 +x 18 +end +arch rock_big11 +x 18 +end +arch desert.102 +x 18 +y 1 +end +arch desert.102 +x 18 +y 2 +end +arch desert.104 +x 18 +y 3 +end +arch archer +x 18 +y 3 +end +arch desert.102 +x 18 +y 4 +end +arch desert.107 +x 18 +y 5 +end +arch desert.103 +x 18 +y 6 +end +arch desert.102 +x 18 +y 7 +end +arch dirt_floor3 +x 18 +y 7 +end +arch desert.101 +x 18 +y 8 +end +arch desert.107 +x 18 +y 9 +end +arch desert.102 +x 18 +y 10 +end +arch desert.104 +x 18 +y 11 +end +arch desert.102 +x 18 +y 12 +end +arch desert.103 +x 18 +y 13 +end +arch desert.102 +x 18 +y 14 +end +arch desert.102 +x 18 +y 15 +end +arch grain4.101 +x 18 +y 15 +end +arch desert.102 +x 18 +y 16 +end +arch grain2.101 +x 18 +y 16 +end +arch desert.101 +x 18 +y 17 +end +arch desert.102 +x 18 +y 18 +end +arch desert.101 +x 18 +y 19 +end +arch desert.103 +x 18 +y 20 +end +arch desert.104 +x 18 +y 21 +end +arch desert.101 +x 18 +y 22 +end +arch desert.101 +x 18 +y 23 +end +arch desert.102 +x 19 +end +arch desert.104 +x 19 +y 1 +end +arch desert.102 +x 19 +y 2 +end +arch desert.102 +x 19 +y 3 +end +arch desert.101 +x 19 +y 4 +end +arch desert.101 +x 19 +y 5 +end +arch desert.102 +x 19 +y 6 +end +arch desert.102 +x 19 +y 7 +end +arch straw2.111 +x 19 +y 7 +end +arch desert.103 +x 19 +y 8 +end +arch desert.102 +x 19 +y 9 +end +arch desert.104 +x 19 +y 10 +end +arch desert.101 +x 19 +y 11 +end +arch barrel_water.101 +x 19 +y 11 +end +arch desert.103 +x 19 +y 12 +end +arch barrel.101 +x 19 +y 12 +end +arch desert.102 +x 19 +y 13 +end +arch water_floor +x 19 +y 13 +end +arch desert.102 +x 19 +y 14 +end +arch desert.102 +x 19 +y 15 +end +arch grain1.101 +x 19 +y 15 +end +arch desert.107 +x 19 +y 16 +end +arch desert.104 +x 19 +y 17 +end +arch desert.102 +x 19 +y 18 +end +arch desert.103 +x 19 +y 19 +end +arch desert.101 +x 19 +y 20 +end +arch desert.104 +x 19 +y 21 +end +arch desert.104 +x 19 +y 22 +end +arch desert.104 +x 19 +y 23 +end +arch desert.102 +x 20 +end +arch desert.102 +x 20 +y 1 +end +arch desert.102 +x 20 +y 2 +end +arch desert.104 +x 20 +y 3 +end +arch desert.104 +x 20 +y 4 +end +arch desert.104 +x 20 +y 5 +end +arch desert.102 +x 20 +y 6 +end +arch desert.101 +x 20 +y 7 +end +arch straw2.111 +x 20 +y 7 +end +arch desert.101 +x 20 +y 8 +end +arch straw2.111 +x 20 +y 8 +end +arch desert.103 +x 20 +y 9 +end +arch desert.101 +x 20 +y 10 +end +arch keg_big.101 +x 20 +y 10 +end +arch desert.105 +x 20 +y 11 +end +arch box2.101 +x 20 +y 11 +end +arch desert.102 +x 20 +y 12 +end +arch box1.101 +x 20 +y 12 +end +arch desert.102 +x 20 +y 13 +end +arch desert.102 +x 20 +y 14 +end +arch desert.104 +x 20 +y 15 +end +arch desert.104 +x 20 +y 16 +end +arch desert.102 +x 20 +y 17 +end +arch desert.104 +x 20 +y 18 +end +arch desert.102 +x 20 +y 19 +end +arch desert.101 +x 20 +y 20 +end +arch desert.102 +x 20 +y 21 +end +arch desert.102 +x 20 +y 22 +end +arch desert.102 +x 20 +y 23 +end +arch desert.102 +x 21 +end +arch desert.102 +x 21 +y 1 +end +arch desert.107 +x 21 +y 2 +end +arch desert.102 +x 21 +y 3 +end +arch desert.102 +x 21 +y 4 +end +arch desert.103 +x 21 +y 5 +end +arch fmask_ruin1_s4.101 +x 21 +y 5 +end +arch desert.104 +x 21 +y 6 +end +arch desert.101 +x 21 +y 7 +end +arch desert.102 +x 21 +y 8 +end +arch desert.103 +x 21 +y 9 +end +arch desert.102 +x 21 +y 10 +end +arch desert.102 +x 21 +y 11 +end +arch desert.103 +x 21 +y 12 +end +arch desert.101 +x 21 +y 13 +end +arch desert.103 +x 21 +y 14 +end +arch desert.102 +x 21 +y 15 +end +arch desert.101 +x 21 +y 16 +end +arch desert.101 +x 21 +y 17 +end +arch desert.101 +x 21 +y 18 +end +arch desert.102 +x 21 +y 19 +end +arch desert.102 +x 21 +y 20 +end +arch desert.104 +x 21 +y 21 +end +arch desert.103 +x 21 +y 22 +end +arch stone5 +x 21 +y 22 +end +arch desert.102 +x 21 +y 23 +end +arch desert.104 +x 22 +end +arch desert.103 +x 22 +y 1 +end +arch desert.104 +x 22 +y 2 +end +arch desert.104 +x 22 +y 3 +end +arch small_stones +x 22 +y 3 +end +arch desert.104 +x 22 +y 4 +end +arch desert.104 +x 22 +y 5 +end +arch desert.102 +x 22 +y 6 +end +arch desert.101 +x 22 +y 7 +end +arch desert.101 +x 22 +y 8 +end +arch desert.102 +x 22 +y 9 +end +arch desert.102 +x 22 +y 10 +end +arch desert.101 +x 22 +y 11 +end +arch desert.104 +x 22 +y 12 +end +arch sand_dm2 +x 22 +y 12 +end +arch desert.106 +x 22 +y 13 +end +arch desert.102 +x 22 +y 14 +end +arch desert.101 +x 22 +y 15 +end +arch desert.103 +x 22 +y 16 +end +arch desert.103 +x 22 +y 17 +end +arch desert.102 +x 22 +y 18 +end +arch desert.101 +x 22 +y 19 +end +arch rock_big7 +x 22 +y 19 +end +arch desert.104 +x 22 +y 20 +end +arch desert.101 +x 22 +y 21 +end +arch desert.104 +x 22 +y 22 +end +arch desert.103 +x 22 +y 23 +end +arch desert.105 +x 23 +end +arch desert.104 +x 23 +y 1 +end +arch desert.106 +x 23 +y 2 +end +arch desert.101 +x 23 +y 3 +end +arch desert.103 +x 23 +y 4 +end +arch desert.102 +x 23 +y 5 +end +arch desert.105 +x 23 +y 6 +end +arch desert.102 +x 23 +y 7 +end +arch desert.105 +x 23 +y 8 +end +arch desert.103 +x 23 +y 9 +end +arch desert.104 +x 23 +y 10 +end +arch desert.103 +x 23 +y 11 +end +arch desert.101 +x 23 +y 12 +end +arch desert.104 +x 23 +y 13 +end +arch desert.103 +x 23 +y 14 +end +arch desert.101 +x 23 +y 15 +end +arch desert.106 +x 23 +y 16 +end +arch desert.101 +x 23 +y 17 +end +arch desert.102 +x 23 +y 18 +end +arch desert.102 +x 23 +y 19 +end +arch desert.103 +x 23 +y 20 +end +arch desert.104 +x 23 +y 21 +end +arch desert.101 +x 23 +y 22 +end +arch desert.103 +x 23 +y 23 +end +arch tent_small +x 11 +y 10 +end +arch tent_small +x 12 +y 6 +end +arch tent_small2 +x 15 +y 3 +end +arch tent_large2 +x 15 +y 8 +end +arch tent_small2 +x 15 +y 16 +end +arch tent_large2 +x 16 +y 8 +end +arch tent_large2 +x 17 +y 8 +end +arch tent_small2 +x 17 +y 17 +end +arch tent_small2 +x 18 +y 4 +end +arch tent_small +x 19 +y 13 +end +arch rock_big9 +x 19 +y 20 +end +arch tent_small +x 20 +y 8 +end Property changes on: trunk/teststuff/perfTest/foo ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/teststuff/perfTest/foo2 =================================================================== --- trunk/teststuff/perfTest/foo2 (rev 0) +++ trunk/teststuff/perfTest/foo2 2006-09-23 11:31:03 UTC (rev 363) @@ -0,0 +1,59823 @@ +arch map +name desert_map_0200 +msg +Creator: omega +Date: 2006-05-28 +endmsg +width 24 +height 24 +tile_path_1 /omg_desert/desert_map_0201 +tile_path_2 /omg_desert/desert_map_0300 +tile_path_4 /omg_desert/desert_map_0... [truncated message content] |
From: <chr...@us...> - 2006-09-23 11:13:06
|
Revision: 362 http://svn.sourceforge.net/gridarta/?rev=362&view=rev Author: christianhujer Date: 2006-09-23 04:12:58 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fixed encoding of message.properties Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-09-23 06:33:20 UTC (rev 361) +++ trunk/daimonin/src/daieditor/messages.properties 2006-09-23 11:12:58 UTC (rev 362) @@ -213,7 +213,7 @@ mapTilesClear.text=Clear Paths mapTilesClear.shortdescription=Clear all path names mapShrink.title=Confirm shrinking map -mapShrink.message=You selected a new map size of {0,number,integer} � {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? +mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? mapHelp.text=Help mapOkay.text=Ok mapRestore.text=Restore @@ -241,7 +241,7 @@ mapErrorArchOutOfGrid.title=Arch out of map mapErrorArchOutOfGrid.message=Removing arch out of map bounds mapErrorDifferentSize.title=Different size -mapErrorDifferentSize.message=The maps you''re attaching have different sizes.\n{0} has size {1} � {2}, while\n{3} has size {4} � {5}.\nThis is hazardous for server and client and MUST BE FIXED! +mapErrorDifferentSize.message=The maps you''re attaching have different sizes.\n{0} has size {1} \xD7 {2}, while\n{3} has size {4} \xD7 {5}.\nThis is hazardous for server and client and MUST BE FIXED! mapMapTabTitle=Map properties mapTilesTabTitle=Map tiles mapTilesNoMapFileNoMapTilePane.title=Map tiles card unavailable @@ -786,7 +786,7 @@ about.mnemonic=A about.title=About Gridarta for Daimonin -about=<html><h1 align="center">Gridarta for Daimonin</h1><p>Editor for Daimonin MMORPG maps and arches</p><table><tr><td valign="top" align="right" width="50%">Copyright � 2001-2006</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Build number:</td><td>{1}</td></tr><tr><td align="right">by:</td><td>{2}</td></tr><tr><td align="right">at:</td><td>{3}</td></tr></table></html> +about=<html><h1 align="center">Gridarta for Daimonin</h1><p>Editor for Daimonin MMORPG maps and arches</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2006</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Build number:</td><td>{1}</td></tr><tr><td align="right">by:</td><td>{2}</td></tr><tr><td align="right">at:</td><td>{3}</td></tr></table></html> aboutTab.title=About license.text=License... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 06:33:29
|
Revision: 361 http://svn.sourceforge.net/gridarta/?rev=361&view=rev Author: akirschbaum Date: 2006-09-22 23:33:20 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:28:35 UTC (rev 360) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:33:20 UTC (rev 361) @@ -591,9 +591,9 @@ /** * Sort the temp list of arches, placing all multiparts at the end. * This is neccessary to assure multiparts are always on top. - * Note: This method assumes that all pieces of one multipart are - * listed in a row. (Which is okay as long as the loader puts it that way.) - * @param objects list of arches + * @param objects list of objects + * @note This method assumes that all pieces of one multipart are listed in + * a row, which is okay as long as the loader puts it that way. */ public static void sortTempList(final List<ArchObject> objects) { final Comparator<ArchObject> sorter = new Comparator<ArchObject>() { Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-23 06:28:35 UTC (rev 360) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-23 06:33:20 UTC (rev 361) @@ -586,7 +586,6 @@ * @param objects list of objects * @note This method assumes that all pieces of one multipart are listed in * a row, which is okay as long as the loader puts it that way. - * @note The returned list is the same list, not a new list. */ public static void sortTempList(final List<ArchObject> objects) { final Comparator<ArchObject> sorter = new Comparator<ArchObject>() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 06:28:41
|
Revision: 360 http://svn.sourceforge.net/gridarta/?rev=360&view=rev Author: akirschbaum Date: 2006-09-22 23:28:35 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Remove useless return value from ArchObjectParser.sortTempList(). Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-23 06:19:51 UTC (rev 359) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-23 06:28:35 UTC (rev 360) @@ -996,8 +996,8 @@ return null; } - final List<ArchObject> sortedObjects = ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) - control = newLevel(sortedObjects, maparch, show, initial); // init the map + ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) + control = newLevel(objects, maparch, show, initial); // init the map if (show) { // finally, show the map and refresh toolbars Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-23 06:19:51 UTC (rev 359) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-23 06:28:35 UTC (rev 360) @@ -147,8 +147,8 @@ if (!mainControl.collectTempList(objects, mapFile)) { // get face names, face id, etc. return false; } - final List<ArchObject> sortedObjects = ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) - bmapview = newPickmap(sortedObjects, maparch, mapFile); // init the map + ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) + bmapview = newPickmap(objects, maparch, mapFile); // init the map } // looks like it worked, so we add a panel and display this pickmap Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:19:51 UTC (rev 359) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:28:35 UTC (rev 360) @@ -594,10 +594,8 @@ * Note: This method assumes that all pieces of one multipart are * listed in a row. (Which is okay as long as the loader puts it that way.) * @param objects list of arches - * @return the sorting might eventually change the starting - * arch. Therefore, the new start arch is returned. */ - public static List<ArchObject> sortTempList(final List<ArchObject> objects) { + public static void sortTempList(final List<ArchObject> objects) { final Comparator<ArchObject> sorter = new Comparator<ArchObject>() { public int compare(final ArchObject o1, final ArchObject o2) { final boolean b1 = o1.isMulti(); @@ -606,7 +604,6 @@ } }; Collections.sort(objects, sorter); - return objects; } } // class ArchObjectParser This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |