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: <aki...@us...> - 2006-09-23 06:19:55
|
Revision: 359 http://svn.sourceforge.net/gridarta/?rev=359&view=rev Author: akirschbaum Date: 2006-09-22 23:19:51 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Replace String.regionMatches() by String.startsWith(). 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-23 06:11:26 UTC (rev 358) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:19:51 UTC (rev 359) @@ -225,7 +225,7 @@ while (thisLine2 != null) { final String thisLine = thisLine2.trim(); - if (thisLine.regionMatches(0, "#", 0, 1)) { + if (thisLine.startsWith("#")) { // skip comments thisLine2 = in.readLine(); continue; @@ -233,12 +233,12 @@ if (!parsearch) { - if (thisLine.regionMatches(0, "More", 0, 4)) { + if (thisLine.startsWith("More")) { if (firstArch == null) { firstArch = archlast; } archmore = true; - } else if (thisLine.regionMatches(0, "Object", 0, 6)) { + } else if (thisLine.startsWith("Object")) { if (arch == null) { arch = new ArchObject(); } @@ -256,13 +256,13 @@ } } else { if (msgflag) { - if (thisLine.regionMatches(0, "endmsg", 0, 6)) { + if (thisLine.startsWith("endmsg")) { msgflag = false; } else { arch.addMsgText(thisLine2 + "\n"); // thisLine2 allows leading whitespaces } } else if (animflag) { - if (thisLine.regionMatches(0, "mina", 0, 4)) { + if (thisLine.startsWith("mina")) { mainControl.getAnimationObject().addAnimObject(arch.getArchName(), arch.getAnimText()); arch.addArchText("animation " + arch.getArchName() + "\n"); @@ -273,14 +273,14 @@ arch.addAnimText(thisLine + "\n"); } } else if (loreflag) { - if (thisLine.regionMatches(0, "endlore", 0, 7)) { + if (thisLine.startsWith("endlore")) { loreflag = false; } else { arch.addLoreText(thisLine + "\n"); } - } else if (thisLine.regionMatches(0, "Object", 0, 6)) { + } else if (thisLine.startsWith("Object")) { log.error("Find inventory Object in def arch: " + thisLine); - } else if (thisLine.regionMatches(0, "end", 0, 3)) { + } else if (thisLine.startsWith("end")) { //if (arch.getArchTypNr() == 0) { if (log.isDebugEnabled()) { log.debug("Arch " + arch.getArchName() + " has no type info!"); @@ -351,45 +351,45 @@ archlast = arch; arch = null; } else { - if (thisLine.regionMatches(0, "msg", 0, 3)) { + if (thisLine.startsWith("msg")) { msgflag = true; - } else if (thisLine.regionMatches(0, "animation", 0, 9)) { + } else if (thisLine.startsWith("animation")) { arch.addArchText(thisLine + "\n"); - } else if (thisLine.regionMatches(0, "anim_speed", 0, 10)) { + } else if (thisLine.startsWith("anim_speed")) { arch.addArchText(thisLine + "\n"); - } else if (thisLine.regionMatches(0, "anim", 0, 4)) { + } else if (thisLine.startsWith("anim")) { animflag = true; } else if (thisLine.equals("lore")) { loreflag = true; - } else if (thisLine.regionMatches(0, "visibility ", 0, 11)) { + } else if (thisLine.startsWith("visibility ")) { if (log.isDebugEnabled()) { log.debug("Remove visibility: " + arch.getArchName()); } - } else if (thisLine.regionMatches(0, "magicmap ", 0, 9)) { + } else if (thisLine.startsWith("magicmap ")) { if (log.isDebugEnabled()) { log.debug("Remove magicmap: " + arch.getArchName()); } - } else if (thisLine.regionMatches(0, "color_fg ", 0, 9)) { + } else if (thisLine.startsWith("color_fg ")) { if (log.isDebugEnabled()) { log.debug("Remove color_fg: " + arch.getArchName()); } - } else if (thisLine.regionMatches(0, "color_bg ", 0, 9)) { + } else if (thisLine.startsWith("color_bg ")) { if (log.isDebugEnabled()) { log.debug("Remove color_bg: " + arch.getArchName()); } - } else if (thisLine.regionMatches(0, "x ", 0, 2)) { + } else if (thisLine.startsWith("x ")) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { log.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } arch.setMultiX(Integer.parseInt(thisLine.substring(2))); - } else if (thisLine.regionMatches(0, "y ", 0, 2)) { + } else if (thisLine.startsWith("y ")) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { log.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } arch.setMultiY(Integer.parseInt(thisLine.substring(2))); - } else if (thisLine.regionMatches(0, "type ", 0, 5)) { + } else if (thisLine.startsWith("type ")) { try { final int i = Integer.parseInt(thisLine.substring(5)); arch.setArchTypNr(i); @@ -400,7 +400,7 @@ log.warn("Arch " + arch.getArchName() + " has a invalid type nr. (" + thisLine.substring(5) + ")"); arch.addArchText(thisLine + "\n"); } - } else if (thisLine.regionMatches(0, "face ", 0, 5)) { + } else if (thisLine.startsWith("face ")) { int x; for (x = 4; x < thisLine.length(); x++) { if (thisLine.charAt(x) != ' ') { 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:11:33
|
Revision: 358 http://svn.sourceforge.net/gridarta/?rev=358&view=rev Author: akirschbaum Date: 2006-09-22 23:11:26 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Fix type in comment. 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-23 06:01:11 UTC (rev 357) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-23 06:11:26 UTC (rev 358) @@ -344,7 +344,7 @@ // if this arch was from Artifacts file - return here: if (archName != null) { arch.setArtifact(true); - // here we add all unchanged arch text lines from def_arch back to arch + // here we add all unchanged arch text lines from defArch back to arch arch.addArchText(arch.diffArchText(defArch.getArchText(), true)); return arch; } 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:01:19
|
Revision: 357 http://svn.sourceforge.net/gridarta/?rev=357&view=rev Author: akirschbaum Date: 2006-09-22 23:01:11 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Add spaces around binary operators. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileDecode.java Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-23 05:54:34 UTC (rev 356) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-23 06:01:11 UTC (rev 357) @@ -178,7 +178,7 @@ arch.addMsgText(thisLine2 + "\n"); } } else if (animflag) { - //arch.addArchText(thisLine+"\n"); + //arch.addArchText(thisLine + "\n"); if (thisLine.regionMatches(0, "mina", 0, 4)) { animflag = false; } else { // we not include anim yet in panel @@ -205,7 +205,7 @@ } return arch; } else if (thisLine.regionMatches(0, "msg", 0, 3)) { - // arch.addArchText(thisLine+"\n"); + // arch.addArchText(thisLine + "\n"); arch.addMsgText(""); // this init the msg text buffer // in the case of msg/endmsg // with no content to overrule def msg @@ -216,7 +216,7 @@ } else if (thisLine.regionMatches(0, "anim_speed", 0, 10)) { arch.addArchText(thisLine + "\n"); } else if (thisLine.regionMatches(0, "anim", 0, 4)) { - //arch.addArchText(thisLine+"\n"); + //arch.addArchText(thisLine + "\n"); animflag = true; } else if (thisLine.startsWith("event_")) { // here's something about a scripted event Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-23 05:54:34 UTC (rev 356) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-23 06:01:11 UTC (rev 357) @@ -150,15 +150,15 @@ // ok, we had a full arch... don't care here about map or object // now we test for a new arch - thats stuf in inventory // or the end... thats the end of this shit - //System.err.println("GO INVENTORY: "+arch+" - "+thisLine); + //System.err.println("GO INVENTORY: " + arch + " - " + thisLine); arch.addLast(readArch(myInput, thisLine)); - //System.err.println("GO INVENTORY2: "+arch+" - "+thisLine); + //System.err.println("GO INVENTORY2: " + arch + " - " + thisLine); } else if (thisLine.startsWith("end")) { // chain this to temp list objects.add(arch); archflag = false; - // System.err.println("LEAVE!: "+arch+" - "+thisLine); + // System.err.println("LEAVE!: " + arch + " - " + thisLine); return arch; } else if (thisLine.startsWith("msg")) { arch.addMsgText(""); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-23 05:54:38
|
Revision: 356 http://svn.sourceforge.net/gridarta/?rev=356&view=rev Author: akirschbaum Date: 2006-09-22 22:54:34 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Remove debug output to console when saving maps. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileEncode.java Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-22 19:21:04 UTC (rev 355) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-23 05:54:34 UTC (rev 356) @@ -92,7 +92,6 @@ for (final ArchObject node : square) { // search only for heads! if (node.getMultiRefCount() > 0 && node.getMapMultiHead() == null) { - System.out.println(node.getArchName()); /* old version: Both heads and tails got written into the mapfile for(multi=node;;) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 19:21:08
|
Revision: 355 http://svn.sourceforge.net/gridarta/?rev=355&view=rev Author: akirschbaum Date: 2006-09-22 12:21:04 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapFileEncode.java Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-22 18:46:45 UTC (rev 354) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-22 19:21:04 UTC (rev 355) @@ -70,7 +70,7 @@ * @param mapModel the MapModel to encode */ public void encodeMapFile(@NotNull final File file, final MapModel mapModel) throws FileNotFoundException, IOException { - final MapArchObject map = mapModel.getMapArchObject(); + final MapArchObject mapArch = mapModel.getMapArchObject(); try { fname = file.getAbsolutePath(); @@ -78,10 +78,10 @@ //ArchObject multi; // write map header: map arch - map.writeMapArch(bufferedWriter); + mapArch.writeMapArch(bufferedWriter); // first, write all one tile parts - final Size2D mapSize = map.getMapSize(); + final Size2D mapSize = mapArch.getMapSize(); final Point pos = new Point(); for (pos.x = 0; pos.x < mapSize.getWidth(); pos.x++) { for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 18:46:50
|
Revision: 354 http://svn.sourceforge.net/gridarta/?rev=354&view=rev Author: akirschbaum Date: 2006-09-22 11:46:45 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Fix typo in variable name. Modified Paths: -------------- trunk/daimonin/src/daieditor/map/MapControl.java Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-22 07:31:42 UTC (rev 353) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-22 18:46:45 UTC (rev 354) @@ -527,7 +527,7 @@ // check if all spaces are free that the multi will occupy boolean allSpacesFree = true; final Point d = new Point(); - for (d.x = p.x; d.x - p.y <= newarch.getRefMaxX(); d.x++) { + for (d.x = p.x; d.x - p.x <= newarch.getRefMaxX(); d.x++) { for (d.y = p.y; d.y - p.y <= newarch.getRefMaxY(); d.y++) { if (!isPointValid(d) || !mapModel.getMapSquare(d).isEmpty()) { allSpacesFree = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 07:31:47
|
Revision: 353 http://svn.sourceforge.net/gridarta/?rev=353&view=rev Author: akirschbaum Date: 2006-09-22 00:31:42 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Fix incorrect indentation. 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-22 07:30:15 UTC (rev 352) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-22 07:31:42 UTC (rev 353) @@ -415,7 +415,8 @@ if (!newCat.equals(oldCat)) { isNewCategory = true; // this arch has a new category } - }arch.addArchText(thisLine + "\n"); + } + arch.addArchText(thisLine + "\n"); if (log.isDebugEnabled()) { log.debug("add String: " + thisLine); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 07:30:24
|
Revision: 352 http://svn.sourceforge.net/gridarta/?rev=352&view=rev Author: akirschbaum Date: 2006-09-22 00:30:15 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Unify string/char/int constants. 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-22 07:23:08 UTC (rev 351) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-22 07:30:15 UTC (rev 352) @@ -447,7 +447,7 @@ boolean scriptflag = false; for (int i = 0, s = 0; i < len; i++) { - if (text.charAt(i) == 0x0a) { + if (text.charAt(i) == '\n') { if (i - s > 0) { if (scriptflag) { arch.addArchText(text.substring(s, i) + "\n"); @@ -506,7 +506,7 @@ arch.resetArchText(); for (int i = 0, s = 0; i < len; i++) { - if (text.charAt(i) == 0x0a) { + if (text.charAt(i) == '\n') { if (i - s > 0) { if (text.regionMatches(s, "name ", 0, 5)) { arch.setObjName(text.substring(s + 5, i)); Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-22 07:23:08 UTC (rev 351) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-22 07:30:15 UTC (rev 352) @@ -192,7 +192,7 @@ if (thisLine.startsWith("endmsg")) { msgflag = false; } else { - arch.addMsgText(thisLine2 + '\n'); // thisLine2 allows leading whitespaces + arch.addMsgText(thisLine2 + "\n"); // thisLine2 allows leading whitespaces } } else if (animflag) { if (thisLine.startsWith("mina")) { @@ -204,14 +204,14 @@ log.log(Level.WARNING, "duplicateAnimation", e); } - arch.addArchText("animation " + arch.getArchName() + '\n'); + arch.addArchText("animation " + arch.getArchName() + "\n"); arch.setAnimName(arch.getArchName()); // here we must add this to AnimationObject // and add Animation cmd here! animflag = false; } else { - animText.append(thisLine).append('\n'); + animText.append(thisLine).append("\n"); } } else if (thisLine.startsWith("Object")) { log.log(Level.WARNING, "inventoryInDefArch", thisLine); @@ -308,12 +308,12 @@ if (thisLine.startsWith("msg")) { msgflag = true; } else if (thisLine.startsWith("animation ")) { - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); final String animName = thisLine.substring(10).trim(); arch.setAnimName(animName); //arch.setAnimNr(mainControl.animationObjects.findAnimObject(animName)); // probably not needed, but better not delete it yet } else if (thisLine.startsWith("anim_speed ")) { - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } else if (thisLine.startsWith("anim")) { animflag = true; animText = new StringBuilder(); @@ -328,13 +328,13 @@ } else if (thisLine.startsWith("x ")) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"x", arch.getArchName()}); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } arch.setRefX(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.startsWith("y ")) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"y", arch.getArchName()}); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } arch.setRefY(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.startsWith("type ")) { @@ -346,7 +346,7 @@ } } catch (final NumberFormatException e) { log.log(Level.WARNING, "defArchWithInvalidTypeNr", new Object[]{arch.getArchName(), thisLine.substring(5)}); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } } else if (thisLine.startsWith("direction ")) { try { @@ -354,7 +354,7 @@ } catch (final NumberFormatException e) { log.log(Level.WARNING, "defArchWithInvalidDirection", new Object[]{arch.getArchName(), thisLine.substring(10)}); } - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } else if (thisLine.startsWith("face ")) { int x; for (x = 4; x < thisLine.length(); x++) { @@ -363,7 +363,7 @@ } } arch.setFaceRealName(thisLine.substring(x, thisLine.length())); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } else if (thisLine.startsWith("editor_folder ")) { // the display category (= "folder" the arch belongs to) newCat = thisLine.substring(14).trim(); @@ -381,7 +381,7 @@ } } catch (final NumberFormatException e) { System.err.println("WARNING: Arch " + arch.getArchName() + " has a invalid mpart_id (" + thisLine.substring(9) + ')'); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } } else if (thisLine.startsWith("mpart_nr ")) { // part nr for multiparts @@ -390,10 +390,10 @@ arch.setMultiPartNr(i); } catch (final NumberFormatException e) { System.err.println("WARNING: Arch " + arch.getArchName() + " has a invalid mpart_nr (" + thisLine.substring(9) + ')'); - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } } else { - arch.addArchText(thisLine + '\n'); + arch.addArchText(thisLine + "\n"); } //System.err.println("add String: "+thisLine); } @@ -424,19 +424,19 @@ if (text.charAt(i) == '\n') { if (i - s > 0) { if (scriptflag) { - arch.addArchText(text.substring(s, i) + '\n'); + arch.addArchText(text.substring(s, i) + "\n"); if (text.regionMatches(s, "end_script_", 0, 11)) { scriptflag = false; } } else if (text.regionMatches(s, "start_script_", 0, 13)) { - arch.addArchText(text.substring(s, i) + '\n'); + arch.addArchText(text.substring(s, i) + "\n"); scriptflag = true; } else if (text.regionMatches(s, "editable ", 0, 9)) { arch.setEditType(Integer.parseInt(text.substring(s + 9, i))); } else if (text.regionMatches(s, "name ", 0, 5)) { arch.setObjName(text.substring(s + 5, i)); } else { - arch.addArchText(text.substring(s, i) + '\n'); + arch.addArchText(text.substring(s, i) + "\n"); } } @@ -486,12 +486,12 @@ if (i - s > 0) { if (text.regionMatches(s, "animation ", 0, 9)) { arch.setAnimName(text.substring(s + 10, i)); - arch.addArchText(text.substring(s, i) + '\n'); + arch.addArchText(text.substring(s, i) + "\n"); } else if (text.regionMatches(s, "name ", 0, 5)) { arch.setObjName(text.substring(s + 5, i)); } else { // this is an unparsed arch attribute, it has to stay in the archtext - arch.addArchText(text.substring(s, i) + '\n'); + arch.addArchText(text.substring(s, i) + "\n"); } } s = i + 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 07:23:12
|
Revision: 351 http://svn.sourceforge.net/gridarta/?rev=351&view=rev Author: akirschbaum Date: 2006-09-22 00:23:08 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Whitespace change to unify comment. 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-22 07:19:15 UTC (rev 350) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-22 07:23:08 UTC (rev 351) @@ -183,11 +183,11 @@ /** * Here we take a default arch from a filestream, parses the data and * put the result on the arch stack in CMainControl. - * @param in <code>BufferedReader</code> file stream of arch data + * @param in <code>BufferedReader</code> file stream of arch data * @param defArch default arch (only for artifacts) - * @param line first line, pre-parsed (only for artifacts) + * @param line first line, pre-parsed (only for artifacts) * @param archName arch-object name (only for artifacts) - * @param index current index on the ArchPanel + * @param index current index on the ArchPanel */ @Nullable public ArchObject parseDefArchFromStream(final BufferedReader in, final ArchObject defArch, final String line, final String archName, int index) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 07:19:25
|
Revision: 350 http://svn.sourceforge.net/gridarta/?rev=350&view=rev Author: akirschbaum Date: 2006-09-22 00:19:15 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Rename variable names. 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-22 07:12:46 UTC (rev 349) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-22 07:19:15 UTC (rev 350) @@ -176,21 +176,21 @@ } } - public void parseDefArchFromStream(final BufferedReader myInput, final int index) { - parseDefArchFromStream(myInput, null, null, null, index); + public void parseDefArchFromStream(final BufferedReader in, final int index) { + parseDefArchFromStream(in, null, null, null, index); } /** * Here we take a default arch from a filestream, parses the data and * put the result on the arch stack in CMainControl. - * @param myInput <code>BufferedReader</code> file stream of arch data + * @param in <code>BufferedReader</code> file stream of arch data * @param defArch default arch (only for artifacts) * @param line first line, pre-parsed (only for artifacts) * @param archName arch-object name (only for artifacts) * @param index current index on the ArchPanel */ @Nullable - public ArchObject parseDefArchFromStream(final BufferedReader myInput, final ArchObject defArch, final String line, final String archName, int index) { + public ArchObject parseDefArchFromStream(final BufferedReader in, final ArchObject defArch, final String line, final String archName, int index) { //Open the file for reading try { @@ -207,7 +207,7 @@ String thisLine2; if (line == null) { - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); } else { thisLine2 = line; // pre read "Object" from artifacts file loader } @@ -227,7 +227,7 @@ if (thisLine.regionMatches(0, "#", 0, 1)) { // skip comments - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); continue; } @@ -421,7 +421,7 @@ } } } - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); } // while loop ends here } catch (final IOException e) { log.error("Error: ", e); Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-22 07:12:46 UTC (rev 349) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-22 07:19:15 UTC (rev 350) @@ -76,12 +76,12 @@ public void parseDefArch(final String fname, final int index) { //Open the file for reading try { - final BufferedReader myInput = new BufferedReader(new FileReader(fname)); + final BufferedReader in = new BufferedReader(new FileReader(fname)); try { // do the actual parsing - parseDefArchFromStream(myInput, index, fname); + parseDefArchFromStream(in, index, fname); } finally { - myInput.close(); + in.close(); } } catch (final FileNotFoundException e) { log.log(Level.WARNING, "archfileNotFound", fname); @@ -90,14 +90,14 @@ } } - public void parseDefArchFromStream(final BufferedReader myInput, final int index, final String fname) throws IOException { - parseDefArchFromStream(myInput, null, null, null, index, fname); + public void parseDefArchFromStream(final BufferedReader in, final int index, final String fname) throws IOException { + parseDefArchFromStream(in, null, null, null, index, fname); } /** * Here we take a default arch from a filestream, parses the data and * put the result on the arch stack in CMainControl. - * @param myInput <code>BufferedReader</code> file stream of arch data + * @param in <code>BufferedReader</code> file stream of arch data * @param defArch default arch (only for artifacts) * @param line first line, pre-parsed (only for artifacts) * @param archName arch-object name (only for artifacts) @@ -106,7 +106,7 @@ * @throws IOException in case of I/O problems */ @Nullable @SuppressWarnings({"StringContatenationInLoop", "ObjectAllocationInLoop"}) - public ArchObject parseDefArchFromStream(final BufferedReader myInput, @Nullable final ArchObject defArch, @Nullable final String line, @Nullable final String archName, /* TODO: final*/ int index, final String fname) throws IOException { + public ArchObject parseDefArchFromStream(final BufferedReader in, @Nullable final ArchObject defArch, @Nullable final String line, @Nullable final String archName, /* TODO: final*/ int index, final String fname) throws IOException { // start with new clean ArchObject instance ArchObject arch; ArchObject archlast = null; @@ -139,7 +139,7 @@ String thisLine2; if (line == null) { - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); } else { thisLine2 = line; // pre read "Object" from artifacts file loader } @@ -159,7 +159,7 @@ if (!msgflag && thisLine.startsWith("#")) { // skip comments (only outside msges) - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); continue; } @@ -398,7 +398,7 @@ //System.err.println("add String: "+thisLine); } } - thisLine2 = myInput.readLine(); + thisLine2 = in.readLine(); } // while loop ends here return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-22 07:13:13
|
Revision: 349 http://svn.sourceforge.net/gridarta/?rev=349&view=rev Author: akirschbaum Date: 2006-09-22 00:12:46 -0700 (Fri, 22 Sep 2006) Log Message: ----------- Unify name of Logger instance to 'log'. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CAttribBitmask.java trunk/crossfire/src/cfeditor/CFArchType.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CSettings.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/Updater.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-22 07:12:46 UTC (rev 349) @@ -44,7 +44,7 @@ public final class CArchPanelPan extends JPanel { - private static final Logger LOG = Logger.getLogger(CArchPanel.class); + private static final Logger log = Logger.getLogger(CArchPanel.class); /** Serial Version UID. */ private static final long serialVersionUID = 1L; @@ -140,7 +140,7 @@ arch = mainControl.getArchObjectStack().getArch(index); } catch (final NullPointerException e) { /* - LOG.info("NullPointerException in showArchListObject()!", e); + log.info("NullPointerException in showArchListObject()!", e); This happens in JDK 1.4 when you select an arch in panel A, then select Panel B, then Panel A again. (why??) */ @@ -199,7 +199,7 @@ for (int i = 0; i < (int) (list.length() / 10.0); i++) { numList[i] = Integer.parseInt(list.substring(10 * i, 5 + 10 * i)); - //LOG.debug(CMainControl.getInstance().getArchObjectStack().getArch(numList[i]).getArchName()); + //log.debug(CMainControl.getInstance().getArchObjectStack().getArch(numList[i]).getArchName()); } return numList; @@ -219,7 +219,7 @@ final int index = Integer.parseInt(list.substring(5 + 10 * i, 10 + 10 * i)); catList[i] = jbox.getItemAt(index).toString().trim(); } catch (final NullPointerException e) { - LOG.warn("Nullpointer in getListCategoryArray()!", e); + log.warn("Nullpointer in getListCategoryArray()!", e); } } Modified: trunk/crossfire/src/cfeditor/CAttribBitmask.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-09-22 07:12:46 UTC (rev 349) @@ -51,7 +51,7 @@ */ public final class CAttribBitmask { - private static final Logger LOG = Logger.getLogger(CAttribBitmask.class); + private static final Logger log = Logger.getLogger(CAttribBitmask.class); /** * Maximum number of characters in a line before linebreak (see {@link @@ -100,7 +100,7 @@ elem = (Element) entries.get(i); final Attribute a; if ((a = elem.getAttribute("bit")) == null || elem.getAttribute("name") == null) { - LOG.warn("Parse error: Found bitmask entry without 'bit' or 'name'."); + log.warn("Parse error: Found bitmask entry without 'bit' or 'name'."); elem.detach(); // remove element from DOM tree } else { try { @@ -109,7 +109,7 @@ maxBit = bit; // this is the highest bit so far } } catch (final DataConversionException e) { - LOG.warn("Parse error: Bitmask bit '" + a.getValue() + "' (" + elem.getAttribute("name").getValue() + ") is not an integer."); + log.warn("Parse error: Bitmask bit '" + a.getValue() + "' (" + elem.getAttribute("name").getValue() + ") is not an integer."); elem.detach(); // remove element from DOM tree } } @@ -133,19 +133,19 @@ } } - if (LOG.isDebugEnabled()) { + if (log.isDebugEnabled()) { String s = "bitmask '" + root.getAttribute("name") + "':"; for (int i = 0; i < bitName.length; i++) { s = s + " " + i + " = " + bitName[i]; } - LOG.debug(s); + log.debug(s); } number = bitName.length - 1; maxvalue = ((int) Math.pow(2., (double) (bitName.length + 1))) - 1; } else { // Error: this is an "empty" bitmask - LOG.warn("Error in \"" + IGUIConstants.TYPEDEF_FILE + "\": Found a bitmask without content!"); + log.warn("Error in \"" + IGUIConstants.TYPEDEF_FILE + "\": Found a bitmask without content!"); bitName = new String[1]; bitName[0] = "<none>"; number = 0; @@ -185,7 +185,7 @@ } else { // value too big? if (value > maxvalue) { - LOG.warn("bitmask value " + value + " is too big."); + log.warn("bitmask value " + value + " is too big."); } boolean linebreak = false; Modified: trunk/crossfire/src/cfeditor/CFArchType.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-22 07:12:46 UTC (rev 349) @@ -40,7 +40,7 @@ */ public final class CFArchType { - private static final Logger LOG = Logger.getLogger(CFArchType.class); + private static final Logger log = Logger.getLogger(CFArchType.class); public static final String XML_TYPE = "type"; @@ -135,7 +135,7 @@ typenr = -1; typeName = "default"; - LOG.debug("type: default"); + log.debug("type: default"); } else { try { // parse the type name @@ -144,8 +144,8 @@ // parse the type number typenr = Integer.parseInt(root.getAttribute("number").getValue().trim()); - if (LOG.isDebugEnabled()) { - LOG.debug("reading type: " + typeName + ", " + typenr); + if (log.isDebugEnabled()) { + log.debug("reading type: " + typeName + ", " + typenr); } // parse 'required' attributes @@ -158,7 +158,7 @@ a1 = elem.getAttribute(CFArchAttrib.XML_KEY_ARCH); final Attribute a2 = elem.getAttribute(XML_VALUE); if (a1 == null || a2 == null) { - LOG.error("In '" + XML_REQUIRED + "' element of type " + typeName + ": " + XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "' or '" + XML_VALUE + "'."); + log.error("In '" + XML_REQUIRED + "' element of type " + typeName + ": " + XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "' or '" + XML_VALUE + "'."); } else { tmp.add(a1.getValue().trim()); tmp.add(a2.getValue().trim()); @@ -172,7 +172,7 @@ } } catch (final NumberFormatException e) { // parsing type number failed: - LOG.error("In " + IGUIConstants.TYPEDEF_FILE + ": Type " + typeName + " has invalid type number '" + root.getAttribute("number").getValue() + "'."); + log.error("In " + IGUIConstants.TYPEDEF_FILE + ": Type " + typeName + " has invalid type number '" + root.getAttribute("number").getValue() + "'."); return false; } @@ -185,7 +185,7 @@ elem = (Element) children.get(i); a1 = elem.getAttribute(CFArchAttrib.XML_KEY_ARCH); if (a1 == null) { - LOG.error("In '" + XML_IGNORE + "' section of type " + typeName + ": " + XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "'."); + log.error("In '" + XML_IGNORE + "' section of type " + typeName + ": " + XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "'."); } else { ignoreTable.put(a1.getValue().trim(), ""); } @@ -197,7 +197,7 @@ elem = (Element) children.get(i); a1 = elem.getAttribute("name"); if (a1 == null) { - LOG.error("In '" + XML_IGNORE + "' section of type " + typeName + ": ignore_list missing 'name'."); + log.error("In '" + XML_IGNORE + "' section of type " + typeName + ": ignore_list missing 'name'."); } else if (tlist.getIgnoreListTable().containsKey(a1.getValue().trim())) { // just copy everything from ignorelist to this ignore section final Vector ignlist = (Vector) (tlist.getIgnoreListTable().get(a1.getValue().trim())); @@ -205,7 +205,7 @@ ignoreTable.put((String) (ignlist.elementAt(k)), ""); } } else { - LOG.error("In '" + XML_IGNORE + "' section of type " + typeName + ": ignore_list with name \"" + a1.getValue() + "\" is undefined."); + log.error("In '" + XML_IGNORE + "' section of type " + typeName + ": ignore_list with name \"" + a1.getValue() + "\" is undefined."); } } } @@ -226,7 +226,7 @@ if ((elem = root.getChild(XML_IMPORT_TYPE)) != null) { a1 = elem.getAttribute("name"); if (a1 == null) { - LOG.error("In file '" + IGUIConstants.TYPEDEF_FILE + "': Type " + typeName + " has " + XML_IMPORT_TYPE + " element without 'name'."); + log.error("In file '" + IGUIConstants.TYPEDEF_FILE + "': Type " + typeName + " has " + XML_IMPORT_TYPE + " element without 'name'."); } else { importName = a1.getValue().trim(); } @@ -247,7 +247,7 @@ if (elem.getName().equalsIgnoreCase(XML_SECTION) && !elem.getChildren().isEmpty()) { a1 = elem.getAttribute("name"); if (a1 == null) { - LOG.warn("In " + IGUIConstants.TYPEDEF_FILE + ": Type " + typeName + " contains a " + XML_SECTION + " missing 'name'."); + log.warn("In " + IGUIConstants.TYPEDEF_FILE + ": Type " + typeName + " contains a " + XML_SECTION + " missing 'name'."); inSection = false; // we'll treat the attributes as "sectionless" } else { // get section name @@ -331,8 +331,8 @@ } } } else { - LOG.error("Syntax Error in file '" + filename + "' (" + typeName + "):"); - LOG.error(" import type \"" + importName + "\" not found!"); + log.error("Syntax Error in file '" + filename + "' (" + typeName + "):"); + log.error(" import type \"" + importName + "\" not found!"); } } @@ -341,16 +341,16 @@ // first put in the references to the default attribs: for (int k = numDef; k > 0; k--) { attr[numDef - k] = defList[numDef - k]; - if (LOG.isDebugEnabled()) { - LOG.debug("*** (" + (numDef - k) + ") " + attr[numDef - k].getNameNew()); + if (log.isDebugEnabled()) { + log.debug("*** (" + (numDef - k) + ") " + attr[numDef - k].getNameNew()); } } // next put in the references of imported arches (at end of array) for (int k = 0; k < importNum; k++) { attr[j - importNum + k] = importList[k]; - if (LOG.isDebugEnabled()) { - LOG.debug("*** (" + (j - importNum + k) + ") " + attr[j - importNum + k].getNameNew()); + if (log.isDebugEnabled()) { + log.debug("*** (" + (j - importNum + k) + ") " + attr[j - importNum + k].getNameNew()); } } } else { @@ -405,9 +405,9 @@ attrib.setSection(1, "Special"); } - if (LOG.isDebugEnabled()) { + if (log.isDebugEnabled()) { final Attribute a = elem.getAttribute("arch"); - LOG.debug("attribute " + (a == null ? "null" : a.getValue()) + ", section " + attrib.getSecId() + " = '" + attrib.getSecName() + "'"); + log.debug("attribute " + (a == null ? "null" : a.getValue()) + ", section " + attrib.getSecId() + " = '" + attrib.getSecName() + "'"); } } } @@ -465,8 +465,8 @@ text += "</BODY>\n</HTML>\n"; - if (LOG.isDebugEnabled()) { - LOG.debug(text); + if (log.isDebugEnabled()) { + log.debug(text); } return text; } Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-22 07:12:46 UTC (rev 349) @@ -55,7 +55,7 @@ */ public final class CFArchTypeList { - private static final Logger LOG = Logger.getLogger(CFArchTypeList.class); + private static final Logger log = Logger.getLogger(CFArchTypeList.class); private final CFArchType head = new CFArchType(null); // head of CFArchType list (head contains default type) @@ -103,7 +103,7 @@ Element elem; Attribute a; if (root == null || !root.getName().equalsIgnoreCase("types")) { - LOG.warn("File '" + IGUIConstants.TYPEDEF_FILE + "' lacks root element 'types'."); + log.warn("File '" + IGUIConstants.TYPEDEF_FILE + "' lacks root element 'types'."); } else { List children; // parse all bitmask elements @@ -111,7 +111,7 @@ for (int i = 0; children != null && i < children.size(); i++) { elem = (Element) children.get(i); if (elem.getAttribute("name") == null) { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load bitmask element without 'name'."); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load bitmask element without 'name'."); } else { bitmaskTable.put(elem.getAttribute("name").getValue(), new CAttribBitmask(elem)); } @@ -122,7 +122,7 @@ for (int i = 0; children != null && i < children.size(); i++) { elem = (Element) children.get(i); if (elem.getAttribute("name") == null) { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load list element without 'name'."); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load list element without 'name'."); } else { final Vector list = parseListFromElement(elem); if (list != null && list.size() > 0) { @@ -134,7 +134,7 @@ // parse default type elem = root.getChild("default_type"); if (elem == null) { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': default_type element is missing!"); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': default_type element is missing!"); } else { // create a new CFArchType element final CFArchType newType = new CFArchType(head); @@ -152,7 +152,7 @@ for (int i = 0; children != null && i < children.size(); i++) { elem = (Element) children.get(i); if (elem.getAttribute("name") == null) { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load ignore_list element without 'name'."); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': cannot load ignore_list element without 'name'."); } else { final String lname = elem.getAttribute("name").getValue().trim(); final List children2 = elem.getChildren(CFArchType.XML_ATTRIBUTE); @@ -164,7 +164,7 @@ if ((a = elem.getAttribute(CFArchAttrib.XML_KEY_ARCH)) != null) { content.addElement(a.getValue().trim()); } else { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': ignore_list '" + lname + "' has " + CFArchType.XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "'."); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': ignore_list '" + lname + "' has " + CFArchType.XML_ATTRIBUTE + " missing '" + CFArchAttrib.XML_KEY_ARCH + "'."); } } // now add the list vector to the ignoreListTable: @@ -178,7 +178,7 @@ for (int i = 0; children != null && i < children.size(); i++) { elem = (Element) children.get(i); if (elem.getAttribute("name") == null || elem.getAttribute("number") == null) { - LOG.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': found type element without 'name' or 'number'."); + log.warn("In file '" + IGUIConstants.TYPEDEF_FILE + "': found type element without 'name' or 'number'."); } else { // create a new CFArchType element final CFArchType newType = new CFArchType(head); @@ -193,17 +193,17 @@ } } - if (LOG.isInfoEnabled()) { - LOG.info("Loaded " + length + " types from '" + IGUIConstants.TYPEDEF_FILE + "'"); + if (log.isInfoEnabled()) { + log.info("Loaded " + length + " types from '" + IGUIConstants.TYPEDEF_FILE + "'"); } } } finally { fread.close(); } } catch (JDOMException e) { - LOG.error("Parsing error in '" + IGUIConstants.TYPEDEF_FILE, e); + log.error("Parsing error in '" + IGUIConstants.TYPEDEF_FILE, e); } catch (IOException e) { - LOG.error("Cannot read file '" + IGUIConstants.TYPEDEF_FILE + "'!", e); + log.error("Cannot read file '" + IGUIConstants.TYPEDEF_FILE + "'!", e); } ignoreListTable = null; // this was only needed during load phase @@ -224,7 +224,7 @@ for (int i = 0; entries != null && i < entries.size(); i++) { elem = (Element) entries.get(i); if (elem.getAttribute("value") == null || elem.getAttribute("name") == null) { - LOG.warn("In '" + IGUIConstants.TYPEDEF_FILE + "', list " + root.getAttribute("name").getValue() + ": found entry missing 'value' or 'name'."); + log.warn("In '" + IGUIConstants.TYPEDEF_FILE + "', list " + root.getAttribute("name").getValue() + ": found entry missing 'value' or 'name'."); } else { // every list entry adds value (Integer) and name (String) to the vector try { @@ -232,7 +232,7 @@ list.addElement(new Integer(num)); list.addElement(" " + elem.getAttribute("name").getValue().trim()); } catch (DataConversionException e) { - LOG.warn("In '" + IGUIConstants.TYPEDEF_FILE + "', list " + root.getAttribute("name").getValue() + ": value '" + elem.getAttribute("value").getValue() + "' is not an integer."); + log.warn("In '" + IGUIConstants.TYPEDEF_FILE + "', list " + root.getAttribute("name").getValue() + ": value '" + elem.getAttribute("value").getValue() + "' is not an integer."); } } } @@ -300,11 +300,11 @@ Element spellElem; Attribute a; if (root == null || !root.getName().equalsIgnoreCase("spells")) { - LOG.warn("File '" + IGUIConstants.SPELL_FILE + "' lacks root element 'spells'."); + log.warn("File '" + IGUIConstants.SPELL_FILE + "' lacks root element 'spells'."); } else { final List spells = root.getChildren("spell"); if (spells == null || spells.size() == 0) { - LOG.warn("File '" + IGUIConstants.SPELL_FILE + "' has no content."); + log.warn("File '" + IGUIConstants.SPELL_FILE + "' has no content."); } else { // initialize array with appropriate size spellName = new String[spells.size() + 1]; @@ -320,9 +320,9 @@ spellElem = (Element) spells.get(j); if (spellElem.getAttribute("id") == null) { - LOG.warn("In File '" + IGUIConstants.SPELL_FILE + "': Found 'spell' element without 'id'"); + log.warn("In File '" + IGUIConstants.SPELL_FILE + "': Found 'spell' element without 'id'"); } else if (spellElem.getAttribute("name") == null) { - LOG.warn("In File '" + IGUIConstants.SPELL_FILE + "': Found 'spell' element without 'name'"); + log.warn("In File '" + IGUIConstants.SPELL_FILE + "': Found 'spell' element without 'name'"); } else { try { // parse spell number and -name @@ -330,18 +330,18 @@ spellName[i] = spellElem.getAttribute("name").getValue().trim(); i++; } catch (DataConversionException de) { - LOG.error("in '" + IGUIConstants.SPELL_FILE + "': spell id '" + spellElem.getAttribute("id").getValue() + "' is not an integer."); + log.error("in '" + IGUIConstants.SPELL_FILE + "': spell id '" + spellElem.getAttribute("id").getValue() + "' is not an integer."); } } } // loading successful i--; - if (LOG.isInfoEnabled()) { + if (log.isInfoEnabled()) { if (i == spells.size()) { - LOG.info("Loaded " + i + " spells from '" + IGUIConstants.SPELL_FILE + "'"); + log.info("Loaded " + i + " spells from '" + IGUIConstants.SPELL_FILE + "'"); } else { - LOG.info("Loaded " + i + " of " + spells.size() + " defined spells from '" + IGUIConstants.SPELL_FILE + "'"); + log.info("Loaded " + i + " of " + spells.size() + " defined spells from '" + IGUIConstants.SPELL_FILE + "'"); } } } @@ -350,9 +350,9 @@ reader.close(); } } catch (JDOMException e) { - LOG.error("Parsing error in '" + IGUIConstants.SPELL_FILE + "'", e); + log.error("Parsing error in '" + IGUIConstants.SPELL_FILE + "'", e); } catch (IOException e) { - LOG.error("Cannot read file '" + IGUIConstants.SPELL_FILE + "'!"); + log.error("Cannot read file '" + IGUIConstants.SPELL_FILE + "'!"); } } @@ -446,7 +446,7 @@ } } } catch (FileNotFoundException e) { - LOG.error("File '" + spellfile.getAbsolutePath() + "' not found!"); + log.error("File '" + spellfile.getAbsolutePath() + "' not found!"); } catch (EOFException e) { // end of file/spell struct reached try { @@ -455,7 +455,7 @@ } catch (IOException ioe) { } } catch (IOException e) { - LOG.error("Cannot read file '" + spellfile.getAbsolutePath() + "'!"); + log.error("Cannot read file '" + spellfile.getAbsolutePath() + "'!"); } } @@ -509,7 +509,7 @@ fileWriter.close(); return list.size(); } catch (IOException e) { - LOG.error("Cannot write file '" + dfile.getAbsolutePath() + "'!"); + log.error("Cannot write file '" + dfile.getAbsolutePath() + "'!"); } } @@ -545,8 +545,8 @@ // check if all the type-attributes match final int argsNum = (int) (tmp.getTypeAttr().length / 2.0); - if (LOG.isDebugEnabled()) { - LOG.debug("# type: " + tmp.getTypeName()); + if (log.isDebugEnabled()) { + log.debug("# type: " + tmp.getTypeName()); } boolean match = true; Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-22 07:12:46 UTC (rev 349) @@ -65,7 +65,7 @@ */ public final class CFTreasureListTree extends JTree { - private static final Logger LOG = Logger.getLogger(CFTreasureListTree.class); + private static final Logger log = Logger.getLogger(CFTreasureListTree.class); /** Serial Version UID. */ private static final long serialVersionUID = 1L; @@ -340,11 +340,11 @@ needSecondLink = null; if (errorLog.toString().trim().length() > 0) { - LOG.warn("Syntax errors in treasurelist file:"); - LOG.warn(errorLog.toString()); + log.warn("Syntax errors in treasurelist file:"); + log.warn(errorLog.toString()); } - if (LOG.isInfoEnabled()) { - LOG.info(tListCount + " treasurelists loaded."); + if (log.isInfoEnabled()) { + log.info(tListCount + " treasurelists loaded."); } // free unused memory Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-22 07:12:46 UTC (rev 349) @@ -48,7 +48,7 @@ */ public final class CMapFileDecode { - private static final Logger LOG = Logger.getLogger(CMapFileDecode.class); + private static final Logger log = Logger.getLogger(CMapFileDecode.class); private int maxxlen, maxylen; @@ -188,20 +188,20 @@ // now we test for a new arch - thats stuf in inventory // or the end... thats the end of this shit } else if (thisLine.startsWith("arch ")) { - if (LOG.isDebugEnabled()) { - LOG.debug("GO INVENTORY: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("GO INVENTORY: " + arch + " - " + thisLine); } readArch(myInput, thisLine, arch); - if (LOG.isDebugEnabled()) { - LOG.debug("GO INVENTORY2: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("GO INVENTORY2: " + arch + " - " + thisLine); } } else if (thisLine.startsWith("end")) { objects.add(arch); archflag = false; archmore = false; - if (LOG.isDebugEnabled()) { - LOG.debug("LEAVE!: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("LEAVE!: " + arch + " - " + thisLine); } return arch; } else if (thisLine.regionMatches(0, "msg", 0, 3)) { @@ -241,7 +241,7 @@ arch.addEventScript(type, path); } } else { - LOG.warn("Arch " + arch.getArchName() + " has incorrect event code '" + thisLine + "'"); + log.warn("Arch " + arch.getArchName() + " has incorrect event code '" + thisLine + "'"); arch.addArchText(thisLine + "\n"); // keep line, it might have a meaning after all } } else if (thisLine.regionMatches(0, "x ", 0, 2)) { @@ -283,7 +283,7 @@ thisLine2 = myInput.readLine(); } } catch (final IOException e) { - LOG.error("Read Error while trying to load map: " + maparch.getFileName(), e); + log.error("Read Error while trying to load map: " + maparch.getFileName(), e); throw e; // we simply pass this exception to the calling function } Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-22 07:12:46 UTC (rev 349) @@ -50,7 +50,7 @@ */ public final class CPickmapPanel { - private static final Logger LOG = Logger.getLogger(CPickmapPanel.class); + private static final Logger log = Logger.getLogger(CPickmapPanel.class); /** static instance of this class */ private static CPickmapPanel instance; @@ -103,7 +103,7 @@ final File pickmapDir = new File(IGUIConstants.PICKMAP_DIR); if (!pickmapDir.exists() || !pickmapDir.isDirectory()) { - LOG.warn("No pickmaps directory found."); + log.warn("No pickmaps directory found."); return; } @@ -164,7 +164,7 @@ // loading failed - could be a system file in that directory, // or something else. Doesn't deserve more attention than a printout. if (!mapFile.getName().startsWith(".")) { - LOG.warn("Couldn't load Pickmap ", e); + log.warn("Couldn't load Pickmap ", e); } } return false; @@ -278,14 +278,14 @@ // this is the new active pickmap currentPickMap = tmp; // <- new pickmap foundMap = true; - if (LOG.isDebugEnabled()) { - LOG.debug("new pickmap: " + newName); + if (log.isDebugEnabled()) { + log.debug("new pickmap: " + newName); } } if (!foundMap && mainControl.getMainView().isPickmapActive() && loadComplete) { // error: the new selected pickmap couldn't be found - LOG.error("Bad Error in CPickmapPanel.updateActivePickmap: Selected pickmap couldn't be found!"); + log.error("Bad Error in CPickmapPanel.updateActivePickmap: Selected pickmap couldn't be found!"); } } Modified: trunk/crossfire/src/cfeditor/CSettings.java =================================================================== --- trunk/crossfire/src/cfeditor/CSettings.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CSettings.java 2006-09-22 07:12:46 UTC (rev 349) @@ -46,7 +46,7 @@ */ @Deprecated public final class CSettings { - private static final Logger LOG = Logger.getLogger(CSettings.class); + private static final Logger log = Logger.getLogger(CSettings.class); /** The properties object that contains the settings. */ private final Properties properties = new Properties(); @@ -105,8 +105,8 @@ } try { - if (LOG.isDebugEnabled()) { - LOG.debug("SAVE SETTINGS: " + (new File(strFile)).getAbsolutePath()); + if (log.isDebugEnabled()) { + log.debug("SAVE SETTINGS: " + (new File(strFile)).getAbsolutePath()); } properties.store(new FileOutputStream(strFile), ""); } catch (final IOException ioe) { Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-22 07:12:46 UTC (rev 349) @@ -42,7 +42,7 @@ */ public final class CopyBuffer { - private static final Logger LOG = Logger.getLogger(CopyBuffer.class); + private static final Logger log = Logger.getLogger(CopyBuffer.class); /** Clear the selection. */ private static final int DO_CLEAR = 1; Modified: trunk/crossfire/src/cfeditor/arch/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-22 07:12:46 UTC (rev 349) @@ -50,7 +50,7 @@ */ public class ArchObject implements Cloneable, net.sf.gridarta.arch.ArchObject, Iterable<ArchObject> { - private static final Logger LOG = Logger.getLogger(ArchObject.class); + private static final Logger log = Logger.getLogger(ArchObject.class); /** Special constant that's used if an arch has no arch type set. */ public static final int TYPE_UNSET = -666; @@ -1409,8 +1409,8 @@ type = typeList.getTypeOfArch(this); // the type of this arch } - if (LOG.isDebugEnabled()) { - LOG.debug("Applying type: " + type.getTypeName()); + if (log.isDebugEnabled()) { + log.debug("Applying type: " + type.getTypeName()); } String line = null; @@ -1430,8 +1430,8 @@ attrKey = line.substring(0, line.indexOf(" ")); } - if (LOG.isDebugEnabled()) { - LOG.debug("read attribute '" + line + "' -> "); + if (log.isDebugEnabled()) { + log.debug("read attribute '" + line + "' -> "); } // now check if there's a match in the definitions @@ -1467,7 +1467,7 @@ sstream.close(); sread.close(); } catch (IOException e) { - LOG.error("in getSyntaxErrors: Cannot close StringReader", e); + log.error("in getSyntaxErrors: Cannot close StringReader", e); } // return errors, or null if empty Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-22 07:12:46 UTC (rev 349) @@ -58,7 +58,7 @@ public final class ArchObjectParser { /** Logger. */ - private static final Logger LOG = Logger.getLogger(ArchObjectParser.class); + private static final Logger log = Logger.getLogger(ArchObjectParser.class); // name of the system-arch containing path of starting map public static final String STARTARCH_NAME = "map"; @@ -100,11 +100,11 @@ final Element root = doc.getRootElement(); final Attribute a; if (root == null || !"typenumbers".equalsIgnoreCase(root.getName())) { - LOG.warn("File '" + IGUIConstants.TYPENR_FILE + "' lacks root element 'typenumbers'."); + log.warn("File '" + IGUIConstants.TYPENR_FILE + "' lacks root element 'typenumbers'."); } else { final List types = root.getChildren("type"); if (types == null || types.size() == 0) { - LOG.warn("File '" + IGUIConstants.TYPENR_FILE + "' has no content."); + log.warn("File '" + IGUIConstants.TYPENR_FILE + "' has no content."); } else { // process all 'type' elements from the xml file int i; @@ -112,22 +112,22 @@ final Element typeElem = (Element) types.get(i); if (typeElem.getAttribute("number") == null) { - LOG.warn("In File '" + IGUIConstants.TYPENR_FILE + "': Found 'type' element without 'number'"); + log.warn("In File '" + IGUIConstants.TYPENR_FILE + "': Found 'type' element without 'number'"); } else if (typeElem.getAttribute("name") == null) { - LOG.warn("In File '" + IGUIConstants.TYPENR_FILE + "': Found 'type' element without 'name'"); + log.warn("In File '" + IGUIConstants.TYPENR_FILE + "': Found 'type' element without 'name'"); } else { try { // parse type number and -name, then add it to the table 'archTypeNumbers' archTypeNumbers.put(typeElem.getAttribute("number").getIntValue(), typeElem.getAttribute("name").getValue()); } catch (final DataConversionException de) { - LOG.error("In '" + IGUIConstants.TYPENR_FILE + "':\n type number '" + typeElem.getAttribute("number").getValue() + "' is not an integer."); + log.error("In '" + IGUIConstants.TYPENR_FILE + "':\n type number '" + typeElem.getAttribute("number").getValue() + "' is not an integer."); } } } // loading successful - if (LOG.isInfoEnabled()) { - LOG.info("" + i + " typenumbers loaded."); + if (log.isInfoEnabled()) { + log.info("" + i + " typenumbers loaded."); } } } @@ -135,11 +135,11 @@ reader.close(); } } catch (final JDOMException e) { - LOG.error("Parsing error in '" + IGUIConstants.TYPENR_FILE + "'", e); + log.error("Parsing error in '" + IGUIConstants.TYPENR_FILE + "'", e); } catch (final FileNotFoundException e) { - LOG.error("Cannot read file '" + IGUIConstants.TYPENR_FILE + "'!", e); + log.error("Cannot read file '" + IGUIConstants.TYPENR_FILE + "'!", e); } catch (final IOException e) { - LOG.error("Error while reading file '" + IGUIConstants.TYPENR_FILE + "'!", e); + log.error("Error while reading file '" + IGUIConstants.TYPENR_FILE + "'!", e); } } @@ -170,9 +170,9 @@ in.close(); } } catch (final FileNotFoundException e) { - LOG.error("Archfile " + fname + " could not be found"); + log.error("Archfile " + fname + " could not be found"); } catch (final IOException e) { - LOG.error("IOException in parseDefArch!"); + log.error("IOException in parseDefArch!"); } } @@ -279,11 +279,11 @@ arch.addLoreText(thisLine + "\n"); } } else if (thisLine.regionMatches(0, "Object", 0, 6)) { - LOG.error("Find inventory Object in def arch: " + thisLine); + log.error("Find inventory Object in def arch: " + thisLine); } else if (thisLine.regionMatches(0, "end", 0, 3)) { //if (arch.getArchTypNr() == 0) { - if (LOG.isDebugEnabled()) { - LOG.debug("Arch " + arch.getArchName() + " has no type info!"); + if (log.isDebugEnabled()) { + log.debug("Arch " + arch.getArchName() + " has no type info!"); } //} // we got full arch @@ -362,30 +362,30 @@ } else if (thisLine.equals("lore")) { loreflag = true; } else if (thisLine.regionMatches(0, "visibility ", 0, 11)) { - if (LOG.isDebugEnabled()) { - LOG.debug("Remove visibility: " + arch.getArchName()); + if (log.isDebugEnabled()) { + log.debug("Remove visibility: " + arch.getArchName()); } } else if (thisLine.regionMatches(0, "magicmap ", 0, 9)) { - if (LOG.isDebugEnabled()) { - LOG.debug("Remove magicmap: " + arch.getArchName()); + if (log.isDebugEnabled()) { + log.debug("Remove magicmap: " + arch.getArchName()); } } else if (thisLine.regionMatches(0, "color_fg ", 0, 9)) { - if (LOG.isDebugEnabled()) { - LOG.debug("Remove color_fg: " + arch.getArchName()); + if (log.isDebugEnabled()) { + log.debug("Remove color_fg: " + arch.getArchName()); } } else if (thisLine.regionMatches(0, "color_bg ", 0, 9)) { - if (LOG.isDebugEnabled()) { - LOG.debug("Remove color_bg: " + arch.getArchName()); + if (log.isDebugEnabled()) { + log.debug("Remove color_bg: " + arch.getArchName()); } } else if (thisLine.regionMatches(0, "x ", 0, 2)) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { - LOG.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchName()); + log.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } arch.setMultiX(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.regionMatches(0, "y ", 0, 2)) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { - LOG.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchName()); + log.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } arch.setMultiY(Integer.parseInt(thisLine.substring(2))); @@ -394,10 +394,10 @@ final int i = Integer.parseInt(thisLine.substring(5)); arch.setArchTypNr(i); if (i == 0) { - LOG.warn("Arch " + arch.getArchName() + " type number is zero. (" + thisLine.substring(5) + ")"); + log.warn("Arch " + arch.getArchName() + " type number is zero. (" + thisLine.substring(5) + ")"); } } catch (final Exception e) { - LOG.warn("Arch " + arch.getArchName() + " has a invalid type nr. (" + thisLine.substring(5) + ")"); + log.warn("Arch " + arch.getArchName() + " has a invalid type nr. (" + thisLine.substring(5) + ")"); arch.addArchText(thisLine + "\n"); } } else if (thisLine.regionMatches(0, "face ", 0, 5)) { @@ -416,15 +416,15 @@ isNewCategory = true; // this arch has a new category } }arch.addArchText(thisLine + "\n"); - if (LOG.isDebugEnabled()) { - LOG.debug("add String: " + thisLine); + if (log.isDebugEnabled()) { + log.debug("add String: " + thisLine); } } } thisLine2 = myInput.readLine(); } // while loop ends here } catch (final IOException e) { - LOG.error("Error: ", e); + log.error("Error: ", e); } return null; } Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-22 07:12:46 UTC (rev 349) @@ -67,7 +67,7 @@ */ public final class ArchObjectStack { - private static final Logger LOG = Logger.getLogger(ArchObjectStack.class); + private static final Logger log = Logger.getLogger(ArchObjectStack.class); // load status: is archstack fully loaded? public static final int IS_EMPTY = 0; @@ -239,7 +239,7 @@ public void loadArches() { final Date timeStart = new Date(); // get starting time loadStatus = IS_LOADING; // status: loading - LOG.info("Start to collect arches..."); + log.info("Start to collect arches..."); CMainStatusbar.getInstance().setText(" Loading Arches... "); // browse arch archive @@ -278,8 +278,8 @@ loadStatus = IS_COMPLETE; // status: stack completed final Date timeFinish = new Date(); // get finishing time final long diff = timeFinish.getTime() - timeStart.getTime(); - if (LOG.isInfoEnabled()) { - LOG.info("Arch collect took " + diff / 1000.0 + " Seconds"); + if (log.isInfoEnabled()) { + log.info("Arch collect took " + diff / 1000.0 + " Seconds"); } // load pickmaps @@ -311,7 +311,7 @@ } catch (final FileNotFoundException e) { // no need for a message here, CFileReader takes care of this } catch (final IOException e) { - LOG.error("Error:", e); + log.error("Error:", e); } } @@ -415,8 +415,8 @@ if (animflag) { if (thisLine.regionMatches(0, "mina", 0, 4)) { animflag = false; - if (LOG.isDebugEnabled()) { - LOG.debug("We found this>> name: >" + animName + " \n>" + animText + "<\n"); + if (log.isDebugEnabled()) { + log.debug("We found this>> name: >" + animName + " \n>" + animText + "<\n"); } mainControl.getAnimationObject().addAnimObject(animName, animText); } else { @@ -435,9 +435,9 @@ myInput.close(); } } catch (final FileNotFoundException e) { - LOG.warn("Error opening face file: " + e); + log.warn("Error opening face file: " + e); } catch (final IOException e) { - LOG.warn("Error reading face file: " + e); + log.warn("Error reading face file: " + e); } } @@ -497,7 +497,7 @@ if (l == 10 || !Character.isLetterOrDigit(l) && l != '/') { faceComplete = true; } else { - LOG.debug("face-path contained '.'"); + log.debug("face-path contained '.'"); face += l; if (!crappyFacepath) { crappyFacepath = true; @@ -550,9 +550,9 @@ if (crappyFacepath) { // print message if there were messy face-pathes with '.' - LOG.warn("######"); - LOG.warn("# Some image-paths contain illegal characters in your collected png file '" + IGUIConstants.PNG_FILE + "'"); - LOG.warn("Re-collect the arches for better loading performance."); + log.warn("######"); + log.warn("# Some image-paths contain illegal characters in your collected png file '" + IGUIConstants.PNG_FILE + "'"); + log.warn("Re-collect the arches for better loading performance."); } // close stream @@ -564,9 +564,9 @@ stream.close(); } } catch (final FileNotFoundException e) { - LOG.warn("file " + IGUIConstants.PNG_FILE + " not found!"); + log.warn("file " + IGUIConstants.PNG_FILE + " not found!"); } catch (final IOException e) { - LOG.warn("Read error in file '" + IGUIConstants.PNG_FILE + "'.", e); + log.warn("Read error in file '" + IGUIConstants.PNG_FILE + "'.", e); } } @@ -689,7 +689,7 @@ arch = mainControl.getArch(numList[i]); if (arch.isTail()) { - LOG.error("Collect Error: Multipart Tail in Panel found!"); + log.error("Collect Error: Multipart Tail in Panel found!"); } binFile.writeBytes("Object " + arch.getArchName() + "\n"); @@ -731,11 +731,11 @@ arch = mainControl.getArch(numList[i] + j); if (arch.isHead()) { - LOG.warn("Multipart object is too short!"); + 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("-> " + multiparts + " tails expected for multipart: '" + before.getArchName() + "',"); + log.warn(" but arch '" + arch.getArchName() + "' follows on position " + j + " and it's not a tail."); } } @@ -818,13 +818,13 @@ // check if we still missed any arches if (count - mainControl.getArchCount() != 0) { - LOG.warn((mainControl.getArchCount() - count) + " arches have been missed during collect!"); + log.warn((mainControl.getArchCount() - count) + " arches have been missed during collect!"); } pbar.setValue(count); binFile.close(); } catch (final IOException e) { - LOG.error("Error: Exception collecting: archfile", e); + log.error("Error: Exception collecting: archfile", e); return; } @@ -873,10 +873,10 @@ try { fin1 = new FileInputStream(faceObjects[0].getPath()); } catch (final ArrayIndexOutOfBoundsException e) { - LOG.warn("You have to give me the name of a file to open."); + log.warn("You have to give me the name of a file to open."); return; } catch (final FileNotFoundException e) { - LOG.warn("Could not open input file " + faceObjects[0].getPath()); + log.warn("Could not open input file " + faceObjects[0].getPath()); return; } @@ -885,12 +885,12 @@ try { numBytes = fin1.read(b, 0, 50000); } catch (final IOException e) { - LOG.error("Unexpected exception: ", e); + log.error("Unexpected exception: ", e); return; } if (numBytes == -1) { - LOG.error("Unexpected EOF: " + faceObjects[0].getPath() + " >> " + numBytes); + log.error("Unexpected EOF: " + faceObjects[0].getPath() + " >> " + numBytes); return; } @@ -908,10 +908,10 @@ // try to open the png image file fin2 = new FileInputStream(faceObjects[i].getPath()); } catch (final ArrayIndexOutOfBoundsException e) { - LOG.warn("You have to give me the name of a file to open."); + log.warn("You have to give me the name of a file to open."); return; } catch (final FileNotFoundException e) { - LOG.warn("Could not open input file " + faceObjects[i].getPath()); + log.warn("Could not open input file " + faceObjects[i].getPath()); return; } @@ -919,12 +919,12 @@ // read size and byte-data from png file numBytes = fin2.read(b, 0, 50000); } catch (final IOException e) { - LOG.error("Unexpected exception ", e); + log.error("Unexpected exception ", e); return; } if (numBytes == -1) { - LOG.warn("Unexpected EOF: " + faceObjects[i].getPath() + " >> " + numBytes); + log.warn("Unexpected EOF: " + faceObjects[i].getPath() + " >> " + numBytes); return; } @@ -960,7 +960,7 @@ // close png file binFile.close(); } catch (final IOException e) { - LOG.error("Exception collecting images", e); + log.error("Exception collecting images", e); } CMainStatusbar.getInstance().setText("Collect Arches: done."); Modified: trunk/crossfire/src/cfeditor/filter/AttributeFilter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-22 07:12:46 UTC (rev 349) @@ -28,7 +28,7 @@ */ public class AttributeFilter implements Filter { - private static final Logger LOG = Logger.getLogger(AttributeFilter.class); + private static final Logger log = Logger.getLogger(AttributeFilter.class); private final Map<String, String> attrList; @@ -72,9 +72,9 @@ } if (matchType >= 0) { hasChecked = true; - if (LOG.isDebugEnabled()) { - LOG.debug("checking type for " + object.getBestName()); - LOG.debug("o.getArchTypNr() != matchType: " + object.getArchTypNr() + " != " + matchType); + if (log.isDebugEnabled()) { + log.debug("checking type for " + object.getBestName()); + log.debug("o.getArchTypNr() != matchType: " + object.getArchTypNr() + " != " + matchType); } if (object.getArchTypNr() != matchType) { return false; @@ -95,7 +95,7 @@ /** {@inheritDoc} */ public FilterConfig createConfig() { - LOG.debug("CreateConfig"); + log.debug("CreateConfig"); return new SimpleFilterConfig(); } Modified: trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java 2006-09-22 07:12:46 UTC (rev 349) @@ -19,7 +19,7 @@ @SuppressWarnings({"AbstractClassWithoutAbstractMethods"}) public abstract class BasicFilterConfig implements FilterConfig { - private static final Logger LOG = Logger.getLogger(BasicFilterConfig.class); + private static final Logger log = Logger.getLogger(BasicFilterConfig.class); private boolean enabled = false; @@ -28,16 +28,16 @@ public void setEnabled(final boolean enabled) { this.enabled = enabled; if (enabled) { - if (LOG.isDebugEnabled()) { - LOG.debug("enabling filter " + this); + if (log.isDebugEnabled()) { + log.debug("enabling filter " + this); } if (!enabled) { final ConfigEvent e = new ConfigEvent(ConfigEventType.ENABLE, this); fireEvent(e); } } else { - if (LOG.isDebugEnabled()) { - LOG.debug("disabling filter " + this); + if (log.isDebugEnabled()) { + log.debug("disabling filter " + this); } if (enabled) { final ConfigEvent e = new ConfigEvent(ConfigEventType.DISABLE, this); Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java 2006-09-20 18:48:13 UTC (rev 348) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java 2006-09-22 07:12:46 UTC (rev 349) @@ -24,7 +24,7 @@ private final Map<String, FilterConfig> map = new Has... [truncated message content] |
From: <chr...@us...> - 2006-09-20 18:48:18
|
Revision: 348 http://svn.sourceforge.net/gridarta/?rev=348&view=rev Author: christianhujer Date: 2006-09-20 11:48:13 -0700 (Wed, 20 Sep 2006) Log Message: ----------- (This is an automatic message!) Released new update version, committing next build number. Modified Paths: -------------- trunk/daimonin/nextBuildNumber.properties Modified: trunk/daimonin/nextBuildNumber.properties =================================================================== --- trunk/daimonin/nextBuildNumber.properties 2006-09-20 18:46:21 UTC (rev 347) +++ trunk/daimonin/nextBuildNumber.properties 2006-09-20 18:48:13 UTC (rev 348) @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Wed Sep 20 19:07:42 CEST 2006 -build.number=2932 +#Wed Sep 20 20:40:21 CEST 2006 +build.number=2933 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-20 18:46:33
|
Revision: 347 http://svn.sourceforge.net/gridarta/?rev=347&view=rev Author: christianhujer Date: 2006-09-20 11:46:21 -0700 (Wed, 20 Sep 2006) Log Message: ----------- Bug: Drawing double arches didn't work. Fixed. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/action.properties trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/daimonin/src/daieditor/messages_sv.properties Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-09-20 18:46:21 UTC (rev 347) @@ -359,10 +359,10 @@ /** * Set whether to use double display like the client with walls. - * @param useDouble <code>true</code> if double display should be used, otherwise <code>false</code> + * @param drawDouble <code>true</code> if double display should be used, otherwise <code>false</code> */ - public void setDrawDouble(final boolean useDouble) { - this.drawDouble = useDouble; + public void setDrawDouble(final boolean drawDouble) { + this.drawDouble = drawDouble; refreshCurrentMap(); } Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-09-20 18:46:21 UTC (rev 347) @@ -727,7 +727,7 @@ ACTION_FACTORY.createActions(true, mainControl.getMapCursorControl(), "insertArch", "deleteArch"); ACTION_FACTORY.createActions(true, mainControl.getMapCursorControl(), "selectArchAbove", "selectArchBelow"); ACTION_FACTORY.createAction(true, "archAttributes", mainControl.getMapCursorControl()); - ACTION_FACTORY.createToggles(true, mainControl, "useDouble", "gridVisible"); + ACTION_FACTORY.createToggles(true, mainControl, "drawDouble", "gridVisible"); ACTION_FACTORY.createToggles(true, this, "lockAllPickmaps"); } Modified: trunk/daimonin/src/daieditor/action.properties =================================================================== --- trunk/daimonin/src/daieditor/action.properties 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/action.properties 2006-09-20 18:46:21 UTC (rev 347) @@ -18,8 +18,8 @@ tools.menu=newScript editScript - controlServer controlClient - checkMap - zoom gc #view.menu=+lafs - changeFont - showMonsters showExits showBackground showDoorsKeys showWall showEquipment showTreasure showConnected resetShow #view.menu=changeFont - viewShow viewAlpha -#view.menu=viewShow viewAlpha gridVisible useDouble - prevWindow nextWindow -view.menu=gridVisible useDouble - prevWindow nextWindow +#view.menu=viewShow viewAlpha gridVisible drawDouble - prevWindow nextWindow +view.menu=gridVisible drawDouble - prevWindow nextWindow viewShow.menu = showMonsters showExits showBackground showDoorsKeys showWall showEquipment showTreasure showConnected resetShow viewAlpha.menu = alphaMonsters alphaExits alphaBackground alphaDoorsKeys alphaWall alphaEquipment alphaTreasure alphaConnected resetAlpha #window.menu=newWindow - closeAll +windows Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/messages.properties 2006-09-20 18:46:21 UTC (rev 347) @@ -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} \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? +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? 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} \xD7 {2}, while\n{3} has size {4} \xD7 {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} � {2}, while\n{3} has size {4} � {5}.\nThis is hazardous for server and client and MUST BE FIXED! mapMapTabTitle=Map properties mapTilesTabTitle=Map tiles mapTilesNoMapFileNoMapTilePane.title=Map tiles card unavailable @@ -750,10 +750,10 @@ gridVisible.shortdescription=Draw a grid that shows the individual map tiles gridVisible.accel=ctrl pressed G -useDouble.text=Draw double faces -useDouble.mnemonic=F -useDouble.shortdescription=Check this to draw double faces (e.g. stacked walls) the same way the client does -useDouble.accel=ctrl shift pressed G +drawDouble.text=Draw double faces +drawDouble.mnemonic=F +drawDouble.shortdescription=Check this to draw double faces (e.g. stacked walls) the same way the client does +drawDouble.accel=ctrl shift pressed G ######### # Window @@ -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 \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> +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> aboutTab.title=About license.text=License... Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-09-20 18:46:21 UTC (rev 347) @@ -408,9 +408,9 @@ gridVisible.mnemonic=G gridVisible.shortdescription=Zeichne ein Gitter, das die verschiedenen Kartenfelder voneinander abgrenzt -useDouble.text=Zeichne doppelte Grafiken -useDouble.mnemonic=F -useDouble.shortdescription=Zeichne Grafiken, die doppelt gezeichnet werden, tats\xE4chlich doppelt (z.B. W\xE4nde) +drawDouble.text=Zeichne doppelte Grafiken +drawDouble.mnemonic=F +drawDouble.shortdescription=Zeichne Grafiken, die doppelt gezeichnet werden, tats\xE4chlich doppelt (z.B. W\xE4nde) ######### # Window Modified: trunk/daimonin/src/daieditor/messages_sv.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_sv.properties 2006-09-20 17:15:33 UTC (rev 346) +++ trunk/daimonin/src/daieditor/messages_sv.properties 2006-09-20 18:46:21 UTC (rev 347) @@ -741,10 +741,10 @@ gridVisible.shortdescription=Rita ut rutn\xE4t f\xF6r att visa enstaka kartrutor gridVisible.accel=ctrl pressed G -useDouble.text=Visa dubbla bilder -useDouble.mnemonic=F -useDouble.shortdescription=Markera f\xF6r att rita ut dubbla bilder (t.ex. v\xE4ggar) p\xE5 samma s\xE4tt som klienten -useDouble.accel=ctrl shift pressed G +drawDouble.text=Visa dubbla bilder +drawDouble.mnemonic=F +drawDouble.shortdescription=Markera f\xF6r att rita ut dubbla bilder (t.ex. v\xE4ggar) p\xE5 samma s\xE4tt som klienten +drawDouble.accel=ctrl shift pressed G ######### # Window This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-20 17:15:49
|
Revision: 346 http://svn.sourceforge.net/gridarta/?rev=346&view=rev Author: christianhujer Date: 2006-09-20 10:15:33 -0700 (Wed, 20 Sep 2006) Log Message: ----------- (This is an automatic message!) Released new update version, committing next build number. Modified Paths: -------------- trunk/daimonin/nextBuildNumber.properties Modified: trunk/daimonin/nextBuildNumber.properties =================================================================== --- trunk/daimonin/nextBuildNumber.properties 2006-09-20 17:13:52 UTC (rev 345) +++ trunk/daimonin/nextBuildNumber.properties 2006-09-20 17:15:33 UTC (rev 346) @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Tue Sep 19 00:58:41 CEST 2006 -build.number=2931 +#Wed Sep 20 19:07:42 CEST 2006 +build.number=2932 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-20 17:13:58
|
Revision: 345 http://svn.sourceforge.net/gridarta/?rev=345&view=rev Author: christianhujer Date: 2006-09-20 10:13:52 -0700 (Wed, 20 Sep 2006) Log Message: ----------- Bug: cut or delete aren't working. Fixed. Modified Paths: -------------- trunk/daimonin/src/daieditor/CopyBuffer.java Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-20 17:13:24 UTC (rev 344) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-20 17:13:52 UTC (rev 345) @@ -149,6 +149,7 @@ final Point offset = selRec.getLocation(); mapControl.getMapModel().beginTransaction(); + final List<ArchObject> archesToDelete = new ArrayList<ArchObject>(); for (final MapSquare square : mapControl.getMapViewFrame().getView().getSelectedSquares()) { final int posx = square.getMapX(); final int posy = square.getMapY(); @@ -164,7 +165,6 @@ assert copyMapCtrl != null; copyMapCtrl.getMapModel().addArchObjectToMap(clone, false); } - // delete the arch if we have a "cut" or "clear" command // again, arches that don't match the view settings are ignored if ((mode == Mode.DO_CLEAR || mode == Mode.DO_CUT) && mainControl.isTileEdit(arch)) { @@ -173,11 +173,14 @@ // above the head (we would miss to copy them otherwise). if (mode == Mode.DO_CLEAR || !arch.isMulti() || arch.getMultiRefCount() > 0 || arch.getMapMultiHead() != null && arch.getMultiRefX() >= 0 && arch.getMultiRefY() >= 0) { - mapControl.getMapModel().deleteMapArch(arch, false); + archesToDelete.add(arch); } } } } + for (final ArchObject arch : archesToDelete) { + arch.remove(); + } mapControl.getMapModel().endTransaction(); // finally redraw the map if (mode != Mode.DO_COPY) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-20 17:13:30
|
Revision: 344 http://svn.sourceforge.net/gridarta/?rev=344&view=rev Author: christianhujer Date: 2006-09-20 10:13:24 -0700 (Wed, 20 Sep 2006) Log Message: ----------- Cosmetic change of constant notation for readability. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileEncode.java Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:50:27 UTC (rev 343) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-20 17:13:24 UTC (rev 344) @@ -44,7 +44,7 @@ * @author <a href="mailto:and...@gm...">Andreas Vogl</a> * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public final class CMapFileEncode { +@SuppressWarnings({"HardcodedLineSeparator"}) public final class CMapFileEncode { /** * Write the map to this writer. @@ -140,7 +140,7 @@ writer.write("msg\n"); if (arch.getMsgText().trim().length() > 0) { writer.write(arch.getMsgText()); - if (arch.getMsgText().lastIndexOf(0x0a) != arch.getMsgText().length() - 1) { + if (arch.getMsgText().lastIndexOf('\n') != arch.getMsgText().length() - 1) { writer.write("\n"); } } @@ -170,7 +170,7 @@ } writer.write(arch.getArchText()); - if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { + if (arch.getArchText().lastIndexOf('\n') != arch.getArchText().length() - 1) { writer.write("\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 23:50:34
|
Revision: 343 http://svn.sourceforge.net/gridarta/?rev=343&view=rev Author: christianhujer Date: 2006-09-18 16:50:27 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Improved writing x|y coordinate of map arches. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileEncode.java Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:45:54 UTC (rev 342) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:50:27 UTC (rev 343) @@ -80,14 +80,15 @@ for (final ArchObject node : mapModel.getMapSquare(pos)) { // only non multi suckers if (node.getMapMultiHead() == null && node.getMultiRefCount() == 0) { - writeMapArch(node, false); + writeMapArch(node, pos.x, pos.y); } } // node } // y } // x - for (final MapSquare square : mapModel) { + final int x = square.getMapX(); + final int y = square.getMapY(); for (final ArchObject node : square) { // search only for heads! if (node.getMultiRefCount() > 0 && node.getMapMultiHead() == null) { @@ -106,7 +107,7 @@ // only the heads get stored in the mapfile // (that's much more efficient) - writeMapArch(node, false); + writeMapArch(node, x, y); } // node } // y } // x @@ -117,23 +118,13 @@ } /** - * Walk through the inventory of an arch and write everything into the file. - * @param start the container arch whose inventory is to be written - * @throws IOException in case of I/O problems - */ - private void browseInvObjects(final ArchObject start) throws IOException { - for (final ArchObject arch : start) { - writeMapArch(arch, true); - } - } - - /** * Here the map arch gets written into the file. * @param arch <code>ArchObject</code> to be written into the map - * @param isInventory is 'arch' inside a container? true/false + * @param x x position of arch (0 if <var>arch</var> is inside an inventory) + * @param y y position of arch (0 if <var>arch</var> is inside an inventory) * @throws IOException in case of I/O problems */ - private void writeMapArch(final ArchObject arch, final boolean isInventory) throws IOException { + private void writeMapArch(final ArchObject arch, final int x, final int y) throws IOException { final ArchObject defarch = arch.getDefaultArch(); // ok, we start with the standard parts... this is valid for all types @@ -183,25 +174,21 @@ writer.write("\n"); } - if (!isInventory) { - final MapSquare square = arch.getMapSquare(); - assert square != null; - final int x = square.getMapX(); - final int y = square.getMapY(); - // map coordinates only belong into map arches (not inventory arches) - if (x != 0) { - writer.write("x "); - writer.write(Integer.toString(x)); - writer.write("\n"); - } - if (y != 0) { - writer.write("y "); - writer.write(Integer.toString(y)); - writer.write("\n"); - } + // map coordinates only belong into map arches (not inventory arches) + if (x != 0) { + writer.write("x "); + writer.write(Integer.toString(x)); + writer.write("\n"); } + if (y != 0) { + writer.write("y "); + writer.write(Integer.toString(y)); + writer.write("\n"); + } - browseInvObjects(arch); // write his inventory inside this arch + for (final ArchObject arch1 : arch) { + writeMapArch(arch1, 0, 0); + } writer.write("end\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 23:45:58
|
Revision: 342 http://svn.sourceforge.net/gridarta/?rev=342&view=rev Author: christianhujer Date: 2006-09-18 16:45:54 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Added assertion for map square of an arch that's written to not be null. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileEncode.java Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:16:38 UTC (rev 341) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:45:54 UTC (rev 342) @@ -185,6 +185,7 @@ if (!isInventory) { final MapSquare square = arch.getMapSquare(); + assert square != null; final int x = square.getMapX(); final int y = square.getMapY(); // map coordinates only belong into map arches (not inventory arches) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 23:16:44
|
Revision: 341 http://svn.sourceforge.net/gridarta/?rev=341&view=rev Author: christianhujer Date: 2006-09-18 16:16:38 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Improved documentation about downloading. Modified Paths: -------------- trunk/src/doc/start.xhtml trunk/src/doc/subversion.xhtml Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2006-09-18 23:10:00 UTC (rev 340) +++ trunk/src/doc/start.xhtml 2006-09-18 23:16:38 UTC (rev 341) @@ -31,6 +31,8 @@ <h2>Download Gridarta</h2> <p> Gridarta can't be downloaded yet. + To download an executable Gridarta for Daimonin, visit the <a href="http://www.daimonin.net/">Daimonin Website</a>. + You can also access the <a href="subversion">latest source code through subversion</a>. <!--To <em>download Gridarta</em>, go to the <a href="http://sourceforge.net/project/showfiles.php?group_id=166996">Files section of the Gridarta Project Page</a>, choose the desired package, release and file type and download it from a mirror of your choice.--> </p> <h2>Documentation</h2> Modified: trunk/src/doc/subversion.xhtml =================================================================== --- trunk/src/doc/subversion.xhtml 2006-09-18 23:10:00 UTC (rev 340) +++ trunk/src/doc/subversion.xhtml 2006-09-18 23:16:38 UTC (rev 341) @@ -76,5 +76,9 @@ <var>version</var> being the release name. To checkout, for example, version <samp>0.8.0</samp>, use <samp>svn co https://svn.sourceforge.net/svnroot/gridarta/tags/0.8.0 gridarta</samp>. </p> + <h2>See Also</h2> + <ul> + <li><a href="http://sourceforge.net/svn/?group_id=166996">SourceForge.net: Subversion for Gridarta</a></li> + </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 23:10:09
|
Revision: 340 http://svn.sourceforge.net/gridarta/?rev=340&view=rev Author: christianhujer Date: 2006-09-18 16:10:00 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Improved commit comment for scpPublish. Modified Paths: -------------- trunk/daimonin/build.xml trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/arch/ArchObject.java Modified: trunk/daimonin/build.xml =================================================================== --- trunk/daimonin/build.xml 2006-09-18 23:06:16 UTC (rev 339) +++ trunk/daimonin/build.xml 2006-09-18 23:10:00 UTC (rev 340) @@ -313,7 +313,7 @@ </scp> <buildnumber file="nextBuildNumber.properties" /> <exec executable="svn"> - <arg line="commit -m "Released new update version, committing next build number." nextBuildNumber.properties" /> + <arg line="commit -m "(This is an automatic message!) Released new update version, committing next build number." nextBuildNumber.properties" /> </exec> </target> Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:06:16 UTC (rev 339) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 23:10:00 UTC (rev 340) @@ -184,15 +184,18 @@ } if (!isInventory) { + final MapSquare square = arch.getMapSquare(); + final int x = square.getMapX(); + final int y = square.getMapY(); // map coordinates only belong into map arches (not inventory arches) - if (arch.getMapX() != 0) { + if (x != 0) { writer.write("x "); - writer.write(Integer.toString(arch.getMapX())); + writer.write(Integer.toString(x)); writer.write("\n"); } - if (arch.getMapY() != 0) { + if (y != 0) { writer.write("y "); - writer.write(Integer.toString(arch.getMapY())); + writer.write(Integer.toString(y)); writer.write("\n"); } } Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-18 23:06:16 UTC (rev 339) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-18 23:10:00 UTC (rev 340) @@ -774,12 +774,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} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 23:06:24
|
Revision: 339 http://svn.sourceforge.net/gridarta/?rev=339&view=rev Author: christianhujer Date: 2006-09-18 16:06:16 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Released new update version, committing next build number. Modified Paths: -------------- trunk/daimonin/nextBuildNumber.properties Modified: trunk/daimonin/nextBuildNumber.properties =================================================================== --- trunk/daimonin/nextBuildNumber.properties 2006-09-18 22:56:49 UTC (rev 338) +++ trunk/daimonin/nextBuildNumber.properties 2006-09-18 23:06:16 UTC (rev 339) @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Tue Sep 19 00:49:14 CEST 2006 -build.number=2930 +#Tue Sep 19 00:58:41 CEST 2006 +build.number=2931 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-18 22:56:55
|
Revision: 338 http://svn.sourceforge.net/gridarta/?rev=338&view=rev Author: christianhujer Date: 2006-09-18 15:56:49 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Released new update version, committing next build number. Modified Paths: -------------- trunk/daimonin/nextBuildNumber.properties Modified: trunk/daimonin/nextBuildNumber.properties =================================================================== --- trunk/daimonin/nextBuildNumber.properties 2006-09-18 19:49:09 UTC (rev 337) +++ trunk/daimonin/nextBuildNumber.properties 2006-09-18 22:56:49 UTC (rev 338) @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Thu Sep 14 00:54:43 CEST 2006 -build.number=2929 +#Tue Sep 19 00:49:14 CEST 2006 +build.number=2930 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-18 19:49:32
|
Revision: 337 http://svn.sourceforge.net/gridarta/?rev=337&view=rev Author: akirschbaum Date: 2006-09-18 12:49:09 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Fix MultiArchData implementation (cfeditor). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/ChangeLog 2006-09-18 19:49:09 UTC (rev 337) @@ -0,0 +1,7 @@ +2006-09-18 Andreas Kirschbaum + + * Fix MultiArchData implementation. The main reason was code + cleanup but it also fixes: + - Prevent multi-part objects from overlapping other objects in + pickmaps. + - (Partially) fix fill and replace with multi-part objects. Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-18 19:49:09 UTC (rev 337) @@ -139,8 +139,8 @@ archTypeText.setText("<html><font color=black>Type: " + mainControl.getArchObjectParser().getArchTypeName(arch.getArchTypNr()) + " (" + arch.getArchTypNr() + ") </font></html>"); - if (arch.getMultiRefCount() > 0) { - archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> (" + +(arch.getMultiRefCount() + 1) + " parts) (" + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) + "," + (arch.getRefMaxY() - arch.getRefMaxMY() + 1) + ")</font></html>"); + if (arch.isMulti()) { + archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> (" + arch.getMultiRefCount() + " parts) (" + arch.getSizeX() + "," + arch.getSizeY() + ")</font></html>"); } else { archTileText.setText("<html><font color=black>Tile: single" + "</font></html>"); } Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-18 19:49:09 UTC (rev 337) @@ -179,8 +179,8 @@ CAttribDialog.setDefaultBounds(); // set width/height etc // reference to the ArchObject - if (aobj.isMulti() && aobj.getMapMultiHead() != null) { - arch = aobj.getMapMultiHead(); + if (aobj.isTail()) { + arch = aobj.getHead(); defarch = this.mainControl.getArchObjectStack().getArch(arch.getNodeNr()); } else { arch = aobj; Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-18 19:49:09 UTC (rev 337) @@ -991,19 +991,14 @@ // ok, we have it all!! final MapControl control; - if (objects == null) { - // The map is totally empty - control = newLevel(objects, maparch, show, initial); // init the map - } else { - // go to ArchObjectParser and add the default arch list information to them - if (!collectTempList(objects, file)) { // get face names, face id, etc. - 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 + // go to ArchObjectParser and add the default arch list information to them + if (!collectTempList(objects, file)) { // get face names, face id, etc. + 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 + if (show) { // finally, show the map and refresh toolbars currentMap.setMapFile(file); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-09-18 19:49:09 UTC (rev 337) @@ -311,7 +311,7 @@ } if (arch != null) { // so here we return the arch from the pickmap - return arch; + return arch.getHead(); } } } Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-18 19:49:09 UTC (rev 337) @@ -267,7 +267,7 @@ } // no single tile? - if (arch.getMultiRefCount() > 0 || arch.isReferenced()) { + if (arch.isMulti() || arch.isTail()) { return; } @@ -277,9 +277,7 @@ } // if this is a multi-tail, we put the new arch into the head's inv. - if (inv.isReferenced() && inv.getMapMultiHead() != null) { - inv = inv.getMapMultiHead(); - } + inv = inv.getHead(); final ArchObject invnew; if (arch.isDefaultArch()) { @@ -312,12 +310,7 @@ // If the active arch is part of a multi, the mutli-head's stats // are taken instead: - final ArchObject arch; - if (activeArch.isReferenced() && activeArch.getMapMultiHead() != null) { - arch = activeArch.getMapMultiHead(); - } else { - arch = activeArch; - } + final ArchObject arch = activeArch.getHead(); final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); if (defarch == null) { // hm, this should NOT happen @@ -707,12 +700,7 @@ // If the active arch is part of a multi, the mutli-head's stats // are displayed (Only the head can store information!). - final ArchObject arch; - if (activeArch.isReferenced() && activeArch.getMapMultiHead() != null) { - arch = activeArch.getMapMultiHead(); - } else { - arch = activeArch; - } + final ArchObject arch = activeArch.getHead(); // no text, we try to set the default text final boolean hasMessage; @@ -788,10 +776,9 @@ } // check for multi tile - if (arch.getMultiRefCount() > 0 || arch.isReferenced()) { + if (arch.isMulti() || arch.isTail()) { // multi: print size - archTileText.setText("Tile: " + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) - + "x" + (arch.getRefMaxY() - arch.getRefMaxMY() + 1)); + archTileText.setText("Tile: " + arch.getSizeX() + "x" + arch.getSizeY()); } else { // single archTileText.setText("Tile: single"); @@ -851,8 +838,8 @@ */ public void editScriptWanted(final int task) { ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch - if (arch != null && arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // if it's a multi, always take the head + if (arch != null) { + arch = arch.getHead(); } // check for a valid selection in the event list @@ -871,9 +858,7 @@ public void addNewScriptWanted() { ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch != null) { - if (arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // if it's a multi, always add scripts to head - } + arch = arch.getHead(); arch.addEventScript(eventList, this); } } Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-18 19:49:09 UTC (rev 337) @@ -89,7 +89,7 @@ while (it.hasNext()) { final ArchObject node = (ArchObject) it.next(); // only non multi suckers - if (node.getMapMultiHead() == null && node.getMapMultiNext() == null) { + if (!node.isMulti()) { if (!writeMapArch(node, false)) { return; } @@ -105,19 +105,7 @@ while (it.hasNext()) { final ArchObject node = (ArchObject) it.next(); // search only for heads! - if (node.getMultiRefCount() > 0 && node.getMapMultiNext() != null) { - /* old version: Both heads and tails got written into the mapfile - for (multi = node; ; ) { - if (!writeMapArch(multi, false)) { - return; - } - multi = multi.getMapMultiNext(); - if (multi == null) { - break; - } - bufferedWriter.write("More\n"); - }*/ - + if (node.isMulti() && node.isHead()) { // only the heads get stored in the mapfile // (that's much more efficient) if (!writeMapArch(node, false)) { Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-18 19:49:09 UTC (rev 337) @@ -371,22 +371,18 @@ */ 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 - final Iterator it; - if (node.isReferenced() && node.getMapMultiHead() != null) { - final Iterator it2 = node.getMapMultiHead().iterator(); // we go to heads inv. + 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()); } - - it = node.getMapMultiHead().iterator(); // we go to heads inv. - } else { - it = node.iterator(); // we go to our own inv. start } final String indentStr = Integer.toString(indent); + final Iterator it = node.getHead().iterator(); while (it.hasNext()) { final ArchObject arch = (ArchObject) it.next(); @@ -462,9 +458,7 @@ // In the map-tile-window the object names are displayed // next to the icons mainControl.setPlainFont(this); - if (arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); - } + arch = arch.getHead(); if (arch.getObjName() != null && arch.getObjName().length() > 0) { setText(arch.getObjName()); // special name Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-18 19:49:09 UTC (rev 337) @@ -447,22 +447,17 @@ if (mapControl.isPointValid(arch.getMapX(), arch.getMapY() - 1)) { redraw[--num] = new Point(arch.getMapX(), arch.getMapY() - 1); } + assert num == 0; } else if (arch.isMulti()) { - // this arch is a multi: - if (arch.isReferenced() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // make sure we got the head - } + arch = arch.getHead(); // make sure we got the head - int num = arch.getMultiRefCount() + 1; // get number of parts - if (num <= 1) { // safety check - return null; - } - + int num = arch.getMultiRefCount(); // get number of parts redraw = new Point[num]; // create instance of needed size for (ArchObject tmp = arch; num > 0 && tmp != null; - num--, tmp = tmp.getMapMultiNext()) { + num--, tmp = tmp.getMultiNext()) { redraw[num - 1] = new Point(tmp.getMapX(), tmp.getMapY()); } + assert num == 0; } else { // just an ordinary single-square arch redraw = new Point[1]; @@ -754,7 +749,7 @@ final ImageIcon img = archlist.getFace(node.getFaceNr()); if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32)) { archlist.getFace(node.getFaceNr()).paintIcon(this, grfx, x * 32 + bOffset, y * 32 + bOffset); - } else if (node.getMultiRefCount() > 0) { + } else if (node.isHead()) { oversizedMultiHeads.addElement(node); // store oversized arches for later } } @@ -858,11 +853,11 @@ mainControl.getUnknownTileIconX().paintIcon(this, tmpGrfx, 0, 0); } else { final ImageIcon img = archlist.getFace(node.getFaceNr()); - if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32) || node.getMultiRefCount() > 0) { + if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32)) { img.paintIcon(this, tmpGrfx, 0, 0); } else { - // this is an oversized image and not the head, so it must be shifted - img.paintIcon(this, tmpGrfx, -32 * node.getMultiRefX(), -32 * node.getMultiRefY()); + // this is an oversized image, so it must be shifted + img.paintIcon(this, tmpGrfx, -32 * node.getMultiX(), -32 * node.getMultiY()); } } } @@ -1431,9 +1426,7 @@ needRedraw = calcArchRedraw(newarch); } else { // insert multi tile from pickmap: - if (newarch.getMapMultiHead() != null) { - newarch = newarch.getMapMultiHead(); - } + newarch = newarch.getHead(); // first insert default arch from archlist if (!mapControl.addArchToMap(newarch.getNodeNr(), pos, allowMany ? -1 : drawInternCount, MapModel.JOIN_DISABLE)) { // do nothing @@ -1487,15 +1480,13 @@ needRedraw = calcArchRedraw(newarch); } else { // insert multi tile from pickmap: - if (newarch.getMapMultiHead() != null) { - newarch = newarch.getMapMultiHead(); - } + newarch = newarch.getHead(); // check if all spaces are free that the multi will occupy boolean allSpacesFree = true; final Point d = new Point(); - for (d.x = pos.x; d.x - pos.x <= newarch.getRefMaxX(); d.x++) { - for (d.y = pos.y; d.y - pos.y <= newarch.getRefMaxY(); d.y++) { + for (d.x = pos.x + newarch.getMinX(); d.x <= pos.x + newarch.getMaxX(); d.x++) { + for (d.y = pos.y + newarch.getMinX(); d.y <= pos.y + newarch.getMaxY(); d.y++) { if (!mapControl.isPointValid(d) || mapControl.containsArchObject(d)) { allSpacesFree = false; } Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-18 19:49:09 UTC (rev 337) @@ -173,7 +173,7 @@ // (for multiparts, only the heads get copied into the buffer) // arches that don't match the view settings are ignored! if ((mode == DO_CUT || mode == DO_COPY) && - !arch.isReferenced() && arch.getContainer() == null && + arch.isHead() && arch.getContainer() == null && (mainControl.getTileEdit() == 0 || mainControl.isTileEdit(arch.getEditType()))) { // copy this arch final ArchObject clone = arch.createClone(Math.abs(pos.x - startp.x), Math.abs(pos.y - startp.y)); @@ -189,8 +189,7 @@ // delete arch (without redrawing the map) // For CUT we don't delete multi tails of multis which are left or // above the head (we would miss to copy them otherwise). - if (mode == DO_CLEAR || !arch.isMulti() || arch.getMultiRefCount() > 0 || - (arch.getMapMultiHead() != null && arch.getMultiRefX() >= 0 && arch.getMultiRefY() >= 0)) { + if (mode == DO_CLEAR || (arch.getMultiX() >= 0 && arch.getMultiY() >= 0)) { it.remove(); } } @@ -247,51 +246,8 @@ final Iterator<ArchObject> it = buffCtrl.getArchObjects(sourcePos); while (it.hasNext()) { final ArchObject arch = it.next(); - if (arch.getMultiRefCount() > 0) { - // first we clone the head - final ArchObject clone = arch.createClone(pos.x, pos.y); - - // second we insert a default multi on the map - if (mapControl.addArchToMap(arch.getNodeNr(), pos, -1, MapModel.JOIN_DISABLE)) { - // third we chop off the default head and attach our clone - ArchObject oldHead = null; // get default head - final Iterator<ArchObject> it2 = mapControl.getArchObjects(pos); - while (it2.hasNext()) { - oldHead = it2.next(); - } - - if (oldHead != null && oldHead.getNodeNr() == arch.getNodeNr()) { - // replace old head with our clone: - if (oldHead.getPrev() != null) { - oldHead.getPrev().setNext(clone); - clone.setPrev(oldHead.getPrev()); - } else { - // no previous arch, we must stick it on the grid - mapControl.setArchObject(pos, clone); - } - - if (oldHead.getNext() != null) { - oldHead.getNext().setPrev(clone); - clone.setNext(oldHead.getNext()); - } - - clone.setMyID(oldHead.getMyID()); // pass ID to new head - clone.setMapMultiNext(oldHead.getMapMultiNext()); // set link to tail - - for (ArchObject tmp = clone.getMapMultiNext(); tmp != null; - tmp = tmp.getMapMultiNext()) { - tmp.setMapMultiHead(clone); // all tails point to new head - } - - // delete old head: - oldHead.setNext(null); - oldHead.setPrev(null); - oldHead.setMapMultiNext(null); - oldHead = null; - } else { - LOG.error("Error in CopyBuffer.paste(): Couldn't find multi-head after insertion!"); - } - } + if (arch.isMulti()) { + addArchToMap(mapControl, arch, pos, -1, false); } } } @@ -328,7 +284,7 @@ !mapControl.containsArchObject(startp)) { arch = mainControl.getArchPanelSelection(); if (arch != null) { - floodfill(mapControl, startp.x, startp.y, arch, arch.isDefaultArch()); // floodfill + floodfill(mapControl, startp.x, startp.y, arch); } } else { // Rectangular fill: @@ -344,19 +300,12 @@ // get the arch to fill with arch = mainControl.getArchPanelSelection(); - final boolean isDefarch = arch.isDefaultArch(); // cycle through all tile coordinates which are highlighted: for (pos.x = startp.x; pos.x - startp.x <= offset.x; pos.x++) { for (pos.y = startp.y; pos.y - startp.y <= offset.y; pos.y++) { // Insert the new arch into the map - if (isDefarch) { - mapControl.addArchToMap(mainControl.getPanelArch(), pos, 0, - MapModel.JOIN_DISABLE, fillBelow); - } else { - // insert arch-clone from pickmap - mapControl.addArchObjectToMap(arch.createClone(pos.x, pos.y), fillBelow); - } + addArchToMap(mapControl, arch, pos, 0, fillBelow); } } } @@ -375,31 +324,22 @@ * @param x starting x-coord for floodfill * @param y starting y-coord for floodfill * @param arch ArchObject to fill with - * @param isDefarch true when 'arch' is a default arch */ - private static void floodfill(final MapControl mapControl, final int x, final int y, final ArchObject arch, final boolean isDefarch) { - final Point p = new Point(x, y); - // insert new arch to x, y - //mapControl.addArchToMap(mainControl.getPanelArch(), p, 0, MapModel.JOIN_DISABLE); - if (isDefarch) { - mapControl.addArchToMap(arch.getNodeNr(), p, 0, MapModel.JOIN_DISABLE); - } else { - // insert arch-clone from pickmap - mapControl.addArchObjectToMap(arch.createClone(x, y)); - } + private void floodfill(final MapControl mapControl, final int x, final int y, final ArchObject arch) { + addArchToMap(mapControl, arch, new Point(x, y), 0, false); // now go recursive into all four directions if (mapControl.isPointValid(x - 1, y) && !mapControl.containsArchObject(x - 1, y)) { - floodfill(mapControl, x - 1, y, arch, isDefarch); + floodfill(mapControl, x - 1, y, arch); } if (mapControl.isPointValid(x, y - 1) && !mapControl.containsArchObject(x, y - 1)) { - floodfill(mapControl, x, y - 1, arch, isDefarch); + floodfill(mapControl, x, y - 1, arch); } if (mapControl.isPointValid(x + 1, y) && !mapControl.containsArchObject(x + 1, y)) { - floodfill(mapControl, x + 1, y, arch, isDefarch); + floodfill(mapControl, x + 1, y, arch); } if (mapControl.isPointValid(x, y + 1) && !mapControl.containsArchObject(x, y + 1)) { - floodfill(mapControl, x, y + 1, arch, isDefarch); + floodfill(mapControl, x, y + 1, arch); } } @@ -411,4 +351,31 @@ ReplaceDialog.getInstance().display(mapControl); } + /** + * Add an archetype to the destination map. Inserts a new object instance + * for default archetypes, and a clone for non-default archetypes. + */ + private void addArchToMap(final MapControl mapControl, final ArchObject arch, final Point pos, final int intern, final boolean fillBelow) { + final ArchObject newHead; + if (arch.isDefaultArch()) { + mapControl.addArchToMap(arch.getNodeNr(), pos, intern, false, fillBelow); + } else { + 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()); + newTail.setMultiX(tmp.getMultiX()); + newTail.setMultiY(tmp.getMultiY()); + newTail.setMapX(pos.x + newTail.getMultiX()); + newTail.setMapY(pos.y + newTail.getMultiY()); + newHead.addTailPart(newTail); + } + + mapControl.addArchObjectToMap(newHead, fillBelow); + for (ArchObject tmp = newHead.getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + mapControl.addArchObjectToMap(tmp, fillBelow); + mainControl.getArchObjectParser().postParseMapArch(tmp, mapControl.getActiveEditType()); + } + } + } + } // class CopyBuffer Modified: trunk/crossfire/src/cfeditor/MultiArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-18 19:49:09 UTC (rev 337) @@ -2,6 +2,7 @@ * Crossfire Java Editor. * Copyright (C) 2000 Michael Toennies * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 Andreas Kirschbaum * * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) * @@ -25,197 +26,169 @@ package cfeditor; import cfeditor.arch.ArchObject; +import java.util.ArrayList; /** - * Class related to ArchObject to store multipart information. - * This data is only needed by multiparts. When the editor is running, - * usually a big number of ArchObjects exist - most of them single-tile - * objects. The encapsulation of this "multpart-only" data can save - * a little bit of memory. + * Class related to {@link ArchObject} to store multipart information. This + * data is only used for multi-part objects. When the editor is running, + * usually a big number of <code>ArchObject</code>s exist - most of them + * single-part objects. The encapsulation of this "multi-part-only" data can + * save a little bit of memory. + * * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @author Andreas Kirschbaum */ public final class MultiArchData { - private boolean referenced; // true: this arch is a part of the tail - NOT the head + /** + * Maximum coordinate of any part; it is never negative. + */ + private int maxX = 0; - private int refnr; // if != -1 - multi tile + /** + * Maximum coordinate of any part; it is never negative. + */ + private int maxY = 0; - // if refnr == nodenr - // then first tile - // else refnr==first tile - private int refx; // multi tile: offset pos from head + /** + * Minimum coordinate of any part; it is never positive. + */ + private int minX = 0; - private int refy; // sic! + /** + * Minimum coordinate of any part; it is never positive. + */ + private int minY = 0; - private int refcount; // head: number of parts (>0 means it's ahead) - - private int refmaxx; // head: parts in x - - private int refmaxy; // head: parts in y - - private int refmaxxm; // head: parts in x to count minus referenced - - private int refmaxym; // head: parts in y sic - - private int multiShapeID; // the ID of the multiPositionData (only for multiparts in ISO_VIEW!) - - private int multiPartNr; // the part number for this tile (only for multiparts in ISO_VIEW!) - - private boolean isLowestPart; // lowest part of all multi tiles (only for multiparts in ISO_VIEW!) - - private ArchObject head; // multi tile, this is the head - - private ArchObject nextref; // next multi tile of this arch in map - - /** Constructor: Initializing the data */ - public MultiArchData() { - refmaxx = refmaxy = 0; - refnr = -1; - referenced = false; - refcount = 0; - head = nextref = null; - isLowestPart = false; - refx = 0; - refy = 0; - } - /** - * @return an identical copy of this MultiArchData object. - * The links are not copied though! A cloned multipart needs to - * be re-linked properly before it can be used! + * All parts belonging to this multi-part object; the first element is the + * head part. */ - public MultiArchData getClone() { - final MultiArchData clone = new MultiArchData(); + private final ArrayList<ArchObject> parts = new ArrayList<ArchObject>(); - clone.referenced = referenced; // true: this arch is a multi tile part - // and NOT the head - clone.refnr = refnr; // if != -1 - multi tile; if refnr == nodenr then first tile - // else refnr==first tile; multi tile: offset pos from head - clone.refx = refx; - clone.refy = refy; // sic! - clone.refcount = refcount; // head: number of parts - clone.refmaxx = refmaxx; // head: parts in x - clone.refmaxy = refmaxy; // head: parts in y - clone.refmaxxm = refmaxxm; // head: parts in x to count minus referenced - clone.refmaxym = refmaxym; // head: parts in y sic - clone.multiShapeID = multiShapeID; // ID for the multiPositionData - clone.multiPartNr = multiPartNr; // part number for the multiPositionData - clone.isLowestPart = isLowestPart; // lowest part of all multi tiles - - return clone; + /** + * Create a new instance. + * + * @param head the head part of the multi-part object + */ + public MultiArchData(final ArchObject head) { + assert head.getMultiX() == 0 && head.getMultiY() == 0; + parts.add(head); } - // --- GET/SET methods --- - public boolean isReferenced() { - return referenced; - } - - public void setReferenced(final boolean referenced) { - this.referenced = referenced; - } - - public boolean isLowestPart() { - return isLowestPart; - } - - public void setLowestPart(final boolean lowestPart) { - isLowestPart = lowestPart; - } - - public int getRefNr() { - return refnr; - } - - public void setRefNr(final int value) { - refnr = value; - } - - public int getRefX() { - return refx; - } - - public void setRefX(final int value) { - refx = value; - } - - public int getRefY() { - return refy; - } - - public void setRefY(final int value) { - refy = value; - } - + /** + * Return the number of parts this multi-part objects contains. + */ public int getMultiRefCount() { - return refcount; + return parts.size(); } - public void setMultiRefCount(final int refcount) { - this.refcount = refcount; + /** + * Determine the horizontal extent in tiles. For single-part objects 1 is + * returned. + * + * @return the horizontal extent + */ + public int getSizeX() { + return maxX - minX + 1; } - public int getRefMaxx() { - return refmaxx; + /** + * Determine the vertical extent in tiles. For single-part objects 1 is + * returned. + * + * @return the vertical extent + */ + public int getSizeY() { + return maxY - minY + 1; } - public void setRefMaxx(final int value) { - refmaxx = value; + /** + * Determine the maximum x-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the maximum x-coordinate + */ + public int getMaxX() { + return maxX; } - public int getRefMaxxm() { - return refmaxxm; + /** + * Determine the maximum y-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the maximum y-coordinate + */ + public int getMaxY() { + return maxY; } - public void setRefMaxxm(final int value) { - refmaxxm = value; + /** + * Determine the minimum x-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the minimum x-coordinate + */ + public int getMinX() { + return minX; } - public int getRefMaxy() { - return refmaxy; + /** + * Determine the minimum y-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the minimum y-coordinate + */ + public int getMinY() { + return minY; } - public void setRefMaxy(final int value) { - refmaxy = value; + /** + * Return the head part of this multi-part object. + * + * @return the head part + */ + public ArchObject getHead() { + return parts.get(0); } - public int getRefMaxym() { - return refmaxym; + /** + * Return the part following a given part. + * + * @param the current part + * + * @return the part following the current part + */ + public ArchObject getNext(final ArchObject ob) { + assert ob != null; + final int index = parts.indexOf(ob); + assert index != -1; + return index + 1 < parts.size() ? parts.get(index + 1) : null; } - public void setRefMaxym(final int value) { - refmaxym = value; - } + /** + * Add a part to this multi-part object. + * + * @param tail the tail part to add + */ + public void addPart(final ArchObject tail) { + assert tail != null; - public int getMultiShapeID() { - return multiShapeID; - } + parts.add(tail); - public void setMultiShapeID(final int multiShapeID) { - this.multiShapeID = multiShapeID; - } + final int x = tail.getMultiX(); + if (x < minX) { + minX = x; + } else if (x > maxX) { + maxX = x; + } - public int getMultiPartNr() { - return multiPartNr; + final int y = tail.getMultiY(); + if (y < minY) { + minY = y; + } else if (y > maxY) { + maxY = y; + } } - public void setMultiPartNr(final int value) { - multiPartNr = value; - } - - public ArchObject getHead() { - return head; - } - - public void setHead(final ArchObject node) { - head = node; - } - - public ArchObject getNext() { - return nextref; - } - - public void setNext(final ArchObject node) { - nextref = node; - } - } // class MultiArchData Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-18 19:49:09 UTC (rev 337) @@ -341,9 +341,7 @@ // insert replacement object if (replaceArch.isMulti()) { // multi's cannot be inserted properly, so we just put them ontop - if (replaceArch.getMultiRefCount() == 0 && replaceArch.getMapMultiHead() != null) { - replaceArch = replaceArch.getMapMultiHead(); - } + replaceArch = replaceArch.getHead(); mapControl.addArchToMap(replaceArch.getNodeNr(), pos, 0, false); // TODO: if from pickmap it could have special attributes -> copy them Modified: trunk/crossfire/src/cfeditor/arch/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-18 19:49:09 UTC (rev 337) @@ -120,6 +120,18 @@ private MultiArchData multi; /** + * The x-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiX; + + /** + * The y-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiY; + + /** * Data for scripted events. * Stays null if no events defined. */ @@ -662,207 +674,146 @@ } // ---- GET/SET methods for multi arches - public int getRefMaxX() { - return multi != null ? multi.getRefMaxx() : 0; + /** + * Determine the horizontal extent in tiles. For single-part objects 1 is + * returned. + * + * @return the horizontal extent + */ + public int getSizeX() { + return multi != null ? multi.getSizeX() : 1; } - public int getRefMaxY() { - return multi != null ? multi.getRefMaxy() : 0; + /** + * Determine the vertical extent in tiles. For single-part objects 1 is + * returned. + * + * @return the vertical extent + */ + public int getSizeY() { + return multi != null ? multi.getSizeY() : 1; } - public int getRefMaxMX() { - return multi != null ? multi.getRefMaxxm() : 0; + /** + * Determine the maximum x-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the maximum x-coordinate + */ + public int getMaxX() { + return multi != null ? multi.getMaxX() : 0; } - public int getRefMaxMY() { - return multi != null ? multi.getRefMaxym() : 0; + /** + * Determine the maximum y-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the maximum y-coordinate + */ + public int getMaxY() { + return multi != null ? multi.getMaxY() : 0; } - public void setRefMaxMX(final int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setRefMaxxm(x); + /** + * Determine the minimum x-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the minimum x-coordinate + */ + public int getMinX() { + return multi != null ? multi.getMinX() : 0; } - public void setRefMaxMY(final int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setRefMaxym(y); + /** + * Determine the minimum y-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the minimum y-coordinate + */ + public int getMinY() { + return multi != null ? multi.getMinY() : 0; } - public void setRefMaxX(final int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (x < 0 && x < multi.getRefMaxxm()) { - multi.setRefMaxxm(x); - } else if (x > multi.getRefMaxx()) { - multi.setRefMaxx(x); - } + public void addTailPart(final ArchObject tail) { + initMultiData(); + tail.multi = multi; + multi.addPart(tail); } - public void setRefMaxY(final int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (y < 0 && y < multi.getRefMaxym()) { - multi.setRefMaxym(y); - } - - if (y > multi.getRefMaxy()) { - multi.setRefMaxy(y); - } + /** + * Return the head part of a multi-part object. For single-part objects it + * is the object itself. + * + * @return the head of the object + */ + public ArchObject getHead() { + return multi != null ? multi.getHead() : this; } - public void setReferenced(final boolean referenced) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setReferenced(referenced); + /** + * Determine if this part is the head part. For single-part objects this is + * always true. + * + * @return <code>true</code> iff this part if a head part + */ + public boolean isHead() { + return getHead() == this; } - public boolean isReferenced() { - return multi != null && multi.isReferenced(); + /** + * Determine if this part is a tail part. For single-part objects this is + * never true. + * + * @return <code>true</code> iff this part if a tail part + */ + public boolean isTail() { + return getHead() != this; } - // this chained multi tiles on map for fast access. better then number and search trash - public void setMapMultiHead(final ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setHead(arch); // this points to head. Heads DON'T points to himself + @Nullable public ArchObject getMultiNext() { + return multi != null ? multi.getNext(this) : null; } - public void setMapMultiNext(final ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setNext(arch); // if this is null and head != null = last tile + /** + * Set the x-position of this part of a multi-part object. The x-position + * is relative to the head part. + * + * @param the x-distance of this part to the head part + */ + public void setMultiX(final int multiX) { + this.multiX = multiX; } - @Nullable public ArchObject getMapMultiHead() { - return multi != null ? multi.getHead() : null; + /** + * Set the y-position of this part of a multi-part object. The y-position + * is relative to the head part. + * + * @param the y-distance of this part to the head part + */ + public void setMultiY(final int multiY) { + this.multiY = multiY; } - @Nullable public ArchObject getMapMultiNext() { - return multi != null ? multi.getNext() : null; - } - - public int getMultiShapeID() { - return multi != null ? multi.getMultiShapeID() : 0; - } - - public void setMultiShapeID(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiShapeID(value); - } - - public int getMultiPartNr() { - return multi != null ? multi.getMultiPartNr() : 0; - } - - public void setMultiPartNr(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiPartNr(value); - } - - public boolean isLowestPart() { - return multi != null && multi.isLowestPart(); - } - - public void setLowestPart(final boolean state) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setLowestPart(state); - } - - // Set Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public void setRefNr(final int nr) { - if (multi == null) { - if (nr != -1) { - multi = new MultiArchData(); - multi.setRefNr(nr); - } - } else { - multi.setRefNr(nr); - } - } - - // Get Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public int getRefNr() { - return multi != null ? multi.getRefNr() : -1; - - } - - // refx/refy: Offset of this multi tile from head tile - public void setRefX(final int xoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefX(xoff); - } - - public void setRefY(final int yoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefY(yoff); - } - /** - * Get the multitile arch offset. - * @return multitile arch x offset or 0 on multitile heads and singletile - * arches + * Get the x-distance of this part to the head part. For single-part + * objects this is always zero. + * + * @return the x-distance of this part to the head part */ - public int getMultiRefX() { - return multi != null ? multi.getRefX() : 0; + public int getMultiX() { + return multiX; } /** - * Get the multitile arch offset. - * @return multitile arch y offset or 0 on multitile heads and singletile - * arches + * Get the y-distance of this part to the head part. For single-part + * objects this is always zero. + * + * @return the y-distance of this part to the head part */ - public int getMultiRefY() { - return multi != null ? multi.getRefY() : 0; + public int getMultiY() { + return multiY; } - public void setMultiRefCount(final int count) { - if (multi == null) { - if (count != 0) { - multi = new MultiArchData(); - multi.setMultiRefCount(count); - } - } else { - multi.setMultiRefCount(count); - } - } - /** * Returns number of parts for multipart heads. (*.getMultiRefCount() > 0) * is often used as way to find multi-heads. @@ -872,17 +823,13 @@ return multi != null ? multi.getMultiRefCount() : 0; } - public boolean isMD() { - return multi != null; - } - /** * Initialize the multipart data object - must only be called for multipart * arches. */ - public void initMultiData() { + private void initMultiData() { if (multi == null) { - multi = new MultiArchData(); + multi = new MultiArchData(this); } } // ----- end multi-arch get/set ----- @@ -1284,9 +1231,12 @@ } if (multi != null) { - clone.multi = multi.getClone(); // clone multi data + clone.initMultiData(); } + clone.multiX = multiX; + clone.multiY = multiY; + if (script != null) { clone.script = script.getClone(); // clone scripting data } @@ -1324,7 +1274,7 @@ /** @return true if 'this' arch is part of a multisquare object */ public boolean isMulti() { - return multi != null && (multi.isReferenced() || multi.getMultiRefCount() > 0); + return multi != null; } public void addEventPlugin(final String eventType, final String pluginName) { Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-18 19:49:09 UTC (rev 337) @@ -197,6 +197,7 @@ // start with new clean ArchObject instance ArchObject arch; + ArchObject archlast = null; if (defArch == null) { arch = new ArchObject(); } else { @@ -218,7 +219,7 @@ boolean archmore = false; String oldCat = "<xxx>"; boolean isNewCategory = true; - int firstArch = -1; + ArchObject firstArch = null; String newCat = "no category info"; int archmoreCount = 0; while (thisLine2 != null) { @@ -233,12 +234,9 @@ if (!parsearch) { if (thisLine.regionMatches(0, "More", 0, 4)) { - if (firstArch == -1) { - firstArch = mainControl.getArchCount() - 1; // if more && !-1 last was first - mainControl.getArch(firstArch).setRefNr(firstArch); + if (firstArch == null) { + firstArch = archlast; } - mainControl.getArch(firstArch).setMultiRefCount(mainControl.getArch(firstArch).getMultiRefCount() + 1); - archmore = true; } else if (thisLine.regionMatches(0, "Object", 0, 6)) { if (arch == null) { @@ -246,14 +244,8 @@ } parsearch = true; - if (archmore) { - archmoreCount++; - if (LOG.isDebugEnabled()) { - LOG.debug("multi part object: part " + archmoreCount); - } - } else { - firstArch = -1; - archmoreCount = 0; + if (!archmore) { + firstArch = null; } if (archName == null) { @@ -297,12 +289,9 @@ // we got full arch parsearch = false; // we write this sucker - arch.setRefNr(firstArch); - if (firstArch != -1) { + if (firstArch != null) { // add to head our x/y position so he can setup refmax - mainControl.getArch(firstArch).setRefMaxX(arch.getMultiRefX()); - mainControl.getArch(firstArch).setRefMaxY(arch.getMultiRefY()); - arch.setReferenced(true); // mark it as ref + firstArch.addTailPart(arch); } else { mainControl.incArchObjCount(); @@ -359,6 +348,7 @@ arch.addArchText(arch.diffArchText(defArch.getArchText(), true)); return arch; } + archlast = arch; arch = null; } else { if (thisLine.regionMatches(0, "msg", 0, 3)) { @@ -392,13 +382,13 @@ LOG.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } - arch.setRefX(Integer.parseInt(thisLine.substring(2))); + arch.setMultiX(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.regionMatches(0, "y ", 0, 2)) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { LOG.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } - arch.setRefY(Integer.parseInt(thisLine.substring(2))); + arch.setMultiY(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.regionMatches(0, "type ", 0, 5)) { try { final int i = Integer.parseInt(thisLine.substring(5)); @@ -540,21 +530,9 @@ arch.setArchTypNr(defarch.getArchTypNr()); } - if (arch.isMulti() || defarch.isMulti()) { - if (!arch.isMD()) { - arch.initMultiData(); // make sure the MultiArchData is initialized - } + arch.setMultiX(defarch.getMultiX()); + arch.setMultiY(defarch.getMultiY()); - arch.setMultiRefCount(defarch.getMultiRefCount()); - arch.setReferenced(defarch.isReferenced()); - arch.setRefMaxX(defarch.getRefMaxX()); - arch.setRefMaxY(defarch.getRefMaxY()); - arch.setRefMaxMX(defarch.getRefMaxMX()); - arch.setRefMaxMY(defarch.getRefMaxMY()); - arch.setRefX(defarch.getMultiRefX()); - arch.setRefY(defarch.getMultiRefY()); - } - // arch.setEditType(defarch.getEditType()); // validate the ScriptedEvents @@ -568,8 +546,8 @@ } // Finally, we calculate the desired editType of the arch - if (arch.isReferenced() && arch.getMapMultiHead() != null) { - arch.setEditType(arch.getMapMultiHead().getEditType()); // copy from head + if (arch.isTail()) { + arch.setEditType(arch.getHead().getEditType()); // copy from head } else if (editType != 0) { arch.setEditType(arch.calculateEditType(editType)); // calculate new } @@ -587,29 +565,21 @@ final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); // default arch // is it a multi head? - if (arch != null && defarch != null && defarch.getMultiRefCount() > 0 && - arch.getMapMultiNext() == null && arch.getMapMultiHead() == null) { + if (arch != null && defarch != null && defarch.isMulti() && !arch.isMulti()) { // we have a multi head and need to insert his tail now - final int count = defarch.getMultiRefCount(); // how many parts have we got - ArchObject newarch = null; // newly inserted arch - ArchObject oldarch = arch; // previous arch - // do insertion for all non-head parts of the multi - for (int c = 1; c <= count; c++) { - newarch = mainControl.getArchObjectStack().newArchObjectInstance(defarch.getNodeNr() + c); + for (ArchObject oldPart = defarch.getMultiNext(); oldPart != null; oldPart = oldPart.getMultiNext()) { + final ArchObject newarch = mainControl.getArchObjectStack().newArchObjectInstance(oldPart.getNodeNr()); assert newarch != null; - newarch.setMapMultiHead(arch); // set link to multi head - oldarch.setMapMultiNext(newarch); // set link between multi arches + arch.addTailPart(newarch); objects.add(newarch); // set map position (x, y) - newarch.setMapX(arch.getMapX() + mainControl.getArchObjectStack().getArch(defarch.getNodeNr() + c).getMultiRefX()); - newarch.setMapY(arch.getMapY() + mainControl.getArchObjectStack().getArch(defarch.getNodeNr() + c).getMultiRefY()); + newarch.setMapX(arch.getMapX() + newarch.getMultiX()); + newarch.setMapY(arch.getMapY() + newarch.getMultiY()); - oldarch = newarch; // next loop oldarch = current newarch - // now attach the default arch and stuff // (don't need edit type as we copy from head) mainControl.getArchObjectParser().postParseMapArch(newarch, 0); Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-18 19:49:09 UTC (rev 337) @@ -206,13 +206,17 @@ return null; } + final ArchObject template = archNodeList[i].arch; + final ArchObject arch = new ArchObject(); - arch.setArchName(archNodeList[i].arch.getArchName()); - if (!archNodeList[i].arch.getFaceFlag()) { - arch.setFaceNr(archNodeList[i].arch.getFaceNr()); + arch.setArchName(template.getArchName()); + if (!template.getFaceFlag()) { + arch.setFaceNr(template.getFaceNr()); } - arch.setNodeNr(archNodeList[i].arch.getNodeNr()); + arch.setNodeNr(template.getNodeNr()); + arch.setMultiX(template.getMultiX()); + arch.setMultiY(template.getMultiY()); return arch; } @@ -225,9 +229,10 @@ */ public void addArchToList(final ArchObject data) { final ArchObjectNode newnode = new ArchObjectNode(data); - newnode.arch.setNodeNr(archNodeListCount); archMap.put(data.getArchName(), archNodeListCount); archNodeList[archNodeListCount++] = newnode; + newnode.arch.setNodeNr(archNodeListCount - 1); + assert newnode.arch.isDefaultArch(); } /** load the arches */ @@ -683,7 +688,7 @@ arch = mainControl.getArch(numList[i]); - if (arch.isReferenced()) { + if (arch.isTail()) { LOG.error("Collect Error: Multipart Tail in Panel found!"); } @@ -725,7 +730,7 @@ for (int j = 1; j <= multiparts; j++) { arch = mainControl.getArch(numList[i] + j); ... [truncated message content] |
From: <aki...@us...> - 2006-09-18 19:37:19
|
Revision: 336 http://svn.sourceforge.net/gridarta/?rev=336&view=rev Author: akirschbaum Date: 2006-09-18 12:37:10 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Restart ChangeLog file with more convenient formatting. Added Paths: ----------- trunk/crossfire/ChangeLog trunk/crossfire/ChangeLog.old Removed Paths: ------------- trunk/crossfire/CHANGES.txt Deleted: trunk/crossfire/CHANGES.txt =================================================================== --- trunk/crossfire/CHANGES.txt 2006-09-18 17:29:36 UTC (rev 335) +++ trunk/crossfire/CHANGES.txt 2006-09-18 19:37:10 UTC (rev 336) @@ -1,1024 +0,0 @@ ---- 20/06/2001 --- - -adding files for version 0.971 - -Status: - -Vendor Tag: yoyo -Release Tags: start - ---- 25/06/2001 --- - -I've added a nice feature to the JavaEditor: -The bottom-right window now displays all arch attributes -of a selected arch. It's much easier to modify them that -way. - --AV - ---- 26/06/2001 --- - -Fixed two bugs that caused some nasty exceptions -when loading new maps. (These resulted in the maps -being impossible to save.) - ---AV - ---- 27/06/2001 --- - -add script parsing to -archText & some minor insanity checks for read/write maps - ---- 29/06/2001 --- - -I've added cut/copy/paste functionality to -the Java Editor. (What good is an editor without it?) -That was a serious chunk of work, I hope -it still runs bug-free. :) - -The cut/copy/paste works similar to Crossedit. -Left-click-and-drag to highlight & select from Edit menu. - ---AV - ---- 06/07/2001 --- - -I've overhauled the view settings code in the Java Editor. - -The classification of objects used to be based on the -"editable" value from the archetype (default arch). But that -was not useful, because it was so unrelyable. E.g. floor arches -can be changed into secret exits, the archetype won't indicate -that. -That's why I changed the editable values to be calculated at -runtime, in the Java Editor. The values are now based on the -objects attributes and type. E.g. an object is considered -an "Exit" when it is of type 66 (exit) or 41 (teleporter). - -I've also made the view settings take effect on copy/paste -actions: All objects that are not shown on the map are -now ignored by copy/paste. -E.g. when selecting view->Monsters, I can copy/paste monsters -freely in my map without having to worry about getting -doubled background tiles. - -I corrected a bug in the parser that prevented the -"type" - attribute from being modified (Parser ignored it). - -Finally, I inserted a new menu under "view"-> "Reset View". -This works basically as a "Show All" for the view setting. - --AV - ---- 30/07/2001 --- - -Remove bug when map windows are cycled. Add x 16/y 16 hack -to map object in archfiles - ---- 02/08/2001 --- - -Lot's of new features to the JavaEditor: - -1) Clear command (edit menu): - Works exactly like cut, except that it doesn't write into - the copy-buffer. - -2) Fill command (edit menu): - There are two different fill-modes: - - For rectangular fill, left click and drag to highlight - a rectangular area. Then invoke fill. - - For floodfill, left click on an empty spot and do not - drag. By invoking fill all connected empty squares are - floodfilled. - -3) Delete (middle mouse button): - When you click on the map with the middle mouse button, - the topmost object on that spot is deleted. - Objects that don't match the view settings are not deleted. - This also works with dragging (multiple objects get deleted). - - Now the mouse works as follows: - left button - select - right button - insert - middle button - delete - -4) Rework of the map-tile panel (the window to the right): - - The objects are now displayed in the same order as - on the map. Topmost on the map => topmost on the panel. - - I have implemented the same mouse-button scheme - as in the map window: - left button - select - right button - insert - middle button - delete - - Inserting works similar to crossedit. You (right-)click on the - panel and the new arch gets inserted in that spot where - you clicked. - This even works for arches inside a container, but - the positioning in that case isn't perfect, that needs some more work. - -AndreasV - ---- 10/08/2001 --- - -new code for the JavaEditor... - -o First, I fixed up the way inventory items were - handed, as this was quite bugged. Items in containers - now save/load correct and they get deleted correct. - Besides, Cut/Copy/Paste now works with containers and - their inventory. - -o I seperated the map arch from the ordinary arch objects. - This was a big biiiig load of work. - ('map arch' = first arch object in the file, containing map attributes - like width, height etc). The map arch now has it's own class - (MapArchObject.java) with own fileparser and -writer methods. - This has a lot of advantages: The code is better organized, - the map attributes are easy accessible, and the map arch can be - expanded with new attributes at will without causing trouble. - - The new parser supports both map formats, old (sp, hp, value etc) and - new (width, height, swap_time etc). Even the map_tiling paths. - Still missing however is the proper user-interface for the map attributes. - That's gonna be the next step... - -o On my way diving through the code, I did a lot of cosmetics and - minor stuff. The file-modified '*' is now displayed a lot more - accurate, panel background is now green... stuff like that. - --AndreasV - ---- 11/08/2001 --- - -Now here comes the user-interface for the -map attributes. Selecting menu "map->map properties", -the user gets an input-mask for all the stuff -from the map arch. Even the new map-tiling is supported. - ---AndreasV - ---- 11/08/2001 --- - -A bunch of cosmetics and minor stuff, mostly -in relation to the recent changes. -Worth mentioning is maybe the improved file save/load -path-logic, and maximized size for newly -opened map-windows. - ---AndreasV - ---- 13/08/2001 --- - -Fixed a bug that prevented arch attributes -to get loaded properly from the map. ---AV - ---- 16/08/2001 --- - -Finally, I've included the sixlegs java png library -into the CFJavaEditor. Now the pngs are loaded with -the sixlegs lib, and all transparencies are now -set correctly! -A big thanks to Chris Nokleberg (the creator of sixlegs) -at this point. Today he sent me the last piece -I needed to make it all work. - -I'm sorry for the mess with the cvs directorys. CVS -is hell of an inconvenient program when it comes -to directory-management. - -Andreas V. - ---- 17/08/2001 --- - -New make files & makejar.bat for using -java sdk 1.3 & sixlegs png lib. - ---- 18/08/2001 --- - -In the MapArchPanel, parts of multi-objects now -display always the head's stats. Changes also get -saved to the head (similar to crossedit). - -I started implementing the "enter exit"-feature, -well known from crossedit. It's not completed yet -though, I'm gonna do that when I return from holiday -in a week. - ---Andreas V. - ---- 20/09/2001 --- - -Completed the "enter exit" feature. It works -very similar to Crossedit: Select and exit on -the map, activate menu "enter exit" (Strg-E) and the -destination map gets loaded. - ---AndreasV - ---- 21/09/2001 --- - -I've reworked some parts of the layout. Icon-Toolbar -is now left and the arch-message window is on a seperate -panel, for better size. -Besides I optimized some code a bit to speed up dragging for -insert/delete objects. - ---AndreasV - ---- 24/09/2001 --- - -I've implemented the auto-joining feature into -the CFJavaEditor. Activate it via menu "Map->Autojoin", -then any walls will join in the right way (similar -to crossedit). -The "joining-definitions" are written in an easily -customizable textfile called "autojoin.txt". - -This feature is very fast and memory-efficient. It -does not increase the loading time. - ---Andreas V. - ---- 29/09/2001 --- - -Another big update for the CFJavaEditor: -Multipart objects are now saved and loaded according to the -"new" map format as head-arches only. That was neccessary -for the JavaEditor in order to cope with maps generated -by recent versions of Crossedit. -It also makes map-files a good deal shorter. - ---Andreas V. - ---- 30/09/2001 --- - -New patch for CFJavaEditor: - -I made the map-loading process faster... a LOT faster. -Try enter-exit between some huge maps and you'll see what -I mean. -To achieve this, I reworked the view-settings concept -to do the nasty view-setting calculations not during -map loading but when the settings are actually needed instead. -Other optimizations followed. - -In the process I tweaked the map-loading methods to be resistent -against numerous kinds of corrupt mapfiles. - -Besides, I included a small new feature: The inventory of -multipart objects is now always stored in the multipart-head. -Every tile of a multipart now shows the one and same inventory. - ---Andreas V. - ---- 01/10/2001 --- - -This patch brings a major improvement in the graphic -routines, greatly increasing the speed for map-modifying -actions like select/insert/delete objects. - -Basically what I did was reducing the redraw actions of the -mapview to a minimum. Instead of drawing the entire map, -only the tiles that changed get redrawn. - -This works well for the standard (rectangular) view. -Unfortunately for iso this is much harder due to overlapping -tiles, so iso still uses the old (and slow) methods. - -I believe there is still an open end for speed improvements, -though the editor is already quite fast now. Only the arch -loading is still awefull... - ---Andreas V. - ---- 02/10/2001 --- - -Further improvements and finetuning to the new -drawing methods: - -Due to the direct drawing on the mapview, the tiles -used to "flicker" slightly when objects got drawn over -each other. To prevent this, tiles are now drawn into -a temporare buffer, then displayed as a whole. -This does not considerably slow anything down. - -Also corrected problems for tiles without background. - ---Andreas V. - ---- 03/10/2001 --- - -I extended the cut/copy/paste methods to enable -copying of multisquare objects. So they are finally -completed now, allowing to copy everything. - -I also did a few speed optimizations to the arch/image -loader. These reduce the loading time by 50% on my -machine. That's not much, but it's a start. - ---Andreas V. - ---- 16/10/01 --- - -I've added a proper online help document to the CFJavaEditor. -It's html, but I kept the style rather simple so far. -The online docu can be viewed by selecting the menu -"Help->Online Help". (Of course the .html files can as well -be viewed directly, with a browser). - -The online help so far describes how to use the editor, provides -some troubleshooting (->faq) and a few general guidelines -for map-making. - -I also added a file "INSTALL.txt" to the main folder, providing -information on how to install (= compile and run) the editor. - ---Andreas V. - ---- 5/11/01 --- - -editor had collect bad archfiles. -Now he can write negatives offsets. - ---Michael T. - ---- 22/11/01 --- - -New (increased) iso tile size for the Editor - ---Michael T. - ---- 23/11/01 --- - -Fixed up the JavaEditor to support the new iso-tile- -size better. - ---Andreas V. - ---- 27/11/01 --- - -Fixed some minor flaws in the archtext parser. - ---Andreas V. - ---- 10/02/2002 --- - -Added the attribute dialog feature, an interface -that provides an "easy" layer over the terrible true -crossfire archtext syntax. -The syntax definitions are read from a well-readable plain -text data file. Not all forms of input-values are supported -yet, but the foundation is laid and the rest will follow. - ---AndreasV - ---- 11/02/2002 --- - -Added support for floating point values in the -attribute dialogs. -Also extending the types.txt definitions file. - ---AndreasV - ---- 13/02/2002 --- - -The CFJavaEditor now works with JDK 1.4 -(and still with JDK 1.3 of course). - -There was a (per default) unset disabled icon, -which caused JDK 1.4 to try producing a greyed-out -icon from a png-imageProducer that didn't exist. -This resulted in runtime errors whenever clicking -on the mapview. Fixed now. - ---AndreasV - ---- 14/02/2002 --- - -Enhanced "types.txt" file and some cosmetics -in the code. - ---AndreasV - ---- 28/02/2002 --- - -The Attribute-Dialog now features a <Help> button. -By clicking on it, a (html) description pops up, telling how -the object works and how it can best be used. - -Also a lot of minor mods/fixes... -The map-tile window (right side window) now displays -object names instead of arch names. - ---AndreasV - ---- 19/02/2002 --- - -Great new feature in the JavaEditor: -Spellnumbers now get handled by the editor internally. -In the attribute-window the mapmaker can choose -spells by name conveniently, from a list. - -The spells are stored in a definitions file, -and they can be new imported from 'spellist.h' -automatically (In case they change). - -I have also upgraded the "types.txt"-file to make -use of the new features. -Added some new types on the way (disease and ability). - ---AndreasV - ---- 20/02/2002 --- - -Added four new kinds of attributes for "types.txt": - -- customized bool: for customizeable true/false values - instead of 1/0 -- direction: for a list of CF direction values - (north, northeast, east, ..., northwest) -- weapontype: for a list of CF weapontypes - (see weapotype code by Garbled) -- mood: for a list of CF moods (see moodfloor code) - -The last three appear as choosebox-lists, like spells. -With the help of these features, affected attributes -are a lot more intuitive and easier to understand. - ---AndreasV - ---- 21/02/2002 --- - -Fixed all Problems with JDK 1.4 afaik. -This new JDK differs quite a bit from version 1.3, which -resulted in a few "malfunctions" for the JavaEditor. -Now this should be resolved, working for both versions. - -Note that for most linux-users JDK 1.4 now works even better, -because it does not have the linux-font problems like 1.3. -So it looks a lot nicer! - ---AndreasV - ---- 24/02/2002 --- - -new features for the JavaEditor: - -- A new command in the file "types.txt" allows - to import attributes from one type to another. - This allowed to include all the common types - of equipment (girdles, helmets, bracers, rings etc.) - with relative ease. - - Now the type definitions for the editor include - almost everything that a mapmaker will need. - -- A doubleclick on an archobject in the right-side - window of the editor now opens an attribute-dialog - for this object. This works faster and is more - convenient than pressing the "attribute"-button - every time. - ---AndreasV - ---- 23/03/2002 --- - -Added support for single-button mice (for mac users). -Left- and middle-button can now be simulated by holding -<shift> or <ctrl>. -This patch was contributed by Josh Bonczkowski. - -Added ant build files for the JavaEditor, -also from Josh. - -Extended the online help docu a little bit to -cover latest features. - ---AndreasV - ---- 09/04/2002 --- - -New version of the JavaEditor: featuring support for -custom fonts. You can now choose a font from the "View->Choose Font"-menu. -This is very helpful for using larger screen resolutions -(like with flatscreens), where the default fonts are too small. - -Also done a lot of code cleanups, minor improvements and -correcting of javadoc comments. - ---AndreasV - ---- 16/04/2002, Version 0.973 --- - -I've added support for bitmask values in the -attribute-dialog. -No longer do mapmakers need to calculate those -ugly attacktype-, material- and spellpath values. -The attribute-dialog GUI presents the bitmasks in -text form now (like "physical, fire, cold" or "paper, iron") -and they can be modified conveniently by an array of -checkboxes. - -Several people have wished for this feature - I hope -they will enjoy what I have done. - -Andreas - ---- 19/04/2002, Version 0.973 --- - -fixed some bad behaviour in the JavaEditor GUIs - ---AndreasV - ---- 23/04/2002, Version 0.974 --- - -Added patches and new code concerning the attribute-dialog: -There used to be a problem with arch-attributes that are -not recognized from the type-definitions (in "types.txt"). -Such entrys in the archtext were deleted by the JavaEditor -when using the attribute-dialog interface. - -Now this handled in a better way: Entrys which are not -recognized are framed "syntax errors" and the user is -able to choose wether to keep or dump them. - -This is interesting as it often shows real errors -in maps that would otherwise be overlooked. -For example, many monsters have 'Str' and 'Dex' set -because nobody realized that those values have no effect. - -Also new is an automatic resizing of the attribute-dialog -when using larger fonts, and some fixes to the general -GUI behaviour. - ---Andreas - ---- 28/04/2002, Version 0.975 --- - -Lots of enhancements to the JavaEditor. I'm gonna -list only the most important ones here: - -o It is now possible to change (object-)types in the - attribute-dialog. Just select one from the choosebox! - The attribute dialog GUI will automatically change - to show all sections and values for the new type. - -o Created a new CFileReader class which allows to - load the resource-textfiles from the jar archive if they - don't exist in the directory. - (Removed the ugly broken code that was trying to do this before) - -o Fixed the default-layout that applies when someone starts - the CFJavaEditor for the first time on his machine. - This used to be real twisted, now it looks as it should. - -Also renamed the file "typdef.def" to "typenumbers.def". -The old name no longer fits, as the file will never get -extended to contain more than type numbers. - ---AndreasV - ---- 29/04/2002, Version 0.975 --- - -some more updates to the type-definitions - ---- 04/05/2002, Version 0.975 --- - -o Seperated map name from file name. When I first - coded this, I misunderstood the concept of map names. - It is now possible to have a different map name - and map file-name, as it should be. - -o Two fixes for ISO-view: - map.arc is now loaded but not displayed, rather - than not loaded at all. - Fixed a bug that caused the highlighting-tile - to get misplaced on large maps. - ---Andreas - ---- 23/07/2002, Version 0.975 --- - -Add support for the 'outdoor' flag in the map objects. - ---Mark Wedel - ---- 08/08/2002, Version 0.980 --- - -I changed the directory structure and setup of the JavaEditor -according to requests from Michael K. and others. The new setup -should be more conform with Java standards and more "organized". -One of the downsides is it will be more difficult to compile & run -the editor from sources for people with lesser Java experience. -I have removed former build scripts as they have to be completely -re-written now. - -A noticeable feature that was implemented in the process is -the ability to load all resource files (text, icons, data) -directly from the jar. This allows to make a jar-only release -of the editor in future. - -In the attribute-dialog, you'll notice a "summary" button at -the bottom of the window. If you click on that button, a list of -all attributes of the selected object are displayed. As the -attribute-interface sometimes has a lot of tabs and fields, -this new feature provides a quick overview of all attributes. - -The JavaEditor can now load arches from collected files. This -reduces loading time to about one third! It is still an option -to load from individual archfiles (See menu "File->Options"). -And, to combine both, you can even collect arches -(menu "Collect->Collect CF Arches"). So you don't need to worry -when your collected files get outdated for example. -From now on the JavaEditor has a collected version of the -archfiles included. That means you no longer need to worry about -arches at all unless you want to create custom arches or images. - -Added "Fill Below" menu option. This is also a feature that -had been requested a while ago. Works similar to the same thing -known from Crossedit. - -Updated the online help docu to cover latest features -an changed functionality. - -This reminds me, I've also created a documentation version-number. -Every time this number is increased, when a user updates his -editor and runs for the first time, the docu will popup automatically. -In this way, I hope to get users more aware of the documentation -and eventual changes/additions to it. In the past many users -did not know that a docu existed, even after long use of the editor. - ---AndreasV - ---- 29/08/2002, Version 0.981 --- - -Finally, I've implemented the concept of pickmaps -into the JavaEditor. - -Users are now able to pick arches either from the -conventional arch-list, or from various pickmaps. -Both can be found in the archpanel to the left side. - -Use of pickmaps saves a lot of time, as pickmaps can -show a lot more objects at once, in logical groups. -No more need to browse up and down in the arch-list -all the time. Moreover, pickmaps can contain customized -objects, in addition to default arches. -Unlike in Crossedit, the pickmaps here are seamlessly -integrated into the GUI. - -Of course it is also possible to modify pickmaps or -create new ones: Pickmaps are stored in standard CF -map format in the directory "resources/pickmaps". -They can be modified (or created) like any other map. - ---AndreasV - ---- 09/09/2002, Version 0.981 --- - -In the previous version is was not possible to insert objects -from a pickmap directly to the map-tile-window. -Now this can be done. - -I updated the type-definitions "types.txt" to support some -of the most important new attributes that have been added lately. - -Also updated the collected arch files to stay in sync -with CVS arches. - ---AndreasV - ---- 05/10/2002, Version 0.982 --- - -In the "Map"-menu there are now commands to move quickly between -tiled maps. This nice patch was contributed by Mark Wedel. - -New Feature: It is now possible to create a full size png-image -from any map in the editor. Not necessary for mapmaking, but maybe -handsome for Crossfire fans who want to tile their bathroom with -map-images... who knows ;-) - -While selecting tiles on a map (left-click and drag mouse), the -dimensions of the highlighted rectangle are now displayed in the -status-bar (bottom of window). - -Lots of bug fixes since last version of the editor. - ---AndreasV - ---- 24/10/2002, Version 0.983 --- - -Again, there is a brand new feature in the JavaEditor: Treasurelists! -The editor now offers a graphical tree of the treasurelists, where -you can click through the sub-lists and sub-sub-lists... -Of course this is also integrated into the attribute dialog: Just -click on the "treasurelist" attribute and the treasurelist-view is -directly opened. I have also included a fairly extensive piece of -online documenattion (for mapmakers) regarding this treasurelist-feature. -Lots of bug fixes since last version of the editor. - -I have applied a lot of GUI-improvements, but most of them -are not eye-catching changes. - -Updated "types.txt" file with corrections about ac and run_away, -as well as some other minor corrections. - ---AndreasV - ---- 23/01/2003, Version 0.984 --- - -The CFJavaEditor now features support for the python scripting plugin! -Look at the "script" tab on the bottom-mid frame: All scripted events -are fully managed in the editor. You can create/remove and edit -scripted events. But that's not all... - -CFJavaEditor now has it's very own ascii editor for viewing and -writing python scripts. It has real python syntax highlighting, -even an auto-complete popup menu for the CFPython package functions. - ---AndreasV - ---- 26/04/2003, Version 0.984 --- - -The primary datafile format is XML from now on. -I have chosen to included the Crimson XML parser for this purpose, -due to it's small size. The code is not dependant on this particular -parser however - it could be exchanged by any other java XML parser. - -The config files "types.xml", "spells.xml" and "typenumbers.xml" -have been converted already. - -Most important is the new format for "types.xml". The XML -is better readable and so much easier to extend and maintain. -Besides, the parser is validating, which means it can tell exact -line numbers in case of an error. - ---AndreasV - ---- 03/05/2003, Version 0.985 --- - -Added basic support for lore to the CFJavaEditor. -In the map properties window (select menu "Map->Map Properties"), -there now is a lore tab with a textarea for map lore. - -For now, arch-lore gets parsed but not displayed, which -practically disables lore in map-objects. - -The "replace" command is also new, which can be found in the -edit menu. This allows to replace (or delete) all objects matching -a certain name or archtype. This makes it very easy to accomplish -tasks like "replace all woodfloor with flagstones" or -"delete all no_spell arches". - ---AndreasV - ---- 07/07/2003, Version 0.95 --- - -Extended pickmaps to be fully dynamic. -It is now possible to insert objects from the map view to the -pickmap with right-click, and delete from pickmaps with middle- -click. That means pickmaps can be modified much like normal -maps - Shifting objects between map and pickmap, in both ways, -becomes very easy and fast. It even works for multiparts too. - -There is an entire new menu "Pickmaps" in the menu bar. -It offers commands to create new pickmaps, save pickmaps, -revert them to last saved state, and close them. - -For those who are fully satisfied with their pickmaps, -there is also a menu command to "Lock All Pickmaps". -This will disable any further changes to the pickmaps unless -they become unlocked again. In that way one can prevent -accidentally changing a pickmap by clicking the wrong -mouse button. - ---AndreasV - ---- 29/10/2003 --- - -Added some elevation intelligence. -When editing maps that have some elevation data, the elevation -data is propagated to the bottom of the stack of tiles during -insert, delete, and layer changing operations (move tile up, move -tile down). Server code that looks at elevation data expects to -find it at the bottom of the stack, which is where it naturally -belongs anyway, elevation is the height above sea level of the -ground, not of the tree or building on top of the ground. - -Note that elevation is only propagated up or down within a stack -of tiles. This means that if you delete all tiles in a particular -spot, then add a tile, there is no tile to propagate the elevation -from, so elevation needs to be set manually. Best to add a tile -first, then delete the old one if you want to keep the old -elevation. Naturally, if you are replacing hills with mountains, -you need to change the elevation manually anyway... - -David Seikel - ---- 14/09/2004 --- - -Added support for the 'other_arch' field in runes. - -Andreas Kirschbaum - ---- 19/07/2005 --- - -Added support for item transformers. - -Andreas Kirschbaum - ---- 08/09/2005 --- - -Do not strip leading (and trailing) whitespace from msg...endmsg and -maplore...endmaplore fields. - -Andreas Kirschbaum - ---- 11/09/2005 --- - -Remove unused import statements. - -Andreas Kirschbaum - ---- 13/09/2005 --- - -Added support for timed gates. - -Andreas Kirschbaum - ---- 14/09/2005 --- - -Do not add "name <untitled>" to maps that do not yet have a "name" field. - -Andreas Kirschbaum - ---- 24/09/2005 --- - -Fix help information for spellpoint regeneration rate and healing rate for -Monsters/NPCs. - -Andreas Kirschbaum - ---- 01/10/2005 --- - -Add support for shop related headers - -Brendan Lally - ---- 04/12/2005 --- - -Fix properties dialog (and make it compile again): display dialog box for -invalid shop greed values (instead printing a stack dump). - -Andreas Kirschbaum - ---- 08/02/2006 --- - -Fix display issues with map window. The problem was that the map window was -set to opaque in some look and feel settings but the paintComponent method did -not paint the whole window area. - -Andreas Kirschbaum - ---- 18/02/2006 --- - -Resize map window if map size is changed in map attributes window. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Fix spelling of "shopitems" header when loading and saving maps. It used to -save the incorrect header "shopitem". - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Save map header fields in same order as crossedit to prevent unnecessary map -differences when switching editors. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Mark map as being "modified" when pasting selections. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Implement map attributes 'template' and 'nosmooth'. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Make menu shortcuts work. Use different shortcuts for all entries. - -Andreas Kirschbaum - ---- 21/02/2006 --- - -Update archetypes information. - -Andreas Kirschbaum - ---- 21/02/2006 --- - -Make "View xxx" options in main menu work again. - -Andreas Kirschbaum - ---- 22/02/2006 --- - -Implement dialog for DOOR objects. - -Fix NullPointerException in View|Choose Font. Selecting a font now partially -works (not all controls are affected). - -Fix typo in File|Options...; also add hint about deferred effect of option -"Separate Map-Tile panel". - -Retain map view position when reverting a map. - -Update treasure lists, item types, and autojoin information. - -Andreas Kirschbaum - ---- 23/02/2006 --- - -Reverse sort order of tabs in Pickmaps and Arch List panels to make them -appear in alphabetical order. - -Fix sort order of objects in types.xml. - -Andreas Kirschbaum - ---- 25/02/2006 --- - -Implement attribute dialogs for Button Trigger, Class Changer, Key, and -Grimreaper object types. - -Indent sub-inventories in map tiles view to visualize nested inventories. - -Improve command line argument handling: -- allow to pass any number of map file names -- recognize "--" option to ignore further options -- print usage message for -h, -help, --help - -Properly report errors if a map file cannot be loaded. - -Andreas Kirschbaum - ---- 26/02/2006 --- - -Make sub-folder selection in archetypes work again. - -Andreas Kirschbaum - ---- 01/03/2006 --- - -Save object fields in same order as crossedit to prevent unnecessary map -differences when switching editors. - -Andreas Kirschbaum - ---- 02/03/2006 --- - -Fix crash due to missing synchronization in menu updates. - -Andreas Kirschbaum - ---- 21/03/2006 --- - -Reduce total memory consumption. - -Andreas Kirschbaum - ---- 22/06/2006 --- - -Prevent crash when collecting archetypes from unreadable or non-existent -directories. Now such directories are silently ignored. - -Andreas Kirschbaum - ---- 12/08/2006 --- - -Removed all ISO code. - -Christian Hujer - ---- 12/08/2006 --- - -Prevent crash when saving inventory objects having a msg...endmsg field. - -Andreas Kirschbaum - ---- 31/08/2006 --- - -Update archetypes information. - -Andreas Kirschbaum Added: trunk/crossfire/ChangeLog =================================================================== Property changes on: trunk/crossfire/ChangeLog ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: trunk/crossfire/ChangeLog.old (from rev 335, trunk/crossfire/CHANGES.txt) =================================================================== --- trunk/crossfire/ChangeLog.old (rev 0) +++ trunk/crossfire/ChangeLog.old 2006-09-18 19:37:10 UTC (rev 336) @@ -0,0 +1,1024 @@ +--- 20/06/2001 --- + +adding files for version 0.971 + +Status: + +Vendor Tag: yoyo +Release Tags: start + +--- 25/06/2001 --- + +I've added a nice feature to the JavaEditor: +The bottom-right window now displays all arch attributes +of a selected arch. It's much easier to modify them that +way. + +-AV + +--- 26/06/2001 --- + +Fixed two bugs that caused some nasty exceptions +when loading new maps. (These resulted in the maps +being impossible to save.) + +--AV + +--- 27/06/2001 --- + +add script parsing to +archText & some minor insanity checks for read/write maps + +--- 29/06/2001 --- + +I've added cut/copy/paste functionality to +the Java Editor. (What good is an editor without it?) +That was a serious chunk of work, I hope +it still runs bug-free. :) + +The cut/copy/paste works similar to Crossedit. +Left-click-and-drag to highlight & select from Edit menu. + +--AV + +--- 06/07/2001 --- + +I've overhauled the view settings code in the Java Editor. + +The classification of objects used to be based on the +"editable" value from the archetype (default arch). But that +was not useful, because it was so unrelyable. E.g. floor arches +can be changed into secret exits, the archetype won't indicate +that. +That's why I changed the editable values to be calculated at +runtime, in the Java Editor. The values are now based on the +objects attributes and type. E.g. an object is considered +an "Exit" when it is of type 66 (exit) or 41 (teleporter). + +I've also made the view settings take effect on copy/paste +actions: All objects that are not shown on the map are +now ignored by copy/paste. +E.g. when selecting view->Monsters, I can copy/paste monsters +freely in my map without having to worry about getting +doubled background tiles. + +I corrected a bug in the parser that prevented the +"type" - attribute from being modified (Parser ignored it). + +Finally, I inserted a new menu under "view"-> "Reset View". +This works basically as a "Show All" for the view setting. + +-AV + +--- 30/07/2001 --- + +Remove bug when map windows are cycled. Add x 16/y 16 hack +to map object in archfiles + +--- 02/08/2001 --- + +Lot's of new features to the JavaEditor: + +1) Clear command (edit menu): + Works exactly like cut, except that it doesn't write into + the copy-buffer. + +2) Fill command (edit menu): + There are two different fill-modes: + - For rectangular fill, left click and drag to highlight + a rectangular area. Then invoke fill. + - For floodfill, left click on an empty spot and do not + drag. By invoking fill all connected empty squares are + floodfilled. + +3) Delete (middle mouse button): + When you click on the map with the middle mouse button, + the topmost object on that spot is deleted. + Objects that don't match the view settings are not deleted. + This also works with dragging (multiple objects get deleted). + + Now the mouse works as follows: + left button - select + right button - insert + middle button - delete + +4) Rework of the map-tile panel (the window to the right): + - The objects are now displayed in the same order as + on the map. Topmost on the map => topmost on the panel. + - I have implemented the same mouse-button scheme + as in the map window: + left button - select + right button - insert + middle button - delete + + Inserting works similar to crossedit. You (right-)click on the + panel and the new arch gets inserted in that spot where + you clicked. + This even works for arches inside a container, but + the positioning in that case isn't perfect, that needs some more work. + +AndreasV + +--- 10/08/2001 --- + +new code for the JavaEditor... + +o First, I fixed up the way inventory items were + handed, as this was quite bugged. Items in containers + now save/load correct and they get deleted correct. + Besides, Cut/Copy/Paste now works with containers and + their inventory. + +o I seperated the map arch from the ordinary arch objects. + This was a big biiiig load of work. + ('map arch' = first arch object in the file, containing map attributes + like width, height etc). The map arch now has it's own class + (MapArchObject.java) with own fileparser and -writer methods. + This has a lot of advantages: The code is better organized, + the map attributes are easy accessible, and the map arch can be + expanded with new attributes at will without causing trouble. + + The new parser supports both map formats, old (sp, hp, value etc) and + new (width, height, swap_time etc). Even the map_tiling paths. + Still missing however is the proper user-interface for the map attributes. + That's gonna be the next step... + +o On my way diving through the code, I did a lot of cosmetics and + minor stuff. The file-modified '*' is now displayed a lot more + accurate, panel background is now green... stuff like that. + +-AndreasV + +--- 11/08/2001 --- + +Now here comes the user-interface for the +map attributes. Selecting menu "map->map properties", +the user gets an input-mask for all the stuff +from the map arch. Even the new map-tiling is supported. + +--AndreasV + +--- 11/08/2001 --- + +A bunch of cosmetics and minor stuff, mostly +in relation to the recent changes. +Worth mentioning is maybe the improved file save/load +path-logic, and maximized size for newly +opened map-windows. + +--AndreasV + +--- 13/08/2001 --- + +Fixed a bug that prevented arch attributes +to get loaded properly from the map. +--AV + +--- 16/08/2001 --- + +Finally, I've included the sixlegs java png library +into the CFJavaEditor. Now the pngs are loaded with +the sixlegs lib, and all transparencies are now +set correctly! +A big thanks to Chris Nokleberg (the creator of sixlegs) +at this point. Today he sent me the last piece +I needed to make it all work. + +I'm sorry for the mess with the cvs directorys. CVS +is hell of an inconvenient program when it comes +to directory-management. + +Andreas V. + +--- 17/08/2001 --- + +New make files & makejar.bat for using +java sdk 1.3 & sixlegs png lib. + +--- 18/08/2001 --- + +In the MapArchPanel, parts of multi-objects now +display always the head's stats. Changes also get +saved to the head (similar to crossedit). + +I started implementing the "enter exit"-feature, +well known from crossedit. It's not completed yet +though, I'm gonna do that when I return from holiday +in a week. + +--Andreas V. + +--- 20/09/2001 --- + +Completed the "enter exit" feature. It works +very similar to Crossedit: Select and exit on +the map, activate menu "enter exit" (Strg-E) and the +destination map gets loaded. + +--AndreasV + +--- 21/09/2001 --- + +I've reworked some parts of the layout. Icon-Toolbar +is now left and the arch-message window is on a seperate +panel, for better size. +Besides I optimized some code a bit to speed up dragging for +insert/delete objects. + +--AndreasV + +--- 24/09/2001 --- + +I've implemented the auto-joining feature into +the CFJavaEditor. Activate it via menu "Map->Autojoin", +then any walls will join in the right way (similar +to crossedit). +The "joining-definitions" are written in an easily +customizable textfile called "autojoin.txt". + +This feature is very fast and memory-efficient. It +does not increase the loading time. + +--Andreas V. + +--- 29/09/2001 --- + +Another big update for the CFJavaEditor: +Multipart objects are now saved and loaded according to the +"new" map format as head-arches only. That was neccessary +for the JavaEditor in order to cope with maps generated +by recent versions of Crossedit. +It also makes map-files a good deal shorter. + +--Andreas V. + +--- 30/09/2001 --- + +New patch for CFJavaEditor: + +I made the map-loading process faster... a LOT faster. +Try enter-exit between some huge maps and you'll see what +I mean. +To achieve this, I reworked the view-settings concept +to do the nasty view-setting calculations not during +map loading but when the settings are actually needed instead. +Other optimizations followed. + +In the process I tweaked the map-loading methods to be resistent +against numerous kinds of corrupt mapfiles. + +Besides, I included a small new feature: The inventory of +multipart objects is now always stored in the multipart-head. +Every tile of a multipart now shows the one and same inventory. + +--Andreas V. + +--- 01/10/2001 --- + +This patch brings a major improvement in the graphic +routines, greatly increasing the speed for map-modifying +actions like select/insert/delete objects. + +Basically what I did was reducing the redraw actions of the +mapview to a minimum. Instead of drawing the entire map, +only the tiles that changed get redrawn. + +This works well for the standard (rectangular) view. +Unfortunately for iso this is much harder due to overlapping +tiles, so iso still uses the old (and slow) methods. + +I believe there is still an open end for speed improvements, +though the editor is already quite fast now. Only the arch +loading is still awefull... + +--Andreas V. + +--- 02/10/2001 --- + +Further improvements and finetuning to the new +drawing methods: + +Due to the direct drawing on the mapview, the tiles +used to "flicker" slightly when objects got drawn over +each other. To prevent this, tiles are now drawn into +a temporare buffer, then displayed as a whole. +This does not considerably slow anything down. + +Also corrected problems for tiles without background. + +--Andreas V. + +--- 03/10/2001 --- + +I extended the cut/copy/paste methods to enable +copying of multisquare objects. So they are finally +completed now, allowing to copy everything. + +I also did a few speed optimizations to the arch/image +loader. These reduce the loading time by 50% on my +machine. That's not much, but it's a start. + +--Andreas V. + +--- 16/10/01 --- + +I've added a proper online help document to the CFJavaEditor. +It's html, but I kept the style rather simple so far. +The online docu can be viewed by selecting the menu +"Help->Online Help". (Of course the .html files can as well +be viewed directly, with a browser). + +The online help so far describes how to use the editor, provides +some troubleshooting (->faq) and a few general guidelines +for map-making. + +I also added a file "INSTALL.txt" to the main folder, providing +information on how to install (= compile and run) the editor. + +--Andreas V. + +--- 5/11/01 --- + +editor had collect bad archfiles. +Now he can write negatives offsets. + +--Michael T. + +--- 22/11/01 --- + +New (increased) iso tile size for the Editor + +--Michael T. + +--- 23/11/01 --- + +Fixed up the JavaEditor to support the new iso-tile- +size better. + +--Andreas V. + +--- 27/11/01 --- + +Fixed some minor flaws in the archtext parser. + +--Andreas V. + +--- 10/02/2002 --- + +Added the attribute dialog feature, an interface +that provides an "easy" layer over the terrible true +crossfire archtext syntax. +The syntax definitions are read from a well-readable plain +text data file. Not all forms of input-values are supported +yet, but the foundation is laid and the rest will follow. + +--AndreasV + +--- 11/02/2002 --- + +Added support for floating point values in the +attribute dialogs. +Also extending the types.txt definitions file. + +--AndreasV + +--- 13/02/2002 --- + +The CFJavaEditor now works with JDK 1.4 +(and still with JDK 1.3 of course). + +There was a (per default) unset disabled icon, +which caused JDK 1.4 to try producing a greyed-out +icon from a png-imageProducer that didn't exist. +This resulted in runtime errors whenever clicking +on the mapview. Fixed now. + +--AndreasV + +--- 14/02/2002 --- + +Enhanced "types.txt" file and some cosmetics +in the code. + +--AndreasV + +--- 28/02/2002 --- + +The Attribute-Dialog now features a <Help> button. +By clicking on it, a (html) description pops up, telling how +the object works and how it can best be used. + +Also a lot of minor mods/fixes... +The map-tile window (right side window) now displays +object names instead of arch names. + +--AndreasV + +--- 19/02/2002 --- + +Great new feature in the JavaEditor: +Spellnumbers now get handled by the editor internally. +In the attribute-window the mapmaker can choose +spells by name conveniently, from a list. + +The spells are stored in a definitions file, +and they can be new imported from 'spellist.h' +automatically (In case they change). + +I have also upgraded the "types.txt"-file to make +use of the new features. +Added some new types on the way (disease and ability). + +--AndreasV + +--- 20/02/2002 --- + +Added four new kinds of attributes for "types.txt": + +- customized bool: for customizeable true/false values + instead of 1/0 +- direction: for a list of CF direction values + (north, northeast, east, ..., northwest) +- weapontype: for a list of CF weapontypes + (see weapotype code by Garbled) +- mood: for a list of CF moods (see moodfloor code) + +The last three appear as choosebox-lists, like spells. +With the help of these features, affected attributes +are a lot more intuitive and easier to understand. + +--AndreasV + +--- 21/02/2002 --- + +Fixed all Problems with JDK 1.4 afaik. +This new JDK differs quite a bit from version 1.3, which +resulted in a few "malfunctions" for the JavaEditor. +Now this should be resolved, working for both versions. + +Note that for most linux-users JDK 1.4 now works even better, +because it does not have the linux-font problems like 1.3. +So it looks a lot nicer! + +--AndreasV + +--- 24/02/2002 --- + +new features for the JavaEditor: + +- A new command in the file "types.txt" allows + to import attributes from one type to another. + This allowed to include all the common types + of equipment (girdles, helmets, bracers, rings etc.) + with relative ease. + + Now the type definitions for the editor include + almost everything that a mapmaker will need. + +- A doubleclick on an archobject in the right-side + window of the editor now opens an attribute-dialog + for this object. This works faster and is more + convenient than pressing the "attribute"-button + every time. + +--AndreasV + +--- 23/03/2002 --- + +Added support for single-button mice (for mac users). +Left- and middle-button can now be simulated by holding +<shift> or <ctrl>. +This patch was contributed by Josh Bonczkowski. + +Added ant build files for the JavaEditor, +also from Josh. + +Extended the online help docu a little bit to +cover latest features. + +--AndreasV + +--- 09/04/2002 --- + +New version of the JavaEditor: featuring support for +custom fonts. You can now choose a font from the "View->Choose Font"-menu. +This is very helpful for using larger screen resolutions +(like with flatscreens), where the default fonts are too small. + +Also done a lot of code cleanups, minor improvements and +correcting of javadoc comments. + +--AndreasV + +--- 16/04/2002, Version 0.973 --- + +I've added support for bitmask values in the +attribute-dialog. +No longer do mapmakers need to calculate those +ugly attacktype-, material- and spellpath values. +The attribute-dialog GUI presents the bitmasks in +text form now (like "physical, fire, cold" or "paper, iron") +and they can be modified conveniently by an array of +checkboxes. + +Several people have wished for this feature - I hope +they will enjoy what I have done. + +Andreas + +--- 19/04/2002, Version 0.973 --- + +fixed some bad behaviour in the JavaEditor GUIs + +--AndreasV + +--- 23/04/2002, Version 0.974 --- + +Added patches and new code concerning the attribute-dialog: +There used to be a problem with arch-attributes that are +not recognized from the type-definitions (in "types.txt"). +Such entrys in the archtext were deleted by the JavaEditor +when using the attribute-dialog interface. + +Now this handled in a better way: Entrys which are not +recognized are framed "syntax errors" and the user is +able to choose wether to keep or dump them. + +This is interesting as it often shows real errors +in maps that would otherwise be overlooked. +For example, many monsters have 'Str' and 'Dex' set +because nobody realized that those values have no effect. + +Also new is an automatic resizing of the attribute-dialog +when using larger fonts, and some fixes to the general +GUI behaviour. + +--Andreas + +--- 28/04/2002, Version 0.975 --- + +Lots of enhancements to the JavaEditor. I'm gonna +list only the most important ones here: + +o It is now possible to change (object-)types in the + attribute-dialog. Just select one from the choosebox! + The attribute dialog GUI will automatically change + to show all sections and values for the new type. + +o Created a new CFileReader class which allows to + load the resource-textfiles from the jar archive if they + don't exist in the directory. + (Removed the ugly broken code that was trying to do this before) + +o Fixed the default-layout that applies when someone starts + the CFJavaEditor for the first time on his machine. + This used to be real twisted, now it looks as it should. + +Also renamed the file "typdef.def" to "typenumbers.def". +The old name no longer fits, as the file will never get +extended to contain more than type numbers. + +--AndreasV + +--- 29/04/2002, Version 0.975 --- + +some more updates to the type-definitions + +--- 04/05/2002, Version 0.975 --- + +o Seperated map name from file name. When I first + coded this, I misunderstood the concept of map names. + It is now possible to have a different map name + and map file-name, as it should be. + +o Two fixes for ISO-view: + map.arc is now loaded but not displayed, rather + than not loaded at all. + Fixed a bug that caused the highlighting-tile + to get misplaced on large maps. + +--Andreas + +--- 23/07/2002, Version 0.975 --- + +Add support for the 'outdoor' flag in the map objects. + +--Mark Wedel + +--- 08/08/2002, Version 0.980 --- + +I changed the directory structure and setup of the JavaEditor +according to requests from Michael K. and others. The new setup +should be more conform with Java standards and more "organized". +One of the downsides is it will be more difficult to compile & run +the editor from sources for people with lesser Java experience. +I have removed former build scripts as they have to be completely +re-written now. + +A noticeable feature that was implemented in the process is +the ability to load all resource files (text, icons, data) +directly from the jar. This allows to make a jar-only release +of the editor in future. + +In the attribute-dialog, you'll notice a "summary" button at +the bottom of the window. If you click on that button, a list of +all attributes of the selected object are displayed. As the +attribute-interface sometimes has a lot of tabs and fields, +this new feature provides a quick overview of all attributes. + +The JavaEditor can now load arches from collected files. This +reduces loading time to about one third! It is still an option +to load from individual archfiles (See menu "File->Options"). +And, to combine both, you can even collect arches +(menu "Collect->Collect CF Arches"). So you don't need to worry +when your collected files get outdated for example. +From now on the JavaEditor has a collected version of the +archfiles included. That means you no longer need to worry about +arches at all unless you want to create custom arches or images. + +Added "Fill Below" menu option. This is also a feature that +had been requested a while ago. Works similar to the same thing +known from Crossedit. + +Updated the online help docu to cover latest features +an changed functionality. + +This reminds me, I've also created a documentation version-number. +Every time this number is increased, when a user updates his +editor and runs for the first time, the docu will popup automatically. +In this way, I hope to get users more aware of the documentation +and eventual changes/additions to it. In the past many users +did not know that a docu existed, even after long use of the editor. + +--AndreasV + +--- 29/08/2002, Version 0.981 --- + +Finally, I've implemented the concept of pickmaps +into the JavaEditor. + +Users are now able to pick arches either from the +conventional arch-list, or from various pickmaps. +Both can be found in the archpanel to the left side. + +Use of pickmaps saves a lot of time, as pickmaps can +show a lot more objects at once, in logical groups. +No more need to browse up and down in the arch-list +all the time. Moreover, pickmaps can contain customized +objects, in addition to default arches. +Unlike in Crossedit, the pickmaps here are seamlessly +integrated into the GUI. + +Of course it is also possible to modify pickmaps or +create new ones: Pickmaps are stored in standard CF +map format in the directory "resources/pickmaps". +They can be modified (or created) like any other map. + +--AndreasV + +--- 09/09/2002, Version 0.981 --- + +In the previous version is was not possible to insert objects +from a pickmap directly to the map-tile-window. +Now this can be done. + +I updated the type-definitions "types.txt" to support some +of the most important new attributes that have been added lately. + +Also updated the collected arch files to stay in sync +with CVS arches. + +--AndreasV + +--- 05/10/2002, Version 0.982 --- + +In the "Map"-menu there are now commands to move quickly between +tiled maps. This nice patch was contributed by Mark Wedel. + +New Feature: It is now possible to create a full size png-image +from any map in the editor. Not necessary for mapmaking, but maybe +handsome for Crossfire fans who want to tile their bathroom with +map-images... who knows ;-) + +While selecting tiles on a map (left-click and drag mouse), the +dimensions of the highlighted rectangle are now displayed in the +status-bar (bottom of window). + +Lots of bug fixes since last version of the editor. + +--AndreasV + +--- 24/10/2002, Version 0.983 --- + +Again, there is a brand new feature in the JavaEditor: Treasurelists! +The editor now offers a graphical tree of the treasurelists, where +you can click through the sub-lists and sub-sub-lists... +Of course this is also integrated into the attribute dialog: Just +click on the "treasurelist" attribute and the treasurelist-view is +directly opened. I have also included a fairly extensive piece of +online documenattion (for mapmakers) regarding this treasurelist-feature. +Lots of bug fixes since last version of the editor. + +I have applied a lot of GUI-improvements, but most of them +are not eye-catching changes. + +Updated "types.txt" file with corrections about ac and run_away, +as well as some other minor corrections. + +--AndreasV + +--- 23/01/2003, Version 0.984 --- + +The CFJavaEditor now features support for the python scripting plugin! +Look at the "script" tab on the bottom-mid frame: All scripted events +are fully managed in the editor. You can create/remove and edit +scripted events. But that's not all... + +CFJavaEditor now has it's very own ascii editor for viewing and +writing python scripts. It has real python syntax highlighting, +even an auto-complete popup menu for the CFPython package functions. + +--AndreasV + +--- 26/04/2003, Version 0.984 --- + +The primary datafile format is XML from now on. +I have chosen to included the Crimson XML parser for this purpose, +due to it's small size. The code is not dependant on this particular +parser however - it could be exchanged by any other java XML parser. + +The config files "types.xml", "spells.xml" and "typenumbers.xml" +have been converted already. + +Most important is the new format for "types.xml". The XML +is better readable and so much easier to extend and maintain. +Besides, the parser is validating, which means it can tell exact +line numbers in case of an error. + +--AndreasV + +--- 03/05/2003, Version 0.985 --- + +Added basic support for lore to the CFJavaEditor. +In the map properties window (select menu "Map->Map Properties"), +there now is a lore tab with a textarea for map lore. + +For now, arch-lore gets parsed but not displayed, which +practically disables lore in map-objects. + +The "replace" command is also new, which can be found in the +edit menu. This allows to replace (or delete) all objects matching +a certain name or archtype. This makes it very easy to accomplish +tasks like "replace all woodfloor with flagstones" or +"delete all no_spell arches". + +--AndreasV + +--- 07/07/2003, Version 0.95 --- + +Extended pickmaps to be fully dynamic. +It is now possible to insert objects from the map view to the +pickmap with right-click, and delete from pickmaps with middle- +click. That means pickmaps can be modified much like normal +maps - Shifting objects between map and pickmap, in both ways, +becomes very easy and fast. It even works for multiparts too. + +There is an entire new menu "Pickmaps" in the menu bar. +It offers commands to create new pickmaps, save pickmaps, +revert them to last saved state, and close them. + +For those who are fully satisfied with their pickmaps, +there is also a menu command to "Lock All Pickmaps". +This will disable any further changes to the pickmaps unless +they become unlocked again. In that way one can prevent +accidentally changing a pickmap by clicking the wrong +mouse button. + +--AndreasV + +--- 29/10/2003 --- + +Added some elevation intelligence. +When editing maps that have some elevation data, the elevation +data is propagated to the bottom of the stack of tiles during +insert, delete, and layer changing operations (move tile up, move +tile down). Server code that looks at elevation data expects to +find it at the bottom of the stack, which is where it naturally +belongs anyway, elevation is the height above sea level of the +ground, not of the tree or building on top of the ground. + +Note that elevation is only propagated up or down within a stack +of tiles. This means that if you delete all tiles in a particular +spot, then add a tile, there is no tile to propagate the elevation +from, so elevation needs to be set manually. Best to add a tile +first, then delete the old one if you want to keep the old +elevation. Naturally, if you are replacing hills with mountains, +you need to change the elevation manually anyway... + +David Seikel + +--- 14/09/2004 --- + +Added support for the 'other_arch' field in runes. + +Andreas Kirschbaum + +--- 19/07/2005 --- + +Added support for item transformers. + +Andreas Kirschbaum + +--- 08/09/2005 --- + +Do not strip leading (and trailing) whitespace from msg...endmsg and +maplore...endmaplore fields. + +Andreas Kirschbaum + +--- 11/09/2005 --- + +Remove unused import statements. + +Andreas Kirschbaum + +--- 13/09/2005 --- + +Added support for timed gates. + +Andreas Kirschbaum + +--- 14/09/2005 --- + +Do not add "name <untitled>" to maps that do not yet have a "name" field. + +Andreas Kirschbaum + +--- 24/09/2005 --- + +Fix help information for spellpoint regeneration rate and healing rate for +Monsters/NPCs. + +Andreas Kirschbaum + +--- 01/10/2005 --- + +Add support for shop related headers + +Brendan Lally + +--- 04/12/2005 --- + +Fix properties dialog (and make it compile again): display dialog box for +invalid shop greed values (instead printing a stack dump). + +Andreas Kirschbaum + +--- 08/02/2006 --- + +Fix display issues with map window. The problem was that the map window was +set to opaque in some look and feel settings but the paintComponent method did +not paint the whole window area. + +Andreas Kirschbaum + +--- 18/02/2006 --- + +Resize map window if map size is changed in map attributes window. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Fix spelling of "shopitems" header when loading and saving maps. It used to +save the incorrect header "shopitem". + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Save map header fields in same order as crossedit to prevent unnecessary map +differences when switching editors. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Mark map as being "modified" when pasting selections. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Implement map attributes 'template' and 'nosmooth'. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Make menu shortcuts work. Use different shortcuts for all entries. + +Andreas Kirschbaum + +--- 21/02/2006 --- + +Update archetypes information. + +Andreas Kirschbaum + +--- 21/02/2006 --- + +Make "View xxx" options in main menu work again. + +Andreas Kirschbaum + +--- 22/02/2006 --- + +Implement dialog for DOOR objects. + +Fix NullPointerException in View|Choose Font. Selecting a font now partially +works (not all controls are affected). + +Fix typo in File|Options...; also add hint about deferred effect of option +"Separate Map-Tile panel". + +Retain map view position when reverting a map. + +Update treasure lists, item types, and autojoin information. + +Andreas Kirschbaum + +--- 23/02/2006 --- + +Reverse sort order of tabs in Pickmaps and Arch List panels to make them +appear in alphabetical order. + +Fix sort order of objects in types.xml. + +Andreas Kirschbaum + +--- 25/02/2006 --- + +Implement attribute d... [truncated message content] |
From: <aki...@us...> - 2006-09-18 17:29:53
|
Revision: 335 http://svn.sourceforge.net/gridarta/?rev=335&view=rev Author: akirschbaum Date: 2006-09-18 10:29:36 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Fix typos in comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchAttrib.java trunk/crossfire/src/cfeditor/CFArchType.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchType.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-18 17:29:36 UTC (rev 335) @@ -174,17 +174,17 @@ listNr = 0; this.mainControl = mainControl; // reference to the main control - typelist = atList; // refernce to the typelist + typelist = atList; // reference to the typelist CAttribDialog.setDefaultBounds(); // set width/height etc - // refernce to the ArchObject + // reference to the ArchObject if (aobj.isMulti() && aobj.getMapMultiHead() != null) { arch = aobj.getMapMultiHead(); defarch = this.mainControl.getArchObjectStack().getArch(arch.getNodeNr()); } else { arch = aobj; - defarch = defaobj; // refernce to the default ArchObject + defarch = defaobj; // reference to the default ArchObject } /* set frame icon Modified: trunk/crossfire/src/cfeditor/CFArchAttrib.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-09-18 17:29:36 UTC (rev 335) @@ -322,7 +322,7 @@ newattr.text = text; - // important: we don't create a new instance of 'misc', only a refernce + // important: we don't create a new instance of 'misc', only a reference newattr.misc = misc; newattr.secId = secId; Modified: trunk/crossfire/src/cfeditor/CFArchType.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-18 17:29:36 UTC (rev 335) @@ -277,7 +277,7 @@ // don't forget about the default attribs int numDef = 0; if (defaultArchType != null && defaultArchType.attr != null && defaultArchType.attr.length > 0) { - // create an array to store the refernces to the default atrribs: + // create an array to store the references to the default atrribs: final CFArchAttrib[] defList = new CFArchAttrib[defaultArchType.attr.length]; for (int t = 0; t < defaultArchType.attr.length; t++) { Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-18 17:29:36 UTC (rev 335) @@ -88,7 +88,7 @@ final Iterator it = mapModel.getArchObjects(pos); while (it.hasNext()) { final ArchObject node = (ArchObject) it.next(); - // only non muli suckers + // only non multi suckers if (node.getMapMultiHead() == null && node.getMapMultiNext() == null) { if (!writeMapArch(node, false)) { return; Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-09-18 17:29:36 UTC (rev 335) @@ -675,7 +675,7 @@ /** Opens the script pad to display the script for this event. */ public void openScript() { - final CMainControl mainControl = CMainControl.getInstance(); // refernce to main control + final CMainControl mainControl = CMainControl.getInstance(); // reference to main control // trying to get the absolute path to scriptfile: String path; Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-18 17:29:36 UTC (rev 335) @@ -214,9 +214,9 @@ listNr = 0; this.mainControl = mainControl; // reference to the main control - typelist = atList; // refernce to the typelist + typelist = atList; // reference to the typelist - // refernce to the ArchObject + // reference to the ArchObject if (aobj.isMulti() && aobj.getMapMultiHead() != null) { arch = aobj.getMapMultiHead(); } else { Modified: trunk/daimonin/src/daieditor/CFArchAttrib.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-09-18 17:29:36 UTC (rev 335) @@ -306,7 +306,7 @@ newattr.text = text; - // important: we don't create a new instance of 'misc', only a refernce + // important: we don't create a new instance of 'misc', only a reference newattr.misc = misc; newattr.secId = secId; Modified: trunk/daimonin/src/daieditor/CFArchType.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchType.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/daimonin/src/daieditor/CFArchType.java 2006-09-18 17:29:36 UTC (rev 335) @@ -247,7 +247,7 @@ // don't forget about the default attribs int numDef = 0; if (defaultArchType != null && defaultArchType.attr != null && defaultArchType.attr.length > 0) { - // create an array to store the refernces to the default atrribs: + // create an array to store the references to the default atrribs: final CFArchAttrib[] defList = new CFArchAttrib[defaultArchType.attr.length]; for (int t = 0; t < defaultArchType.attr.length; t++) { Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-18 17:29:36 UTC (rev 335) @@ -78,7 +78,7 @@ for (pos.x = 0; pos.x < mapSize.getWidth(); pos.x++) { for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { for (final ArchObject node : mapModel.getMapSquare(pos)) { - // only non muli suckers + // only non multi suckers if (node.getMapMultiHead() == null && node.getMultiRefCount() == 0) { writeMapArch(node, false); } Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-17 19:46:54 UTC (rev 334) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-18 17:29:36 UTC (rev 335) @@ -622,7 +622,7 @@ /** Opens the script pad to display the script for this event. */ public void openScript() { - final CMainControl mainControl = CMainControl.getInstance(); // refernce to main control + final CMainControl mainControl = CMainControl.getInstance(); // reference to main control final String filePath = getFilePath(); // trying to get the absolute path to scriptfile: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |