You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <chr...@us...> - 2006-09-24 20:12:42
|
Revision: 409 http://svn.sourceforge.net/gridarta/?rev=409&view=rev Author: christianhujer Date: 2006-09-24 13:12:32 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Minor documentation improvements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 20:05:19 UTC (rev 408) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 20:12:32 UTC (rev 409) @@ -45,7 +45,7 @@ import org.jetbrains.annotations.NotNull; /** - * The <code>GameObject</code> class handles the Crossfire arch objects. + * The <code>GameObject</code> class handles the Crossfire GameObjects. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 20:05:19 UTC (rev 408) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 20:12:32 UTC (rev 409) @@ -42,7 +42,7 @@ import org.jetbrains.annotations.NotNull; /** - * The <code>GameObject</code> class handles the Daimonin arch objects. + * The <code>GameObject</code> class handles the Daimonin GameObjects. * Usually, an GameObject that is really used is derived from a (replacable) default arch. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> @@ -1313,9 +1313,8 @@ } /** - * Create a new GameObject from this default GameObject. If this GameObject - * is not a default GameObject, this method recursively forwards to the - * default GameObject. + * Create a new GameObject from this Archetype. + * If this GameObject is not an Archetype, this method recursively forwards to its Archetype. * @return new GameObject */ public GameObject createArch() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 20:05:29
|
Revision: 408 http://svn.sourceforge.net/gridarta/?rev=408&view=rev Author: christianhujer Date: 2006-09-24 13:05:19 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fixed same || vs. && bug as in daimonin. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:59:24 UTC (rev 407) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 20:05:19 UTC (rev 408) @@ -295,7 +295,7 @@ editType |= IGUIConstants.TILE_EDIT_CONNECTED; } if ((checkType & IGUIConstants.TILE_EDIT_EXIT) != 0 - && archType == 66 || archType == 41 || archType == 95) { + && (archType == 66 || archType == 41 || archType == 95)) { // Exit: teleporter/exit/trapdoors editType |= IGUIConstants.TILE_EDIT_EXIT; } @@ -306,7 +306,7 @@ editType |= IGUIConstants.TILE_EDIT_TREASURE; } if ((checkType & IGUIConstants.TILE_EDIT_DOOR) != 0 - && archType == 20 || archType == 23 || archType == 26 || archType == 91 || archType == 21 || archType == 24) { + && (archType == 20 || archType == 23 || archType == 26 || archType == 91 || archType == 21 || archType == 24)) { // Door: door/special door/gates + keys editType |= IGUIConstants.TILE_EDIT_DOOR; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 19:59:39
|
Revision: 407 http://svn.sourceforge.net/gridarta/?rev=407&view=rev Author: christianhujer Date: 2006-09-24 12:59:24 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Declared nullability of reference types used by Gridarta GameObject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:46:33 UTC (rev 406) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:59:24 UTC (rev 407) @@ -155,7 +155,7 @@ * Container of this GameObject. * The Crossfire implementation only knows <code>null</code> (map or unlinked) or being an inventory item. */ - private GameObject container = null; + @Nullable private GameObject container = null; /** * All inventory objects. Set to {@link Collections#EMPTY_LIST} @@ -321,7 +321,7 @@ } /** {@inheritDoc} */ - public String getAttributeString(String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + @NotNull public String getAttributeString(@NotNull String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // The "real" Archtext from arch & archetype int j; attributeName = attributeName.trim() + " "; // attributeName must be followed by space @@ -364,17 +364,17 @@ } /** {@inheritDoc} */ - public String getAttributeString(final String attributeName, final boolean queryArchetype) { + @NotNull public String getAttributeString(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeString(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public String getAttributeString(final String attributeName) { + @NotNull public String getAttributeString(@NotNull final String attributeName) { return getAttributeString(attributeName, true); } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public int getAttributeInt(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -396,12 +396,12 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, final boolean queryArchetype) { + public int getAttributeInt(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeInt(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public long getAttributeLong(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -422,12 +422,12 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, final boolean queryArchetype) { + public long getAttributeLong(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeLong(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public double getAttributeDouble(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -448,17 +448,17 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, final boolean queryArchetype) { + public double getAttributeDouble(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeDouble(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public GameObject getContainer() { + @Nullable public GameObject getContainer() { return container; } /** {@inheritDoc} */ - public GameObject getTopContainer() { + @NotNull public GameObject getTopContainer() { GameObject tmpArch; for (tmpArch = this; tmpArch.getContainer() != null; @@ -987,7 +987,7 @@ } /** {@inheritDoc} */ - public String getObjectText() { + @NotNull public String getObjectText() { return objectText.toString(); } Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:46:33 UTC (rev 406) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:59:24 UTC (rev 407) @@ -321,12 +321,12 @@ } /** {@inheritDoc} */ - public String getAttributeString(String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + @NotNull public String getAttributeString(@NotNull String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { throw new Error("deprecated and not used in Daimonin"); } /** {@inheritDoc} */ - public String getAttributeString(final String attributeName, final boolean queryArchetype) { + @NotNull public String getAttributeString(@NotNull final String attributeName, final boolean queryArchetype) { String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (queryArchetype) { @@ -343,12 +343,12 @@ } /** {@inheritDoc} */ - public String getAttributeString(final String attributeName) { + @NotNull public String getAttributeString(@NotNull final String attributeName) { return getAttributeString(attributeName, true); } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public int getAttributeInt(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -370,12 +370,12 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, final boolean queryArchetype) { + public int getAttributeInt(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeInt(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public long getAttributeLong(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -396,12 +396,12 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, final boolean queryArchetype) { + public long getAttributeLong(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeLong(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + public double getAttributeDouble(@NotNull final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -422,17 +422,17 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, final boolean queryArchetype) { + public double getAttributeDouble(@NotNull final String attributeName, final boolean queryArchetype) { return getAttributeDouble(attributeName, queryArchetype ? archetype : null); } /** {@inheritDoc} */ - public GameObjectContainer getContainer() { + @NotNull public GameObjectContainer getContainer() { return container; } /** {@inheritDoc} */ - public GameObject getTopContainer() { + @NotNull public GameObject getTopContainer() { return isInContainer() ? ((GameObject) container).getTopContainer() : this; } @@ -889,7 +889,7 @@ } /** {@inheritDoc} */ - public String getObjectText() { + @NotNull public String getObjectText() { return objectText.toString(); } Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-09-24 19:46:33 UTC (rev 406) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-09-24 19:59:24 UTC (rev 407) @@ -1,5 +1,8 @@ package net.sf.gridarta.gameobject; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + /** * This interface serves as a common interface for GameObjects for Daimonin and Crossfire to allow classes that use GameObjects being reused and moved to Gridarta. * @@ -18,7 +21,7 @@ * Returns the object text of this game object as String. * @return the object text */ - String getObjectText(); + @NotNull String getObjectText(); /** * Get the requested attribute value of this GameObject as {@link String}. @@ -33,7 +36,7 @@ * @return Attribute value or empty String if not found. * @deprecated a GameObject knows its own archetype and there is no purpose for using another GameObject as archetype. Because of that this method will be removed. */ - @Deprecated String getAttributeString(String attributeName, GameObject archetype); + @Deprecated @NotNull String getAttributeString(@NotNull String attributeName, @Nullable GameObject archetype); /** * Get the requested attribute value of this GameObject as {@link String}. @@ -50,7 +53,7 @@ * @return Attribute value or empty String ("") if no such attribute * @see #getAttributeString(String) */ - String getAttributeString(String attributeName, boolean queryArchetype); + @NotNull String getAttributeString(@NotNull String attributeName, boolean queryArchetype); /** * Get the requested attribute value of this GameObject as {@link String}. @@ -63,7 +66,7 @@ * @return Attribute value or empty String ("") if no such attribute * @see #getAttributeString(String, boolean) */ - String getAttributeString(String attributeName); + @NotNull String getAttributeString(@NotNull String attributeName); /** * Get the requested attribute value of this GameObject as <code>int</code>. @@ -73,7 +76,7 @@ * @deprecated a GameObject knows its own archetype and there is no purpose for using another GameObject as archetype. Because of that this method will be removed. * @see #getAttributeString(String, GameObject) */ - @Deprecated int getAttributeInt(String attributeName, GameObject archetype); + @Deprecated int getAttributeInt(@NotNull String attributeName, @Nullable GameObject archetype); /** * Get the requested attribute value of this GameObject as <code>int</code>. @@ -82,7 +85,7 @@ * @return attribute value or zero if not found. * @see #getAttributeString(String, boolean) */ - int getAttributeInt(String attributeName, boolean queryArchetype); + int getAttributeInt(@NotNull String attributeName, boolean queryArchetype); /** * Get the requested attribute value of this GameObject as <code>long</code>. @@ -92,7 +95,7 @@ * @deprecated a GameObject knows its own archetype and there is no purpose for using another GameObject as archetype. Because of that this method will be removed. * @see #getAttributeString(String, GameObject) */ - @Deprecated long getAttributeLong(String attributeName, GameObject archetype); + @Deprecated long getAttributeLong(@NotNull String attributeName, @Nullable GameObject archetype); /** * Get the requested attribute value of this GameObject as <code>int</code>. @@ -101,7 +104,7 @@ * @return attribute value or zero if not found. * @see #getAttributeString(String, boolean) */ - long getAttributeLong(String attributeName, boolean queryArchetype); + long getAttributeLong(@NotNull String attributeName, boolean queryArchetype); /** * Get the requested attribute value of this GameObject as <code>double</code>. @@ -111,7 +114,7 @@ * @deprecated a GameObject knows its own archetype and there is no purpose for using another GameObject as archetype. Because of that this method will be removed. * @see #getAttributeString(String, net.sf.gridarta.gameobject.GameObject) */ - @Deprecated double getAttributeDouble(String attributeName, GameObject archetype); + @Deprecated double getAttributeDouble(@NotNull String attributeName, @Nullable GameObject archetype); /** * Get the requested attribute value of this GameObject as <code>int</code>. @@ -120,26 +123,26 @@ * @return attribute value or zero if not found. * @see #getAttributeString(String, boolean) */ - double getAttributeDouble(String attributeName, boolean queryArchetype); + double getAttributeDouble(@NotNull String attributeName, boolean queryArchetype); /** * Returns container of this GameObject. * There are two possibilities for the container: * <ul> * <li>Another GameObject, which means this object is in the inventory of that GameObject.</li> - * <li>A MapSquare, which means that this GameObject is top level on that MapSquare.</li> + * <li>A MapSquare, which means that this GameObject is top level on that MapSquare (Crossfire returns <code>null</code> for this).</li> * </ul> * @return container of this GameObject. */ - Object getContainer(); // todo: change return type to something more specific. + @Nullable Object getContainer(); // todo: change return type to something more specific. /** * Get the topmost container of this GameObject (in Game sense, which * means being in a MapSquare isn't, but being in an GameObject is). - * @return the topmost container but always GameObject, never MapSquare - * @todo document what happens if this object is topmost + * @return the topmost container but always GameObject, never MapSquare. + * If this object is topmost itself, it returns itself. */ - GameObject getTopContainer(); + @NotNull GameObject getTopContainer(); /** * Get the Archetype this GameObject is based on. @@ -147,7 +150,7 @@ * @note currently this method returns the GameObject that reflects the Archetype data because there is no separate Archetype class. * This will change in future, and you should be aware of this fact. */ - GameObject getArchetype(); + @NotNull GameObject getArchetype(); /** * Set the Archetype of this GameObject. @@ -155,7 +158,7 @@ * @note currently this method takes a GameObject that reflects the Archetype data because there is no separate Archetype class. * This will change in future, and you should be aware of this fact. */ - void setArchetype(final GameObject archetype); + void setArchetype(@NotNull final GameObject archetype); /** * Returns whether this GameObject is an Archetype. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 19:47:02
|
Revision: 406 http://svn.sourceforge.net/gridarta/?rev=406&view=rev Author: christianhujer Date: 2006-09-24 12:46:33 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Some unification work of cf/dai GameObject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/match/MutableNameGameObjectMatcher.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapControl.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:46:33 UTC (rev 406) @@ -79,26 +79,18 @@ private String objName; /** - * The objectText. - * <p/> - * It only contains the differences from the default arch. - * <p/> - * Note: It's a rule that every line ends with a '\n', including the last - * line. + * The objectText with the differences from the Archetype. + * @note Every line in the objectText must end on '\n', including the last line. */ - private StringBuffer objectText; + @NotNull private StringBuffer objectText; /** * The msgText. - * <p/> - * Note: It's a rule that every line ends with a '\n', including the last - * line. - * <p/> - * Another rule (unconfirmed): If the value is <code>null</code>, the arch - * has no message text, if the value exists but is empty, the arch has an - * empty message text. + * @note Every line in msgText must end on '\n', including the last line. + * @note If the value is <code>null</code>, the arch has no message text, + * if the value exists but is empty, the arch has an empty message text (unconfirmed). */ - private StringBuffer msgText; + @Nullable private StringBuffer msgText; private StringBuffer animText; // anim text buffer @@ -144,23 +136,26 @@ private boolean noface; // if true, arch has no face as default + /** + * If this flag is set, the arch is not a "real" arch but comes from the + * artifacts file. Such GameObject instances are not included in the arch + * collection, since the artifacts file is the same for editor and server. + */ + private boolean artifact; + private int facenr; // the index of faceImages[] private boolean editflag; // if true, object is in a editor - // for example in the map arch panel - private boolean artifact; // if set, this is not a "real" arch - // It will NOT be included in the arch collection - private GameObject next; // to chain ArchObjects in maps private GameObject prev; // same /** - * Enclosing container; if null, this object is not in a container but in a - * map. + * Container of this GameObject. + * The Crossfire implementation only knows <code>null</code> (map or unlinked) or being an inventory item. */ - private GameObject env = null; + private GameObject container = null; /** * All inventory objects. Set to {@link Collections#EMPTY_LIST} @@ -459,7 +454,7 @@ /** {@inheritDoc} */ public GameObject getContainer() { - return env; + return container; } /** {@inheritDoc} */ @@ -610,7 +605,7 @@ */ public void addInvObj(final GameObject arch) { // arch must not be already in a container - if (arch.env != null) { + if (arch.container != null) { throw new IllegalArgumentException(); } @@ -619,7 +614,7 @@ } inv.add(arch); - arch.env = this; + arch.container = this; arch.setMapX(getMapX()); arch.setMapY(getMapY()); @@ -633,17 +628,17 @@ } // object must be in a container - if (env == null) { + if (container == null) { throw new IllegalArgumentException(); } // remove this object from its parent container - if (!env.inv.remove(this)) { + if (!container.inv.remove(this)) { throw new AssertionError(); } - if (env.inv.size() == 0) { - env.inv = Collections.EMPTY_LIST; + if (container.inv.size() == 0) { + container.inv = Collections.EMPTY_LIST; } } Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 19:46:33 UTC (rev 406) @@ -112,7 +112,7 @@ if (def == null || def == arch) { objName = null; } else if ((objName = def.getObjName()) != null && objName.length() != 0) { - } else if ((objName = def.getArchName()) != null && objName.length() != 0) { + } else if ((objName = def.getArchetypeName()) != null && objName.length() != 0) { } else { objName = null; } @@ -125,7 +125,7 @@ } archObjNameText.setText(objName); - archArchNameText.setText(arch.getArchName()); + archArchNameText.setText(arch.getArchetypeName()); archTypeText.setText(mainControl.getTypeList().getArchTypeName(arch.getArchTypNr()) + " (" + arch.getArchTypNr() + ')'); Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 19:46:33 UTC (rev 406) @@ -453,14 +453,14 @@ } else if (defarch.getObjName() != null && defarch.getObjName().length() > 0) { nameTF = new JTextField(defarch.getObjName(), 16); } else { - nameTF = new JTextField(defarch.getArchName(), 16); + nameTF = new JTextField(defarch.getArchetypeName(), 16); } nameTF.setEditable(false); header.add(nameTF, gbc); gbc.gridy++; header.add(buildTypesBox(), gbc); // build type-selection box gbc.gridy++; - defarchTF = new JTextField(defarch.getArchName(), 16); + defarchTF = new JTextField(defarch.getArchetypeName(), 16); defarchTF.setEditable(false); header.add(defarchTF, gbc); @@ -676,7 +676,7 @@ } else if (defarch.getObjName() != null && defarch.getObjName().length() > 0) { dtxt = defarch.getObjName(); } else { - dtxt = defarch.getArchName(); + dtxt = defarch.getArchetypeName(); } } else if ("face".equalsIgnoreCase(nameOld)) { if (arch.getFaceRealName() != null && arch.getFaceRealName().length() > 0) { @@ -1103,7 +1103,7 @@ } else { newName = ""; } - } else if (!inline.equalsIgnoreCase(defarch.getArchName())) { + } else if (!inline.equalsIgnoreCase(defarch.getArchetypeName())) { newName = inline; } else { newName = ""; Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 19:46:33 UTC (rev 406) @@ -1294,9 +1294,9 @@ //noinspection ForLoopWithMissingComponent for (final Iterator<GameObject> it = objects.iterator(); it.hasNext();) { final GameObject arch = it.next(); - final GameObject defarch = archetypeSet.getArch(arch.getArchName()); + final GameObject defarch = archetypeSet.getArch(arch.getArchetypeName()); if (defarch == null) { - noarch.append(arch.getArchName()).append('\n'); + noarch.append(arch.getArchetypeName()).append('\n'); noarchcount++; it.remove(); } @@ -1906,7 +1906,7 @@ * if so, use the pickmap as random arch seed for the filler. */ if (arch != null) { - title.append("with arch ").append(arch.getArchName()); + title.append("with arch ").append(arch.getArchetypeName()); } else { pmap = CPickmapPanel.getInstance().getCurrentPickmap(); if (pmap != null) { Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 19:46:33 UTC (rev 406) @@ -355,7 +355,7 @@ } else { arch.setObjName(archNameField.getText()); // overrule in map arch } - } else if (archNameField.getText().compareTo(arch.getArchName()) == 0) { + } else if (archNameField.getText().compareTo(arch.getArchetypeName()) == 0) { arch.setObjName(null); } else { // def is null, something is in panel, so we set it arch.setObjName(archNameField.getText()); // overrule in map arch @@ -843,8 +843,8 @@ archNameField.setForeground(black); if (defarch.getObjName() == null) { // arch name - if (arch.getArchName() != null) { - archNameField.setText(arch.getArchName()); + if (arch.getArchetypeName() != null) { + archNameField.setText(arch.getArchetypeName()); } else { archNameField.setText(""); } @@ -882,8 +882,8 @@ } if (arch.isInContainer()) { final GameObject cont = (GameObject) arch.getContainer(); - if (cont.getArchName() != null) { - specialText.append(" (env: ").append(cont.getArchName()).append(')'); + if (cont.getArchetypeName() != null) { + specialText.append(" (env: ").append(cont.getArchetypeName()).append(')'); } else { specialText.append(" (env: ><)"); } @@ -893,7 +893,7 @@ final StringBuilder typeText = new StringBuilder(); if (defarch != null) { - typeText.append("Type: ").append(mainControl.getTypeList().getArchTypeName(arch.getArchTypNr())).append(" (").append(arch.getArchTypNr()).append(") [").append(arch.getArchName()).append(']'); + typeText.append("Type: ").append(mainControl.getTypeList().getArchTypeName(arch.getArchTypNr())).append(" (").append(arch.getArchTypNr()).append(") [").append(arch.getArchetypeName()).append(']'); } else { typeText.append("Type: <unknown>"); } Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 19:46:33 UTC (rev 406) @@ -134,7 +134,7 @@ // if this is still -1 in the post parse, we have no direction command loaded arch.setDirection(-1); // our arch! it has a name! - arch.setArchName(thisLine.substring("arch ".length()).trim()); + arch.setArchetypeName(thisLine.substring("arch ".length()).trim()); } } else { Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 19:46:33 UTC (rev 406) @@ -115,7 +115,7 @@ final GameObject defarch = arch.getArchetype(); // ok, we start with the standard parts... this is valid for all types - writer.write("arch " + arch.getArchName() + '\n'); + writer.write("arch " + arch.getArchetypeName() + '\n'); if (arch.getObjName() != null) { writer.write("name " + arch.getObjName() + '\n'); } Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 19:46:33 UTC (rev 406) @@ -205,7 +205,7 @@ if (newarch == null) { archname = null; } else { - archname = newarch.getArchName(); + archname = newarch.getArchetypeName(); } } @@ -461,7 +461,7 @@ if (defname != null && defname.length() > 0) { setText(defname); // default name } else { - setText(arch.getArchName()); // arch name + setText(arch.getArchetypeName()); // arch name } } } Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 19:46:33 UTC (rev 406) @@ -461,7 +461,7 @@ */ private void addArchToMap(final MapControl mapControl, final GameObject arch, final Point pos, final boolean allowDouble, final boolean fillBelow) { if (arch.isArchetype()) { - mapControl.getMapModel().addArchToMap(arch.getArchName(), pos, allowDouble, fillBelow); + mapControl.getMapModel().addArchToMap(arch.getArchetypeName(), pos, allowDouble, fillBelow); } else { final GameObject newHead = arch.createClone(pos.x, pos.y); for (GameObject tmp = arch.getArchetype().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 19:46:33 UTC (rev 406) @@ -316,7 +316,7 @@ for (MapSquare square : entireMap ? mapControl.getMapModel() : mapViewIFrame.getView().getSelectedSquares()) { for (GameObject node : square) { if (!node.isMulti() - && (matchCriteria == MATCH_ARCH_NAME && node.getArchName() != null && node.getArchName().equalsIgnoreCase(matchString) + && (matchCriteria == MATCH_ARCH_NAME && node.getArchetypeName() != null && node.getArchetypeName().equalsIgnoreCase(matchString) || matchCriteria == MATCH_OBJ_NAME && node.getBestName().equalsIgnoreCase(matchString))) { if (replaceListSize > 0 && !deleteOnly) { GameObject randomArch; Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 19:46:33 UTC (rev 406) @@ -588,7 +588,7 @@ ScriptedEvent(final int eventType, final String pluginName, final String filePath, final String options) { event = new GameObject(); // FIXME: This arch has no default arch event.setArchTypNr(118); - event.setArchName("event_obj"); + event.setArchetypeName("event_obj"); event.setArchetype(CMainControl.getInstance().getArchObjectStack().getArch("event_obj")); event.setObjectFace(); setEventData(eventType, pluginName, filePath, options); Modified: trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java 2006-09-24 19:46:33 UTC (rev 406) @@ -183,9 +183,9 @@ } if (archName == null) { - arch.setArchName(thisLine.substring(7)); + arch.setArchetypeName(thisLine.substring(7)); } else { - arch.setArchName(archName); + arch.setArchetypeName(archName); } multiShapeID = 0; @@ -200,15 +200,15 @@ } else if (animflag) { if (thisLine.startsWith("mina")) { try { - mainControl.getAnimationObjects().addAnimPath(arch.getArchName(), path.concat(arch.getArchName())); - mainControl.getAnimationObjects().addAnimationObject(arch.getArchName(), animText.toString()); + mainControl.getAnimationObjects().addAnimPath(arch.getArchetypeName(), path.concat(arch.getArchetypeName())); + mainControl.getAnimationObjects().addAnimationObject(arch.getArchetypeName(), animText.toString()); } catch (final DuplicateAnimationException e) { // TODO: Report to the user log.log(Level.WARNING, "duplicateAnimation", e); } - arch.addArchText("animation " + arch.getArchName() + "\n"); - arch.setAnimName(arch.getArchName()); + arch.addArchText("animation " + arch.getArchetypeName() + "\n"); + arch.setAnimName(arch.getArchetypeName()); // here we must add this to AnimationObject // and add Animation cmd here! @@ -220,7 +220,7 @@ log.log(Level.WARNING, "inventoryInDefArch", thisLine); } else if (thisLine.startsWith("end")) { //if (arch.getArchTypNr() == 0) { - //System.err.println("Arch "+ arch.getArchName()+" has no type info!"); + //System.err.println("Arch "+ arch.getArchetypeName()+" has no type info!"); //} // we got full arch parsearch = false; // we write this sucker @@ -233,7 +233,7 @@ if (firstArch.getMultiRefCount() == 2) { firstArch.setMultiShapeID(multiShapeID); } else if (multiShapeID != firstArch.getMultiShapeID()) { - log.log(Level.WARNING, "defArchWithInvalidMpartNr", new Object[]{arch.getArchName(), firstArch.getArchName(), Integer.toString(multiShapeID), Integer.toString(firstArch.getMultiShapeID())}); + log.log(Level.WARNING, "defArchWithInvalidMpartNr", new Object[]{arch.getArchetypeName(), firstArch.getArchetypeName(), Integer.toString(multiShapeID), Integer.toString(firstArch.getMultiShapeID())}); } } else { mainControl.incArchObjCount(); @@ -243,7 +243,7 @@ if (!ArchetypeSet.isLoadedFromArchive() || archName != null) { // loading from individual files, so we simply add it to list // ArchetypeSet.loadArchFromFiles() takes care of the panels - mainControl.addArchPanelArch(arch.getArchName(), index); + mainControl.addArchPanelArch(arch.getArchetypeName(), index); } else { // loading from collected files, so we need process panels here // FIXME this sucks. This takes 50% of the time of collecting arches!!! @@ -287,7 +287,7 @@ isNewCategory = false; oldCat = newCat; } - mainControl.addArchPanelArch(arch.getArchName(), index); + mainControl.addArchPanelArch(arch.getArchetypeName(), index); } } } @@ -327,23 +327,23 @@ animflag = true; animText = new StringBuilder(); } else if (thisLine.startsWith("visibility ")) { - // System.err.println("Remove visibility: "+arch.getArchName()); + // System.err.println("Remove visibility: "+arch.getArchetypeName()); } else if (thisLine.startsWith("magicmap ")) { - // System.err.println("Remove magicmap: "+arch.getArchName()); + // System.err.println("Remove magicmap: "+arch.getArchetypeName()); } else if (thisLine.startsWith("color_fg ")) { - // System.err.println("Remove color_fg: "+arch.getArchName()); + // System.err.println("Remove color_fg: "+arch.getArchetypeName()); } else if (thisLine.startsWith("color_bg ")) { - // System.err.println("Remove color_bg: "+arch.getArchName()); + // System.err.println("Remove color_bg: "+arch.getArchetypeName()); } else if (thisLine.startsWith("x ")) { - if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { - log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"x", arch.getArchName()}); + if (!archmore && !arch.getArchetypeName().equals(STARTARCH_NAME)) { + log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"x", arch.getArchetypeName()}); arch.addArchText(thisLine + "\n"); } else { arch.setMultiX(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()}); + if (!archmore && !arch.getArchetypeName().equals(STARTARCH_NAME)) { + log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"y", arch.getArchetypeName()}); arch.addArchText(thisLine + "\n"); } else { arch.setMultiY(Integer.parseInt(thisLine.substring(2))); @@ -353,17 +353,17 @@ final int i = Integer.parseInt(thisLine.substring(5)); arch.setArchTypNr(i); if (i == 0) { - log.log(Level.WARNING, "defArchWithZeroType", arch.getArchName()); + log.log(Level.WARNING, "defArchWithZeroType", arch.getArchetypeName()); } } catch (final NumberFormatException e) { - log.log(Level.WARNING, "defArchWithInvalidTypeNr", new Object[]{arch.getArchName(), thisLine.substring(5)}); + log.log(Level.WARNING, "defArchWithInvalidTypeNr", new Object[]{arch.getArchetypeName(), thisLine.substring(5)}); arch.addArchText(thisLine + "\n"); } } else if (thisLine.startsWith("direction ")) { try { arch.setDirection(Integer.parseInt(thisLine.substring(10))); } catch (final NumberFormatException e) { - log.log(Level.WARNING, "defArchWithInvalidDirection", new Object[]{arch.getArchName(), thisLine.substring(10)}); + log.log(Level.WARNING, "defArchWithInvalidDirection", new Object[]{arch.getArchetypeName(), thisLine.substring(10)}); } arch.addArchText(thisLine + "\n"); } else if (thisLine.startsWith("face ")) { @@ -387,10 +387,10 @@ multiShapeID = Integer.parseInt(thisLine.substring(9).trim()); if (multiShapeID <= 0 || multiShapeID >= MultiPositionData.Y_DIM) { - System.err.println("WARNING: Arch " + arch.getArchName() + " mpart_id number is '" + thisLine.substring(9) + '\''); + System.err.println("WARNING: Arch " + arch.getArchetypeName() + " mpart_id number is '" + thisLine.substring(9) + '\''); } } catch (final NumberFormatException e) { - System.err.println("WARNING: Arch " + arch.getArchName() + " has a invalid mpart_id (" + thisLine.substring(9) + ')'); + System.err.println("WARNING: Arch " + arch.getArchetypeName() + " has a invalid mpart_id (" + thisLine.substring(9) + ')'); arch.addArchText(thisLine + "\n"); } } else if (thisLine.startsWith("mpart_nr ")) { @@ -399,7 +399,7 @@ final int i = Integer.parseInt(thisLine.substring(9).trim()); arch.setMultiPartNr(i); } catch (final NumberFormatException e) { - System.err.println("WARNING: Arch " + arch.getArchName() + " has a invalid mpart_nr (" + thisLine.substring(9) + ')'); + System.err.println("WARNING: Arch " + arch.getArchetypeName() + " has a invalid mpart_nr (" + thisLine.substring(9) + ')'); arch.addArchText(thisLine + "\n"); } } else { Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-09-24 19:46:33 UTC (rev 406) @@ -184,12 +184,12 @@ * @todo check whether the GameObject is a default arch and reject no default arches with an exception */ public void addArchToList(final GameObject data) /*throws DuplicateArchException*/ { - if (arches.containsKey(data.getArchName())) { - ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "loadDuplicateArch", data.getArchName(), currentFile); + if (arches.containsKey(data.getArchetypeName())) { + ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "loadDuplicateArch", data.getArchetypeName(), currentFile); //throw new DuplicateArchException(data); } else { archObjects.add(data); - arches.put(data.getArchName(), data); + arches.put(data.getArchetypeName(), data); } } @@ -569,15 +569,15 @@ artifactCount++; continue; } - if (arch.getArchName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { + if (arch.getArchetypeName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { // process map arch - out.append("Object ").append(arch.getArchName()).append('\n'); + out.append("Object ").append(arch.getArchetypeName()).append('\n'); // map object hack: x/y is normally a reference for multi // part arches - i include this hack until we rework the // arch objects with more useful script names - if (arch.getArchName().equals(ArchObjectParser.STARTARCH_NAME)) { + if (arch.getArchetypeName().equals(ArchObjectParser.STARTARCH_NAME)) { out.append("x ").append(Integer.toString(arch.getMultiX())).append('\n'); out.append("y ").append(Integer.toString(arch.getMultiY())).append('\n'); } @@ -603,7 +603,7 @@ continue; //ACTION_FACTORY.showMessageDialog(pbar.getParentComponent(), WARNING_MESSAGE, "archCollectWarningMultipartTailInPanel"); } - out.append("Object ").append(arch.getArchName()).append('\n'); + out.append("Object ").append(arch.getArchetypeName()).append('\n'); if (arch.getObjName() != null) { out.append("name ").append(arch.getObjName()).append('\n'); @@ -652,7 +652,7 @@ out.append("More\n"); - out.append("Object ").append(tail.getArchName()).append('\n'); + out.append("Object ").append(tail.getArchetypeName()).append('\n'); if (tail.getObjName() != null) { out.append("name ").append(tail.getObjName()).append('\n'); Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:46:33 UTC (rev 406) @@ -72,7 +72,7 @@ private String faceRealName; /** Arch name. */ - private String archName; + private String archetypeName; /** The name of this object. */ private String objName; @@ -81,7 +81,7 @@ private String animName; /** - * The objectText with the differences from the default arch. + * The objectText with the differences from the Archetype. * @note Every line in the objectText must end on '\n', including the last line. */ @NotNull private StringBuffer objectText; @@ -136,6 +136,15 @@ */ private ScriptArchData script; + private boolean noface; + + /** + * If this flag is set, the arch is not a "real" arch but comes from the + * artifacts file. Such GameObject instances are not included in the arch + * collection, since the artifacts file is the same for editor and server. + */ + private boolean artifact; + /** State where the face comes from. */ private FaceDesc faceobjdesc; @@ -147,16 +156,7 @@ private int direction; - private boolean noface; - /** - * If this flag is set, the arch is not a "real" arch but comes from the - * artifacts file. Such GameObject instances are not included in the arch - * collection, since the artifacts file is the same for editor and server. - */ - private boolean artifact; - - /** * Container of this GameObject. * There are two possibilities for the container: * <ul> @@ -800,18 +800,18 @@ /** * Sets arch name. - * @param archName arch name + * @param archetypeName arch name */ - public void setArchName(final String archName) { - this.archName = archName != null ? archName.intern() : null; + public void setArchetypeName(final String archetypeName) { + this.archetypeName = archetypeName != null ? archetypeName.intern() : null; } /** * Returns arch name. * @return the arch name */ - public String getArchName() { - return archName; + public String getArchetypeName() { + return archetypeName; } /** @@ -824,10 +824,10 @@ return objName; } else if (archetype != null && archetype.objName != null && archetype.objName.length() > 0) { return archetype.objName; - } else if (archName != null && archName.length() > 0) { - return archName; - } else if (archetype != null && archetype.archName != null) { - return archetype.archName; + } else if (archetypeName != null && archetypeName.length() > 0) { + return archetypeName; + } else if (archetype != null && archetype.archetypeName != null) { + return archetype.archetypeName; } return "???"; // this case should actually never happen @@ -1188,7 +1188,7 @@ /** @return true when this arch has one or more scripted events defined */ public boolean isScripted() { - for (GameObject tmp : this) { + for (final GameObject tmp : this) { if (tmp.archType == 118) { return true; } @@ -1323,7 +1323,7 @@ return archetype.createArch(); } final GameObject arch = new GameObject(); - arch.setArchName(archName); + arch.setArchetypeName(archetypeName); arch.setArchetype(this); arch.setObjectFace(); arch.setMultiX(multiX); Modified: trunk/daimonin/src/daieditor/gameobject/match/MutableNameGameObjectMatcher.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/match/MutableNameGameObjectMatcher.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/gameobject/match/MutableNameGameObjectMatcher.java 2006-09-24 19:46:33 UTC (rev 406) @@ -47,7 +47,7 @@ /** {@inheritDoc} */ public boolean isMatching(final GameObject arch) { - return name.matches(arch.getArchName()); + return name.matches(arch.getArchetypeName()); } /** Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-24 19:46:33 UTC (rev 406) @@ -234,7 +234,7 @@ if (!allowDouble) { for (final GameObject node : mapGrid[mapT.x][mapT.y]) { - if (node.getArchName().equals(tail.getArchName())) { + if (node.getArchetypeName().equals(tail.getArchetypeName())) { return false; } } @@ -307,7 +307,7 @@ if (newarch == null || newarch.isArchetype()) { // just make sure we never insert an uninitialized default arch from the stack if (newarch != null && newarch.isArchetype()) { - archname = newarch.getArchName(); + archname = newarch.getArchetypeName(); } // insert a new instance of the default arch (number 'archnr') if (!addArchToMap(archname, pos, true, false)) { @@ -340,7 +340,7 @@ final GameObject invnew; // new arch to be inserted if (newarch == null || newarch.isArchetype()) { if (newarch != null && newarch.isArchetype()) { - archname = newarch.getArchName(); + archname = newarch.getArchetypeName(); } // create a new copy of a default arch invnew = getDefaultArch(archname).createArch(); Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 19:27:28 UTC (rev 405) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 19:46:33 UTC (rev 406) @@ -480,7 +480,7 @@ // insert multi tile from pickmap: newarch = newarch.getHead(); // first insert default arch from archlist - if (!mapModel.addArchToMap(newarch.getArchName(), p, allowMany, false)) { + if (!mapModel.addArchToMap(newarch.getArchetypeName(), p, allowMany, false)) { // do nothing } else { // insertion successful, now get redraw info @@ -532,7 +532,7 @@ } // first insert default arch from archlist - if (!allSpacesFree || !mapModel.addArchToMap(newarch.getArchName(), p, true, false)) { + if (!allSpacesFree || !mapModel.addArchToMap(newarch.getArchetypeName(), p, true, false)) { // do nothing } else { // insertion successful, now get redraw info This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 19:27:47
|
Revision: 405 http://svn.sourceforge.net/gridarta/?rev=405&view=rev Author: christianhujer Date: 2006-09-24 12:27:28 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Some unification work of cf/dai GameObject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:27:28 UTC (rev 405) @@ -42,6 +42,7 @@ import javax.swing.JList; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; /** * The <code>GameObject</code> class handles the Crossfire arch objects. @@ -109,7 +110,7 @@ // the nodenr determines the (default) archetype /** The Archetype of this GameObject. */ - private GameObject archetype; + @NotNull private GameObject archetype; /** Map x position if on map. */ private int mapx; @@ -219,32 +220,41 @@ typeList = tlist; } - /** - * Returns edit Type. - * @return edit Type - */ - // edit type is the editable value from arch - // here it is used to identify the layer type - public int getEditType() { - return editType; - } - /** {@inheritDoc} */ public GameObject getArchetype() { return archetype; } + /** {@inheritDoc} + * @note DO NOT INVOKE DIRECTLY YET! + */ + public void setArchetype(final GameObject archetype) { + this.archetype = archetype; + } + + /** {@inheritDoc} + * @note DO NOT INVOKE DIRECTLY YET! + */ + public void setArchetype(final net.sf.gridarta.gameobject.GameObject archetype) { + this.archetype = (GameObject) archetype; + } + /** {@inheritDoc} */ public boolean isArchetype() { return archetype == this; } - /** - * Get the EditType of an GameObject (e.g. floor, monster, etc). These are - * determined by the various attributes of the arch (->objectText). - * @param checkType bitmask containing the edit type(s) to be calculated - * @return new editType for this arch - */ + /** {@inheritDoc} */ + public int getEditType() { + return editType; + } + + /** {@inheritDoc} */ + public void setEditType(final int editType) { + this.editType = editType; + } + + /** {@inheritDoc} */ public int calculateEditType(final int checkType) { // ATTENTION! BE VERY CAREFUL WHEN YOU TRY TO UNIFY MORE OF THIS WITH DAIMONIN! /* if one of the types in checkType already is in editType, @@ -369,7 +379,7 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { + public int getAttributeInt(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -396,7 +406,7 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { + public long getAttributeLong(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -422,7 +432,7 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { + public double getAttributeDouble(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { @@ -447,14 +457,6 @@ return getAttributeDouble(attributeName, queryArchetype ? archetype : null); } - /** - * Sets edit Type. - * @param editType edit Type. - */ - public void setEditType(final int editType) { - this.editType = editType; - } - /** {@inheritDoc} */ public GameObject getContainer() { return env; @@ -906,20 +908,6 @@ setArchetype(archetypeSet.getArch(nodenr)); } - /** {@inheritDoc} - * @note DO NOT INVOKE DIRECTLY YET! - */ - public void setArchetype(final GameObject archetype) { - this.archetype = archetype; - } - - /** {@inheritDoc} - * @note DO NOT INVOKE DIRECTLY YET! - */ - public void setArchetype(final net.sf.gridarta.gameobject.GameObject archetype) { - this.archetype = (GameObject) archetype; - } - /* Get Node number. Node number is the index of the default arch node list */ public int getNodeNr() { return nodenr; Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 19:27:28 UTC (rev 405) @@ -1229,7 +1229,7 @@ errors = arch.getSyntaxErrors(typeStruct); // --- parsing succeeded, now we write it into the arch/map --- - arch.setArchText(newArchText); + arch.setObjectText(newArchText); //arch.setArchTypNr(); if (newName != null) { if (newName.length() == 0) { Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 19:27:28 UTC (rev 405) @@ -398,7 +398,7 @@ // read from archEdit (bottom right textwin) only the attributes // that differ from the default arch. These get stored into // the arche's archText (and finally in the map). - arch.setArchText(defarch.diffArchText(archEdit.getText(), false)); + arch.setObjectText(defarch.diffArchText(archEdit.getText(), false)); /* check we have a face and set the real face obj for fast access */ final String face = arch.getAttributeString("face", false); Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 19:27:28 UTC (rev 405) @@ -147,7 +147,7 @@ newArchText.append(line).append('\n'); } } - arch.setArchText(newArchText.toString()); + arch.setObjectText(newArchText.toString()); } // now append the type to the archtext Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 19:27:28 UTC (rev 405) @@ -81,10 +81,10 @@ private String animName; /** - * The archText with the differences from the default arch. - * @note Every line in the archText must end on '\n', including the last line. + * The objectText with the differences from the default arch. + * @note Every line in the objectText must end on '\n', including the last line. */ - @NotNull private StringBuffer archText; + @NotNull private StringBuffer objectText; /** * The msgText. @@ -182,7 +182,7 @@ /** Create an GameObject. */ public GameObject() { - archText = new StringBuffer(); + objectText = new StringBuffer(); faceobjdesc = FaceDesc.FACE_NOT_FOUND; archType = TYPE_UNSET; // type must be set script = new ScriptArchData(this); @@ -192,16 +192,6 @@ typeList = tlist; } - /** - * Returns edit Type. - * @return edit Type - */ - // edit type is the editable value from arch - // here it is used to identify the layer type - public int getEditType() { - return editType; - } - /** {@inheritDoc} */ public GameObject getArchetype() { return archetype; @@ -247,11 +237,18 @@ return archetype == other.archetype; } + /** {@inheritDoc} */ + public int getEditType() { + return editType; + } + + /** {@inheritDoc} */ + public void setEditType(final int editType) { + this.editType = editType; + } + /** - * Get the EditType of an GameObject (e.g. floor, monster, etc). These are - * determined by the various attributes of the arch (->archText). - * @param checkType bitmask containing the edit type(s) to be calculated - * @return new editType for this arch + * {@inheritDoc} * @deprecated use arch object matchers, this method will be removed */ @Deprecated public int calculateEditType(final int checkType) { @@ -324,13 +321,13 @@ } /** {@inheritDoc} */ - @Deprecated public String getAttributeString(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { + public String getAttributeString(String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { throw new Error("deprecated and not used in Daimonin"); } /** {@inheritDoc} */ public String getAttributeString(final String attributeName, final boolean queryArchetype) { - String aText = archText.toString(); // The "real" Archtext from arch & archetype + String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (queryArchetype) { aText += diffArchText(archetype.getObjectText(), true); @@ -351,8 +348,8 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { - String aText = archText.toString(); // The "real" Archtext from arch & rchetypea + public int getAttributeInt(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + String aText = objectText.toString(); // The "real" Archtext from arch & archetype // Add all attributes from archetype that don't already exist in aText if (archetype != null) { aText += diffArchText(archetype.getObjectText(), true); @@ -378,8 +375,8 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { - String aText = archText.toString(); + public long getAttributeLong(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { aText += diffArchText(archetype.getObjectText(), true); @@ -404,8 +401,8 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attributeName, final net.sf.gridarta.gameobject.GameObject archetype) { - String aText = archText.toString(); + public double getAttributeDouble(final String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + String aText = objectText.toString(); // Add all attributes from archetype that don't already exist in aText if (archetype != null) { aText += diffArchText(archetype.getObjectText(), true); @@ -429,14 +426,6 @@ return getAttributeDouble(attributeName, queryArchetype ? archetype : null); } - /** - * Sets edit Type. - * @param editType edit Type. - */ - public void setEditType(final int editType) { - this.editType = editType; - } - /** {@inheritDoc} */ public GameObjectContainer getContainer() { return container; @@ -887,26 +876,26 @@ * @param text text to add */ public void addArchText(final String text) { - archText.append(text); + objectText.append(text); } /** * Set <var>text</var> as arch text of this arch. - * @param archText text to set as arch text + * @param objectText text to set as arch text */ - public void setArchText(final String archText) { + public void setObjectText(final String objectText) { resetArchText(); - this.archText.append(archText); + this.objectText.append(objectText); } /** {@inheritDoc} */ public String getObjectText() { - return archText.toString(); + return objectText.toString(); } /** Clears the arch text of this arch. */ public void resetArchText() { - archText.delete(0, archText.length()); + objectText.delete(0, objectText.length()); } /** @@ -1161,8 +1150,8 @@ final GameObject clone = clone(); // The clone is a new object! // Clone Recursion for complex types - if (archText != null) { // Arch Text differences - clone.archText = new StringBuffer(archText); + if (objectText != null) { // Arch Text differences + clone.objectText = new StringBuffer(objectText); } if (msgText != null) { // Message text clone.msgText = new StringBuffer(msgText); @@ -1258,8 +1247,8 @@ } /** - * This method checks the archText for syntax errors. More precisely: It - * reads every line in the archText and looks if it matches the + * This method checks the objectText for syntax errors. More precisely: It + * reads every line in the objectText and looks if it matches the * type-definitions (-> see CFArchTypeList) for this arch. If there is no * match, the line is considered wrong. Of course the type-definitions will * never be perfect, this should be kept in mind. @@ -1275,9 +1264,9 @@ final CFArchType type = archType != null ? archType : typeList.getTypeOfArch(this); - if (typeList != null && archText != null && archText.length() > 0) { + if (typeList != null && objectText != null && objectText.length() > 0) { final StringBuilder errors = new StringBuilder(); // return value: all error lines - for (String rawLine : archText.toString().split("\n")) { + for (String rawLine : objectText.toString().split("\n")) { final String line = rawLine.trim(); // get only the key-part of the attribute. final String attrKey = line.contains(" ") ? line.substring(0, line.indexOf(" ")) : line; Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 19:27:28 UTC (rev 405) @@ -487,7 +487,7 @@ final GameObject newdef = mapModel.getMapSquare(p).getLast(); if (newdef != null) { // now we've got the inserted arch, copy the custom stuff from pickmap - newdef.setArchText(newarch.getObjectText()); + newdef.setObjectText(newarch.getObjectText()); newdef.setObjName(newarch.getObjName()); newdef.resetMsgText(); newdef.addMsgText(newarch.getMsgText()); @@ -539,7 +539,7 @@ final GameObject newdef = mapModel.getMapSquare(p).getLast(); if (newdef != null) { // now we've got the inserted arch, copy the custom stuff from pickmap - newdef.setArchText(newarch.getObjectText()); + newdef.setObjectText(newarch.getObjectText()); newdef.setObjName(newarch.getObjName()); newdef.resetMsgText(); newdef.addMsgText(newarch.getMsgText()); Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-09-24 19:13:06 UTC (rev 404) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-09-24 19:27:28 UTC (rev 405) @@ -163,4 +163,24 @@ */ boolean isArchetype(); + /** + * Returns the edit type. + * @return edit type + */ + int getEditType(); + + /** + * Sets the edit type of this GameObject. + * @param editType edit type of this GameObject. + */ + void setEditType(int editType); + + /** + * Get the EditType of an GameObject (e.g. floor, monster, etc). These are + * determined by the various attributes of the arch (->objectText). + * @param checkType bitmask containing the edit type(s) to be calculated + * @return new editType for this arch + */ + int calculateEditType(int checkType); + } // interface GameObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 19:13:11
|
Revision: 404 http://svn.sourceforge.net/gridarta/?rev=404&view=rev Author: christianhujer Date: 2006-09-24 12:13:06 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fixed bogus javadoc. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:07:06 UTC (rev 403) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:13:06 UTC (rev 404) @@ -768,7 +768,7 @@ * 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 + * @param multiX the x-distance of this part to the head part */ public void setMultiX(final int multiX) { this.multiX = multiX; @@ -778,7 +778,7 @@ * 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 + * @param multiY the y-distance of this part to the head part */ public void setMultiY(final int multiY) { this.multiY = multiY; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 19:08:01
|
Revision: 403 http://svn.sourceforge.net/gridarta/?rev=403&view=rev Author: christianhujer Date: 2006-09-24 12:07:06 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Committing progress of clarifying terminology about GameObjectType, Archetype and GameObject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFJavaEditor.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapFileDecode.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/ReplaceDialog.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/package.html Modified: trunk/crossfire/src/cfeditor/AutojoinList.java =================================================================== --- trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 19:07:06 UTC (rev 403) @@ -125,7 +125,7 @@ jlist.nodenr[i] = nbuf[i]; // store nodenr. in the list archstack.getArch(nbuf[i]).setJoinList(jlist); // set the link in the def. arch if (log.isDebugEnabled()) { - log.debug("(" + i + ") arch: '" + archstack.getArch(nbuf[i]).getArchName() + "' -> nr: (" + nbuf[i] + ")"); + log.debug("(" + i + ") arch: '" + archstack.getArch(nbuf[i]).getArchetypeName() + "' -> nr: (" + nbuf[i] + ")"); } } @@ -140,7 +140,7 @@ // add a new archid to the buffer // try to parse the arch node_nr from the hashtable - final int entry = ArchetypeSet.getArchIndex(line); + final int entry = ArchetypeSet.getArchetypeIndex(line); if (entry != -1) { nbuf[count] = entry; @@ -334,7 +334,7 @@ if (arch.getNodeNr() != newNodenr) { // set new archtype arch.setNodeNr(newNodenr); - arch.setArchName(defarch.getArchName()); + arch.setArchetypeName(defarch.getArchetypeName()); // set face of new default arch arch.setFaceNr(defarch.getFaceNr()); Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 19:07:06 UTC (rev 403) @@ -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]).getArchetypeName()); } return numList; @@ -277,7 +277,7 @@ mainControl.setStatusText(" " + value.toString() + " "); } mainControl.setPlainFont(this); - setText(arch.getArchName()); + setText(arch.getArchetypeName()); if (arch.getFaceFlag()) { setIcon(mainControl.getNofaceTileIcon()); Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 19:07:06 UTC (rev 403) @@ -127,15 +127,15 @@ } final GameObject arch = archPart.getHead(); - archArchNameText.setText("<html><font color=black>Arch: " + arch.getArchName() + "</font></html>"); + archArchNameText.setText("<html><font color=black>Arch: " + arch.getArchetypeName() + "</font></html>"); if (arch.getObjName() == null || arch.getObjName().length() <= 0) { - final GameObject def = arch.getDefaultArch(); + final GameObject def = arch.getArchetype(); if (def == null || def == arch) { archObjNameText.setText("<html><font color=black>Name: -none- </font></html>"); } else if (def.getObjName() != null && def.getObjName().length() > 0) { archObjNameText.setText("<html><font color=black>Name: " + def.getObjName() + "</font></html>"); - } else if (def.getArchName() != null && def.getArchName().length() > 0) { - archObjNameText.setText("<html><font color=black>Name: " + def.getArchName() + "</font></html>"); + } else if (def.getArchetypeName() != null && def.getArchetypeName().length() > 0) { + archObjNameText.setText("<html><font color=black>Name: " + def.getArchetypeName() + "</font></html>"); } else { archObjNameText.setText("<html><font color=black>Name: -none- </font></html>"); } Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 19:07:06 UTC (rev 403) @@ -180,7 +180,7 @@ // reference to the GameObject arch = aobj.getHead(); - defarch = arch.getDefaultArch(); + defarch = arch.getArchetype(); /* set frame icon if (arch.getFaceNr() >= 0) { @@ -488,7 +488,7 @@ } else if (defarch.getObjName() != null && defarch.getObjName().length() > 0) { nameTF = new JTextField(defarch.getObjName(), 16); } else { - nameTF = new JTextField(defarch.getArchName(), 16); + nameTF = new JTextField(defarch.getArchetypeName(), 16); } nameTF.setEditable(false); layout3.add(nameTF); @@ -504,7 +504,7 @@ final JPanel layout4 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); layout4.add(new JLabel("Default Arch: ")); // create label - defarchTF = new JTextField(defarch.getArchName(), 16); + defarchTF = new JTextField(defarch.getArchetypeName(), 16); defarchTF.setEditable(false); layout4.add(defarchTF); @@ -771,7 +771,7 @@ } else if (defarch.getObjName() != null && defarch.getObjName().length() > 0) { dtxt = defarch.getObjName(); } else { - dtxt = defarch.getArchName(); + dtxt = defarch.getArchetypeName(); } } else if (type.getAttr()[i].getNameOld().equalsIgnoreCase("face")) { if (arch.getFaceName() != null && arch.getFaceName().length() > 0) { @@ -1179,7 +1179,7 @@ * @return true if the settings were applied, false if error occurred */ private boolean applySettings() { - final String oldArchText = arch.getArchText(); // the old ArchText + final String oldArchText = arch.getObjectText(); // the old ArchText final String oldMsg = arch.getMsgText(); // old arch msg final CFArchType typeStruct = typelist.getTypeOfArch(arch); // the type structure for this arch @@ -1263,7 +1263,7 @@ } else { newName = ""; } - } else if (!inline.equalsIgnoreCase(defarch.getArchName())) { + } else if (!inline.equalsIgnoreCase(defarch.getArchetypeName())) { newName = inline; } else { newName = ""; @@ -1370,7 +1370,7 @@ errors = arch.getSyntaxErrors(typeStruct); // --- parsing succeeded, now we write it into the arch/map --- - arch.setArchText(newArchText); + arch.setObjectText(newArchText); //arch.setArchTypNr(); if (newName != null) { if (newName.length() == 0) { @@ -1436,8 +1436,8 @@ } // if the archtext changed, set the map changed flag - if ((oldArchText != null && !oldArchText.equals(arch.getArchText())) || - (oldArchText == null && arch.getArchText() != null) || + if ((oldArchText != null && !oldArchText.equals(arch.getObjectText())) || + (oldArchText == null && arch.getObjectText() != null) || (oldMsg != null && !oldMsg.equals(arch.getMsgText())) || (oldMsg == null && arch.getMsgText() != null)) { mainControl.getCurrentMap().setLevelChangedFlag(); Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 19:07:06 UTC (rev 403) @@ -533,7 +533,7 @@ CFArchType tmp = head.getNext(); // tmp cycles through all types CFArchType type = tmp; // return value: the type of the arch, first one (misc) if no other found - final GameObject defarch = arch.getDefaultArch(); + final GameObject defarch = arch.getArchetype(); boolean typeFound = false; for (int i = 0; tmp != null && !typeFound; tmp = tmp.getNext(), i++) { Modified: trunk/crossfire/src/cfeditor/CFJavaEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/CFJavaEditor.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CFJavaEditor.java 2006-09-24 19:07:06 UTC (rev 403) @@ -107,7 +107,7 @@ // Initialise the application mainControl.init(doShow); mainControl.refreshMenusAndToolbars(); - mainControl.getArchObjectStack().loadArches(); + mainControl.getArchObjectStack().loadArchetypes(); System.gc(); // process commandline parameters: Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 19:07:06 UTC (rev 403) @@ -983,7 +983,7 @@ } } else if (content.getType() != TreasureObj.FOLDER) { // normal arch: display the face icon - final int num = ArchetypeSet.getArchIndex(content.getName()); + final int num = ArchetypeSet.getArchetypeIndex(content.getName()); if (num != -1 && ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_COMPLETE) { final GameObject arch = CMainControl.getInstance().getArch(num); if (arch != null) { Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 19:07:06 UTC (rev 403) @@ -318,7 +318,7 @@ return; } - archList.collectArches(); + archList.collectArchetypes(); } /** @@ -1048,10 +1048,10 @@ // first: attach our map sucker to a default arch we have loaded for (final Iterator<GameObject> it = objects.iterator(); it.hasNext();) { final GameObject arch = it.next(); - final int index1 = ArchetypeSet.getArchIndex(arch.getArchName()); + final int index1 = ArchetypeSet.getArchetypeIndex(arch.getArchetypeName()); if (index1 == -1) { // we had an unknown arch here!! - // showMessage("Error Loading Map File "+file.getName(), "\n Found Unknown Arch < "+arch.getArchName()+" >"); + // showMessage("Error Loading Map File "+file.getName(), "\n Found Unknown Arch < "+arch.getArchetypeName()+" >"); // return false; } else { arch.setNodeNr(index1); // our default arch! Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 19:07:06 UTC (rev 403) @@ -276,7 +276,7 @@ inv = inv.getHead(); final GameObject invnew; - if (arch.isDefaultArch()) { + if (arch.isArchetype()) { // create a new copy of a default arch invnew = mainControl.getArchObjectStack().newArchObjectInstance(arch.getNodeNr()); } else { @@ -313,7 +313,7 @@ return; } - final String oldArchText = arch.getArchText(); + final String oldArchText = arch.getObjectText(); final String oldMsg = arch.getMsgText(); // We update all panels: name, face, msg and archText (more to come...) @@ -326,7 +326,7 @@ } else { arch.setObjName(archNameField.getText()); // overrule in map arch } - } else if (archNameField.getText().compareTo(arch.getArchName()) == 0) { + } else if (archNameField.getText().compareTo(arch.getArchetypeName()) == 0) { arch.setObjName(null); } else { // def is null, something is in panel, so we set it arch.setObjName(archNameField.getText()); // overrule in map arch @@ -413,7 +413,7 @@ // read from archEdit (bottom right textwin) only the attributes // that differ from the default arch. These get stored into // the arche's archText (and finally in the map). - arch.setArchText(defarch.diffArchText(archEdit.getText(), false)); + arch.setObjectText(defarch.diffArchText(archEdit.getText(), false)); // we look for 'type' in the ArchText. In future maybe type should get // a seperate textfield @@ -425,8 +425,8 @@ arch.calculateEditType(mainControl.getCurrentMap().getActiveEditType()); // if the archtext changed, set the map changed flag - if ((oldArchText != null && !oldArchText.equals(arch.getArchText())) || - (oldArchText == null && arch.getArchText() != null) || + if ((oldArchText != null && !oldArchText.equals(arch.getObjectText())) || + (oldArchText == null && arch.getObjectText() != null) || (oldMsg != null && !oldMsg.equals(arch.getMsgText())) || (oldMsg == null && arch.getMsgText() != null)) { mainControl.getCurrentMap().setLevelChangedFlag(); @@ -733,8 +733,8 @@ archNameField.setForeground(Color.black); if (mainControl.getArch(arch.getNodeNr()).getObjName() == null) { // arch name - if (arch.getArchName() != null) { - archNameField.setText(arch.getArchName()); + if (arch.getArchetypeName() != null) { + archNameField.setText(arch.getArchetypeName()); } else { archNameField.setText(""); } @@ -766,7 +766,7 @@ if (arch.getNodeNr() != -1) { archTypeText.setText("Type: " + mainControl.getArchObjectParser().getArchTypeName(arch.getArchTypNr()) - + " (" + arch.getArchTypNr() + ") [" + arch.getArchName() + "]"); + + " (" + arch.getArchTypNr() + ") [" + arch.getArchetypeName() + "]"); } else { archTypeText.setText("Type: <unknown>"); } @@ -791,8 +791,8 @@ // blue: the "special" attributes, differ from the default archetype StyleConstants.setForeground(currentAttributes, Color.blue); - if (arch.getArchText() != null) { - doc.insertString(doc.getLength(), arch.getArchText(), currentAttributes); + if (arch.getObjectText() != null) { + doc.insertString(doc.getLength(), arch.getObjectText(), currentAttributes); } // doc.insertString(doc.getLength(), "ID#"+arch.getMyID()+ " inv#: "+arch.countInvObjects()+"\n", currentAttributes); @@ -800,8 +800,8 @@ // black: the attributes from the default archetype // that don't exist among the "special" ones StyleConstants.setForeground(currentAttributes, Color.black); - if (arch.getArchText() != null && mainControl.getArchObjectStack().getArch(arch.getNodeNr()) != null) { - doc.insertString(doc.getLength(), arch.diffArchText(mainControl.getArchObjectStack().getArch(arch.getNodeNr()).getArchText(), true), currentAttributes); + if (arch.getObjectText() != null && mainControl.getArchObjectStack().getArch(arch.getNodeNr()) != null) { + doc.insertString(doc.getLength(), arch.diffArchText(mainControl.getArchObjectStack().getArch(arch.getNodeNr()).getObjectText(), true), currentAttributes); } } catch (final BadLocationException e) { // TODO Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 19:07:06 UTC (rev 403) @@ -161,7 +161,7 @@ arch = new GameObject(); // create a new instance // our arch! it has a name! - arch.setArchName(thisLine.substring(x, thisLine.length())); + arch.setArchetypeName(thisLine.substring(x, thisLine.length())); // ok, we have setup our arch, now check for inventory if (container != null) { @@ -241,7 +241,7 @@ arch.addEventScript(type, path); } } else { - log.warn("Arch " + arch.getArchName() + " has incorrect event code '" + thisLine + "'"); + log.warn("Arch " + arch.getArchetypeName() + " 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)) { Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 19:07:06 UTC (rev 403) @@ -138,7 +138,7 @@ * @return true if arch was written successfully */ boolean writeMapArch(final GameObject arch, final boolean isInventory) { - final GameObject defarch = arch.getDefaultArch(); + final GameObject defarch = arch.getArchetype(); // Collect all fields to write. final Map<String, String> fields = new HashMap<String, String>(); // String key -> String value @@ -181,12 +181,12 @@ if (defarch != null && arch.getArchTypNr() != defarch.getArchTypNr()) { // this arch has special type - if (arch.getArchText().indexOf("type ") >= 0) { + if (arch.getObjectText().indexOf("type ") >= 0) { // oh oh - there might also be a type in the archtext which // is conflicting. remove the type from the archtext // open a reading stream for the archText - final StringReader sread = new StringReader(arch.getArchText().toString()); + final StringReader sread = new StringReader(arch.getObjectText().toString()); final BufferedReader sstream = new BufferedReader(sread); String newArchtext = ""; @@ -212,9 +212,9 @@ sread.close(); if (newArchtext.trim().length() == 0) { - arch.setArchText(""); + arch.setObjectText(""); } else { - arch.setArchText(newArchtext.trim() + "\n"); + arch.setObjectText(newArchtext.trim() + "\n"); } } catch (final IOException e) { log.error("getSyntaxErrors: Cannot close StringReader"); @@ -225,7 +225,7 @@ fields.put("type", Integer.toString(arch.getArchTypNr())); } - final String text = arch.getArchText(); + final String text = arch.getObjectText(); if (!text.equals("")) { final String[] tmp = text.split("\n"); for (final String aTmp : tmp) { @@ -257,7 +257,7 @@ // Actually write the fields. try { - bufferedWriter.write("arch " + arch.getArchName() + "\n"); + bufferedWriter.write("arch " + arch.getArchetypeName() + "\n"); for (int i = 0; i < keys.length; i++) { final String value = (String) fields.get(keys[i]); if (value != null) { Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 19:07:06 UTC (rev 403) @@ -452,7 +452,7 @@ if (defname != null && defname.length() > 0) { setText(defname); // default name } else { - setText(arch.getArchName()); // arch name + setText(arch.getArchetypeName()); // arch name } } Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 19:07:06 UTC (rev 403) @@ -1298,10 +1298,10 @@ if ((insArch = mainControl.getArchPanelSelection()) != null) { if (insArch.getObjName() != null && insArch.getObjName().length() > 0) { insertArchName = mainControl.getArchPanelSelection().getObjName(); - } else if (insArch.getArchName() != null && insArch.getArchName().length() > 0) { - insertArchName = mainControl.getArchPanelSelection().getArchName(); - } else if ((insArch = insArch.getDefaultArch()) != null) { - insertArchName = mainControl.getArchPanelSelection().getArchName(); + } else if (insArch.getArchetypeName() != null && insArch.getArchetypeName().length() > 0) { + insertArchName = mainControl.getArchPanelSelection().getArchetypeName(); + } else if ((insArch = insArch.getArchetype()) != null) { + insertArchName = mainControl.getArchPanelSelection().getArchetypeName(); } else { insertArchName = "unknown"; } @@ -1407,7 +1407,7 @@ GameObject newarch = mainControl.getArchPanelSelection(); if (!mainControl.getMainView().isPickmapActive() || mapControl.isPickmap() || - (newarch != null && newarch.isDefaultArch())) { + (newarch != null && newarch.isArchetype())) { // insert default arch from archlist: if (!mapControl.addArchToMap(mainControl.getPanelArch(), pos, allowMany ? -1 : drawInternCount, MapModel.JOIN_ENABLE)) { // mainControl.getMainView().mapPanel.setMapArchList(null); @@ -1453,7 +1453,7 @@ final GameObject newdef = mapControl.getTopArchObject(pos); // new inserted default arch if (newdef != null) { // now we've got the inserted arch, copy the custom stuff from pickmap - newdef.setArchText(newarch.getArchText()); + newdef.setObjectText(newarch.getObjectText()); newdef.setObjName(newarch.getObjName()); newdef.resetMsgText(); newdef.addMsgText(newarch.getMsgText()); @@ -1519,7 +1519,7 @@ final GameObject newdef = mapControl.getTopArchObject(pos); // new inserted default arch if (newdef != null) { // now we've got the inserted arch, copy the custom stuff from pickmap - newdef.setArchText(newarch.getArchText()); + newdef.setObjectText(newarch.getObjectText()); newdef.setObjName(newarch.getObjName()); newdef.resetMsgText(); newdef.addMsgText(newarch.getMsgText()); Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 19:07:06 UTC (rev 403) @@ -357,11 +357,11 @@ */ private void addArchToMap(final MapControl mapControl, final GameObject arch, final Point pos, final int intern, final boolean fillBelow) { final GameObject newHead; - if (arch.isDefaultArch()) { + if (arch.isArchetype()) { mapControl.addArchToMap(arch.getNodeNr(), pos, intern, false, fillBelow); } else { newHead = arch.createClone(pos.x, pos.y); - for (GameObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + for (GameObject tmp = arch.getArchetype().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { final GameObject newTail = mainControl.getArchObjectStack().newArchObjectInstance(tmp.getNodeNr()); final Point mapPos = new Point(pos.x + newTail.getMultiX(), pos.y + newTail.getMultiY()); Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 19:07:06 UTC (rev 403) @@ -329,8 +329,8 @@ while (it.hasNext()) { final GameObject node = it.next(); if (node.isHead() && - ((matchCriteria == MATCH_ARCH_NAME && node.getArchName() != null && - node.getArchName().equalsIgnoreCase(matchString)) || + ((matchCriteria == MATCH_ARCH_NAME && node.getArchetypeName() != null && + node.getArchetypeName().equalsIgnoreCase(matchString)) || (matchCriteria == MATCH_OBJ_NAME && node.getBestName().equalsIgnoreCase(matchString)))) { // first, delete the old arch Modified: trunk/crossfire/src/cfeditor/filter/AttributeFilter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-24 19:07:06 UTC (rev 403) @@ -61,7 +61,7 @@ final Set<Map.Entry<String, String>> pairs = attrList.entrySet(); if (!pairs.isEmpty()) { hasChecked = true; - final GameObject def = object.getDefaultArch(); + final GameObject def = object.getArchetype(); for (final Map.Entry<String, String> ent : pairs) { final String key = ent.getKey(); final String val = ent.getValue(); Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterList.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-09-24 19:07:06 UTC (rev 403) @@ -103,7 +103,7 @@ public boolean match(final FilterConfig config, final GameObject object) { try { if (log.isDebugEnabled()) { - log.debug("match called on " + object.getArchName()); + log.debug("match called on " + object.getArchetypeName()); } final NamedFilterConfig nfc = (NamedFilterConfig) config; for (final String name: subFilters.keySet()) { Modified: trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java 2006-09-24 19:07:06 UTC (rev 403) @@ -245,9 +245,9 @@ } if (archName == null) { - arch.setArchName(thisLine.substring(7)); + arch.setArchetypeName(thisLine.substring(7)); } else { - arch.setArchName(archName); + arch.setArchetypeName(archName); } } } else { @@ -259,9 +259,9 @@ } } else if (animflag) { if (thisLine.startsWith("mina")) { - mainControl.getAnimationObject().addAnimObject(arch.getArchName(), arch.getAnimText()); + mainControl.getAnimationObject().addAnimObject(arch.getArchetypeName(), arch.getAnimText()); - arch.addArchText("animation " + arch.getArchName() + "\n"); + arch.addArchText("animation " + arch.getArchetypeName() + "\n"); // here we must add this to AnimationObject // and add Animation cmd here! animflag = false; @@ -279,7 +279,7 @@ } else if (thisLine.startsWith("end")) { //if (arch.getArchTypNr() == 0) { if (log.isDebugEnabled()) { - log.debug("Arch " + arch.getArchName() + " has no type info!"); + log.debug("Arch " + arch.getArchetypeName() + " has no type info!"); } //} // we got full arch @@ -292,7 +292,7 @@ mainControl.incArchObjCount(); // add arch to the archpanel - only if it is not the map arch - if (!arch.getArchName().equals(STARTARCH_NAME)) { + if (!arch.getArchetypeName().equals(STARTARCH_NAME)) { if (!ArchetypeSet.isLoadedFromArchive() || archName != null) { // loading from individual files, so we simply add it to list // ArchetypeSet.loadArchFromFiles() takes care of the panels @@ -341,7 +341,7 @@ if (archName != null) { arch.setArtifact(true); // here we add all unchanged arch text lines from defArch back to arch - arch.addArchText(arch.diffArchText(defArch.getArchText(), true)); + arch.addArchText(arch.diffArchText(defArch.getObjectText(), true)); return arch; } archlast = arch; @@ -359,29 +359,29 @@ loreflag = true; } else if (thisLine.startsWith("visibility ")) { if (log.isDebugEnabled()) { - log.debug("Remove visibility: " + arch.getArchName()); + log.debug("Remove visibility: " + arch.getArchetypeName()); } } else if (thisLine.startsWith("magicmap ")) { if (log.isDebugEnabled()) { - log.debug("Remove magicmap: " + arch.getArchName()); + log.debug("Remove magicmap: " + arch.getArchetypeName()); } } else if (thisLine.startsWith("color_fg ")) { if (log.isDebugEnabled()) { - log.debug("Remove color_fg: " + arch.getArchName()); + log.debug("Remove color_fg: " + arch.getArchetypeName()); } } else if (thisLine.startsWith("color_bg ")) { if (log.isDebugEnabled()) { - log.debug("Remove color_bg: " + arch.getArchName()); + log.debug("Remove color_bg: " + arch.getArchetypeName()); } } 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()); + if (!archmore && !arch.getArchetypeName().equals(STARTARCH_NAME)) { + log.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchetypeName()); arch.addArchText(thisLine + "\n"); } arch.setMultiX(Integer.parseInt(thisLine.substring(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()); + if (!archmore && !arch.getArchetypeName().equals(STARTARCH_NAME)) { + log.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchetypeName()); arch.addArchText(thisLine + "\n"); } arch.setMultiY(Integer.parseInt(thisLine.substring(2))); @@ -390,10 +390,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.getArchetypeName() + " 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.getArchetypeName() + " has a invalid type nr. (" + thisLine.substring(5) + ")"); arch.addArchText(thisLine + "\n"); } } else if (thisLine.startsWith("face ")) { @@ -432,7 +432,7 @@ * @param arch default arch to be parsed */ public static void postParseDefArch(final GameObject arch) { - final String text = arch.getArchText(); + final String text = arch.getObjectText(); arch.resetArchText(); final int len = text.length(); @@ -496,7 +496,7 @@ return; } - final String text = arch.getArchText(); + final String text = arch.getObjectText(); final int len = text.length(); final GameObject defarch = mainControl.getArch(arch.getNodeNr()); Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-09-24 19:07:06 UTC (rev 403) @@ -61,7 +61,7 @@ import net.sf.gridarta.io.CFileReader; /** - * The <code>ArchetypeSet</code> contains all the default arches. + * The <code>ArchetypeSet</code> contains all the Archetypes. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ @@ -69,7 +69,7 @@ private static final Logger log = Logger.getLogger(ArchetypeSet.class); - // load status: is archstack fully loaded? + // load status: is the ArchetypeSet fully loaded? public static final int IS_EMPTY = 0; public static final int IS_LOADING = 1; @@ -79,13 +79,13 @@ private static int loadStatus = IS_EMPTY; /** - * true when arches were loaded from the big collected archive files, - * false when arches were loaded from individual archfiles + * true when Archetypes were loaded from the big collected archive files, + * false when Archetypes were loaded from individual .arc-files */ private static boolean loadedFromArchive = false; // this is the static part.. i want fast access later - private final ArchObjectNode[] archNodeList = new ArchObjectNode[10000]; + private final ArchtypeNode[] archNodeList = new ArchtypeNode[10000]; private final FaceObject[] faceObjects = new FaceObject[10000]; @@ -94,9 +94,9 @@ // in the table is faster than in the static arrays, we can change this private static final Map<String, Integer> faceMap = new HashMap<String, Integer>(); - private static final Map<String, Integer> archMap = new HashMap<String, Integer>(); + private static final Map<String, Integer> archetypeMap = new HashMap<String, Integer>(); - private int archNodeListCount; // ALL default arches loaded + private int archetypeNodeListCount; // ALL default arches loaded private int archObjCount; // all objects, multi tile arches = 1 object @@ -107,15 +107,15 @@ private int folderLevel; /** - * Create the GameObject stack. + * Create the ArchetypeSet. * @param mainControl reference to CMainControl */ public ArchetypeSet(final CMainControl mainControl) { this.mainControl = mainControl; - archNodeListCount = 0; + archetypeNodeListCount = 0; faceListCount = 0; archObjCount = 0; - GameObject.setArchStack(this); // add static reference to GameObject + GameObject.setArchetypeSet(this); // add static reference to GameObject } public void incArchObjCount() { @@ -148,12 +148,12 @@ } /** Returns the index of an arch in the arch map or -1. - * @param archName name of arch to get index for + * @param archetypeName name of arch to get index for * @return index of arch in map or -1 if arch is not in map * @deprecated the index system is slow and unmaintainable and therefore will be removed */ - @Deprecated public static int getArchIndex(final String archName) { - return archMap.containsKey(archName) ? archMap.get(archName) : -1; + @Deprecated public static int getArchetypeIndex(final String archetypeName) { + return archetypeMap.containsKey(archetypeName) ? archetypeMap.get(archetypeName) : -1; } @Nullable public ImageIcon getFace(final int i) { @@ -173,43 +173,54 @@ } public int getArchCount() { - return archNodeListCount; + return archetypeNodeListCount; } public int getFaceCount() { return faceListCount; } - @Nullable public ArchObjectNode getNextNode(final ArchObjectNode node) { + @Nullable public ArchtypeNode getNextNode(final ArchtypeNode node) { if (node == null) { return archNodeList[0]; } - final int i = node.arch.getNodeNr(); - if (i + 1 < archNodeListCount) { + final int i = node.archtypeData.getNodeNr(); + if (i + 1 < archetypeNodeListCount) { return archNodeList[i + 1]; } return null; } + /** + * Get the Archetype with the specified internal index as GameObject (not yet instanciated). + * @param i internal Archetype index + * @return GameObject with Archetype information + * @see #newArchObjectInstance(int) for a similar method that instanciates. + */ @Nullable public GameObject getArch(final int i) { - if (i >= 0 && i < archNodeListCount) { - return archNodeList[i].arch; + if (i >= 0 && i < archetypeNodeListCount) { + return archNodeList[i].archtypeData; } return null; } + /** + * Create a GameObject for the specified Archetype internal index. + * @param i internal Archetype index + * @return GameObject instanciated from the specified Archetype + */ @Nullable public GameObject newArchObjectInstance(final int i) { - if (i < 0 && i >= archNodeListCount) { + if (i < 0 && i >= archetypeNodeListCount) { return null; } - final GameObject template = archNodeList[i].arch; + final GameObject template = archNodeList[i].archtypeData; final GameObject arch = new GameObject(); - arch.setArchName(template.getArchName()); + arch.setArchetypeName(template.getArchetypeName()); if (!template.getFaceFlag()) { arch.setFaceNr(template.getFaceNr()); } @@ -222,21 +233,21 @@ /** * Adds an GameObject to the stack. - * Only invoke this method if the GameObject is a default arch. + * Only invoke this method if the GameObject is an Archetype. * Do not invoke this method on map arches. * @param data GameObject with DefaultArch to add * @todo check whether the GameObject is a default arch and reject no default arches with an exception */ public void addArchToList(final GameObject data) { - final ArchObjectNode newnode = new ArchObjectNode(data); - archMap.put(data.getArchName(), archNodeListCount); - archNodeList[archNodeListCount++] = newnode; - newnode.arch.setNodeNr(archNodeListCount - 1); - assert newnode.arch.isDefaultArch(); + final ArchtypeNode newnode = new ArchtypeNode(data); + archetypeMap.put(data.getArchetypeName(), archetypeNodeListCount); + archNodeList[archetypeNodeListCount++] = newnode; + newnode.archtypeData.setNodeNr(archetypeNodeListCount - 1); + assert newnode.archtypeData.isArchetype(); } /** load the arches */ - public void loadArches() { + public void loadArchetypes() { final Date timeStart = new Date(); // get starting time loadStatus = IS_LOADING; // status: loading log.info("Start to collect arches..."); @@ -252,7 +263,7 @@ if (mainControl.isArchLoadedFromCollection()) { loadArchFromCollected(); // collect arches & images from collection } else { - loadArchFromFiles(f, 0); // collect arches & images from individual files + loadArchetypesFromFiles(f, 0); // collect arches & images from individual files } CMainStatusbar.getInstance().setText(" Sorting..."); @@ -321,7 +332,7 @@ * @param f file path where we currently are * @param index counter for arches */ - private void loadArchFromFiles(final File f, int index) { + private void loadArchetypesFromFiles(final File f, int index) { final String name = f.getName(); loadedFromArchive = false; // don't load from the collected files @@ -343,7 +354,7 @@ if (children != null) { Arrays.sort(children); for (int i = 0; i < children.length; i++) { - loadArchFromFiles(new File(f, children[i]), index); + loadArchetypesFromFiles(new File(f, children[i]), index); } } folderLevel--; @@ -618,14 +629,14 @@ int i, s; // run through arches - for (s = 0; s < archNodeListCount; s++) { - final String aname = archNodeList[s].arch.getFaceName(); + for (s = 0; s < archetypeNodeListCount; s++) { + final String aname = archNodeList[s].archtypeData.getFaceName(); if (aname != null) { final Integer num = (Integer) faceMap.get(aname); if (num != null) { - archNodeList[s].arch.setFaceNr(num); + archNodeList[s].archtypeData.setFaceNr(num); } - archNodeList[s].arch.setFaceFlag(false); + archNodeList[s].archtypeData.setFaceFlag(false); } } } @@ -634,8 +645,8 @@ * Wrapper method for arch collecting. Either Crossfire or Daimonin method * for collecting arches is chosen here. */ - public void collectArches() { - collectCFArches(); + public void collectArchetypes() { + collectCrossfireArchetypes(); } /** @@ -644,12 +655,12 @@ * variable included which is used in the editor to categorize the arches. * <p/> Output is: "archetypes", "crossfire.png" */ - private void collectCFArches() { + private void collectCrossfireArchetypes() { CMainStatusbar.getInstance().setText("Collect Archfile: write archetypes"); // open the process bar final CollectProgressBar pbar = new CollectProgressBar(mainControl.getArchObjectStack().getArchCount(), - "Collecting Arches..."); + "Collecting Archetypes..."); File dfile; try { @@ -692,7 +703,7 @@ log.error("Collect Error: Multipart Tail in Panel found!"); } - out.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + arch.getArchetypeName() + "\n"); if (arch.getObjName() != null) { out.writeBytes("name " + arch.getObjName() + "\n"); @@ -712,8 +723,8 @@ out.writeBytes("msg\n" + arch.getMsgText().trim() + "\nendmsg\n"); } - out.writeBytes(arch.getArchText()); - if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { + out.writeBytes(arch.getObjectText()); + if (arch.getObjectText().lastIndexOf(0x0a) != arch.getObjectText().length() - 1) { out.writeBytes("\n"); } @@ -734,14 +745,14 @@ log.warn("Multipart object is too short!"); final GameObject before = mainControl.getArch(numList[i]); if (before != null) { - log.warn("-> " + multiparts + " tails expected for multipart: '" + before.getArchName() + "',"); - log.warn(" but arch '" + tail.getArchName() + "' follows on position " + j + " and it's not a tail."); + log.warn("-> " + multiparts + " tails expected for multipart: '" + before.getArchetypeName() + "',"); + log.warn(" but arch '" + tail.getArchetypeName() + "' follows on position " + j + " and it's not a tail."); } } out.writeBytes("More\n"); - out.writeBytes("Object " + tail.getArchName() + "\n"); + out.writeBytes("Object " + tail.getArchetypeName() + "\n"); if (tail.getObjName() != null) { out.writeBytes("name " + tail.getObjName() + "\n"); @@ -756,8 +767,8 @@ // special: add a string-attribute with the display-category //out.writeBytes("editor_folder "+node.getTitle()+"/"+catList[i]+"\n"); - out.writeBytes(tail.getArchText()); - if (tail.getArchText().lastIndexOf(0x0a) != tail.getArchText().length() - 1) { + out.writeBytes(tail.getObjectText()); + if (tail.getObjectText().lastIndexOf(0x0a) != tail.getObjectText().length() - 1) { out.writeBytes("\n"); } @@ -782,17 +793,17 @@ boolean maparchFound = false; for (int i = 0; i < mainControl.getArchCount() && !maparchFound; i++) { arch = mainControl.getArch(i); - if (arch.getArchName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { + if (arch.getArchetypeName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { // process map arch maparchFound = true; count++; - out.writeBytes("Object " + arch.getArchName() + "\n"); + out.writeBytes("Object " + arch.getArchetypeName() + "\n"); // map object hack: x/y is normally a reference for multi // part arches - i include this hack until we rework the // arch objects with more useful script names - if (arch.getArchName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { + if (arch.getArchetypeName().compareTo(ArchObjectParser.STARTARCH_NAME) == 0) { out.writeBytes("x " + arch.getMultiX() + "\n"); out.writeBytes("y " + arch.getMultiY() + "\n"); } @@ -807,8 +818,8 @@ out.writeBytes("type " + arch.getArchTypNr() + "\n"); } - out.writeBytes(arch.getArchText()); - if (arch.getArchText().lastIndexOf(0x0a) != arch.getArchText().length() - 1) { + out.writeBytes(arch.getObjectText()); + if (arch.getObjectText().lastIndexOf(0x0a) != arch.getObjectText().length() - 1) { out.writeBytes("\n"); } @@ -818,7 +829,7 @@ // 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) + " archetypes have been missed during collect!"); } pbar.setValue(count); @@ -963,7 +974,7 @@ log.error("Exception collecting images", e); } - CMainStatusbar.getInstance().setText("Collect Arches: done."); + CMainStatusbar.getInstance().setText("Collect Archetypes: done."); } /** @@ -1053,17 +1064,17 @@ } } // class CollectProgressBar - public class ArchObjectNode { + public class ArchtypeNode { - final GameObject arch; + final GameObject archtypeData; - final ArchObjectNode next; + final ArchtypeNode next; - public ArchObjectNode(final GameObject data) { - this.arch = data; + public ArchtypeNode(final GameObject data) { + this.archtypeData = data; this.next = null; } - } // class ArchObjectNode + } // class ArchtypeNode } // class ArchetypeSet Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 17:36:47 UTC (rev 402) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 19:07:06 UTC (rev 403) @@ -55,8 +55,8 @@ /** Special constant that's used if an arch has no arch type set. */ public static final int TYPE_UNSET = -666; - /** Static reference to the archstack (default arches). */ - private static ArchetypeSet archstack; + /** Static reference to the ArchetypeSet (Archetypes). */ + private static ArchetypeSet archetypeSet; /** Static reference to the typeList (find syntax errors). */ private static CFArchTypeList typeList; @@ -68,20 +68,24 @@ private String faceName; // face name : 1 - private String archName; // arch Name + /** + * The name of the Archetype this GameObject is based on. + * It is the String value of the attribute <code>arch</code> that also starts a GameObject. + */ + private String archetypeName; // arch Name /** The name of this object. */ private String objName; /** - * The archText. + * The objectText. * <p/> * It only contains the differences from the default arch. * <p/> * Note: It's a rule that every line ends with a '\n', including the last * line. */ - private StringBuffer archText; + private StringBuffer objectText; /** * The msgText. @@ -104,8 +108,8 @@ private int nodenr; // we are (internal) arch nr in node list // the nodenr determines the (default) archetype - /** The default arch. */ - private GameObject defaultArch; + /** The Archetype of this GameObject. */ + private GameObject archetype; /** Map x position if on map. */ private int mapx; @@ -178,10 +182,10 @@ myId = myIdCounter++; // increase ID counter for every new arch created - archName = null; - archText = new StringBuffer(""); + archetypeName = null; + objectText = new StringBuffer(""); msgText = animText = loreText = null; - archTextCount = 0; // lines inserted in archText + archTextCount = 0; // lines inserted in objectText objName = null; @@ -203,9 +207,12 @@ editType = 0; } - // set static references: arch stack and typeList - public static void setArchStack(final ArchetypeSet stack) { - archstack = stack; + /** + * Set the ArchetypeSet to get information on Archetypes. + * @param archetypeSet ArchetypeSet + */ + public static void setArchetypeSet(final ArchetypeSet archetypeSet) { + GameObject.archetypeSet = archetypeSet; } public static void setTypeList(final CFArchTypeList tlist) { @@ -222,26 +229,19 @@ return editType; } - /** - * Get the default arch of this arch. - * @return the default <code>GameObject</code> for this arch - */ - public GameObject getDefaultArch() { - return defaultArch; + /** {@inheritDoc} */ + public GameObject getArchetype() { + return archetype; } - /** - * Check whether this GameObject is a default arch. - * @return <code>true</code> when this GameObject is a default arch (from - * the {@link ArchetypeSet}), otherwise <code>false</code> - */ - public boolean isDefaultArch() { - return defaultArch == this; + /** {@inheritDoc} */ + public boolean isArchetype() { + return archetype == this; } /** * Get the EditType of an GameObject (e.g. floor, monster, etc). These are - * determined by the various attributes of the arch (->archText). + * determined by the various attributes of the arch (->objectText). * @param checkType bitmask containing the edit type(s) to be calculated * @return new editType for this arch */ @@ -315,76 +315,68 @@ return editType; } - /** - * Get the String of an arch attribute from the archText both of the arch - * itself and if n.e. in it's default arch. If the attribute doesn't exist - * in either one, an empty String "" is returned. - * @param attr search for "attr <string>" - * @param defarch default arch of this arch, or <code>null</code> if this - * arch is a default arch or the default arch should be ignored - * @return <string>, "" if not found - */ - public String getAttributeString(String attr, @Nullable final net.sf.gridarta.gameobject.GameObject defarch) { - String aText = archText.toString(); // The "real" Archtext from arch & defarch + /** {@inheritDoc} */ + public String getAttributeString(String attributeName, @Nullable final net.sf.gridarta.gameobject.GameObject archetype) { + String aText = objectText.toString(); // The "real" Archtext from arch & archetype int j; - attr = attr.trim() + " "; // attr must be followed by space + attributeName = attributeName.trim() + " "; // attributeName must be followed by space String result = ""; - if (defarch == getDefaultArch()) { - result = getCachedAttributeValue(attr); + if (archetype == getArchetype()) { + result = getCachedAttributeValue(attributeName); if (result != null) { return result; ... [truncated message content] |
From: <chr...@us...> - 2006-09-24 17:38:49
|
Revision: 402 http://svn.sourceforge.net/gridarta/?rev=402&view=rev Author: christianhujer Date: 2006-09-24 10:36:47 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Renamed arch packages to gameobject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/MapViewIFrame.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/crossfire/src/cfeditor/gameobject/GameObjectIterator.java trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteGameMapObject.java trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteMapGame.java trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java trunk/crossfire/src/cfeditor/map/MapModel.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchType.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CMapViewBasic.java trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/MultiArchData.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/ArchAttribType.java trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/gameobject/DuplicateArchException.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObjectContainer.java trunk/daimonin/src/daieditor/gameobject/NamedObject.java trunk/daimonin/src/daieditor/gameobject/NamedObjects.java trunk/daimonin/src/daieditor/gameobject/NamedTreeNode.java trunk/daimonin/src/daieditor/gameobject/RecursiveGameObjectIterator.java trunk/daimonin/src/daieditor/gameobject/anim/AnimationObject.java trunk/daimonin/src/daieditor/gameobject/anim/AnimationObjects.java trunk/daimonin/src/daieditor/gameobject/anim/AnimationParseException.java trunk/daimonin/src/daieditor/gameobject/anim/DuplicateAnimationException.java trunk/daimonin/src/daieditor/gameobject/face/DuplicateFaceException.java trunk/daimonin/src/daieditor/gameobject/face/FaceFacade.java trunk/daimonin/src/daieditor/gameobject/face/FaceObject.java trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java trunk/daimonin/src/daieditor/gameobject/match/AndGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/AttribGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/GameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/GameObjectMatchers.java trunk/daimonin/src/daieditor/gameobject/match/MutableNameGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/MutableOrGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/NamedGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/NotGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/OrGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/TypeNrsGameObjectMatcher.java trunk/daimonin/src/daieditor/gameobject/match/ViewGameObjectMatcherManager.java trunk/daimonin/src/daieditor/gui/ConnectionView.java trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java trunk/daimonin/src/daieditor/gui/map/MapViewSettings.java trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java trunk/daimonin/src/daieditor/map/ArchOutOfMapBoundsException.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapModel.java trunk/daimonin/src/daieditor/map/MapModelEvent.java trunk/daimonin/src/daieditor/map/MapSquare.java trunk/daimonin/src/daieditor/map/validation/ArchValidationError.java trunk/daimonin/src/daieditor/map/validation/ArchValidator.java trunk/daimonin/src/daieditor/map/validation/ArchesValidationError.java trunk/daimonin/src/daieditor/map/validation/DelegatingMapValidator.java trunk/daimonin/src/daieditor/map/validation/ValidationError.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerError.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ExitChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ExitError.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingError.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroError.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Added Paths: ----------- trunk/crossfire/src/cfeditor/gameobject/ trunk/daimonin/src/daieditor/gameobject/ trunk/src/app/net/sf/gridarta/gameobject/ Removed Paths: ------------- trunk/crossfire/src/cfeditor/arch/ trunk/daimonin/src/daieditor/arch/ trunk/src/app/net/sf/gridarta/arch/ Modified: trunk/crossfire/src/cfeditor/AutojoinList.java =================================================================== --- trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import cfeditor.map.MapModel; import java.io.FileNotFoundException; import java.io.IOException; Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GridBagConstraints; Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.EOFException; Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2006-09-24 17:36:47 UTC (rev 402) @@ -7,7 +7,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.filter.ConfigEvent; import cfeditor.filter.ConfigListener; import cfeditor.filter.Filter; Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,10 +24,10 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchObjectParser; -import cfeditor.arch.ArchetypeSet; -import cfeditor.arch.anim.AnimationObjects; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchObjectParser; +import cfeditor.gameobject.ArchetypeSet; +import cfeditor.gameobject.anim.AnimationObjects; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; import cfeditor.map.MapModel; Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.ArchetypeSet; import cfeditor.menu.AggregateMenuLocation; import cfeditor.menu.BasicMenuEntry; import cfeditor.menu.CheckBoxMenuEntry; Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; import java.awt.BorderLayout; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapArchObject; import java.io.BufferedReader; import java.io.File; Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapArchObject; import cfeditor.map.MapModel; import java.awt.Point; Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; import cfeditor.map.MapModel; import java.awt.BorderLayout; Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import cfeditor.filter.AttributeFilter; import cfeditor.map.MapControl; import cfeditor.map.MapModel; Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.ArchetypeSet; import cfeditor.map.MapArchObject; import java.awt.BorderLayout; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchObjectParser; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchObjectParser; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; import java.io.File; Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.DefaultMapModel; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; Modified: trunk/crossfire/src/cfeditor/ExitTypes.java =================================================================== --- trunk/crossfire/src/cfeditor/ExitTypes.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/ExitTypes.java 2006-09-24 17:36:47 UTC (rev 402) @@ -2,7 +2,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.util.HashSet; import java.util.Set; Modified: trunk/crossfire/src/cfeditor/MapViewIFrame.java =================================================================== --- trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; import cfeditor.menu.MenuHelper; import cfeditor.menu.MenuManager; Modified: trunk/crossfire/src/cfeditor/MultiArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.util.ArrayList; /** Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; import java.awt.Color; import java.awt.FlowLayout; Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Insets; Modified: trunk/crossfire/src/cfeditor/filter/AttributeFilter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-09-24 17:36:47 UTC (rev 402) @@ -7,7 +7,7 @@ package cfeditor.filter; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.menu.BasicMenuEntry; import cfeditor.menu.FilterCheckBoxEntry; import java.util.HashMap; Modified: trunk/crossfire/src/cfeditor/filter/Filter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/Filter.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/filter/Filter.java 2006-09-24 17:36:47 UTC (rev 402) @@ -7,7 +7,7 @@ package cfeditor.filter; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.menu.BasicMenuEntry; import org.jdom.Element; Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterList.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -7,7 +7,7 @@ package cfeditor.filter; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import cfeditor.menu.BasicMenuEntry; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; Copied: trunk/crossfire/src/cfeditor/gameobject (from rev 401, trunk/crossfire/src/cfeditor/arch) Modified: trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/ArchObjectParser.java 2006-09-24 17:36:47 UTC (rev 402) @@ -22,7 +22,7 @@ * */ -package cfeditor.arch; +package cfeditor.gameobject; import cfeditor.CMainControl; import cfeditor.IGUIConstants; @@ -36,7 +36,6 @@ import java.util.List; import java.util.Map; import org.apache.log4j.Logger; -import org.jdom.Attribute; import org.jdom.DataConversionException; import org.jdom.Document; import org.jdom.Element; Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchetypeSet.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,7 +23,7 @@ * */ -package cfeditor.arch; +package cfeditor.gameobject; import cfeditor.CArchPanel; import cfeditor.CFTreasureListTree; Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/GameObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -22,7 +22,7 @@ * */ -package cfeditor.arch; +package cfeditor.gameobject; import cfeditor.AutojoinList; import cfeditor.CFArchType; @@ -48,7 +48,7 @@ * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ -public class GameObject implements Cloneable, net.sf.gridarta.arch.GameObject, Iterable<GameObject> { +public class GameObject implements Cloneable, net.sf.gridarta.gameobject.GameObject, Iterable<GameObject> { private static final Logger log = Logger.getLogger(GameObject.class); @@ -324,7 +324,7 @@ * arch is a default arch or the default arch should be ignored * @return <string>, "" if not found */ - public String getAttributeString(String attr, @Nullable final net.sf.gridarta.arch.GameObject defarch) { + public String getAttributeString(String attr, @Nullable final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // The "real" Archtext from arch & defarch int j; attr = attr.trim() + " "; // attr must be followed by space @@ -377,7 +377,7 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public int getAttributeInt(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // The "real" Archtext from arch & defarch // Add all attributes from defarch that don't already exist in aText if (defarch != null) { @@ -404,7 +404,7 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public long getAttributeLong(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // Add all attributes from defarch that don't already exist in aText if (defarch != null) { @@ -430,7 +430,7 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public double getAttributeDouble(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // Add all attributes from defarch that don't already exist in aText if (defarch != null) { Modified: trunk/crossfire/src/cfeditor/gameobject/GameObjectIterator.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/GameObjectIterator.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/GameObjectIterator.java 2006-09-24 17:36:47 UTC (rev 402) @@ -22,7 +22,7 @@ * */ -package cfeditor.arch; +package cfeditor.gameobject; import java.util.Iterator; import java.util.NoSuchElementException; Modified: trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteGameMapObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/GameObjectIteratorDeleteGameMapObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteGameMapObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -1,6 +1,6 @@ /* $Id: GameObjectIteratorDeleteGameMapObject.java,v 1.1 2006/04/06 17:16:03 akirschbaum Exp $ */ -package cfeditor.arch; +package cfeditor.gameobject; import cfeditor.map.MapModel; import java.util.Iterator; Modified: trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteMapGame.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/GameObjectIteratorDeleteMapGame.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/GameObjectIteratorDeleteMapGame.java 2006-09-24 17:36:47 UTC (rev 402) @@ -1,6 +1,6 @@ /* $Id: GameObjectIteratorDeleteMapGame.java,v 1.1 2006/04/06 17:16:03 akirschbaum Exp $ */ -package cfeditor.arch; +package cfeditor.gameobject; import cfeditor.map.MapModel; import java.awt.Point; Modified: trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,7 +23,7 @@ * */ -package cfeditor.arch.anim; +package cfeditor.gameobject.anim; /** * A single animation object. Modified: trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,7 +23,7 @@ * */ -package cfeditor.arch.anim; +package cfeditor.gameobject.anim; import java.util.ArrayList; import java.util.Iterator; Modified: trunk/crossfire/src/cfeditor/gui/ArchComboBox.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-09-24 17:36:47 UTC (rev 402) @@ -9,7 +9,7 @@ import cfeditor.CMainControl; import cfeditor.IGUIConstants; -import cfeditor.arch.GameObject; +import cfeditor.gameobject.GameObject; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -27,10 +27,10 @@ import cfeditor.CMainControl; import cfeditor.ExitTypes; import cfeditor.IGUIConstants; -import cfeditor.arch.GameObject; -import cfeditor.arch.GameObjectIterator; -import cfeditor.arch.GameObjectIteratorDeleteGameMapObject; -import cfeditor.arch.GameObjectIteratorDeleteMapGame; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.GameObjectIterator; +import cfeditor.gameobject.GameObjectIteratorDeleteGameMapObject; +import cfeditor.gameobject.GameObjectIteratorDeleteMapGame; import cfeditor.filter.Filter; import cfeditor.filter.FilterConfig; import cfeditor.filter.NamedFilterConfig; Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2006-09-24 17:36:47 UTC (rev 402) @@ -31,9 +31,9 @@ import net.sf.gridarta.CUndoStack; import cfeditor.IGUIConstants; import cfeditor.GridderException; -import cfeditor.arch.GameObject; -import cfeditor.arch.GameObjectIterator; -import cfeditor.arch.GameObjectIteratorDeleteMapGame; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.GameObjectIterator; +import cfeditor.gameobject.GameObjectIteratorDeleteMapGame; import java.awt.Point; import java.io.File; import java.util.Iterator; Modified: trunk/crossfire/src/cfeditor/map/MapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -1,8 +1,8 @@ package cfeditor.map; -import cfeditor.arch.GameObject; -import cfeditor.arch.GameObjectIterator; -import cfeditor.arch.GameObjectIteratorDeleteMapGame; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.GameObjectIterator; +import cfeditor.gameobject.GameObjectIteratorDeleteMapGame; import java.awt.Point; import org.jetbrains.annotations.Nullable; Modified: trunk/crossfire/src/cfeditor/parameter/ArchParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/parameter/ArchParameter.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/crossfire/src/cfeditor/parameter/ArchParameter.java 2006-09-24 17:36:47 UTC (rev 402) @@ -10,8 +10,8 @@ import cfeditor.CMainControl; import cfeditor.PluginParameter; import cfeditor.PluginParameterView; -import cfeditor.arch.GameObject; -import cfeditor.arch.ArchetypeSet; +import cfeditor.gameobject.GameObject; +import cfeditor.gameobject.ArchetypeSet; import org.jdom.Element; import org.jetbrains.annotations.Nullable; Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.gui.map.tools.ToolSelectorPane; import java.awt.BorderLayout; import java.util.ArrayList; Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package daieditor; -import daieditor.arch.GameObject; -import daieditor.arch.ArchetypeSet; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,26 +24,26 @@ package daieditor; -import daieditor.arch.ArchAttribType; -import static daieditor.arch.ArchAttribType.ANIMNAME; -import static daieditor.arch.ArchAttribType.BITMASK; -import static daieditor.arch.ArchAttribType.BOOL; -import static daieditor.arch.ArchAttribType.BOOL_SPEC; -import static daieditor.arch.ArchAttribType.DBLLIST; -import static daieditor.arch.ArchAttribType.FACENAME; -import static daieditor.arch.ArchAttribType.FIXED; -import static daieditor.arch.ArchAttribType.FLOAT; -import static daieditor.arch.ArchAttribType.INT; -import static daieditor.arch.ArchAttribType.LIST; -import static daieditor.arch.ArchAttribType.LONG; -import static daieditor.arch.ArchAttribType.SPELL; -import static daieditor.arch.ArchAttribType.STRING; -import static daieditor.arch.ArchAttribType.TEXT; -import static daieditor.arch.ArchAttribType.TREASURE; -import static daieditor.arch.ArchAttribType.ZSPELL; -import daieditor.arch.GameObject; -import daieditor.arch.NamedObject; -import daieditor.arch.NamedObjects; +import daieditor.gameobject.ArchAttribType; +import static daieditor.gameobject.ArchAttribType.ANIMNAME; +import static daieditor.gameobject.ArchAttribType.BITMASK; +import static daieditor.gameobject.ArchAttribType.BOOL; +import static daieditor.gameobject.ArchAttribType.BOOL_SPEC; +import static daieditor.gameobject.ArchAttribType.DBLLIST; +import static daieditor.gameobject.ArchAttribType.FACENAME; +import static daieditor.gameobject.ArchAttribType.FIXED; +import static daieditor.gameobject.ArchAttribType.FLOAT; +import static daieditor.gameobject.ArchAttribType.INT; +import static daieditor.gameobject.ArchAttribType.LIST; +import static daieditor.gameobject.ArchAttribType.LONG; +import static daieditor.gameobject.ArchAttribType.SPELL; +import static daieditor.gameobject.ArchAttribType.STRING; +import static daieditor.gameobject.ArchAttribType.TEXT; +import static daieditor.gameobject.ArchAttribType.TREASURE; +import static daieditor.gameobject.ArchAttribType.ZSPELL; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.NamedObject; +import daieditor.gameobject.NamedObjects; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; Modified: trunk/daimonin/src/daieditor/CFArchAttrib.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,23 +24,23 @@ package daieditor; -import daieditor.arch.ArchAttribType; -import static daieditor.arch.ArchAttribType.ANIMNAME; -import static daieditor.arch.ArchAttribType.BITMASK; -import static daieditor.arch.ArchAttribType.BOOL; -import static daieditor.arch.ArchAttribType.BOOL_SPEC; -import static daieditor.arch.ArchAttribType.DBLLIST; -import static daieditor.arch.ArchAttribType.FACENAME; -import static daieditor.arch.ArchAttribType.FIXED; -import static daieditor.arch.ArchAttribType.FLOAT; -import static daieditor.arch.ArchAttribType.INT; -import static daieditor.arch.ArchAttribType.LIST; -import static daieditor.arch.ArchAttribType.LONG; -import static daieditor.arch.ArchAttribType.SPELL; -import static daieditor.arch.ArchAttribType.STRING; -import static daieditor.arch.ArchAttribType.TEXT; -import static daieditor.arch.ArchAttribType.TREASURE; -import static daieditor.arch.ArchAttribType.ZSPELL; +import daieditor.gameobject.ArchAttribType; +import static daieditor.gameobject.ArchAttribType.ANIMNAME; +import static daieditor.gameobject.ArchAttribType.BITMASK; +import static daieditor.gameobject.ArchAttribType.BOOL; +import static daieditor.gameobject.ArchAttribType.BOOL_SPEC; +import static daieditor.gameobject.ArchAttribType.DBLLIST; +import static daieditor.gameobject.ArchAttribType.FACENAME; +import static daieditor.gameobject.ArchAttribType.FIXED; +import static daieditor.gameobject.ArchAttribType.FLOAT; +import static daieditor.gameobject.ArchAttribType.INT; +import static daieditor.gameobject.ArchAttribType.LIST; +import static daieditor.gameobject.ArchAttribType.LONG; +import static daieditor.gameobject.ArchAttribType.SPELL; +import static daieditor.gameobject.ArchAttribType.STRING; +import static daieditor.gameobject.ArchAttribType.TEXT; +import static daieditor.gameobject.ArchAttribType.TREASURE; +import static daieditor.gameobject.ArchAttribType.ZSPELL; import org.w3c.dom.Attr; import org.w3c.dom.Element; Modified: trunk/daimonin/src/daieditor/CFArchType.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchType.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CFArchType.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import static daieditor.arch.ArchAttribType.TEXT; +import static daieditor.gameobject.ArchAttribType.TEXT; import java.util.ArrayList; import java.util.HashMap; import java.util.List; Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,9 +24,9 @@ package daieditor; -import daieditor.arch.GameObject; -import daieditor.arch.match.GameObjectMatchers; -import daieditor.arch.match.NamedGameObjectMatcher; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.match.GameObjectMatchers; +import daieditor.gameobject.match.NamedGameObjectMatcher; import java.io.File; import java.io.IOException; import java.util.ArrayList; Modified: trunk/daimonin/src/daieditor/CFTreasureListTree.java =================================================================== --- trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package daieditor; import static daieditor.CGUIUtils.getSysIcon; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import java.awt.BorderLayout; import static java.awt.Color.gray; import java.awt.Component; Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 17:36:47 UTC (rev 402) @@ -28,14 +28,14 @@ import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_DEFAULT; import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_KEY; import static daieditor.IGUIConstants.TILE_EDIT_NONE; -import daieditor.arch.GameObject; -import daieditor.arch.ArchObjectParser; -import daieditor.arch.ArchetypeSet; -import daieditor.arch.anim.AnimationObjects; -import daieditor.arch.face.FaceFacade; -import daieditor.arch.face.FaceObjects; -import daieditor.arch.match.MutableOrGameObjectMatcher; -import daieditor.arch.match.ViewGameObjectMatcherManager; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.ArchObjectParser; +import daieditor.gameobject.ArchetypeSet; +import daieditor.gameobject.anim.AnimationObjects; +import daieditor.gameobject.face.FaceFacade; +import daieditor.gameobject.face.FaceObjects; +import daieditor.gameobject.match.MutableOrGameObjectMatcher; +import daieditor.gameobject.match.ViewGameObjectMatcherManager; import daieditor.gui.MapFileFilter; import daieditor.gui.map.MapCursorControl; import daieditor.gui.map.MapPreviewAccessory; Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package daieditor; -import daieditor.arch.GameObject; -import daieditor.arch.ArchetypeSet; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.ArchetypeSet; import daieditor.gui.AboutDialog; import daieditor.map.MapControl; import daieditor.map.validation.ErrorCollector; Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package daieditor; -import daieditor.arch.GameObject; -import daieditor.arch.ArchObjectParser; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.ArchObjectParser; import daieditor.gui.ConnectionView; import daieditor.gui.ErrorListView; import daieditor.map.validation.ErrorCollector; Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,8 +24,8 @@ package daieditor; -import daieditor.arch.GameObject; -import daieditor.arch.ArchObjectParser; +import daieditor.gameobject.GameObject; +import daieditor.gameobject.ArchObjectParser; import daieditor.map.MapArchObject; import java.io.BufferedReader; import java.io.File; Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapModel; import daieditor.map.MapSquare; Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.map.MapControl; import daieditor.map.MapSquare; import java.awt.BorderLayout; Modified: trunk/daimonin/src/daieditor/CMapViewBasic.java =================================================================== --- trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.gui.map.DefaultLevelRenderer; import daieditor.gui.map.MapUserListener; import daieditor.map.MapControl; Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapControl; import java.io.File; Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package daieditor; import static daieditor.CMainControl.rnd; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapControl; import daieditor.map.MapModel; Modified: trunk/daimonin/src/daieditor/MultiArchData.java =================================================================== --- trunk/daimonin/src/daieditor/MultiArchData.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/MultiArchData.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import java.util.ArrayList; /** Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 17:36:47 UTC (rev 402) @@ -25,7 +25,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import daieditor.map.MapControl; import daieditor.map.MapSquare; import java.awt.FlowLayout; Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.GameObject; +import daieditor.gameobject.GameObject; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import java.awt.Color; import java.awt.FlowLayout; Copied: trunk/daimonin/src/daieditor/gameobject (from rev 401, trunk/daimonin/src/daieditor/arch) Modified: trunk/daimonin/src/daieditor/gameobject/ArchAttribType.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchAttribType.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/ArchAttribType.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; /** * Enumeration for Archetype Attribute Types. Modified: trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/ArchObjectParser.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,13 +23,13 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import daieditor.CMainControl; import daieditor.IGUIConstants; import daieditor.MultiPositionData; import daieditor.PathManager; -import daieditor.arch.anim.DuplicateAnimationException; +import daieditor.gameobject.anim.DuplicateAnimationException; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchetypeSet.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,21 +24,21 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import daieditor.CFTreasureListTree; import net.sf.gridarta.io.CFileReader; import daieditor.CMainControl; import daieditor.CPickmapPanel; import daieditor.IGUIConstants; -import daieditor.arch.anim.AnimationObject; -import daieditor.arch.anim.AnimationObjects; -import daieditor.arch.anim.AnimationParseException; -import daieditor.arch.anim.DuplicateAnimationException; -import daieditor.arch.face.DuplicateFaceException; -import daieditor.arch.face.FaceFacade; -import daieditor.arch.face.FaceObject; -import daieditor.arch.face.FaceObjects; +import daieditor.gameobject.anim.AnimationObject; +import daieditor.gameobject.anim.AnimationObjects; +import daieditor.gameobject.anim.AnimationParseException; +import daieditor.gameobject.anim.DuplicateAnimationException; +import daieditor.gameobject.face.DuplicateFaceException; +import daieditor.gameobject.face.FaceFacade; +import daieditor.gameobject.face.FaceObject; +import daieditor.gameobject.face.FaceObjects; import daieditor.icons.ArchFaceProvider; import java.io.BufferedOutputStream; import java.io.BufferedReader; Modified: trunk/daimonin/src/daieditor/gameobject/DuplicateArchException.java =================================================================== --- trunk/daimonin/src/daieditor/arch/DuplicateArchException.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/DuplicateArchException.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; /** * Exception that's thrown in case an arch name was not unique. Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/GameObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,7 +23,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import daieditor.CFArchType; import daieditor.CFArchTypeList; @@ -32,8 +32,8 @@ import daieditor.IGUIConstants; import daieditor.MultiArchData; import daieditor.ScriptArchData; -import daieditor.arch.anim.AnimationObject; -import daieditor.arch.anim.AnimationObjects; +import daieditor.gameobject.anim.AnimationObject; +import daieditor.gameobject.anim.AnimationObjects; import daieditor.map.MapSquare; import java.io.Serializable; import javax.swing.ImageIcon; @@ -54,7 +54,7 @@ * normal arches. * @todo this class is not always the best place for multipart object handling, see also {@link GameObjectContainer} for issues about this */ -public final class GameObject /*extends NamedObject*/ extends GameObjectContainer implements Cloneable, net.sf.gridarta.arch.GameObject, Serializable { +public final class GameObject /*extends NamedObject*/ extends GameObjectContainer implements Cloneable, net.sf.gridarta.gameobject.GameObject, Serializable { /** Serial Version. */ private static final long serialVersionUID = 1L; @@ -329,7 +329,7 @@ } /** {@inheritDoc} */ - @Deprecated public String getAttributeString(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + @Deprecated public String getAttributeString(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { throw new Error("deprecated and not used in Daimonin"); } @@ -356,7 +356,7 @@ } /** {@inheritDoc} */ - public int getAttributeInt(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public int getAttributeInt(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // The "real" Archtext from arch & defarch // Add all attributes from defarch that don't already exist in aText if (defarch != null) { @@ -383,7 +383,7 @@ } /** {@inheritDoc} */ - public long getAttributeLong(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public long getAttributeLong(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // Add all attributes from defarch that don't already exist in aText if (defarch != null) { @@ -409,7 +409,7 @@ } /** {@inheritDoc} */ - public double getAttributeDouble(final String attr, final net.sf.gridarta.arch.GameObject defarch) { + public double getAttributeDouble(final String attr, final net.sf.gridarta.gameobject.GameObject defarch) { String aText = archText.toString(); // Add all attributes from defarch that don't already exist in aText if (defarch != null) { Modified: trunk/daimonin/src/daieditor/gameobject/GameObjectContainer.java =================================================================== --- trunk/daimonin/src/daieditor/arch/GameObjectContainer.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/GameObjectContainer.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import daieditor.map.MapSquare; import java.util.Iterator; Modified: trunk/daimonin/src/daieditor/gameobject/NamedObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/NamedObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/NamedObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,15 +19,15 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import javax.swing.ImageIcon; import java.io.Serializable; /** * A <code>NamedObject</code> has a name and tree position source and provides an icon for display. - * <code>NamedObject</code> is the superclass of {@link daieditor.arch.face.FaceObject} and - * {@link daieditor.arch.anim.AnimationObject}. + * <code>NamedObject</code> is the superclass of {@link daieditor.gameobject.face.FaceObject} and + * {@link daieditor.gameobject.anim.AnimationObject}. * @author <a href="mailto:ch...@ri...">Chrsitian Hujer</a> */ public abstract class NamedObject implements Comparable<NamedObject>, Serializable { Modified: trunk/daimonin/src/daieditor/gameobject/NamedObjects.java =================================================================== --- trunk/daimonin/src/daieditor/arch/NamedObjects.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/NamedObjects.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import java.awt.Component; import java.awt.event.MouseAdapter; Modified: trunk/daimonin/src/daieditor/gameobject/NamedTreeNode.java =================================================================== --- trunk/daimonin/src/daieditor/arch/NamedTreeNode.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/NamedTreeNode.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch; +package daieditor.gameobject; import java.util.ArrayList; import static java.util.Arrays.binarySearch; Modified: trunk/daimonin/src/daieditor/gameobject/RecursiveGameObjectIterator.java =================================================================== --- trunk/daimonin/src/daieditor/arch/RecursiveGameObjectIterator.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/RecursiveGameObjectIterator.java 2006-09-24 17:36:47 UTC (rev 402) @@ -1,4 +1,4 @@ -package daieditor.arch; +package daieditor.gameobject; import java.util.Iterator; import java.util.Stack; Modified: trunk/daimonin/src/daieditor/gameobject/anim/AnimationObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/anim/AnimationObject.java 2006-09-24 17:36:47 UTC (rev 402) @@ -24,10 +24,10 @@ * */ -package daieditor.arch.anim; +package daieditor.gameobject.anim; -import daieditor.arch.NamedObject; -import daieditor.arch.face.FaceFacade; +import daieditor.gameobject.NamedObject; +import daieditor.gameobject.face.FaceFacade; import java.util.ArrayList; import java.util.List; import java.io.Serializable; Modified: trunk/daimonin/src/daieditor/gameobject/anim/AnimationObjects.java =================================================================== --- trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/anim/AnimationObjects.java 2006-09-24 17:36:47 UTC (rev 402) @@ -23,11 +23,11 @@ * */ -package daieditor.arch.anim; +package daieditor.gameobject.anim; import daieditor.PathManager; import net.sf.gridarta.io.CFileReader; -import daieditor.arch.NamedObjects; +import daieditor.gameobject.NamedObjects; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; Modified: trunk/daimonin/src/daieditor/gameobject/anim/AnimationParseException.java =================================================================== --- trunk/daimonin/src/daieditor/arch/anim/AnimationParseException.java 2006-09-24 17:15:52 UTC (rev 401) +++ trunk/daimonin/src/daieditor/gameobject/anim/AnimationParseException.java 2006-09-24 17:36:47 UTC (rev 402) @@ -19,7 +19,7 @@ * */ -package daieditor.arch.anim; +package daieditor.gameobject.anim; import java.io.File; Modified: trunk/daimonin/src/daieditor/gameobject/anim/DuplicateAnimationException.java =================================================================== --- trunk/daimonin/src/daiedi... [truncated message content] |
From: <chr...@us...> - 2006-09-24 17:17:18
|
Revision: 401 http://svn.sourceforge.net/gridarta/?rev=401&view=rev Author: christianhujer Date: 2006-09-24 10:15:52 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Renamed ArchObjectStack to ArchetypeSet. Renamed ArchObject to GameObject (missing part of previous commit). Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchType.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/MapViewIFrame.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapArchObject.java trunk/crossfire/src/cfeditor/map/MapControl.java trunk/crossfire/src/cfeditor/map/MapModel.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java trunk/daimonin/src/daieditor/CArchPanelPan.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/GameObject.java trunk/daimonin/src/daieditor/map/MapModel.java Added Paths: ----------- trunk/crossfire/src/cfeditor/arch/ArchetypeSet.java trunk/crossfire/src/cfeditor/arch/GameObject.java trunk/crossfire/src/cfeditor/arch/GameObjectIterator.java trunk/crossfire/src/cfeditor/arch/GameObjectIteratorDeleteGameMapObject.java trunk/crossfire/src/cfeditor/arch/GameObjectIteratorDeleteMapGame.java trunk/daimonin/src/daieditor/arch/ArchetypeSet.java trunk/src/app/net/sf/gridarta/arch/GameObject.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java trunk/src/app/net/sf/gridarta/arch/ArchObject.java Modified: trunk/crossfire/src/cfeditor/AutojoinList.java =================================================================== --- trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/AutojoinList.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,10 +24,9 @@ package cfeditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.GameObject; +import cfeditor.arch.ArchetypeSet; import cfeditor.map.MapModel; -import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import org.apache.log4j.Logger; @@ -54,7 +53,7 @@ private static final int WEST = 8; - private ArchObjectStack stack; // reference to the stack of default arches + private ArchetypeSet stack; // reference to the stack of default arches private AutojoinList next; // next autojoin list @@ -83,7 +82,7 @@ * @param archstack the stack of default arches * @return true if at least one autojoin list was successfully loaded */ - public boolean loadList(final ArchObjectStack archstack) { + public boolean loadList(final ArchetypeSet archstack) { boolean success = false; // return value (true if >= 1 list loaded) try { @@ -141,7 +140,7 @@ // add a new archid to the buffer // try to parse the arch node_nr from the hashtable - final int entry = ArchObjectStack.getArchIndex(line); + final int entry = ArchetypeSet.getArchIndex(line); if (entry != -1) { nbuf[count] = entry; @@ -200,7 +199,7 @@ } // now do the joining in all four directions: - ArchObject arch = null; + GameObject arch = null; if (map.isPointValid(x, y - 1)) { if ((arch = findArchOfJoinlist(map, x, y - 1)) != null) { newIndex = addDir(newIndex, NORTH); @@ -233,7 +232,7 @@ } /** - * Do autojoining on deletion of an ArchObject on the map. + * Do autojoining on deletion of an GameObject on the map. * All arches around the insert point get adjusted. * This method must be called from the appropriate element of the * AutojoinList, best use the link from the default arch. @@ -242,7 +241,7 @@ * @param map Data model of the map */ public void joinDelete(final MapModel map, final int x, final int y) { - ArchObject arch; // temp. arch + GameObject arch; // temp. arch // do the joining in all four directions: if (map.isPointValid(x, y - 1)) { @@ -313,8 +312,8 @@ * @param y location to search * @return arch which is part of this joinlist, null if no such arch exists */ - @Nullable private ArchObject findArchOfJoinlist(final MapModel map, final int x, final int y) { - ArchObject tmpArch = map.getTopArchObject(x, y); + @Nullable private GameObject findArchOfJoinlist(final MapModel map, final int x, final int y) { + GameObject tmpArch = map.getTopArchObject(x, y); // we look through the arches at the given location (top to bottom): for (; tmpArch != null; tmpArch = tmpArch.getPrev()) { if (stack.getArch(tmpArch.getNodeNr()).getJoinList() == this) { @@ -329,8 +328,8 @@ * Add/remove a certain connection of the given arch * by changing archtype and face. */ - private void connectArch(final ArchObject arch, final int newNodenr) { - final ArchObject defarch = stack.getArch(newNodenr); // new default arch + private void connectArch(final GameObject arch, final int newNodenr) { + final GameObject defarch = stack.getArch(newNodenr); // new default arch if (arch.getNodeNr() != newNodenr) { // set new archtype Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -145,7 +145,7 @@ } } - @Nullable public ArchObject getArchPanelSelection() { + @Nullable public GameObject getArchPanelSelection() { if (selectedPanel == null) { return null; } @@ -153,7 +153,7 @@ return selectedPanel.getArchListObject(); } - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { archQuickPanel.showArchPanelQuickObject(arch); } Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; @@ -120,8 +120,8 @@ }); } - public ArchObject getArchListObject() { - ArchObject arch = null; + public GameObject getArchListObject() { + GameObject arch = null; int index = theList.getSelectedIndex(); if (index != -1) { @@ -132,7 +132,7 @@ } public void showArchListObject(int index) { - ArchObject arch = null; + GameObject arch = null; if (index != -1) { try { @@ -271,7 +271,7 @@ /* We additionally set the JLabels icon property here. */ - final ArchObject arch = mainControl.getArchObjectStack().getArch(Integer.parseInt(value.toString())); + final GameObject arch = mainControl.getArchObjectStack().getArch(Integer.parseInt(value.toString())); if (isSelected) { archPanel.setPanelArch(Integer.parseInt(value.toString())); mainControl.setStatusText(" " + value.toString() + " "); Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GridBagConstraints; @@ -117,7 +117,7 @@ * @param archPart the object to show; this may be any part of a multi-part * object */ - void showArchPanelQuickObject(final ArchObject archPart) { + void showArchPanelQuickObject(final GameObject archPart) { if (archPart == null) { archArchNameText.setText("<html><font color=black>Arch:</font></html>"); archObjNameText.setText("<html><font color=black>Name:</font></html>"); @@ -126,10 +126,10 @@ return; } - final ArchObject arch = archPart.getHead(); + final GameObject arch = archPart.getHead(); archArchNameText.setText("<html><font color=black>Arch: " + arch.getArchName() + "</font></html>"); if (arch.getObjName() == null || arch.getObjName().length() <= 0) { - final ArchObject def = arch.getDefaultArch(); + final GameObject def = arch.getDefaultArch(); if (def == null || def == arch) { archObjNameText.setText("<html><font color=black>Name: -none- </font></html>"); } else if (def.getObjName() != null && def.getObjName().length() > 0) { Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.GameObject; +import cfeditor.arch.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -121,13 +121,13 @@ private JLabel imagePanel; // panel for object's face (png) - private final ArchObject arch; + private final GameObject arch; - private final ArchObject defarch; + private final GameObject defarch; private CFArchType type; // reference to the type data - // this differs from the ArchObject if the type is undefined + // this differs from the GameObject if the type is undefined private int listNr; // the position of this type in the type list // buttons: @@ -155,11 +155,11 @@ * Constructor: Creates the GUI layout and * draws the dialog window. * @param atList the list of CF type-data - * @param aobj the ArchObject to be displayed by this dialog - * @param defaobj the default ArchObject of 'arch' + * @param aobj the GameObject to be displayed by this dialog + * @param defaobj the default GameObject of 'arch' * @param mainControl main control */ - CAttribDialog(final CFArchTypeList atList, final ArchObject aobj, final CMainControl mainControl) { + CAttribDialog(final CFArchTypeList atList, final GameObject aobj, final CMainControl mainControl) { super(mainControl.getMainView(), "CF Attribute Dialog", false); // when close-box is selected, execute the 'closeDialog' method and nothing else @@ -178,7 +178,7 @@ CAttribDialog.setDefaultBounds(); // set width/height etc - // reference to the ArchObject + // reference to the GameObject arch = aobj.getHead(); defarch = arch.getDefaultArch(); @@ -1016,14 +1016,14 @@ applyButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { - // write settings into the ArchObject + // write settings into the GameObject applySettings(); } }); okButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { - // write settings into the ArchObject, then exit + // write settings into the GameObject, then exit if (applySettings()) { closeDialog(); } @@ -1175,7 +1175,7 @@ /** * This method is called when the "apply"-button has been * pressed. All the settings from the dialog get - * written into the ArchObject. + * written into the GameObject. * @return true if the settings were applied, false if error occurred */ private boolean applySettings() { @@ -1396,11 +1396,11 @@ if (faceChanged) { if (arch.getFaceName() != null) { // we have a non-default face - final int index = ArchObjectStack.getFaceIndex(arch.getFaceName()); + final int index = ArchetypeSet.getFaceIndex(arch.getFaceName()); arch.setFaceNr(index); } else { // we have the default face - final int index = ArchObjectStack.getFaceIndex(defarch.getFaceName()); + final int index = ArchetypeSet.getFaceIndex(defarch.getFaceName()); arch.setFaceNr(index); } mainControl.getCurrentMap().repaint(); // repaint map @@ -1708,7 +1708,7 @@ final JTextArea text; // textfield containing the error-text to keep - final ArchObject arch; // the according arch + final GameObject arch; // the according arch final String allErrors; // list of all errors @@ -1720,7 +1720,7 @@ * @param keepB button "keep what is in the textfield" * @param textNew textfield containing the error-text to keep */ - public ConfirmErrorsAL(final JDialog dl, final ArchObject archNew, final String errors, final JButton keepB, final JTextArea textNew) { + public ConfirmErrorsAL(final JDialog dl, final GameObject archNew, final String errors, final JButton keepB, final JTextArea textNew) { arch = archNew; keepButton = keepB; text = textNew; @@ -1785,9 +1785,9 @@ final CAttribDialog frame; // the entire frame - final ArchObject arch; // the according arch + final GameObject arch; // the according arch - final ArchObject defarch; // default arch of 'arch' + final GameObject defarch; // default arch of 'arch' String deselected; // the latest deselected item @@ -1799,7 +1799,7 @@ * @param archNew the arch which has the error to be added * @param defarchNew the default arch of 'arch' */ - public TypesBoxAL(final CAttribDialog frameNew, final ArchObject archNew, final ArchObject defarchNew) { + public TypesBoxAL(final CAttribDialog frameNew, final GameObject archNew, final GameObject defarchNew) { frame = frameNew; arch = archNew; defarch = defarchNew; Modified: trunk/crossfire/src/cfeditor/CFArchType.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CFArchType.java 2006-09-24 17:15:52 UTC (rev 401) @@ -413,7 +413,7 @@ } /** - * Create the documentation to this ArchObject-type. + * Create the documentation to this GameObject-type. * @return the full html-text to be (parsed and) displayed */ public String createHtmlDocu() { Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.EOFException; @@ -528,12 +528,12 @@ * @return the <code>CFArchType</code> which belongs to this arch, * or the first (misc) type if no match is found. */ - public CFArchType getTypeOfArch(final ArchObject arch) { + public CFArchType getTypeOfArch(final GameObject arch) { // check if the type of the object is present in the definitions CFArchType tmp = head.getNext(); // tmp cycles through all types CFArchType type = tmp; // return value: the type of the arch, first one (misc) if no other found - final ArchObject defarch = arch.getDefaultArch(); + final GameObject defarch = arch.getDefaultArch(); boolean typeFound = false; for (int i = 0; tmp != null && !typeFound; tmp = tmp.getNext(), i++) { Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.GameObject; +import cfeditor.arch.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -983,9 +983,9 @@ } } else if (content.getType() != TreasureObj.FOLDER) { // normal arch: display the face icon - final int num = ArchObjectStack.getArchIndex(content.getName()); - if (num != -1 && ArchObjectStack.getLoadStatus() == ArchObjectStack.IS_COMPLETE) { - final ArchObject arch = CMainControl.getInstance().getArch(num); + final int num = ArchetypeSet.getArchIndex(content.getName()); + if (num != -1 && ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_COMPLETE) { + final GameObject arch = CMainControl.getInstance().getArch(num); if (arch != null) { if (!arch.getFaceFlag()) { setIcon(CMainControl.getInstance().getFace(arch.getFaceNr())); Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2006-09-24 17:15:52 UTC (rev 401) @@ -7,7 +7,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.filter.ConfigEvent; import cfeditor.filter.ConfigListener; import cfeditor.filter.Filter; @@ -25,7 +25,7 @@ * @author tchize * <p/> * Control to check if - * 1) a specific ArchObject can be shown (filter out of view part) + * 1) a specific GameObject can be shown (filter out of view part) * 2) a specific MapSquare must be highlighted (analysis part) * It provides onyl one filterOut path (and so elements elements are visbile * or not, they can't be twice visible or such). @@ -102,7 +102,7 @@ return false; } - public void objectInSquare(final ArchObject o) { + public void objectInSquare(final GameObject o) { for (int i = 0; i < 3; i++) { if (!highLightConfig[i].isEnabled()) { continue; /*matching system not activated*/ @@ -114,7 +114,7 @@ } } - public boolean canShow(final ArchObject o) { + public boolean canShow(final GameObject o) { if (!filterOutConfig.isEnabled()) { return true; } Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,9 +24,9 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.arch.ArchObjectParser; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.ArchetypeSet; import cfeditor.arch.anim.AnimationObjects; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; @@ -143,7 +143,7 @@ private ImageIcon noarchTileIconX; - private final ArchObjectStack archList; // the one and only arch list + private final ArchetypeSet archList; // the one and only arch list /** All open maps. */ private final Vector levels = new Vector(1, 2); @@ -202,7 +202,7 @@ /** Constructs the main controller and its model and view. */ public CMainControl() { - archList = new ArchObjectStack(this); + archList = new ArchetypeSet(this); mainView = new CMainView(this); instance = this; @@ -283,7 +283,7 @@ // load the list with archtype-data from "types.txt" typelist = new CFArchTypeList(); - ArchObject.setTypeList(typelist); // set reference in ArchObject + GameObject.setTypeList(typelist); // set reference in GameObject // now collect all arch you can find in the arch path!! System.gc(); @@ -293,7 +293,7 @@ /** * Loading the joinlist from file and attaching all to 'joinlist'. * (This method must not be called before all arches are loaded - * into the ArchObjectStack 'archList'!) + * into the ArchetypeSet 'archList'!) */ public void loadJoinlist() { joinlist = new AutojoinList(); @@ -302,17 +302,17 @@ } } - void moveTileUp(final ArchObject arch, final boolean refresh) { + void moveTileUp(final GameObject arch, final boolean refresh) { currentMap.getMapModel().moveTileUp(arch, refresh); } - void moveTileDown(final ArchObject arch, final boolean refresh) { + void moveTileDown(final GameObject arch, final boolean refresh) { currentMap.getMapModel().moveTileDown(arch, refresh); } /** collect CF arches */ public void collectCFArches() { - if (ArchObjectStack.getLoadStatus() != ArchObjectStack.IS_COMPLETE) { + if (ArchetypeSet.getLoadStatus() != ArchetypeSet.IS_COMPLETE) { // must not collect arches while arch stack not complete showMessage("Arches still Loading", "You have to wait for all arches to be loaded\nbefore you can collect them."); return; @@ -392,7 +392,7 @@ // access to ArchNodeList // remark: i use before some weird access to it, use this instead when you find it - public void addArchToList(final ArchObject data) { + public void addArchToList(final GameObject data) { archList.addArchToList(data); } @@ -408,7 +408,7 @@ return archList.getArchCount(); } - public ArchObject getArch(final int i) { + public GameObject getArch(final int i) { return archList.getArch(i); } @@ -548,12 +548,12 @@ } // ask arch panel which arch is selectd - public ArchObject getArchPanelSelection() { + public GameObject getArchPanelSelection() { return mainView.getArchPanelSelection(); } // setup quick view window - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { mainView.showArchPanelQuickObject(arch); } @@ -595,7 +595,7 @@ return currentMap.addArchToMap(archnr, pos, intern, join); } - boolean insertArchToMap(final ArchObject newarch, final int archnr, final ArchObject next, final Point pos, final boolean join) { + boolean insertArchToMap(final GameObject newarch, final int archnr, final GameObject next, final Point pos, final boolean join) { return currentMap.insertArchToMap(newarch, archnr, next, pos, join); } @@ -603,7 +603,7 @@ currentMap.deleteMapArch(index, pos, refreshMap, join); } - public ArchObject getMapArch(final int index, final Point pos) { + public GameObject getMapArch(final int index, final Point pos) { return currentMap.getMapArch(index, pos); } @@ -649,10 +649,10 @@ } /** - * Get the ArchObjectStack. - * @return ArchObjectStack + * Get the ArchetypeSet. + * @return ArchetypeSet */ - public ArchObjectStack getArchObjectStack() { + public ArchetypeSet getArchObjectStack() { return archList; } @@ -728,7 +728,7 @@ * left corner * @return map control of new map */ - public MapControl newLevel(final List<ArchObject> objects, final MapArchObject maparch, final Point initial) { + public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final Point initial) { return newLevel(objects, maparch, true, initial); } @@ -743,7 +743,7 @@ * left corner * @return map control of new map */ - public MapControl newLevel(final List<ArchObject> objects, final MapArchObject maparch, final boolean show, final Point initial) { + public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final boolean show, final Point initial) { // Create a new level control and set the level view from that CMainStatusbar.getInstance().setText(" Creating new map " + maparch.getMapDisplayName()); @@ -904,7 +904,7 @@ final int returnVal = fileChooser.showOpenDialog(mainView); if (returnVal == JFileChooser.APPROVE_OPTION) { - if (ArchObjectStack.getLoadStatus() == ArchObjectStack.IS_LOADING) { + if (ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_LOADING) { // ArchStack still loading -> abort! showMessage("Cannot open Map", "Are you nuts?! :-)\n" + "All arches have to be loaded before you can open a map.\n" + @@ -912,7 +912,7 @@ return; } - if (ArchObjectStack.getLoadStatus() == ArchObjectStack.IS_EMPTY) { + if (ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_EMPTY) { // ArchStack is empty -> abort! showMessage("Cannot open Map", "There are currently no arches avaliable!\n" + "You need to have arches loaded before opening a map.\n" + @@ -971,7 +971,7 @@ * @return the map controller to manipulate this map */ @Nullable public MapControl openFile(final File file, final boolean show, final Point initial) { - final List<ArchObject> objects; + final List<GameObject> objects; final MapArchObject maparch; try { objects = mapFileDecoder.decodeMapFile(file); // parse mapfile @@ -1014,7 +1014,7 @@ * Open an attribute dialog window for the specified arch * @param arch attr. window is opened for this arch */ - public void openAttrDialog(final ArchObject arch) { + public void openAttrDialog(final GameObject arch) { if (typelist.isEmpty()) { // types.txt is missing! showMessage("File Missing", "The definitions-file \"types.txt\" is missing! The\nattribute interface doesn't work without that file."); @@ -1043,12 +1043,12 @@ * browse first through the default arch list and attach map arches to it * then browse through the face list and try to find the pictures */ - boolean collectTempList(final List<ArchObject> objects, final File file) { - final List<ArchObject> tailList = new ArrayList<ArchObject>(); + boolean collectTempList(final List<GameObject> objects, final File file) { + final List<GameObject> tailList = new ArrayList<GameObject>(); // first: attach our map sucker to a default arch we have loaded - for (final Iterator<ArchObject> it = objects.iterator(); it.hasNext();) { - final ArchObject arch = it.next(); - final int index1 = ArchObjectStack.getArchIndex(arch.getArchName()); + for (final Iterator<GameObject> it = objects.iterator(); it.hasNext();) { + final GameObject arch = it.next(); + final int index1 = ArchetypeSet.getArchIndex(arch.getArchName()); if (index1 == -1) { // we had an unknown arch here!! // showMessage("Error Loading Map File "+file.getName(), "\n Found Unknown Arch < "+arch.getArchName()+" >"); @@ -1060,7 +1060,7 @@ // if there was no special face added in map, get it from def object if (arch.getFaceName() != null) { - final int index2 = ArchObjectStack.getFaceIndex(arch.getFaceName()); + final int index2 = ArchetypeSet.getFaceIndex(arch.getFaceName()); if (index2 == -1) { // just warn here we have not the gfx //showMessage("LOAD FILE", "Arch: "+arch.getFaceName()+" Face: " +arch.getFaceName()+" Face Name Unknown"); } else { @@ -1076,7 +1076,7 @@ archObjectParser.expandMulti(arch, tailList); } - for (final ArchObject tail : tailList) { + for (final GameObject tail : tailList) { objects.add(tail); } @@ -1318,7 +1318,7 @@ /** Try to load the map where the selected map-exit points to. */ public void enterExitWanted() { - final ArchObject exit = currentMap.getMapModel().getExit(); + final GameObject exit = currentMap.getMapModel().getExit(); if (exit == null) { // no exit found showMessage("No Exit Found", "There is no valid exit at the selected spot."); Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.ArchetypeSet; import cfeditor.menu.AggregateMenuLocation; import cfeditor.menu.BasicMenuEntry; import cfeditor.menu.CheckBoxMenuEntry; @@ -38,7 +38,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; -import java.util.Enumeration; import java.util.List; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -857,7 +856,7 @@ mainControl.setPickmapsLocked(m_lockPickmaps.isChecked()); m_newPickmap.setEnabled(!m_lockPickmaps.isChecked()); - final boolean isArchLoadComplete = ArchObjectStack.getLoadStatus() == ArchObjectStack.IS_COMPLETE; + final boolean isArchLoadComplete = ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_COMPLETE; if (isArchLoadComplete) { m_deletePickmap.setEnabled(!m_lockPickmaps.isChecked()); m_loadPickmap.setEnabled(!m_lockPickmaps.isChecked()); @@ -1253,7 +1252,7 @@ /** Refreshes the state of items in this toolbar. */ public void refresh() { - final boolean isArchLoadComplete = ArchObjectStack.getLoadStatus() == ArchObjectStack.IS_COMPLETE; + final boolean isArchLoadComplete = ArchetypeSet.getLoadStatus() == ArchetypeSet.IS_COMPLETE; m_undo.setEnabled(false); m_redo.setEnabled(false); @@ -1268,7 +1267,7 @@ m_autojoin.setEnabled(mainControl.getJoinlist() != null); // collect arches is only allowed if we run from individual archfiles - m_collectArch.setEnabled(isArchLoadComplete && !ArchObjectStack.isLoadedFromArchive()); + m_collectArch.setEnabled(isArchLoadComplete && !ArchetypeSet.isLoadedFromArchive()); if (isArchLoadComplete) { m_viewTreasure.setEnabled(true); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.map.MapControl; import java.awt.BorderLayout; import java.awt.Dimension; @@ -292,10 +292,10 @@ * @return the active arch in the left-side panel. * This can either be a default arch from the archlist, or * a custom arch from a pickmap. - * IMPORTANT: The returned ArchObject is not a clone. A copy + * IMPORTANT: The returned GameObject is not a clone. A copy * must be generated before inserting such an arch to the map. */ - public ArchObject getArchPanelSelection() { + public GameObject getArchPanelSelection() { if ((isPickmapActive() || archPanel.getArchPanelSelection() == null) && CPickmapPanel.getInstance().isLoadComplete() && @@ -305,7 +305,7 @@ if (pmap != null && pmap.getMapView().isHighlight()) { // now try to get the topmost object - ArchObject arch = null; + GameObject arch = null; if (pmap.isPointValid(pmap.getMapView().getHighlightStart())) { arch = pmap.getMapModel().getBottomArchObject(pmap.getMapView().getHighlightStart()); } @@ -321,7 +321,7 @@ return archPanel.getArchPanelSelection(); } - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { archPanel.showArchPanelQuickObject(arch); } @@ -331,12 +331,12 @@ } // show a arch in the arch map panel - public void setMapArchPanelObject(final ArchObject arch) { + public void setMapArchPanelObject(final GameObject arch) { mapArchPanel.setMapArchPanelObject(arch); } // show a arch in the arch map panel - public ArchObject getMapArchPanelObject() { + public GameObject getMapArchPanelObject() { return mapArchPanel.getMapArchPanelObject(); } @@ -349,7 +349,7 @@ mapTileList.refresh(); } - public ArchObject getMapTileSelection() { + public GameObject getMapTileSelection() { return mapTileList.getMapTileSelection(); } Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,11 +24,10 @@ package cfeditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.GameObject; +import cfeditor.arch.ArchetypeSet; import java.awt.BorderLayout; import java.awt.Color; -import java.awt.Component; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -44,7 +43,6 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.JTextField; @@ -60,7 +58,7 @@ /** * <code>CMapArchPanel</code> implements the panel that holds information about - * the currently selected ArchObject on the map. + * the currently selected GameObject on the map. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ @@ -161,7 +159,7 @@ private JList eventList; - private ArchObject selectedObject; + private GameObject selectedObject; /* Build Panel */ CMapArchPanel(final CMainControl mainControl, final CMainView view) { @@ -259,7 +257,7 @@ invChange.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { - final ArchObject arch = mainControl.getArchPanelSelection(); + final GameObject arch = mainControl.getArchPanelSelection(); if (arch == null) { // nothing selected? return; } @@ -269,7 +267,7 @@ return; } - ArchObject inv = mainView.getMapTileSelection(); + GameObject inv = mainView.getMapTileSelection(); if (inv == null) { return; } @@ -277,7 +275,7 @@ // if this is a multi-tail, we put the new arch into the head's inv. inv = inv.getHead(); - final ArchObject invnew; + final GameObject invnew; if (arch.isDefaultArch()) { // create a new copy of a default arch invnew = mainControl.getArchObjectStack().newArchObjectInstance(arch.getNodeNr()); @@ -299,7 +297,7 @@ * is pressed, this function updates the active arch object. * @param activeArch the currently selected arch */ - public void applyArchPanelChanges(final ArchObject activeArch) { + public void applyArchPanelChanges(final GameObject activeArch) { boolean needRedraw = false; // do we need a map-redraw? true/false if (activeArch == null) { @@ -308,9 +306,9 @@ // If the active arch is part of a multi, the mutli-head's stats // are taken instead: - final ArchObject arch = activeArch.getHead(); + final GameObject arch = activeArch.getHead(); - final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); + final GameObject defarch = mainControl.getArch(arch.getNodeNr()); if (defarch == null) { // hm, this should NOT happen return; } @@ -376,11 +374,11 @@ if (arch.getFaceName() != null) { // we have a non-default face - final int index = ArchObjectStack.getFaceIndex(arch.getFaceName()); + final int index = ArchetypeSet.getFaceIndex(arch.getFaceName()); arch.setFaceNr(index); } else { // we have the default face - final int index = ArchObjectStack.getFaceIndex(defarch.getFaceName()); + final int index = ArchetypeSet.getFaceIndex(defarch.getFaceName()); arch.setFaceNr(index); } @@ -519,7 +517,7 @@ * Open an attribute dialog window for the currently selected arch * @param arch currently selected arch */ - private void openAttrDialog(final ArchObject arch) { + private void openAttrDialog(final GameObject arch) { mainControl.openAttrDialog(arch); } @@ -657,7 +655,7 @@ * updated. * @return the selected arch */ - public ArchObject getMapArchPanelObject() { + public GameObject getMapArchPanelObject() { return selectedObject; } @@ -666,7 +664,7 @@ * updated. * @param activeArch the selected arch */ - public void setMapArchPanelObject(final ArchObject activeArch) { + public void setMapArchPanelObject(final GameObject activeArch) { selectedObject = activeArch; // archObjNameText.setText("<html><font color=black>Name:</font></html>"); // reset panel @@ -698,7 +696,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 = activeArch.getHead(); + final GameObject arch = activeArch.getHead(); // no text, we try to set the default text final boolean hasMessage; @@ -835,7 +833,7 @@ * script is triggered. */ public void editScriptWanted(final int task) { - ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch + GameObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch != null) { arch = arch.getHead(); } @@ -854,7 +852,7 @@ /** This method is invoked when the user pressed the "new script" button. */ public void addNewScriptWanted() { - ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch + GameObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch != null) { arch = arch.getHead(); arch.addEventScript(eventList, this); Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.map.MapArchObject; import java.io.BufferedReader; import java.io.File; @@ -53,7 +53,7 @@ private int maxxlen, maxylen; /** ArchObjects that are read from the map. */ - private List<ArchObject> objects; + private List<GameObject> objects; /** Contains the map arch (see MapArchObject class). */ private MapArchObject maparch; @@ -69,17 +69,17 @@ * Loading a Crossfire map from the given mapfile. * This method returns a list of arches, connected with the temp pointers. * @param file mapfile - * @return first <code>ArchObject</code> in the list + * @return first <code>GameObject</code> in the list * @throws FileNotFoundException in case the requested map file was not found * @throws IOException in case the file couldn't be read or is in wrong format * @todo create a separate exception for the wrong format */ - public List<ArchObject> decodeMapFile(final File file) throws FileNotFoundException, IOException { + public List<GameObject> decodeMapFile(final File file) throws FileNotFoundException, IOException { final BufferedReader myInput = new BufferedReader(new InputStreamReader(new FileInputStream(file), CFileReader.MAP_ENCODING)); try { maxxlen = 0; maxylen = 0; - objects = new ArrayList<ArchObject>(); + objects = new ArrayList<GameObject>(); // first of all we read the map arch (if that fails we throw an exception) maparch = new MapArchObject(); @@ -113,12 +113,12 @@ * @param myInput input filestream * @param thisLine first line of text, belonging to this new arch * @param container container arch that contains this new arch - if any - * @return the new parsed <code>ArchObject</code> + * @return the new parsed <code>GameObject</code> * @throws IOException when an I/O-error occured during file reading */ - @Nullable private ArchObject readArch(final BufferedReader myInput, String thisLine, final ArchObject container) + @Nullable private GameObject readArch(final BufferedReader myInput, String thisLine, final GameObject container) throws IOException { - ArchObject arch; + GameObject arch; String thisLine2; boolean archflag, archmore, msgflag, animflag, scriptflag; final int y; @@ -158,7 +158,7 @@ archflag = true; // from now on we are inside an arch if (!archmore) { - arch = new ArchObject(); // create a new instance + arch = new GameObject(); // create a new instance // our arch! it has a name! arch.setArchName(thisLine.substring(x, thisLine.length())); Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.map.MapArchObject; import cfeditor.map.MapModel; import java.awt.Point; @@ -75,7 +75,7 @@ try { fname = file.getAbsolutePath(); bufferedWriter = new BufferedWriter(new FileWriter(file)); - //ArchObject multi; + //GameObject multi; // write map header: map arch mapArch.writeMapArch(bufferedWriter); @@ -87,7 +87,7 @@ for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { final Iterator it = mapModel.getArchObjects(pos); while (it.hasNext()) { - final ArchObject node = (ArchObject) it.next(); + final GameObject node = (GameObject) it.next(); // only non multi suckers if (!node.isMulti()) { if (!writeMapArch(node, false)) { @@ -103,7 +103,7 @@ for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { final Iterator it = mapModel.getArchObjects(pos); while (it.hasNext()) { - final ArchObject node = (ArchObject) it.next(); + final GameObject node = (GameObject) it.next(); // search only for heads! if (node.isMulti() && node.isHead()) { // only the heads get stored in the mapfile @@ -125,20 +125,20 @@ * Walk through the inventory of an arch and write everything into the file. * @param start the container arch whose inventory is to be written */ - private void browseInvObjects(final ArchObject start) { - for (final ArchObject arch : start) { + private void browseInvObjects(final GameObject start) { + for (final GameObject 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 arch <code>GameObject</code> to be written into the map * @param isInventory is 'arch' inside a container? true/false * @return true if arch was written successfully */ - boolean writeMapArch(final ArchObject arch, final boolean isInventory) { - final ArchObject defarch = arch.getDefaultArch(); + boolean writeMapArch(final GameObject arch, final boolean isInventory) { + final GameObject defarch = arch.getDefaultArch(); // Collect all fields to write. final Map<String, String> fields = new HashMap<String, String>(); // String key -> String value Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,7 +24,7 @@ package cfeditor; -import cfeditor.arch.ArchObject; +import cfeditor.arch.GameObject; import cfeditor.map.MapControl; import cfeditor.map.MapModel; import java.awt.BorderLayout; @@ -238,7 +238,7 @@ return listIndex; } - @Nullable public ArchObject getMapTileSelection() { + @Nullable public GameObject getMapTileSelection() { // find the selected entry if one final int index = list.getSelectedIndex(); if (currentSquare == null || index >= list.getModel().getSize() || index < 0 || list.getModel().getSize() <= 0 || mainControl.getCurrentMap() == null) { @@ -254,7 +254,7 @@ /** Insert a tile index of list, this will delete it. */ void deleteIndexFromList(final int index) { if (currentSquare != null && index != -1 && index < list.getModel().getSize()) { - final ArchObject temp = getMapTileSelection(); + final GameObject temp = getMapTileSelection(); final String entry = model.getElementAt(index).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); mainControl.deleteMapArch(num, currentSquare, true, MapModel.JOIN_ENABLE); @@ -279,7 +279,7 @@ void refresh() { final int id; - final ArchObject sel = getMapTileSelection(); + final GameObject sel = getMapTileSelection(); if (sel != null) { id = getMapTileSelection().getMyID(); } else { @@ -314,7 +314,7 @@ postSelect = -1; listCounter = 0; currentSquare = map.getMapModel().getMouseRightPos(); - ArchObject node = map.getMapModel().getMouseRightPosObject(); + GameObject node = map.getMapModel().getMouseRightPosObject(); // Jump to the end of the list for (; node != null && node.getNext() != null; node = node.getNext()) { @@ -363,12 +363,12 @@ * @param archid nodeNr of the highlighted arch (?) * @param indent indentation; 1=minimal indentation */ - public void addInvObjects(final ArchObject node, final int archid, final int indent) { + public void addInvObjects(final GameObject node, final int archid, final int indent) { final String indentStr = Integer.toString(indent); final Iterator it = node.getHead().iterator(); while (it.hasNext()) { - final ArchObject arch = (ArchObject) it.next(); + final GameObject arch = (GameObject) it.next(); if (arch.getMyID() == archid) { postSelect = listCounter; @@ -408,7 +408,7 @@ final int num = Integer.parseInt(entry.substring(0, 10)); final int indent = Integer.parseInt(entry.substring(10, 20)); - ArchObject arch = mainControl.getMapArch(num, currentSquare); + GameObject arch = mainControl.getMapArch(num, currentSquare); //String label; // We must set a disabled Icon (even though we don't want it) Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 16:56:25 UTC (rev 400) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 17:15:52 UTC (rev 401) @@ -24,8 +24,8 @@ package cfeditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.GameObject; +import cfeditor.arch.ArchetypeSet; import cfeditor.filter.AttributeFilter; import cfeditor.map.MapControl; import cfeditor.map.MapModel; @@ -402,12 +402,12 @@ /** * Determine which map-squares need to be redrawn after inserting/deleting - * the given ArchObject. + * the given GameObject. * @param arch the arch that is inserted or deleted * @return a <code>Point</code> array containing the coords of the tiles * which need to be redrawn */ - @Nullable Point[] calcArchRedraw(ArchObject arch) { + @Nullable Point[] calcArchRedraw(GameObject arch) { if (arch == null) { // safety check return null; } @@ -453,7 +453,7 @@ 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; + for (GameObject tmp = arch; num > 0 && tmp != null; num--, tmp = tmp.getMultiNext()) { redraw[num - 1] = new Point(tmp.getMapX(), tmp.getMapY()); } @@ -705,7 +705,7 @@ * "screenshot"-image, false for normal drawing */ public void paintComponent(final Graphics2D grfx, final boolean isSnapshot) { - final ArchObjectStack archlist = mainControl.getArchObjectStack(); + final ArchetypeSet archlist = mainControl.getArchObjectStack(); if (isPickmap) { // draw greenisch background for pickmaps @@ -731,7 +731,7 @@ } else { final Iterator it = _model.getArchObjects(x, y); while (it.hasNext()) { - final ArchObject node = (ArchObject) it.next(); + final GameObject node = (GameObject) it.next(); filter.objectInSquare(node); if (!filter.canShow(node)) { continue; @@ -771,7 +771,7 @@ } // at the end, we have to draw the oversized multipart images on top of the rest for (int i = 0; i < oversizedMultiHeads.size(); i++) { - final ArchObject node = (ArchObject) (oversizedMultiHeads.elementAt(i)); + final GameObject node = (GameObject) (oversizedMultiHeads.elementAt(i)); archlist.getFace(node.getFaceNr()).paintIcon(this, grfx, node.getMapX() * 32 + bOffset, node.getMapY() * 32 + bOffset); } @@ -818,7 +818,7 @@ } else { grfx = backBuffer.getGraphics(); } - final ArchObjectStack archlist = mainControl.getArchObjectStack(); // arch stack + final ArchetypeSet archlist = mainControl.getArchObjectStack(); // arch stack // ---------- draw tile for rectangular view (non-iso) -------------- final CFilterControl filter = mainControl.getFilterControl(); @@ -837,7 +837,7 @@ // loop through all arches on that square and draw em final Iterator it = _model.getArchObjects(x, y); while (it.hasNext()) { - final ArchObject node = (ArchObject) it.next(); + final GameObject node = (GameObject) it.next(); filter.objectInSquare(node); if (!filter.canShow(node)) { @@ -1242,7 +1242,7 @@ } else { // delete the topmost arch (matching the view settings) // on that square and redraw the map - ArchObject tmpArch = mapControl.getBottomArchObject(temp); + GameObject tmpArch = mapControl.getBottomArchObject(temp); if (tmpArch != null) { // go to the topmost arch (end of the list) for (; tmpArch.getNext() != null; tmpArch = tmpArch.getNext()) { @@ -1294,7 +1294,7 @@ needRedraw = insertSelArchToMap(mapLoc, true); // get name of inserted arch (this is display in status bar while dragging) - ArchObject insArch; + GameObject insArch; if ((insArch = mainControl.getArchPanelSelection()) != null) { if (insArch.getObjName() != null && insArch.getObjName().length() > 0) { insertArchName = mainControl.getArchPanelSelection().getObjName(); @@ -1344,7 +1344,7 @@ renderer.setHighlightTile(/*((JComponent)renderer).getGraphics(), */mapLoc.x, mapLoc.y); if (renderer.isPickmap()) { - final ArchObject arch = mapControl.getBottomArchObject(mapLoc); + final GameObject arch = mapControl.getBottomArchObject(mapLoc); if (arch != null) { // an arch of a pickmap was selected mainControl.showArchPanelQuickObject(arch); @@ -1367,7 +1367,7 @@ // delete the topmost arch (matching the view settings) on that square // and redraw the map - ArchObject tmpArch = mapControl.getBottomArchObject(mapLoc); + GameObject tmpArch = mapControl.getBottomArchObject(mapLoc); if (tmpArch != null) { // go to the topmost arch (end of the list) for (; tmpArch.getNext() != null; tmpArch = tmpArch.getNext()) { @@ -1404,7 +1404,7 @@ // this is the arch that would get inserted from pickmap, but it also could // be a default arch (when pickmap has no selection) - ArchObject newarch = mainControl.getArchPanelSelection(); + GameObject newarch = mainControl.getArchPanelSelection(); if (!mainControl.getMainView().isPickmapActive() || mapControl.isPickmap() || (newarch != null && newarch.isDefaultArch())) { @@ -1428,7 +1428,7 @@ // check if there is already an arch of that kind final Iterator it = mapControl.getArchObjects(pos); while (it.hasNext()) { - final ArchObject t = (ArchObject) it.next(); + final GameObject t = (GameObject) it.next(); if (t.getNodeNr() == newarch.getNodeNr() && t.getArchTypNr() == newarch.getArchTypNr()) { insertAllowed = false; // there's a match - don't insert a second one @@ -1450,7 +1450,7 @@ // do nothing } else { // insertion successful, now get redraw info - final ArchObject newdef = mapControl.getTopArchObject(pos); // new inserted default arch + final GameObject newdef = mapControl.getTopArchObject(pos); // new inserted default arch if (newdef != null) { // now we've got the inserted arch, copy the custom stuff from pickmap newdef.setArchText(newarch.... [truncated message content] |
From: <chr...@us...> - 2006-09-24 16:58:35
|
Revision: 400 http://svn.sourceforge.net/gridarta/?rev=400&view=rev Author: christianhujer Date: 2006-09-24 09:56:25 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Renamed ArchObject to GameObject. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchType.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CMapViewBasic.java trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/MultiArchData.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/arch/DuplicateArchException.java trunk/daimonin/src/daieditor/gui/ConnectionView.java trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java trunk/daimonin/src/daieditor/gui/map/MapViewSettings.java trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java trunk/daimonin/src/daieditor/map/ArchOutOfMapBoundsException.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapArchObject.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapModel.java trunk/daimonin/src/daieditor/map/MapModelEvent.java trunk/daimonin/src/daieditor/map/MapSquare.java trunk/daimonin/src/daieditor/map/validation/ArchValidationError.java trunk/daimonin/src/daieditor/map/validation/ArchValidator.java trunk/daimonin/src/daieditor/map/validation/ArchesValidationError.java trunk/daimonin/src/daieditor/map/validation/DelegatingMapValidator.java trunk/daimonin/src/daieditor/map/validation/ValidationError.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerError.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ExitChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ExitError.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingError.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroError.java Added Paths: ----------- trunk/daimonin/src/daieditor/arch/GameObject.java trunk/daimonin/src/daieditor/arch/GameObjectContainer.java trunk/daimonin/src/daieditor/arch/RecursiveGameObjectIterator.java trunk/daimonin/src/daieditor/arch/match/AndGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/AttribGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/GameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/GameObjectMatchers.java trunk/daimonin/src/daieditor/arch/match/MutableNameGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableOrGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NamedGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NotGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/OrGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/TypeNrsGameObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ViewGameObjectMatcherManager.java Removed Paths: ------------- trunk/daimonin/src/daieditor/arch/ArchObject.java trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java trunk/daimonin/src/daieditor/arch/RecursiveArchObjectIterator.java trunk/daimonin/src/daieditor/arch/match/AndArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatchers.java trunk/daimonin/src/daieditor/arch/match/AttribArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableNameArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableOrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NamedArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NotArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/OrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/TypeNrsArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ViewArchObjectMatcherManager.java Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.gui.map.tools.ToolSelectorPane; import java.awt.BorderLayout; import java.util.ArrayList; @@ -132,11 +132,11 @@ } } - @Nullable public ArchObject getArchPanelSelection() { + @Nullable public GameObject getArchPanelSelection() { return selectedPanel != null ? selectedPanel.getArchListObject() : null; } - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { archQuickPanel.showArchPanelQuickObject(arch); } Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.ArchObjectStack; import java.awt.BorderLayout; import java.awt.Component; @@ -148,24 +148,24 @@ * @used */ public void editPopup() { - final ArchObject arch = getArchListObject(); + final GameObject arch = getArchListObject(); CAttribDialog.showAttribDialog(mainControl.getTypeList(), arch, mainControl); } /** - * Get the ArchObject currently selected in the list. - * @return ArchObject or <code>null</code> if no selection + * Get the GameObject currently selected in the list. + * @return GameObject or <code>null</code> if no selection */ - public ArchObject getArchListObject() { + public GameObject getArchListObject() { return getArchListObject(theList.getSelectedIndex()); } /** - * Get the ArchObject from the list. + * Get the GameObject from the list. * @param index Index of selected list element or <code>-1</code> for no selection. - * @return ArchObject or <code>null</code> if <var>index</var> was <code>-1</code> + * @return GameObject or <code>null</code> if <var>index</var> was <code>-1</code> */ - @Nullable private ArchObject getArchListObject(final int index) { + @Nullable private GameObject getArchListObject(final int index) { if (index != -1) { try { return mainControl.getArchObjectStack().getArch((String) theList.getSelectedValue()); @@ -271,7 +271,7 @@ final ArchObjectStack stack = mainControl.getArchObjectStack(); final String archname = (String) value; - final ArchObject arch = stack.getArch(archname); + final GameObject arch = stack.getArch(archname); if (isSelected) { // XXX it is not a good idea to query the selection information at this place. archPanel.setSelectedArch(archname); mainControl.setStatusText(' ' + value.toString() + ' '); Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -93,7 +93,7 @@ * @param archPart the object to show; this may be any part of a multi-part * object */ - void showArchPanelQuickObject(final ArchObject archPart) { + void showArchPanelQuickObject(final GameObject archPart) { if (archPart == null) { if (mainControl.getMainView().isPickmapActive()) { archObjNameText.setText(" -random pick- "); @@ -105,10 +105,10 @@ archTypeText.setText(null); archTileText.setText(null); } else { - final ArchObject arch = archPart.getHead(); + final GameObject arch = archPart.getHead(); String objName = arch.getObjName(); if (objName == null || objName.length() == 0) { - final ArchObject def = arch.getDefaultArch(); + final GameObject def = arch.getDefaultArch(); if (def == null || def == arch) { objName = null; } else if ((objName = def.getObjName()) != null && objName.length() != 0) { Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 16:56:25 UTC (rev 400) @@ -41,7 +41,7 @@ import static daieditor.arch.ArchAttribType.TEXT; import static daieditor.arch.ArchAttribType.TREASURE; import static daieditor.arch.ArchAttribType.ZSPELL; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.NamedObject; import daieditor.arch.NamedObjects; import java.awt.BorderLayout; @@ -142,13 +142,13 @@ private JLabel imagePanel; // panel for object's face (png) - private final ArchObject arch; + private final GameObject arch; - private final ArchObject defarch; + private final GameObject defarch; private CFArchType type; // reference to the type data - // this differs from the ArchObject if the type is undefined + // this differs from the GameObject if the type is undefined private int listNr; // the position of this type in the type list /** The CardLayout for toggling between edit and summary. */ @@ -179,16 +179,16 @@ private final JTextPane summaryTP; /** The arch objects that already are shown, to avoid opening a dialog twice. */ - private static final Map<ArchObject, JDialog> dialogs = new HashMap<ArchObject, JDialog>(); + private static final Map<GameObject, JDialog> dialogs = new HashMap<GameObject, JDialog>(); /** * Wrapper method for the constructor. * This method only creates a CAttribDialog if there's no dialog for the same arch already. * @param atList the list of CF type-data - * @param aobj the ArchObject to be displayed by this dialog + * @param aobj the GameObject to be displayed by this dialog * @param mainControl main control */ - public static void showAttribDialog(final CFArchTypeList atList, final ArchObject aobj, final CMainControl mainControl) { + public static void showAttribDialog(final CFArchTypeList atList, final GameObject aobj, final CMainControl mainControl) { synchronized (dialogs) { if (dialogs.containsKey(aobj)) { dialogs.get(aobj).toFront(); @@ -207,16 +207,16 @@ /** * Constructor, creates the GUI layout. * @param atList the list of CF type-data - * @param aobj the ArchObject to be displayed by this dialog + * @param aobj the GameObject to be displayed by this dialog * @param mainControl main control */ - private CAttribDialog(final CFArchTypeList atList, final ArchObject aobj, final CMainControl mainControl) { + private CAttribDialog(final CFArchTypeList atList, final GameObject aobj, final CMainControl mainControl) { listNr = 0; this.mainControl = mainControl; // reference to the main control typelist = atList; // reference to the typelist - // reference to the ArchObject + // reference to the GameObject arch = aobj.getHead(); defarch = arch.getDefaultArch(); @@ -1026,7 +1026,7 @@ /** * This method is called when the "apply"-button has been * pressed. All the settings from the dialog get - * written into the ArchObject. + * written into the GameObject. * @return true if the settings were applied, false if error occurred */ private boolean applySettings() { @@ -1529,7 +1529,7 @@ private final JTextArea text; // textfield containing the error-text to keep - private final ArchObject arch; // the according arch + private final GameObject arch; // the according arch private final String allErrors; // list of all errors @@ -1541,7 +1541,7 @@ * @param keepB button "keep what is in the textfield" * @param textNew textfield containing the error-text to keep */ - ConfirmErrorsAL(final JDialog dialog, final ArchObject archNew, final String errors, final JButton keepB, final JTextArea textNew) { + ConfirmErrorsAL(final JDialog dialog, final GameObject archNew, final String errors, final JButton keepB, final JTextArea textNew) { arch = archNew; keepButton = keepB; text = textNew; @@ -1581,7 +1581,7 @@ private final CAttribDialog frame; // the entire frame - private final ArchObject arch; // the according arch + private final GameObject arch; // the according arch private String deselected; // the latest deselected item @@ -1592,7 +1592,7 @@ * @param frameNew the attribute-dialog mainframe * @param archNew the arch which has the error to be added */ - TypesBoxAL(final CAttribDialog frameNew, final ArchObject archNew) { + TypesBoxAL(final CAttribDialog frameNew, final GameObject archNew) { frame = frameNew; arch = archNew; ignoreEvent = false; Modified: trunk/daimonin/src/daieditor/CFArchType.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchType.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CFArchType.java 2006-09-24 16:56:25 UTC (rev 400) @@ -382,7 +382,7 @@ } /** - * Create the documentation to this ArchObject-type. + * Create the documentation to this GameObject-type. * @return the full html-text to be (parsed and) displayed */ public String createHtmlDocu() { Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,9 +24,9 @@ package daieditor; -import daieditor.arch.ArchObject; -import daieditor.arch.match.ArchObjectMatchers; -import daieditor.arch.match.NamedArchObjectMatcher; +import daieditor.arch.GameObject; +import daieditor.arch.match.GameObjectMatchers; +import daieditor.arch.match.NamedGameObjectMatcher; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -60,7 +60,7 @@ * Map with arch object matchers and their IDs. * @todo turn static field into instance field */ - private static final Map<String, NamedArchObjectMatcher> archObjectMatchersByIds = new HashMap<String, NamedArchObjectMatcher>(); + private static final Map<String, NamedGameObjectMatcher> archObjectMatchersByIds = new HashMap<String, NamedGameObjectMatcher>(); private static final Spells spells = new Spells(); @@ -74,7 +74,7 @@ private final Map<Integer, String> archTypeNumbers = new HashMap<Integer, String>(); /** List with arch object matchers. */ - private final List<NamedArchObjectMatcher> archObjectMatchers = new ArrayList<NamedArchObjectMatcher>(); + private final List<NamedGameObjectMatcher> archObjectMatchers = new ArrayList<NamedGameObjectMatcher>(); // table with type arch type name as keys (String), and arch type object as values (CFArchType) private final Map<String, CFArchType> archTypeNames = new HashMap<String, CFArchType>(); @@ -92,11 +92,11 @@ private Map<String, List<String>> ignoreListTable; // table with List objects for ignore_lists (value) sorted by name (key) /** - * Check whether the ArchObject is an exit. - * @param arch ArchObject to check + * Check whether the GameObject is an exit. + * @param arch GameObject to check * @return <code>true</code> if <var>arch</var> is an exit, otherwise <code>false</code> */ - public static boolean isExitType(final ArchObject arch) { + public static boolean isExitType(final GameObject arch) { return arch != null && archObjectMatchersByIds.get("exits").isMatching(arch); } @@ -121,7 +121,7 @@ spells.loadSpellsFromXML(documentBuilder); // open ascii filestream to the xml data loadTypesFromXML(); - // read ArchObjectMatchers. FIXME: this is not the best place to do this. + // read GameObjectMatchers. FIXME: this is not the best place to do this. readArchObjectMatchers(); } catch (final ParserConfigurationException e) { System.err.println("Cannot create XML parser:\n" + e.getMessage()); @@ -269,18 +269,18 @@ } private void readArchObjectMatchers() { - final ArchObjectMatchers aom = new ArchObjectMatchers(xpath); + final GameObjectMatchers aom = new GameObjectMatchers(xpath); final String baseDir = CMainControl.getInstance().getArchDefaultFolder() + File.separator + IGUIConstants.CONFIG_DIR; try { - final Document doc = documentBuilder.parse(new File(baseDir, "ArchObjectMatchers.xml")); - for (final Element node : new NodeListIterator<Element>(doc.getElementsByTagName("ArchObjectMatcher"))) { - final NamedArchObjectMatcher archObjectMatcher = aom.parseMatcher(node); + final Document doc = documentBuilder.parse(new File(baseDir, "GameObjectMatchers.xml")); + for (final Element node : new NodeListIterator<Element>(doc.getElementsByTagName("GameObjectMatcher"))) { + final NamedGameObjectMatcher archObjectMatcher = aom.parseMatcher(node); archObjectMatchers.add(archObjectMatcher); if (archObjectMatcher.getID() != null) { archObjectMatchersByIds.put(archObjectMatcher.getID(), archObjectMatcher); } } - System.err.println("Loaded " + archObjectMatchers.size() + " ArchObjectMatchers from 'ArchObjectMatchers.xml'."); + System.err.println("Loaded " + archObjectMatchers.size() + " GameObjectMatchers from 'GameObjectMatchers.xml'."); // TODO: Do something with archObjectMatchers } catch (final SAXException e) { e.printStackTrace(); //TODO @@ -370,7 +370,7 @@ * @return the <code>CFArchType</code> which belongs to this arch, * or the first (misc) type if no match is found. */ - public CFArchType getTypeOfArch(final ArchObject arch) { + public CFArchType getTypeOfArch(final GameObject arch) { // check if the type of the object is present in the definitions for (final CFArchType tmp : archTypeList) { if (tmp.getTypeNr() == arch.getArchTypNr()) { Modified: trunk/daimonin/src/daieditor/CFTreasureListTree.java =================================================================== --- trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-09-24 16:56:25 UTC (rev 400) @@ -25,7 +25,7 @@ package daieditor; import static daieditor.CGUIUtils.getSysIcon; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import java.awt.BorderLayout; import static java.awt.Color.gray; import java.awt.Component; @@ -944,7 +944,7 @@ } } else if (content.getType() != TreasureObj.FOLDER) { // normal arch: display the face icon - final ArchObject arch = CMainControl.getInstance().getArchObjectStack().getArch(content.getName()); + final GameObject arch = CMainControl.getInstance().getArchObjectStack().getArch(content.getName()); if (arch != null) { if (!arch.hasFaceObject()) { setIcon(CMainControl.getInstance().getArchObjectStack().getFace(arch.getFaceObjName())); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 16:56:25 UTC (rev 400) @@ -28,14 +28,14 @@ import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_DEFAULT; import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_KEY; import static daieditor.IGUIConstants.TILE_EDIT_NONE; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.ArchObjectParser; import daieditor.arch.ArchObjectStack; import daieditor.arch.anim.AnimationObjects; import daieditor.arch.face.FaceFacade; import daieditor.arch.face.FaceObjects; -import daieditor.arch.match.MutableOrArchObjectMatcher; -import daieditor.arch.match.ViewArchObjectMatcherManager; +import daieditor.arch.match.MutableOrGameObjectMatcher; +import daieditor.arch.match.ViewGameObjectMatcherManager; import daieditor.gui.MapFileFilter; import daieditor.gui.map.MapCursorControl; import daieditor.gui.map.MapPreviewAccessory; @@ -290,17 +290,17 @@ /** Preferences default for auto validation. */ public static final boolean PREFS_VALIDATOR_AUTO_DEFAULT = false; - /** The ArchObjectMatcher for show only. */ - public MutableOrArchObjectMatcher moaomShow = new MutableOrArchObjectMatcher(true); + /** The GameObjectMatcher for show only. */ + public MutableOrGameObjectMatcher moaomShow = new MutableOrGameObjectMatcher(true); - /** The ArchObjectMatcher for alpha. */ - public MutableOrArchObjectMatcher moaomAlpha = new MutableOrArchObjectMatcher(false); + /** The GameObjectMatcher for alpha. */ + public MutableOrGameObjectMatcher moaomAlpha = new MutableOrGameObjectMatcher(false); - /** The ViewArchObjectMatcherManager for show only. */ - public ViewArchObjectMatcherManager vaommShow = new ViewArchObjectMatcherManager(moaomShow); + /** The ViewGameObjectMatcherManager for show only. */ + public ViewGameObjectMatcherManager vaommShow = new ViewGameObjectMatcherManager(moaomShow); - /** The ViewArchObjectMatcherManager for alpha. */ - public ViewArchObjectMatcherManager vaommAlpha = new ViewArchObjectMatcherManager(moaomAlpha); + /** The ViewGameObjectMatcherManager for alpha. */ + public ViewGameObjectMatcherManager vaommAlpha = new ViewGameObjectMatcherManager(moaomAlpha); private boolean gridVisible; @@ -435,7 +435,7 @@ // load the list with archtype-data from "types.txt" typeList = new CFArchTypeList(); - ArchObject.setTypeList(typeList); // set reference in ArchObject + GameObject.setTypeList(typeList); // set reference in GameObject // now collect all arch you can find in the arch path!! mainView.updateFocus(false); /*MTMT*/ @@ -611,7 +611,7 @@ * @param arch are tiles of this type displayed? * @return true if these tiles are currently displayed */ - public boolean isTileEdit(final ArchObject arch) { + public boolean isTileEdit(final GameObject arch) { return tileEdit == 0 || isTileEdit(arch.getEditType()); } @@ -678,7 +678,7 @@ // access to ArchNodeList // remark: i use before some weird access to it, use this instead when you find it - public void addArchToList(final ArchObject data) { + public void addArchToList(final GameObject data) { archObjectStack.addArchToList(data); } @@ -791,25 +791,25 @@ } // ask arch panel which arches are selectd - public List<ArchObject> getArchPanelSelection() { + public List<GameObject> getArchPanelSelection() { return mainView.getArchPanelSelection(); } // ask arch panel which arch is highlighted - public ArchObject getArchPanelHighlight() { + public GameObject getArchPanelHighlight() { return mainView.getArchPanelHighlight(); } // setup quick view window - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { mainView.showArchPanelQuickObject(arch); } - boolean insertArchToMap(final ArchObject newarch, final String archname, final ArchObject next, final int mapx, final int mapy) { + boolean insertArchToMap(final GameObject newarch, final String archname, final GameObject next, final int mapx, final int mapy) { return currentMap.getMapModel().insertArchToMap(newarch, archname, next, new Point(mapx, mapy)); } - public void deleteMapArch(final ArchObject arch, final boolean refreshMap) { + public void deleteMapArch(final GameObject arch, final boolean refreshMap) { currentMap.getMapModel().deleteMapArch(arch, refreshMap); } @@ -906,7 +906,7 @@ * @param view Only create a view if this is true; * @return map control of new map */ - public MapControl newLevel(final List<ArchObject> objects, final MapArchObject maparch, final boolean view) { + public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final boolean view) { // Create a new level control and set the level view from that if (view) { setStatusText("Creating new map " + maparch.getMapName()); @@ -1225,7 +1225,7 @@ } try { - final List<ArchObject> objects = mapFileDecoder.decodeMapFile(file, mapDir.getAbsolutePath()); // parse mapfile + final List<GameObject> objects = mapFileDecoder.decodeMapFile(file, mapDir.getAbsolutePath()); // parse mapfile final MapArchObject maparch = mapFileDecoder.getMapArch(); // get map arch // go to ArchObjectParser and add the default arch list information to them final MapControl newMap = newLevel(objects, maparch, view); // init the map @@ -1255,7 +1255,7 @@ * Open an attribute dialog window for the specified arch * @param arch attr. window is opened for this arch */ - public void openAttrDialog(final ArchObject arch) { + public void openAttrDialog(final GameObject arch) { if (typeList.isEmpty()) { // types.txt is missing! ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoTypes"); @@ -1285,16 +1285,16 @@ * browse first through the default arch list and attach map arches to it * then browse through the face list and try to find the pictures */ - void collectTempList(final List<ArchObject> objects, final File file) { + void collectTempList(final List<GameObject> objects, final File file) { final StringBuilder noarch = new StringBuilder(); int noarchcount = 0; - final List<ArchObject> tailList = new ArrayList<ArchObject>(); + final List<GameObject> tailList = new ArrayList<GameObject>(); // first: attach our map sucker to a default arch we have loaded //noinspection ForLoopWithMissingComponent - for (final Iterator<ArchObject> it = objects.iterator(); it.hasNext();) { - final ArchObject arch = it.next(); - final ArchObject defarch = archObjectStack.getArch(arch.getArchName()); + for (final Iterator<GameObject> it = objects.iterator(); it.hasNext();) { + final GameObject arch = it.next(); + final GameObject defarch = archObjectStack.getArch(arch.getArchName()); if (defarch == null) { noarch.append(arch.getArchName()).append('\n'); noarchcount++; @@ -1310,7 +1310,7 @@ archObjectParser.expandMulti(arch, tailList); } - for (final ArchObject tail : tailList) { + for (final GameObject tail : tailList) { objects.add(tail); } if (noarchcount > 0) { @@ -1557,7 +1557,7 @@ * @todo look for similarities to {@link #enterTileWanted(int)} and unify. */ public void enterExit() { - ArchObject exit = getMainView().getMapTileSelection(); + GameObject exit = getMainView().getMapTileSelection(); if (exit == null || !CFArchTypeList.isExitType(exit)) { exit = currentMap.getMapModel().getExit(currentMap.getMapViewFrame().getView().getCursorPosition()); } @@ -1897,7 +1897,7 @@ } final StringBuilder title = new StringBuilder("Random fill "); - final ArchObject arch = instance.getArchPanelHighlight(); + final GameObject arch = instance.getArchPanelHighlight(); MapControl pmap = null; /* if we have a single arch, use it as random seed. @@ -2146,7 +2146,7 @@ /** {@inheritDoc} */ public void mapArchesChanged(final MapModelEvent e) { if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { - final ArchObject[] arches = e.getArches(); + final GameObject[] arches = e.getArches(); if (arches != null) { final ErrorCollector errorCollector = new DefaultErrorCollector(); validators.validate(arches, errorCollector); Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.ArchObjectStack; import daieditor.gui.AboutDialog; import daieditor.map.MapControl; @@ -271,10 +271,10 @@ * @return the active arch in the left-side panel. * This can either be a default arch from the archlist, or * a custom arch from a pickmap. - * IMPORTANT: The returned ArchObject is not a clone. A copy + * IMPORTANT: The returned GameObject is not a clone. A copy * must be generated before inserting such an arch to the map. */ - @Nullable public ArchObject getArchPanelHighlight() { + @Nullable public GameObject getArchPanelHighlight() { if ((pickmapActive || archPanel.getArchPanelSelection() == null) && CPickmapPanel.getInstance().isLoadComplete() @@ -284,7 +284,7 @@ if (pmap != null && pmap.getMapViewFrame().isHighlight()) { // now try to get the topmost object - ArchObject arch = null; + GameObject arch = null; final Point cursor = pmap.getMapViewFrame().getView().getCursorPosition(); if (pmap.isPointValid(cursor)) { arch = pmap.getMapModel().getMapSquare(cursor).getFirst(); @@ -307,10 +307,10 @@ * @return the selected arches in the left-side panel. * This can either be default arches, or * custom arches from a pickmap. - * IMPORTANT: The returned ArchObject list contains no clone. A copy + * IMPORTANT: The returned GameObject list contains no clone. A copy * must be generated before inserting such arches to the map. */ - @Nullable public List<ArchObject> getArchPanelSelection() { + @Nullable public List<GameObject> getArchPanelSelection() { if ((pickmapActive || archPanel.getArchPanelSelection() == null) && CPickmapPanel.getInstance().isLoadComplete()) { @@ -324,16 +324,16 @@ // return the arch from the archlist in any case the pickmap is // either not active or didn't work - final ArchObject archObject = archPanel.getArchPanelSelection(); + final GameObject archObject = archPanel.getArchPanelSelection(); if (archObject != null) { - final ArrayList<ArchObject> archPanelList = new ArrayList<ArchObject>(); + final ArrayList<GameObject> archPanelList = new ArrayList<GameObject>(); archPanelList.add(archObject); return archPanelList; } return null; } - public void showArchPanelQuickObject(final ArchObject arch) { + public void showArchPanelQuickObject(final GameObject arch) { archPanel.showArchPanelQuickObject(arch); } @@ -343,12 +343,12 @@ } // show a arch in the arch map panel - void setMapArchPanelObject(final ArchObject arch) { + void setMapArchPanelObject(final GameObject arch) { mapArchPanel.setMapArchPanelObject(arch); } // access mape tile list ... - public void setMapTileList(final MapControl map, final ArchObject selArch) { + public void setMapTileList(final MapControl map, final GameObject selArch) { mapTileList.setMapTileList(map, selArch); } @@ -356,7 +356,7 @@ mapTileList.refresh(); } - public ArchObject getMapTileSelection() { + public GameObject getMapTileSelection() { return mapTileList.getMapTileSelection(); } Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.ArchObjectParser; import daieditor.gui.ConnectionView; import daieditor.gui.ErrorListView; @@ -74,7 +74,7 @@ /** * <code>CMapArchPanel</code> implements the panel that holds information about - * the currently selected ArchObject on the map. + * the currently selected GameObject on the map. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> * @author <a href="mailto:ch...@ri...">Christian Hujer</a> @@ -276,7 +276,7 @@ } public void mapArchAddInv() { - final ArchObject arch = mainControl.getArchPanelHighlight(); + final GameObject arch = mainControl.getArchPanelHighlight(); if (arch == null) { // nothing selected? return; } @@ -285,7 +285,7 @@ // if(arch.isMulti()) // return; - ArchObject inv = mainView.getMapTileSelection(); + GameObject inv = mainView.getMapTileSelection(); if (inv == null) { return; } @@ -293,7 +293,7 @@ // if this is a multi-tail, we put the new arch into the head's inv. inv = inv.getHead(); - final ArchObject invnew; + final GameObject invnew; if (arch.isDefaultArch()) { // create a new copy of a default arch invnew = arch.createArch(); @@ -311,7 +311,7 @@ } public void updateMapTileList() { - ArchObject inv = mainView.getMapTileSelection(); + GameObject inv = mainView.getMapTileSelection(); if (inv == null) { return; } @@ -327,7 +327,7 @@ * is pressed, this function updates the active arch object. * @param activeArch the currently selected arch */ - public void applyArchPanelChanges(final ArchObject activeArch) { + public void applyArchPanelChanges(final GameObject activeArch) { if (activeArch == null) { return; @@ -335,9 +335,9 @@ // If the active arch is part of a multi, the mutli-head's stats // are taken instead: - final ArchObject arch = activeArch.getHead(); + final GameObject arch = activeArch.getHead(); - final ArchObject defarch = arch.getDefaultArch(); + final GameObject defarch = arch.getDefaultArch(); if (defarch == null) { // hm, this should NOT happen return; } @@ -543,7 +543,7 @@ return dirPanel; } - private void applyDirectionChanges(final ArchObject arch, final int dir) { + private void applyDirectionChanges(final GameObject arch, final int dir) { final StringBuilder newText = new StringBuilder(); final String text = archEdit.getText(); final int len = text.length(); @@ -748,7 +748,7 @@ * (bottom right windows) get updated. * @param activeArch the selected arch */ - void setMapArchPanelObject(final ArchObject activeArch) { + void setMapArchPanelObject(final GameObject activeArch) { // reset panel archNameField.setText(""); archFaceText.setText("Image:"); @@ -792,7 +792,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 = activeArch.getHead(); + final GameObject arch = activeArch.getHead(); panelDesktop.setForegroundAt(0, blue); aInvChange.setEnabled(true); @@ -810,7 +810,7 @@ button.setSelected(true); } - final ArchObject defarch = arch.getDefaultArch(); + final GameObject defarch = arch.getDefaultArch(); // no text, we try to set the default text final boolean hasMessage; @@ -881,7 +881,7 @@ specialText.append(" (inv: ").append(invObjects).append(')'); } if (arch.isInContainer()) { - final ArchObject cont = (ArchObject) arch.getContainer(); + final GameObject cont = (GameObject) arch.getContainer(); if (cont.getArchName() != null) { specialText.append(" (env: ").append(cont.getArchName()).append(')'); } else { @@ -913,7 +913,7 @@ if (arch.getFaceObjName() == null) { faceText.append("Image: >no face<"); } else { - final ArchObject.FaceDesc desc = arch.getFaceObjDesc(); + final GameObject.FaceDesc desc = arch.getFaceObjDesc(); faceText.append("Image: ").append(arch.getFaceObjName()).append(" ("); switch (desc) { case FACE_NOT_FOUND: @@ -1003,7 +1003,7 @@ * script is triggered. */ public void editScriptWanted(final int task) { - ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch + GameObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch == null) { return; } @@ -1024,7 +1024,7 @@ /** This method is invoked when the user pressed the "new script" button. */ public void addNewScriptWanted() { - ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch + GameObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch != null) { arch = arch.getHead(); if (arch.addEventScript(eventList, this)) { Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.arch.ArchObjectParser; import daieditor.map.MapArchObject; import java.io.BufferedReader; @@ -33,7 +33,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; -import java.io.Closeable; import java.util.ArrayList; import java.util.List; import org.jetbrains.annotations.Nullable; @@ -53,7 +52,7 @@ public final class CMapFileDecode { /** ArchObjects that are read from the map. */ - private List<ArchObject> objects; + private List<GameObject> objects; /** Contains the map arch (see MapArchObject class). */ private MapArchObject maparch; @@ -70,15 +69,15 @@ * This method returns a list of arches. * @param file mapfile * @param mapDir map directory - * @return first <code>ArchObject</code> in the list + * @return first <code>GameObject</code> in the list * @throws FileNotFoundException in case the requested map file was not found * @throws IOException in case the file couldn't be read or is in wrong format * @todo create a separate exception for the wrong format */ - @NotNull public synchronized List<ArchObject> decodeMapFile(@NotNull final File file, final String mapDir) throws FileNotFoundException, IOException { + @NotNull public synchronized List<GameObject> decodeMapFile(@NotNull final File file, final String mapDir) throws FileNotFoundException, IOException { final BufferedReader myInput = new BufferedReader(new InputStreamReader(new FileInputStream(file), CFileReader.MAP_ENCODING)); try { - objects = new ArrayList<ArchObject>(); + objects = new ArrayList<GameObject>(); // first of all we read the map arch (if that fails we throw an exception) maparch = new MapArchObject(); final String fname; @@ -115,22 +114,22 @@ * included in CF!) * @param myInput input filestream * @param thisLine first line of text, belonging to this new arch - * @return the new parsed <code>ArchObject</code> + * @return the new parsed <code>GameObject</code> * @throws IOException when an I/O-error occured during file reading * @fixme I'm too long, make me shorter - what about a HashMap<String,Integer> and switch/case? - * @todo attributes not relevant during map parsing shouldn't be evaluated here, but in ArchObject / ArchObjectParser instead. + * @todo attributes not relevant during map parsing shouldn't be evaluated here, but in GameObject / ArchObjectParser instead. */ - @Nullable private ArchObject readArch(final BufferedReader myInput, String thisLine) throws IOException { + @Nullable private GameObject readArch(final BufferedReader myInput, String thisLine) throws IOException { boolean msgflag = false; boolean archflag = false; - ArchObject arch = null; + GameObject arch = null; do { thisLine = thisLine.trim(); if (!archflag) { if (thisLine.startsWith("arch ")) { archflag = true; // from now on we are inside an arch - arch = new ArchObject(); // create a new instance + arch = new GameObject(); // create a new instance // if this is still -1 in the post parse, we have no direction command loaded arch.setDirection(-1); Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapModel; import daieditor.map.MapSquare; @@ -67,7 +67,7 @@ final MapArchObject mapArch = mapModel.getMapArchObject(); try { writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), CFileReader.MAP_ENCODING)); - //ArchObject multi; + //GameObject multi; // write map header: map arch mapArch.writeMapArch(writer); // FIXME: It doesn't look like a good idea to mix Push and Pull @@ -77,7 +77,7 @@ 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++) { - for (final ArchObject node : mapModel.getMapSquare(pos)) { + for (final GameObject node : mapModel.getMapSquare(pos)) { // only non multi suckers if (!node.isMulti()) { writeMapArch(node, pos.x, pos.y); @@ -89,7 +89,7 @@ for (final MapSquare square : mapModel) { final int x = square.getMapX(); final int y = square.getMapY(); - for (final ArchObject node : square) { + for (final GameObject node : square) { // search only for heads! if (node.isMulti() && node.isHead()) { // only the heads get stored in the mapfile @@ -106,13 +106,13 @@ /** * Here the map arch gets written into the file. - * @param arch <code>ArchObject</code> to be written into the map + * @param arch <code>GameObject</code> to be written into the map * @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 int x, final int y) throws IOException { - final ArchObject defarch = arch.getDefaultArch(); + private void writeMapArch(final GameObject arch, final int x, final int y) throws IOException { + final GameObject defarch = arch.getDefaultArch(); // ok, we start with the standard parts... this is valid for all types writer.write("arch " + arch.getArchName() + '\n'); @@ -140,7 +140,7 @@ // is conflicting. remove the type from the archtext // FIXME: Isn't the whole stuff about fixing the ArchText something that hasn't directly to do with Map I/O? - // Shouldn't it be somewhere else then, e.g. in ArchObject? + // Shouldn't it be somewhere else then, e.g. in GameObject? final StringBuilder newArchText = new StringBuilder(); for (String line : arch.getArchText().split("\n")) { if (!line.startsWith("type ")) { @@ -173,7 +173,7 @@ writer.write("\n"); } - for (final ArchObject arch1 : arch) { + for (final GameObject arch1 : arch) { writeMapArch(arch1, 0, 0); } Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 16:56:25 UTC (rev 400) @@ -25,7 +25,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.map.MapControl; import daieditor.map.MapSquare; import java.awt.BorderLayout; @@ -133,7 +133,7 @@ * @used */ @ActionMethod public void moveTileTop() { - final ArchObject arch = getMapTileSelection(); + final GameObject arch = getMapTileSelection(); if (arch != null) { arch.moveTop(); } @@ -145,7 +145,7 @@ * @used */ @ActionMethod public void moveTileUp() { - final ArchObject arch = getMapTileSelection(); + final GameObject arch = getMapTileSelection(); if (arch != null) { arch.moveUp(); } @@ -157,7 +157,7 @@ * @used */ @ActionMethod public void moveTileDown() { - final ArchObject arch = getMapTileSelection(); + final GameObject arch = getMapTileSelection(); if (arch != null) { arch.moveDown(); } @@ -169,7 +169,7 @@ * @used */ @ActionMethod public void moveTileBottom() { - final ArchObject arch = getMapTileSelection(); + final GameObject arch = getMapTileSelection(); if (arch != null) { arch.moveBottom(); } @@ -198,7 +198,7 @@ } else if (e.getButton() == BUTTON3 && (e.getModifiers() & SHIFT_MASK) != SHIFT_MASK) { // RMB if (currentSquare != null) { - ArchObject newarch = mainControl.getArchPanelHighlight(); + GameObject newarch = mainControl.getArchPanelHighlight(); String archname = mainControl.getPanelArchName(); if (newarch == null) { newarch = CopyBuffer.getRandomMapArch(CPickmapPanel.getInstance().getCurrentPickmap(), 100); @@ -213,7 +213,7 @@ if (listIndex >= list.getModel().getSize()) { mainControl.insertArchToMap(newarch, archname, null, currentSquare.getMapX(), currentSquare.getMapY()); } else { - final ArchObject entry = (ArchObject) model.getElementAt(listIndex); + final GameObject entry = (GameObject) model.getElementAt(listIndex); mainControl.insertArchToMap(newarch, archname, entry, currentSquare.getMapX(), currentSquare.getMapY()); } @@ -278,20 +278,20 @@ } /** Get the selected arch within the list (currently selected tile). */ - public ArchObject getMapTileSelection() { - return (ArchObject) list.getSelectedValue(); + public GameObject getMapTileSelection() { + return (GameObject) list.getSelectedValue(); } /** - * Delete an ArchObject with a specific list index. - * @param index List index of ArchObject + * Delete an GameObject with a specific list index. + * @param index List index of GameObject */ private void deleteIndexFromList(final int index) { if (index < 0) { return; } // index is -1 for empty lists, so an IndexOutOfBoundsException would be thrown - final ArchObject temp = getMapTileSelection(); - final ArchObject entry = (ArchObject) model.getElementAt(index); + final GameObject temp = getMapTileSelection(); + final GameObject entry = (GameObject) model.getElementAt(index); if (entry != null) { mainControl.deleteMapArch(entry, true); mainView.setMapTileList(mainControl.getCurrentMap(), temp); @@ -321,9 +321,9 @@ /** * Set the display to the currently selected map tile. * @param map Map to get display for (includes selection information) - * @param selArch Selected ArchObject + * @param selArch Selected GameObject */ - public void setMapTileList(final MapControl map, final ArchObject selArch) { + public void setMapTileList(final MapControl map, final GameObject selArch) { list.setEnabled(false); model.removeAllElements(); if (map == null) { @@ -344,7 +344,7 @@ // Now go through the list backwards and put all arches // on the panel in this order if (currentSquare != null) { - for (ArchObject node : currentSquare.reverse()) { + for (GameObject node : currentSquare.reverse()) { // add the node if (node == selArch) { postSelect = listCounter; @@ -381,12 +381,12 @@ /** * Add inventory objects to an arch in the MapTileList recursively. * @param node the arch where the inventory gets added - * @param selArch selected ArchObject + * @param selArch selected GameObject * @return <code>-1</code> if <var>selArch</var> was found, else <var>listCounter</var> of the arch */ - private int addInvObjects(final ArchObject node, final ArchObject selArch) { + private int addInvObjects(final GameObject node, final GameObject selArch) { int selListCounter = -1; - for (ArchObject arch : node.reverse()) { + for (GameObject arch : node.reverse()) { if (arch == selArch) { selListCounter = listCounter; } @@ -427,7 +427,7 @@ public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - ArchObject arch = (ArchObject) value; + GameObject arch = (GameObject) value; // arch==null should not happen, but it *can* happen when the active // window gets changed by user and java is still blitting here Modified: trunk/daimonin/src/daieditor/CMapViewBasic.java =================================================================== --- trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,7 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.gui.map.DefaultLevelRenderer; import daieditor.gui.map.MapUserListener; import daieditor.map.MapControl; @@ -108,7 +108,7 @@ private Map<MapSquare, ValidationError> erraneousMapSquares = new HashMap<MapSquare, ValidationError>(); /** The ArchObjects that are known to contain errors. */ - private Map<ArchObject,ValidationError> erraneousArchObjects = new HashMap<ArchObject,ValidationError>(); + private Map<GameObject,ValidationError> erraneousArchObjects = new HashMap<GameObject,ValidationError>(); /** * Constructs a level view. @@ -406,7 +406,7 @@ mapGrid.clearErrors(); for (ValidationError validationError : errors.getErrors()) { final MapSquare mapSquare = validationError.getMapSquare(); - final ArchObject archObject = validationError.getArchObject(); + final GameObject archObject = validationError.getArchObject(); if (mapSquare != null) { erraneousMapSquares.put(mapSquare, validationError); mapGrid.setError(mapSquare.getMapX(), mapSquare.getMapY()); Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-09-24 16:56:25 UTC (rev 400) @@ -24,8 +24,7 @@ package daieditor; -import daieditor.arch.ArchObject; -import daieditor.arch.ArchObjectParser; +import daieditor.arch.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapControl; import java.io.File; @@ -141,7 +140,7 @@ try { // FIXME: This is somewhat dangerous regarding multithreading final CMapFileDecode decoder = mainControl.getMapFileDecode(); - final List<ArchObject> objects = decoder.decodeMapFile(mapFile, mainControl.getMapDir().getAbsolutePath()); + final List<GameObject> objects = decoder.decodeMapFile(mapFile, mainControl.getMapDir().getAbsolutePath()); final MapArchObject maparch = decoder.getMapArch(); final CMapViewBasic bmapview; @@ -199,7 +198,7 @@ * @param index tab index to insert, -1 means add to the end * @return basic mapview */ - private CMapViewBasic newPickmap(final List<ArchObject> objects, final MapArchObject maparch, final File mapFile, final int index) { + private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile, final int index) { final MapControl map = new MapControl(mainControl, objects, maparch, true, true); map.getMapViewFrame().setAutoscrolls(true); map.setMapFile(mapFile); Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 16:16:50 UTC (rev 399) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 16:56:25 UTC (rev 400) @@ -25,7 +25,7 @@ package daieditor; import static daieditor.CMainControl.rnd; -import daieditor.arch.ArchObject; +import daieditor.arch.GameObject; import daieditor.map.MapArchObject; import daieditor.map.MapControl; import daieditor.map.MapModel; @@ -149,11 +149,11 @@ final Point offset = selRec.getLocation(); mapControl.getMapModel().beginTransaction(); - final List<ArchObject> archesToDelete = new ArrayList<ArchObject>(); + final List<GameObject> archesToDelete = new ArrayList<GameObject>(); for (final MapSquare square : mapControl.getMapViewFrame().getView().getSelectedSquares()) { final int posx = square.getMapX(); final int posy = square.getMapY(); - for (final ArchObject arch : square) { + for (final GameObject arch : square) { // store a clone of the arch in the CopyBuffer // (for multiparts, only the heads get copied into the buffer) // arches that don't match the view settings are ignored! @@ -161,7 +161,7 @@ && arch.isHead() && !arch.isInContainer() && mainControl.isTileEdit(arch)) { // copy this arch - final ArchObject clone = arch.createClone(posx - offset.x, posy - offset.y); + final GameObject clone = arch.createClone(posx - offset.x, posy - offset.y); assert copyMapCtrl != null; copyMa... [truncated message content] |
From: <chr...@us...> - 2006-09-24 16:16:58
|
Revision: 399 http://svn.sourceforge.net/gridarta/?rev=399&view=rev Author: christianhujer Date: 2006-09-24 09:16:50 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Changed default creator name to be the system user name. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 16:13:39 UTC (rev 398) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-09-24 16:16:50 UTC (rev 399) @@ -161,7 +161,7 @@ public static final String PREFS_USERNAME = "username"; /** Preferences default value for username. */ - public static final String PREFS_USERNAME_DEFAULT = "Unknown Combat Dummy"; + public static final String PREFS_USERNAME_DEFAULT = System.getProperty("user.name"); /** Preferences key for language. */ public static final String PREFS_LANGUAGE = "language"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 16:13:44
|
Revision: 398 http://svn.sourceforge.net/gridarta/?rev=398&view=rev Author: christianhujer Date: 2006-09-24 09:13:39 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fixed bogus javadoc. Modified Paths: -------------- trunk/daimonin/src/daieditor/arch/ArchObject.java Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 16:13:00 UTC (rev 397) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 16:13:39 UTC (rev 398) @@ -674,7 +674,7 @@ * 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 + * @param multiX the x-distance of this part to the head part */ public void setMultiX(final int multiX) { this.multiX = multiX; @@ -684,7 +684,7 @@ * 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 + * @param multiY the y-distance of this part to the head part */ public void setMultiY(final int multiY) { this.multiY = multiY; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 16:13:07
|
Revision: 397 http://svn.sourceforge.net/gridarta/?rev=397&view=rev Author: christianhujer Date: 2006-09-24 09:13:00 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fixed bogus calculation of edit types. Modified Paths: -------------- trunk/daimonin/src/daieditor/arch/ArchObject.java Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 16:07:14 UTC (rev 396) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 16:13:00 UTC (rev 397) @@ -306,7 +306,7 @@ editType |= IGUIConstants.TILE_EDIT_CONNECTED; } if ((checkType & IGUIConstants.TILE_EDIT_EXIT) != 0 - && archType == 66 || archType == 41 || archType == 95 || archType == 94 || archType == 69) { + && (archType == 66 || archType == 41 || archType == 95 || archType == 94 || archType == 69)) { // Exit: teleporter/exit/trapdoors/pit/shopmat editType |= IGUIConstants.TILE_EDIT_EXIT; } @@ -317,7 +317,7 @@ editType |= IGUIConstants.TILE_EDIT_TREASURE; } if ((checkType & IGUIConstants.TILE_EDIT_DOOR) != 0 - && archType == 20 || archType == 23 || archType == 26 || archType == 91 || archType == 21 || archType == 24) { + && (archType == 20 || archType == 23 || archType == 26 || archType == 91 || archType == 21 || archType == 24)) { // Door: door/special door/gates + keys editType |= IGUIConstants.TILE_EDIT_DOOR; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 16:07:21
|
Revision: 396 http://svn.sourceforge.net/gridarta/?rev=396&view=rev Author: christianhujer Date: 2006-09-24 09:07:14 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Simplified formatting of ISO date in new map date stamp. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 16:04:02 UTC (rev 395) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 16:07:14 UTC (rev 396) @@ -323,7 +323,7 @@ // default map text: maparch.addText("Creator: " + prefs.get(PREFS_USERNAME, PREFS_USERNAME_DEFAULT) + '\n'); - maparch.addText("Date: " + new SimpleDateFormat("yyyy-MM-dd").format(new Date())); + maparch.addText(String.format("Date: %tF", System.currentTimeMillis())); if (mapType == MapType.GAMEMAP) { mainControl.newLevel(null, maparch, true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 16:04:09
|
Revision: 395 http://svn.sourceforge.net/gridarta/?rev=395&view=rev Author: christianhujer Date: 2006-09-24 09:04:02 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Added map difficulty to new map dialog. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/IGUIConstants.java trunk/daimonin/src/daieditor/messages.properties Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 15:59:21 UTC (rev 394) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 16:04:02 UTC (rev 395) @@ -89,12 +89,15 @@ /** Preferences. */ private static final Preferences prefs = userNodeForPackage(CMainControl.class); - /** The key value used to store the last used level width to INI file. */ + /** The key used to store the last used level width in preferences. */ private static final String DEFAULT_LEVEL_WIDTH_KEY = "NewLevelDialog.mapWidth"; - /** The key value used to store the last used level height to INI file. */ + /** The key used to store the last used level height in preferences. */ private static final String DEFAULT_LEVEL_HEIGHT_KEY = "NewLevelDialog.mapHeight"; + /** The key used to store the last used difficulty in preferences. */ + private static final String DEFAULT_DIFFICULTY_KEY = "NewLevelDialog.difficulty"; + /** The controller of this new level dialog view. */ private final CMainControl mainControl; @@ -130,6 +133,11 @@ */ private final JFormattedTextField mapHeightField = new JFormattedTextField(); + /** + * Textfield for the difficulty of the new map. + */ + private final JFormattedTextField mapDifficultyField = new JFormattedTextField(); + /** JButton for ok. */ private final JButton okButton = new JButton(ACTION_FACTORY.createAction(false, "mapOkay", this)); @@ -160,9 +168,9 @@ // file name panel final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); if (mapType == MapType.PICKMAP) { - fileNamePanel.add(new JLabel("Pickmap Name:")); + fileNamePanel.add(new JLabel("Pickmap Name:")); // TODO cher: i18n/l10n } else { - fileNamePanel.add(new JLabel("File Name:")); + fileNamePanel.add(new JLabel("File Name:")); // TODO cher: i18n/l10n } if (filename != null && filename.length() > 0) { fileNameField.setText(filename); @@ -176,7 +184,7 @@ if (mapType == MapType.GAMEMAP) { // map name panel final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel("Map Name:")); + mapNamePanel.add(new JLabel("Map Name:")); // TODO cher: i18n/l10n mapNamePanel.add(mapNameField); newLevelFromScratchPanel.add(mapNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -185,18 +193,19 @@ newLevelFromScratchPanel.add(mapSizeDefaultCheckbox); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - final JPanel mapSizePanel = new JPanel(new GridLayout(2, 2)); + final JPanel mapSizePanel = new JPanel(new GridLayout(0, 2)); mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == MapType.PICKMAP ? "Pickmap Size" : "Map Size"), IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n - mapSizePanel.add(new JLabel("Width:")); + mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth"))); if (mapType == MapType.PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); } else { + assert mapType == MapType.GAMEMAP; mapWidthField.setValue(prefs.getInt(DEFAULT_LEVEL_WIDTH_KEY, IGUIConstants.DEF_MAPSIZE)); } mapWidthField.setColumns(3); mapSizePanel.add(mapWidthField); - mapSizePanel.add(new JLabel("Height:")); + mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapHeight"))); if (mapType == MapType.PICKMAP) { mapHeightField.setValue(IGUIConstants.DEF_PICKMAP_HEIGHT); } else { @@ -204,6 +213,11 @@ } mapHeightField.setColumns(3); mapSizePanel.add(mapHeightField); + if (mapType == MapType.GAMEMAP) { + mapDifficultyField.setValue(prefs.getInt(DEFAULT_DIFFICULTY_KEY, IGUIConstants.DEF_MAPDIFFICULTY)); + mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapDifficulty"))); + mapSizePanel.add(mapDifficultyField); + } newLevelFromScratchPanel.add(mapSizePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -295,6 +309,14 @@ // set map name if (mapType == MapType.GAMEMAP) { maparch.setMapName(mapName); + try { + maparch.setDifficulty((Integer) mapDifficultyField.getValue()); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDifficultyNotANumber" : "newMapDifficultyOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapDifficultyField.requestFocus(); + return false; + } } else if (mapType == MapType.PICKMAP) { maparch.setMapName("pickmap"); } Modified: trunk/daimonin/src/daieditor/IGUIConstants.java =================================================================== --- trunk/daimonin/src/daieditor/IGUIConstants.java 2006-09-24 15:59:21 UTC (rev 394) +++ trunk/daimonin/src/daieditor/IGUIConstants.java 2006-09-24 16:04:02 UTC (rev 395) @@ -44,6 +44,11 @@ */ int DOCU_VERSION = 1; + /** + * Default difficulty for newly created maps. + */ + int DEF_MAPDIFFICULTY = 1; + int TILE_ISO_XLEN = 48; int TILE_ISO_XLEN2 = 24; Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-09-24 15:59:21 UTC (rev 394) +++ trunk/daimonin/src/daieditor/messages.properties 2006-09-24 16:04:02 UTC (rev 395) @@ -1,4 +1,4 @@ -# Warning: This file MUST be ISO-8859-1 +#mapDifficultyField.getValue()); Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding mainWindow.title=Gridarta for Daimonin {0} @@ -144,6 +144,10 @@ newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! newMapNoName.title=Map Name is missing newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. +newMapDifficultyNotANumber.title=Illegal Value +newMapDifficultyNotANumber.message=Map difficulty must be a numerical integer value. +newMapDifficultyOutOfRange.title=Illegal Value +newMapDifficultyOutOfRange.message=Map difficulty must be greater or equal 1 and less or equal 110 errCantLoadFaceTree.title=Cannot Load Face Tree errCantLoadFaceTree.message=<html>Can''t load face tree.<br>You won''t be able to easily choose faces from a tree.<br>To change this, you need either a version of <code>arch/</code> that contains <code>arch/dev/editor/conf/facetree</code>,<br>or you have to collect arches yourself.</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 15:59:25
|
Revision: 394 http://svn.sourceforge.net/gridarta/?rev=394&view=rev Author: akirschbaum Date: 2006-09-24 08:59:21 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Rename function names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapViewBasic.java Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 15:51:12 UTC (rev 393) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-24 15:59:21 UTC (rev 394) @@ -559,7 +559,7 @@ boolean isPickmap(); - void PaintHighlightTile(Graphics grfx, int x, int y); + void paintHighlightTile(Graphics grfx, int x, int y); void modelChanged(); @@ -794,7 +794,7 @@ } if (highlightOn && mapMouseRightPos.y != -1 && mapMouseRightPos.x != -1 && !isSnapshot) { // Highlight the selected area - PaintHighlightArea(grfx); + paintHighlightArea(grfx); } @@ -890,15 +890,15 @@ } // if tile is highlighted, draw the highlight icon - PaintHighlightTile(grfx, x, y); + paintHighlightTile(grfx, x, y); } public void setHighlightTile(final int x, final int y) { if (isPickmap()) { - PaintHighlightTile(getGraphics(), x, y); + paintHighlightTile(getGraphics(), x, y); } else { - PaintHighlightTile(backBuffer.getGraphics(), x, y); + paintHighlightTile(backBuffer.getGraphics(), x, y); repaint(); } } @@ -910,7 +910,7 @@ * @param y map coords of the square * @param grfx graphics context to draw in */ - public void PaintHighlightTile(final Graphics grfx, final int x, final int y) { + public void paintHighlightTile(final Graphics grfx, final int x, final int y) { // if tile is highlighted, draw the highlight icon: if (highlightOn && mapMouseRightPos.y != -1 && mapMouseRightPos.x != -1) { // get rect. coords of highlighted area: top(left) and bot(tomright) corner @@ -930,7 +930,7 @@ * Painting the highlited (selected) area on the map * @param grfx graphics context of mapview */ - public void PaintHighlightArea(final Graphics grfx) { + public void paintHighlightArea(final Graphics grfx) { final int signX, signY; // sign = "direction" of the dragging offset if (mapMouseRightOff.x > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 15:51:17
|
Revision: 393 http://svn.sourceforge.net/gridarta/?rev=393&view=rev Author: akirschbaum Date: 2006-09-24 08:51:12 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Remove unused variables. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMapArchPanel.java Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 15:42:45 UTC (rev 392) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-09-24 15:51:12 UTC (rev 393) @@ -359,7 +359,6 @@ * @param listNode node of the treasureone list */ private void recalculateChances(final TreasureTreeNode listNode) { - final int cnum = listNode.getSiblingCount() - 1; // number of child-objects in the treasureone list int sumChances = 0; // sum of chances // calculate the sum of all chances Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 15:42:45 UTC (rev 392) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 15:51:12 UTC (rev 393) @@ -146,8 +146,6 @@ private final JButton submitMultiChange; - private JButton jumpChange; - private final JButton invChange; private final JButton attrWin; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 15:42:50
|
Revision: 392 http://svn.sourceforge.net/gridarta/?rev=392&view=rev Author: akirschbaum Date: 2006-09-24 08:42:45 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Remove unused variable. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 15:41:22 UTC (rev 391) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 15:42:45 UTC (rev 392) @@ -98,7 +98,6 @@ // retrieve the spell data from the xml 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'."); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 15:41:25
|
Revision: 391 http://svn.sourceforge.net/gridarta/?rev=391&view=rev Author: akirschbaum Date: 2006-09-24 08:41:22 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Remove unused variable. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 15:32:32 UTC (rev 390) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-09-24 15:41:22 UTC (rev 391) @@ -84,7 +84,6 @@ CArchPanelPan(final CArchPanel controlPanel, final CMainControl mainControl) { this.mainControl = mainControl; archPanel = controlPanel; - final int listcounter = 0; comboCounter = 0; setLayout(new BorderLayout()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 15:32:40
|
Revision: 390 http://svn.sourceforge.net/gridarta/?rev=390&view=rev Author: christianhujer Date: 2006-09-24 08:32:32 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Added a checkbox to the dialog for new maps that needs to be unchecked first before creating maps of non-standard size. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 15:27:44 UTC (rev 389) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-09-24 15:32:32 UTC (rev 390) @@ -44,6 +44,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; +import javax.swing.JCheckBox; import javax.swing.border.CompoundBorder; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; @@ -67,6 +68,14 @@ /** ActionFactory. */ private static final ActionFactory ACTION_FACTORY = getFactory("daieditor"); + /** + * Whether to use the default map size. + * @val true override default map size + * @val false use default map size + * @default true + */ + private boolean mapSizeDefault = true; + /** Map types. */ public enum MapType { @@ -92,13 +101,33 @@ /** type of map to create: pickmap or normal map? */ private final MapType mapType; - // Dialog UI Components + /** + * Textfield for the name of the map. + * This is only used for {@link MapType#GAMEMAP} to determine the title of the new map. + * The filename of the new map is unset and will be specified when the user saves the map for the first time. + */ private final JTextField mapNameField = new JTextField(16); + /** + * Textfield for the filename of the map. + * This is only used for {@link MapType#PICKMAP} to determine the filename of the new pickmap. + * The title of the pickmap will be set to "pickmap" always. + */ private final JTextField fileNameField = new JTextField(16); + /** + * Checkbox to set whether the default width / height should be overridden. + */ + private final JCheckBox mapSizeDefaultCheckbox = new JCheckBox(ACTION_FACTORY.createToggle(false, "mapSizeDefault", this)); + + /** + * Textfield for the width of the new map. + */ private final JFormattedTextField mapWidthField = new JFormattedTextField(); + /** + * Textfield for the height of the new map. + */ private final JFormattedTextField mapHeightField = new JFormattedTextField(); /** JButton for ok. */ @@ -153,9 +182,12 @@ newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); } + newLevelFromScratchPanel.add(mapSizeDefaultCheckbox); + newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); + final JPanel mapSizePanel = new JPanel(new GridLayout(2, 2)); mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == MapType.PICKMAP ? "Pickmap Size" : "Map Size"), - IGUIConstants.DIALOG_BORDER)); + IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n mapSizePanel.add(new JLabel("Width:")); if (mapType == MapType.PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); @@ -203,35 +235,40 @@ // Get and validate the width final int width; - try { - width = (Integer) mapWidthField.getValue(); - } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); - mapWidthField.requestFocus(); - return false; - } - if (width < 1) { - ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); - mapWidthField.requestFocus(); - return false; - } + final int height; + if (mapSizeDefault) { + try { + width = (Integer) mapWidthField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapWidthField.requestFocus(); + return false; + } + if (width < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapWidthField.requestFocus(); + return false; + } - // Get and validate the height - final int height; - try { - height = (Integer) mapHeightField.getValue(); - } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); - mapHeightField.requestFocus(); - return false; + // Get and validate the height + try { + height = (Integer) mapHeightField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapHeightField.requestFocus(); + return false; + } + if (height < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapHeightField.requestFocus(); + return false; + } + } else { + width = IGUIConstants.DEF_MAPSIZE; + height = IGUIConstants.DEF_MAPSIZE; } - if (height < 1) { - ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); - mapHeightField.requestFocus(); - return false; - } maparch.setMapSize(new Size2D(width, height)); @@ -290,6 +327,7 @@ // TODO: localize pane.mapNameField.setText("Unnamed Map"); + pane.setMapSizeDefault(true); dialog.setVisible(true); pane.mapNameField.selectAll(); @@ -298,4 +336,24 @@ pane.mapHeightField.selectAll(); } + /** + * Set whether to override the default map size. + * @return mapSizeDefault <code>true</code> if the user wants to specify her own map size, otherwise <code>false</code> + */ + public boolean isMapSizeDefault() { + return mapSizeDefault; + } + + /** + * Set whether to override the default map size. + * @param mapSizeDefault <code>true</code> if the user wants to specify her own map size, otherwise <code>false</code> + */ + public void setMapSizeDefault(final boolean mapSizeDefault) { + mapSizeDefaultCheckbox.setSelected(mapSizeDefault); + //System.err.println(mapSizeDefaultCheckbox.isSelected() + " " + mapSizeDefault); + this.mapSizeDefault = mapSizeDefault; + mapWidthField.setEnabled(!mapSizeDefault); + mapHeightField.setEnabled(!mapSizeDefault); + } + } // class CNewMapDialog Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-09-24 15:27:44 UTC (rev 389) +++ trunk/daimonin/src/daieditor/messages.properties 2006-09-24 15:32:32 UTC (rev 390) @@ -218,6 +218,7 @@ mapOkay.text=Ok mapRestore.text=Restore mapCancel.text=Cancel +mapSizeDefault.text=default map size (24 \xD7 24) mapErrorUnsaved.title=Missing File Path mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! mapErrorPath.title=Error creating Map Path Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-09-24 15:27:44 UTC (rev 389) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-09-24 15:32:32 UTC (rev 390) @@ -79,6 +79,7 @@ mapOkay.text=Ok mapRestore.text=Zur\xFCcksetzen mapCancel.text=Abbrechen +mapSizeDefault.text=Standardgr\xF6\xDFe (24 \xD7 24) mapErrorUnsaved.title=Fehlender Dateipfad mapErrorUnsaved=Kann ungespeicherte Karte nicht verbinden.\nDie Karte muss zuerst im Kartenverzeichnis gespeichert werden! mapErrorPath.title=Fehler beim Erzeugen des Pfades This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 15:27:59
|
Revision: 389 http://svn.sourceforge.net/gridarta/?rev=389&view=rev Author: akirschbaum Date: 2006-09-24 08:27:44 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Some unification changes. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/MultiPositionData.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-24 15:27:44 UTC (rev 389) @@ -159,7 +159,7 @@ * @param defaobj the default ArchObject of 'arch' * @param mainControl main control */ - CAttribDialog(final CFArchTypeList atList, final ArchObject aobj, final ArchObject defaobj, final CMainControl mainControl) { + CAttribDialog(final CFArchTypeList atList, final ArchObject aobj, final CMainControl mainControl) { super(mainControl.getMainView(), "CF Attribute Dialog", false); // when close-box is selected, execute the 'closeDialog' method and nothing else @@ -179,13 +179,8 @@ CAttribDialog.setDefaultBounds(); // set width/height etc // reference to the ArchObject - if (aobj.isTail()) { - arch = aobj.getHead(); - defarch = this.mainControl.getArchObjectStack().getArch(arch.getNodeNr()); - } else { - arch = aobj; - defarch = defaobj; // reference to the default ArchObject - } + arch = aobj.getHead(); + defarch = arch.getDefaultArch(); /* set frame icon if (arch.getFaceNr() >= 0) { Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-24 15:27:44 UTC (rev 389) @@ -1019,7 +1019,7 @@ // types.txt is missing! showMessage("File Missing", "The definitions-file \"types.txt\" is missing! The\nattribute interface doesn't work without that file."); } else if (arch != null && arch.getNodeNr() != -1) { - final CAttribDialog dwin = new CAttribDialog(typelist, arch, getArch(arch.getNodeNr()), this); + final CAttribDialog dwin = new CAttribDialog(typelist, arch, this); } } Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-24 15:27:44 UTC (rev 389) @@ -267,7 +267,7 @@ } // no single tile? - if (arch.isMulti() || arch.isTail()) { + if (arch.isMulti()) { return; } @@ -776,7 +776,7 @@ } // check for multi tile - if (arch.isMulti() || arch.isTail()) { + if (arch.isMulti()) { // multi: print size archTileText.setText("Tile: " + arch.getSizeX() + "x" + arch.getSizeY()); } else { Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 15:27:44 UTC (rev 389) @@ -364,18 +364,17 @@ for (ArchObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { final ArchObject newTail = mainControl.getArchObjectStack().newArchObjectInstance(tmp.getNodeNr()); - final int mapx = pos.x + newTail.getMultiX(); - final int mapy = pos.y + newTail.getMultiY(); + final Point mapPos = new Point(pos.x + newTail.getMultiX(), pos.y + newTail.getMultiY()); - if (!mapControl.isPointValid(mapx, mapy)) { + if (!mapControl.isPointValid(mapPos)) { // outside map return; } newTail.setMultiX(tmp.getMultiX()); newTail.setMultiY(tmp.getMultiY()); - newTail.setMapX(mapx); - newTail.setMapY(mapy); + newTail.setMapX(mapPos.x); + newTail.setMapY(mapPos.y); newHead.addTailPart(newTail); } Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-24 15:27:44 UTC (rev 389) @@ -566,7 +566,7 @@ final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); // default arch // is it a multi head? - if (defarch != null && defarch.isMulti() && !arch.isMulti()) { + if (defarch != null && defarch.isMulti() && arch.getMultiRefCount() <= 1) { // we have a multi head and need to insert his tail now // do insertion for all non-head parts of the multi Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 15:27:44 UTC (rev 389) @@ -129,7 +129,7 @@ archTypeText.setText(mainControl.getTypeList().getArchTypeName(arch.getArchTypNr()) + " (" + arch.getArchTypNr() + ')'); - if (arch.getMultiRefCount() > 0) { + if (arch.isMulti()) { archTileText.setText("<html><span style=\"color:green;\"> multi</span> (" + arch.getMultiRefCount() + " parts) (" + arch.getSizeX() + ',' + arch.getSizeY() + ")</html>"); } else { archTileText.setText("single"); Modified: trunk/daimonin/src/daieditor/MultiPositionData.java =================================================================== --- trunk/daimonin/src/daieditor/MultiPositionData.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/daimonin/src/daieditor/MultiPositionData.java 2006-09-24 15:27:44 UTC (rev 389) @@ -46,7 +46,7 @@ public static final int Y_DIM = 16; - private static MultiPositionData instance; + private static MultiPositionData instance = null; /** array with position data */ private final int[][] data; Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 15:27:44 UTC (rev 389) @@ -315,7 +315,7 @@ final int replaceListSize = replaceList == null ? 0 : replaceList.size(); for (MapSquare square : entireMap ? mapControl.getMapModel() : mapViewIFrame.getView().getSelectedSquares()) { for (ArchObject node : square) { - if ((!node.isMulti() || node.isHead()) + if (!node.isMulti() && (matchCriteria == MATCH_ARCH_NAME && node.getArchName() != null && node.getArchName().equalsIgnoreCase(matchString) || matchCriteria == MATCH_OBJ_NAME && node.getBestName().equalsIgnoreCase(matchString))) { if (replaceListSize > 0 && !deleteOnly) { Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-24 14:41:10 UTC (rev 388) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-24 15:27:44 UTC (rev 389) @@ -560,6 +560,7 @@ // is it a multi head? if (defarch != null && defarch.isMulti() && arch.getMultiRefCount() <= 1) { + // we have a multi head and need to insert his tail now // do insertion for all non-head parts of the multi for (ArchObject oldPart = defarch.getMultiNext(); oldPart != null; oldPart = oldPart.getMultiNext()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 14:41:31
|
Revision: 388 http://svn.sourceforge.net/gridarta/?rev=388&view=rev Author: akirschbaum Date: 2006-09-24 07:41:10 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fix MultiArchData implementation (daieditor). Also fixes multiple problems with multi-part objects. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/MultiArchData.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/arch/ArchObject.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/daimonin/src/daieditor/messages.properties Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-09-24 14:41:10 UTC (rev 388) @@ -130,7 +130,7 @@ archTypeText.setText(mainControl.getTypeList().getArchTypeName(arch.getArchTypNr()) + " (" + arch.getArchTypNr() + ')'); if (arch.getMultiRefCount() > 0) { - archTileText.setText("<html><span style=\"color:green;\"> multi</span> (" + (arch.getMultiRefCount() + 1) + " parts) (" + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) + ',' + (arch.getRefMaxY() - arch.getRefMaxMY() + 1) + ")</html>"); + archTileText.setText("<html><span style=\"color:green;\"> multi</span> (" + arch.getMultiRefCount() + " parts) (" + arch.getSizeX() + ',' + arch.getSizeY() + ")</html>"); } else { archTileText.setText("single"); } Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-09-24 14:41:10 UTC (rev 388) @@ -217,11 +217,7 @@ typelist = atList; // reference to the typelist // reference to the ArchObject - if (aobj.isMulti() && aobj.getMapMultiHead() != null) { - arch = aobj.getMapMultiHead(); - } else { - arch = aobj; - } + arch = aobj.getHead(); defarch = arch.getDefaultArch(); // check if the type of the object is present in the definitions Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-09-24 14:41:10 UTC (rev 388) @@ -282,8 +282,8 @@ } // no single tile? - // if(arch.getMultiRefCount()>0 || arch.isReferenced()) - // return; +// if(arch.isMulti()) +// return; ArchObject inv = mainView.getMapTileSelection(); if (inv == null) { @@ -291,9 +291,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()) { @@ -319,9 +317,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(); mainControl.getMainView().setMapTileList(mainControl.getCurrentMap(), inv); } @@ -339,12 +335,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 = arch.getDefaultArch(); if (defarch == null) { // hm, this should NOT happen @@ -801,12 +792,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(); panelDesktop.setForegroundAt(0, blue); aInvChange.setEnabled(true); @@ -913,9 +899,9 @@ } // check for multi tile - if (arch.getMultiRefCount() > 0 || arch.isReferenced()) { + if (arch.isMulti()) { // multi: print size - typeText.append(" [").append(arch.getRefMaxX() - arch.getRefMaxMX() + 1).append('x').append(arch.getRefMaxY() - arch.getRefMaxMY() + 1).append(']'); + typeText.append(" [").append(arch.getSizeX()).append('x').append(arch.getSizeY()).append(']'); } else { // single typeText.append(" [single]"); @@ -1018,13 +1004,14 @@ */ 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) { + return; } + arch = arch.getHead(); + // check for a valid selection in the event list - if (arch != null && eventList.getModel() != null && eventList.getModel().getSize() > 0 - && eventList.getSelectedIndex() >= 0) { + if (eventList.getModel() != null && eventList.getModel().getSize() > 0 && eventList.getSelectedIndex() >= 0) { // there final int index = eventList.getSelectedIndex(); if (index >= 0) { @@ -1039,9 +1026,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(); if (arch.addEventScript(eventList, this)) { updateMapTileList(); } Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-09-24 14:41:10 UTC (rev 388) @@ -79,7 +79,7 @@ for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { for (final ArchObject node : mapModel.getMapSquare(pos)) { // only non multi suckers - if (node.getMapMultiHead() == null && node.getMultiRefCount() == 0) { + if (!node.isMulti()) { writeMapArch(node, pos.x, pos.y); } } // node @@ -91,19 +91,7 @@ final int y = square.getMapY(); for (final ArchObject node : square) { // search only for heads! - if (node.getMultiRefCount() > 0 && node.getMapMultiHead() == 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; - writer.write("More\n"); - - }*/ - + if (node.isMulti() && node.isHead()) { // only the heads get stored in the mapfile // (that's much more efficient) writeMapArch(node, x, y); Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-09-24 14:41:10 UTC (rev 388) @@ -357,7 +357,7 @@ sIndex = listCounter - 1; // select this tile foundSIndex = true; // this is it - don't select any other tile } - final int tmpSelect = addInvObjects(node.isReferenced() && node.getMapMultiHead() != null ? node.getMapMultiHead() : node, selArch); + final int tmpSelect = addInvObjects(node.getHead(), selArch); if (postSelect == -1 && tmpSelect != -1) { postSelect = tmpSelect; } @@ -432,9 +432,7 @@ // arch==null should not happen, but it *can* happen when the active // window gets changed by user and java is still blitting here if (arch != null) { - if (arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); - } + arch = arch.getHead(); if (!arch.hasDefaultArch()) { setIcon(CMainControl.noarchTileIcon); @@ -448,9 +446,7 @@ // In the map-tile-window the object names are displayed // next to the icons - 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/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-09-24 14:41:10 UTC (rev 388) @@ -158,7 +158,7 @@ // (for multiparts, only the heads get copied into the buffer) // arches that don't match the view settings are ignored! if ((mode == Mode.DO_CUT || mode == Mode.DO_COPY) - && !arch.isReferenced() && !arch.isInContainer() + && arch.isHead() && !arch.isInContainer() && mainControl.isTileEdit(arch)) { // copy this arch final ArchObject clone = arch.createClone(posx - offset.x, posy - offset.y); @@ -171,8 +171,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 == Mode.DO_CLEAR || !arch.isMulti() || arch.getMultiRefCount() > 0 - || arch.getMapMultiHead() != null && arch.getMultiRefX() >= 0 && arch.getMultiRefY() >= 0) { + if (mode == Mode.DO_CLEAR || (arch.getMultiX() >= 0 && arch.getMultiY() >= 0)) { archesToDelete.add(arch); } } @@ -208,8 +207,7 @@ for (final ArchObject arch : square) { if (!arch.isMulti()) { // read arch from buffer and stick in on the map - final ArchObject clone = arch.createClone(pos.x, pos.y); - mapControl.getMapModel().addArchObjectToMap(clone, false); + addArchToMap(mapControl, arch, pos, true, false); } } } @@ -221,23 +219,8 @@ pos.translate(square.getMapX(), square.getMapY()); if (mapControl.isPointValid(pos)) { // paste the archs if on the map: for (final ArchObject arch : square) { - 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.getMapModel().addArchToMap(arch.getArchName(), pos, true, false)) { - // third we chop off the default head and attach our clone - final ArchObject oldHead = mapControl.getMapModel().getMapSquare(pos).getLast(); - if (oldHead != null && oldHead.hasSameDefaultArch(arch)) { - oldHead.getContainer().replace(oldHead, clone); - clone.setTailList(oldHead.getTailList()); // set link to tail - for (ArchObject tmp = clone.getMapMultiNext(); tmp != null; tmp = tmp.getMapMultiNext()) { - tmp.setMapMultiHead(clone); // all tails point to new head - } - } else { - System.err.println("Error in CopyBuffer.paste(): Couldn't find multi-head after insertion!"); - } - } + if (arch.isMulti()) { + addArchToMap(mapControl, arch, pos, true, false); } } } @@ -290,13 +273,7 @@ continue; } final ArchObject arch = archList.get(rnd.nextInt(archList.size())); - final boolean isDefarch = arch.isDefaultArch(); - if (isDefarch) { - mapControl.getMapModel().addArchToMap(mainControl.getPanelArchName(), p, false, fillBelow); - } else { - // insert arch-clone from pickmap - mapControl.getMapModel().addArchObjectToMap(arch.createClone(p.x, p.y), fillBelow); - } + addArchToMap(mapControl, arch, p, false, fillBelow); } mapControl.getMapModel().endTransaction(); } @@ -320,7 +297,7 @@ for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { for (ArchObject node : map.getMapSquare(pos)) { // only non multi suckers - if (node.getMapMultiHead() == null && node.getMapMultiNext() == null || node.getMultiRefCount() > 0 && node.getMapMultiNext() != null) + if (!node.isTail()) { count++; } @@ -378,7 +355,7 @@ final List<ArchObject> objects = new ArrayList<ArchObject>(max); for (final MapSquare mapSquare : mapSquares) { for (final ArchObject node : mapSquare) { - if (node.getMapMultiHead() == null && node.getMapMultiNext() == null || node.getMultiRefCount() > 0 && node.getMapMultiNext() != null) { + if (!node.isTail()) { objects.add(node); } } @@ -402,7 +379,7 @@ * @param startY starting y-coord for floodfill * @param archList ArchObject list to fill with */ - private static void floodfill(final MapControl mapControl, final int startX, final int startY, final List<ArchObject> archList) { + private void floodfill(final MapControl mapControl, final int startX, final int startY, final List<ArchObject> archList) { // Algorithmic notes: // This algorithm replaces the recursive algorithm used before. This algorithm might not look as efficient as the previous recursive one, but // it is. Especially, this algorithm uses very low memory (mapsize bytes) and the stack amount used is very low and constant. @@ -434,12 +411,7 @@ if (mapControl.isPointValid(p) && mapControl.getMapModel().getMapSquare(p).isEmpty()) { area[p.x][p.y] = WAS_EMPTY; final ArchObject arch = archList.get(rnd.nextInt(archList.size())); - final boolean isDefArch = arch.isDefaultArch(); - if (isDefArch) { - mapControl.getMapModel().addArchToMap(arch.getArchName(), p, false, false); - } else { - mapControl.getMapModel().addArchObjectToMap(arch.createClone(p.x, p.y), false); - } + addArchToMap(mapControl, arch, p, false, false); try { if (area[p.x - 1][p.y] == NOT_LOOKED_AT) { area[p.x - 1][p.y] = BORDER; @@ -483,4 +455,33 @@ return copyMapCtrl; } + /** + * 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 boolean allowDouble, final boolean fillBelow) { + if (arch.isDefaultArch()) { + mapControl.getMapModel().addArchToMap(arch.getArchName(), pos, allowDouble, fillBelow); + } else { + final ArchObject newHead = arch.createClone(pos.x, pos.y); + for (ArchObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + final Point mapPos = new Point(pos.x + tmp.getMultiX(), pos.y + tmp.getMultiY()); + + if (!mapControl.isPointValid(mapPos)) { + // outside map + return; + } + + final ArchObject newTail = tmp.createClone(mapPos.x, mapPos.y); + newHead.addTailPart(newTail); + } + + mapControl.getMapModel().addArchObjectToMap(newHead, fillBelow); + for (ArchObject tmp = newHead.getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + mapControl.getMapModel().addArchObjectToMap(tmp, fillBelow); + mainControl.getArchObjectParser().postParseMapArch(tmp, mapControl.getActiveEditType()); + } + } + } + } // class CopyBuffer Modified: trunk/daimonin/src/daieditor/MultiArchData.java =================================================================== --- trunk/daimonin/src/daieditor/MultiArchData.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/MultiArchData.java 2006-09-24 14:41:10 UTC (rev 388) @@ -2,6 +2,7 @@ * Daimonin 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) * @@ -26,157 +27,126 @@ import daieditor.arch.ArchObject; import java.util.ArrayList; -import java.util.List; -import java.io.Serializable; -import org.jetbrains.annotations.Nullable; /** - * 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 implements Serializable { +public final class MultiArchData { - /** Serial Version. */ - private static final long serialVersionUID = 1L; + /** + * Maximum coordinate of any part; it is never negative. + */ + private int maxX = 0; - 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 maxY = 0; - 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 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 private int multiPartNr; // the part number for this tile - private boolean isLowestPart; // lowest part of all multi tiles - - private ArchObject head; // multi tile, this is the head - - private List<ArchObject> tailList; // list of tail ArchObjects - - public List<ArchObject> getTailList() { - if (tailList == null) { - tailList = new ArrayList<ArchObject>(); - } - return tailList; - } - - public void setTailList(final List<ArchObject> tails) { - tailList = tails; - } - - /** Constructor: Initializing the data */ - public MultiArchData() { - } - /** - * @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.refx = refx; // multi tile: offset pos from head - clone.refy = refy; // sic! - 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 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() { - if (tailList == null) { - return 0; - } - return tailList.size(); + return parts.size(); } - public int getRefMaxx() { - return refmaxx; + /** + * 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 void setRefMaxx(final int value) { - refmaxx = value; + /** + * 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 int getRefMaxxm() { - return refmaxxm; + /** + * 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 void setRefMaxxm(final int value) { - refmaxxm = value; + /** + * 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 int getRefMaxy() { - return refmaxy; + /** + * 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 void setRefMaxy(final int value) { - refmaxy = value; + /** + * 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 int getRefMaxym() { - return refmaxym; - } - - public void setRefMaxym(final int value) { - refmaxym = value; - } - public int getMultiShapeID() { return multiShapeID; } @@ -185,31 +155,52 @@ this.multiShapeID = multiShapeID; } - public int getMultiPartNr() { - return multiPartNr; + /** + * Return the head part of this multi-part object. + * + * @return the head part + */ + public ArchObject getHead() { + return parts.get(0); } - public void setMultiPartNr(final int value) { - multiPartNr = value; + /** + * 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 ArchObject getHead() { - return head; - } + /** + * Add a part to this multi-part object. + * + * @param tail the tail part to add + */ + public void addPart(final ArchObject tail) { + assert tail != null; - @Nullable public ArchObject getNext(final ArchObject arch) { - if (tailList == null) { - return null; + parts.add(tail); + + final int x = tail.getMultiX(); + if (x < minX) { + minX = x; + } else if (x > maxX) { + maxX = x; } - final int index = tailList.indexOf(arch); - if (index >= 0 && tailList.size() > index + 1) { - return tailList.get(index + 1); + + final int y = tail.getMultiY(); + if (y < minY) { + minY = y; + } else if (y > maxY) { + maxY = y; } - return null; } - public void setHead(final ArchObject node) { - head = node; - } - } // class MultiArchData Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-09-24 14:41:10 UTC (rev 388) @@ -315,7 +315,7 @@ final int replaceListSize = replaceList == null ? 0 : replaceList.size(); for (MapSquare square : entireMap ? mapControl.getMapModel() : mapViewIFrame.getView().getSelectedSquares()) { for (ArchObject node : square) { - if ((!node.isMulti() || node.getMultiRefCount() > 0) + if ((!node.isMulti() || node.isHead()) && (matchCriteria == MATCH_ARCH_NAME && node.getArchName() != null && node.getArchName().equalsIgnoreCase(matchString) || matchCriteria == MATCH_OBJ_NAME && node.getBestName().equalsIgnoreCase(matchString))) { if (replaceListSize > 0 && !deleteOnly) { @@ -327,9 +327,7 @@ } if (randomArch.isMulti()) { // multi's cannot be inserted properly, so we just put them ontop - if (randomArch.getMultiRefCount() == 0 && randomArch.getMapMultiHead() != null) { - randomArch = randomArch.getMapMultiHead(); - } + randomArch = randomArch.getHead(); } randomArch = randomArch.createArch(); node.replace(randomArch); Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-09-24 14:41:10 UTC (rev 388) @@ -110,9 +110,30 @@ * Data for multitile-arches. * Stays null for singlesquare-arches. */ - @Nullable private MultiArchData multi; + @Nullable private MultiArchData multi = null; /** + * The x-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiX = 0; + + /** + * The y-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiY = 0; + + private int multiPartNr = 0; + + /** + * Set if this part of a multi-part object is the lowest part. The lowest + * part is the part with the minimum y screen coordinate. Set to + * <code>true</code> for single-part objects. + */ + private boolean isLowestPart = true; + + /** * Data for scripted events. * Stays null if no events defined. */ @@ -512,19 +533,15 @@ * This method also takes perfectly well care of multihead arches. */ public void remove() { - final ArchObject head = getMapMultiHead() != null ? getMapMultiHead() : this; - for (final ArchObject tail : head.getTailList()) { + final ArchObject head = getHead(); + for (ArchObject tail = head.getMultiNext(); tail != null; tail = tail.getMultiNext()) { if (tail.container != null) { tail.container.remove(tail); } - tail.setMapMultiHead(null); - tail.setTailList(null); - tail.setReferenced(false); } if (head.container != null) { head.container.remove(head); } - head.setTailList(null); } /** @@ -553,173 +570,169 @@ return count; } - // ---- 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; } /** - * For normal arches returns the arch itself, for multiheads returns the - * head. Invoke this method if you need to be sure to have the single / - * head arch. - * @return head for multiheads, this for normal arches + * 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 ArchObject getHead() { - return isReferenced() && getMapMultiHead() != null ? getMapMultiHead() : this; + 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(this) : null; - } - public int getMultiShapeID() { return multi != null ? multi.getMultiShapeID() : 0; } public void setMultiShapeID(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - + initMultiData(); multi.setMultiShapeID(value); } public int getMultiPartNr() { - return multi != null ? multi.getMultiPartNr() : 0; + return multiPartNr; } - public void setMultiPartNr(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiPartNr(value); + public void setMultiPartNr(final int multiPartNr) { + this.multiPartNr = multiPartNr; } public boolean isLowestPart() { - return multi != null && multi.isLowestPart(); + return isLowestPart; } - public void setLowestPart(final boolean state) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setLowestPart(state); + public void setLowestPart(final boolean isLowestPart) { + this.isLowestPart = isLowestPart; } - // 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; } /** @@ -733,40 +746,15 @@ 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); } } - - public List<ArchObject> getTailList() { - return multi != null ? multi.getTailList() : Collections.EMPTY_LIST; - } - - public void setTailList(final List<ArchObject> tails) { - if (multi == null) { - multi = new MultiArchData(); - } - multi.setTailList(tails); - } - - public void addTail(final ArchObject tail) { - if (multi == null) { - multi = new MultiArchData(); - } - tail.setMapMultiHead(this); - tail.setReferenced(true); - multi.getTailList().add(tail); - tail.setTailList(multi.getTailList()); - } // ----- end multi-arch get/set ----- public int getArchTypNr() { @@ -1160,6 +1148,7 @@ final ArchObject clone = (ArchObject) super.clone(); clone.mapx = -1; clone.mapy = -1; + clone.multi = null; clone.container = null; return clone; } catch (final CloneNotSupportedException e) { @@ -1186,9 +1175,13 @@ if (msgText != null) { // Message text clone.msgText = new StringBuffer(msgText); } - if (multi != null) { // Multi data - clone.multi = multi.getClone(); + + if (multi != null) { + clone.initMultiData(); } + clone.multiX = multiX; + clone.multiY = multiY; + clone.script = new ScriptArchData(clone); // Script data clone.mapx = posx; clone.mapy = posy; @@ -1201,7 +1194,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; } /** @@ -1352,6 +1345,10 @@ arch.setArchName(archName); arch.setDefaultArch(this); arch.setObjectFace(); + arch.setMultiX(multiX); + arch.setMultiY(multiY); + arch.setMultiPartNr(multiPartNr); + arch.setLowestPart(isLowestPart); return arch; } Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-09-24 14:41:10 UTC (rev 388) @@ -153,6 +153,7 @@ boolean animflag = false; boolean msgflag = false; StringBuilder animText = null; + int multiShapeID = 0; while (thisLine2 != null) { final String thisLine = thisLine2.trim(); @@ -186,6 +187,8 @@ } else { arch.setArchName(archName); } + + multiShapeID = 0; } } else { if (msgflag) { @@ -224,9 +227,14 @@ if (firstArch != null) { // add to head our x/y position so he can setup refmax - firstArch.setRefMaxX(arch.getMultiRefX()); - firstArch.setRefMaxY(arch.getMultiRefY()); - firstArch.addTail(arch); + firstArch.addTailPart(arch); + + // set or check mpart_nr + if (firstArch.getMultiRefCount() == 2) { + firstArch.setMultiShapeID(multiShapeID); + } else if (multiShapeID != firstArch.getMultiShapeID()) { + log.log(Level.WARNING, "defArchWithInvalidMpartNr", new Object[]{arch.getArchName(), firstArch.getArchName(), Integer.toString(multiShapeID), Integer.toString(firstArch.getMultiShapeID())}); + } } else { mainControl.incArchObjCount(); @@ -329,14 +337,16 @@ if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { log.log(Level.WARNING, "foundCoordInDefArchSingleTileOrHead", new Object[]{"x", arch.getArchName()}); arch.addArchText(thisLine + "\n"); + } else { + arch.setMultiX(Integer.parseInt(thisLine.substring(2))); } - 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"); + } else { + arch.setMultiY(Integer.parseInt(thisLine.substring(2))); } - arch.setRefY(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.startsWith("type ")) { try { final int i = Integer.parseInt(thisLine.substring(5)); @@ -373,10 +383,9 @@ } else if (thisLine.startsWith("mpart_id ")) { // shape ID for multiparts try { - final int i = Integer.parseInt(thisLine.substring(9).trim()); - arch.setMultiShapeID(i); + multiShapeID = Integer.parseInt(thisLine.substring(9).trim()); - if (i <= 0 || i >= MultiPositionData.Y_DIM) { + if (multiShapeID <= 0 || multiShapeID >= MultiPositionData.Y_DIM) { System.err.println("WARNING: Arch " + arch.getArchName() + " mpart_id number is '" + thisLine.substring(9) + '\''); } } catch (final NumberFormatException e) { @@ -517,18 +526,8 @@ arch.setLowestPart(true); } - if (arch.isMulti() || defarch.isMulti()) { - if (!arch.isMD()) { - arch.initMultiData(); // make sure the MultiArchData is initialized - } - 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.setMultiX(defarch.getMultiX()); + arch.setMultiY(defarch.getMultiY()); // arch.setEditType(defarch.getEditType()); @@ -536,8 +535,8 @@ arch.validateAllEvents(); // 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 } @@ -560,18 +559,18 @@ final ArchObject defarch = arch.getDefaultArch(); // default arch // is it a multi head? - if (defarch != null && defarch.getMultiRefCount() > 0 && arch.getMultiRefCount() == 0 && arch.getMapMultiHead() == null) { + if (defarch != null && defarch.isMulti() && arch.getMultiRefCount() <= 1) { // do insertion for all non-head parts of the multi - for (ArchObject tail : defarch.getTailList()) { - final ArchObject newarch = tail.createArch(); + for (ArchObject oldPart = defarch.getMultiNext(); oldPart != null; oldPart = oldPart.getMultiNext()) { + final ArchObject newarch = oldPart.createArch(); - arch.addTail(newarch); + arch.addTailPart(newarch); objects.add(newarch); // set map position (x, y) - newarch.setMapX(arch.getMapX() + tail.getMultiRefX()); - newarch.setMapY(arch.getMapY() + tail.getMultiRefY()); + newarch.setMapX(arch.getMapX() + newarch.getMultiX()); + newarch.setMapY(arch.getMapY() + newarch.getMultiY()); // now attach the default arch and stuff // (don't need edit type as we copy from head) @@ -612,7 +611,7 @@ int minYOffset = MultiPositionData.getYOffset(head.getMultiShapeID(), head.getMultiPartNr()); // 1.step: find the maximal y-offest - for (ArchObject tail : arch.getTailList()) { + for (ArchObject tail = head.getMultiNext(); tail != null; tail = tail.getMultiNext()) { final int t = MultiPositionData.getYOffset(tail.getMultiShapeID(), tail.getMultiPartNr()); if (t < minYOffset) { minYOffset = t; @@ -625,7 +624,7 @@ } else { head.setLowestPart(false); } - for (ArchObject tail : arch.getTailList()) { + for (ArchObject tail = arch.getMultiNext(); tail != null; tail = tail.getMultiNext()) { if (MultiPositionData.getYOffset(tail.getMultiShapeID(), tail.getMultiPartNr()) <= minYOffset) { tail.setLowestPart(true); } else { Modified: trunk/daimonin/src/daieditor/arch/ArchObjectStack.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectStack.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/arch/ArchObjectStack.java 2006-09-24 14:41:10 UTC (rev 388) @@ -578,8 +578,8 @@ // part arches - i include this hack until we rework the // arch objects with more useful script names if (arch.getArchName().equals(ArchObjectParser.STARTARCH_NAME)) { - out.append("x ").append(Integer.toString(arch.getMultiRefX())).append('\n'); - out.append("y ").append(Integer.toString(arch.getMultiRefY())).append('\n'); + out.append("x ").append(Integer.toString(arch.getMultiX())).append('\n'); + out.append("y ").append(Integer.toString(arch.getMultiY())).append('\n'); } if (arch.getObjName() != null) { @@ -599,7 +599,7 @@ out.append("end\n"); } else { - if (arch.isReferenced()) { + if (arch.isTail()) { continue; //ACTION_FACTORY.showMessageDialog(pbar.getParentComponent(), WARNING_MESSAGE, "archCollectWarningMultipartTailInPanel"); } @@ -644,9 +644,9 @@ // if multi-head, we must attach the tail if (arch.isMulti()) { // process the multipart tail: - for (final ArchObject tail : arch.getTailList()) { + for (ArchObject tail = arch.getMultiNext(); tail != null; tail = tail.getMultiNext()) { - if (!tail.isReferenced()) { + if (tail.isHead()) { ACTION_FACTORY.showMessageDialog(pbar.getParentComponent(), "archCollectWarningMultipartTooShort"); } @@ -687,14 +687,12 @@ } // position of multi relative to head - if (tail.isReferenced()) { - if (tail.getMultiRefX() != 0) { - out.append("x ").append(Integer.toString(tail.getMultiRefX())).append('\n'); - } - if (tail.getMultiRefY() != 0) { - out.append("y ").append(Integer.toString(tail.getMultiRefY())).append('\n'); - } + if (tail.getMultiX() != 0) { + out.append("x ").append(Integer.toString(tail.getMultiX())).append('\n'); } + if (tail.getMultiY() != 0) { + out.append("y ").append(Integer.toString(tail.getMultiY())).append('\n'); + } out.append("end\n"); count++; if (count % 100 == 0) { Modified: trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java 2006-09-24 14:41:10 UTC (rev 388) @@ -324,10 +324,10 @@ */ private void paint(final Graphics2D grfx, final int xstart, final int ystart, ArchObject node) { ArchObject tmpNode = null; - if (node.isMulti() && node.getMapMultiHead() != null) { + if (node.isMulti()) { // this is a multipart tail: tmpNode = node; // save old node - node = node.getMapMultiHead(); // go to multipart head + node = node.getHead(); // go to multipart head } if (mainControl.isTileEdit(node) || isPickmap) { final ImageIcon img = "trans.101".equals(node.getFaceObjName()) ? unknownTileIcon : Modified: trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java 2006-09-24 14:41:10 UTC (rev 388) @@ -132,10 +132,10 @@ */ private void paint(final Graphics2D grfx, final int xstart, final int ystart, ArchObject node) { ArchObject tmpNode = null; - if (node.isMulti() && node.getMapMultiHead() != null) { + if (node.isMulti()) { // this is a multipart tail: tmpNode = node; // save old node - node = node.getMapMultiHead(); // go to multipart head + node = node.getHead(); // go to multipart head } final ImageIcon img = "trans.101".equals(node.getFaceObjName()) ? unknownTileIcon : node.getNormalImage(); int yoff = 0; Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-09-24 14:41:10 UTC (rev 388) @@ -219,13 +219,13 @@ /** {@inheritDoc} */ public boolean isMultiArchFittingToMap(final String archname, final Point pos, final boolean allowDouble) { final ArchObject head = getDefaultArch(archname); - final Point mapH = new Point(head.getMultiRefX(), head.getMultiRefY()); + final Point mapH = new Point(head.getMultiX(), head.getMultiY()); mapH.translate(pos.x, pos.y); if (!isPointValid(mapH)) { return false; } - for (final ArchObject tail : head.getTailList()) { - final Point mapT = new Point(tail.getMultiRefX(), tail.getMultiRefY()); + for (ArchObject tail = head.getMultiNext(); tail != null; tail = tail.getMultiNext()) { + final Point mapT = new Point(tail.getMultiX(), tail.getMultiY()); mapT.translate(pos.x, pos.y); // outside map if (!isPointValid(mapT)) { @@ -255,8 +255,8 @@ final ArchObject defaultArch = getDefaultArch(archname); // FIXME: Check maximum RefX and RefY to check whether the multitile arch fits on the map. - if (pos.x + defaultArch.getRefMaxX() > mapSize.getWidth() - || pos.y + defaultArch.getRefMaxY() > mapSize.getHeight()) { + if (pos.x + defaultArch.getMinX() < 0 || pos.y + defaultArch.getMinY() < 0 || pos.x + defaultArch.getMaxX() > mapSize.getWidth() || pos.y + defaultArch.getMaxY() > mapSize.getHeight()) { + // does not fit on map Toolkit.getDefaultToolkit().beep(); return false; } @@ -271,11 +271,11 @@ head.setDirection(defaultArch.getDirection()); ArchObjectParser.postParseMapArch(head, mapControl.getActiveEditType()); head.setObjectFace(); - for (final ArchObject tailArch : defaultArch.getTailList()) { - final Point posT = new Point(tailArch.getMultiRefX(), tailArch.getMultiRefY()); + for (ArchObject tailArch = defaultArch.getMultiNext(); tailArch != null; tailArch = tailArch.getMultiNext()) { + final Point posT = new Point(tailArch.getMultiX(), tailArch.getMultiY()); posT.translate(pos.x, pos.y); final ArchObject tail = tailArch.createArch(); - head.addTail(tail); + head.addTailPart(tail); tail.setMapX(posT.x); tail.setMapY(posT.y); @@ -387,8 +387,8 @@ } // calculate edit type - 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 (mapControl.getActiveEditType() != 0) { arch.setEditType(arch.calculateEditType(mapControl.getActiveEditType())); // calculate new } Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 14:38:41 UTC (rev 387) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-09-24 14:41:10 UTC (rev 388) @@ -192,9 +192,9 @@ for (pos.y = 0; pos.y < mapSize.getWidth(); pos.y++) { for (ArchObject arch : mapModel.getMapSquare(pos)) { // calculate the new edit type - if (arch.isReferenced() && arch.getMapMultiHead() != null) { + if (arch.isTail()) { // multi ... [truncated message content] |
From: <der...@us...> - 2006-09-24 14:38:46
|
Revision: 387 http://svn.sourceforge.net/gridarta/?rev=387&view=rev Author: derdanny Date: 2006-09-24 07:38:41 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fix for #1564515 edit operations are wrongly disabled under certain condition Modified Paths: -------------- trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java Modified: trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java 2006-09-24 14:32:13 UTC (rev 386) +++ trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java 2006-09-24 14:38:41 UTC (rev 387) @@ -36,6 +36,7 @@ final Point mapLoc = e.getMapLocation(); final MapCursor mapCursor = e.getMapCursor(); final MapControl mapControl = e.getMapControl(); + final boolean selChange = mapCursor.isActive(); mapCursor.setLocationSafe(mapLoc); if (mapLoc != null && mapCursor.isActive()) { // delete the topmost arch (matching the view settings) on that square and redraw the map @@ -43,6 +44,9 @@ // update mapArch panel CMainControl.getInstance().getMainView().setMapTileList(CMainControl.getInstance().getCurrentMap(), null); } + if (!(selChange == mapCursor.isActive())) { + CMainControl.getInstance().getMainView().refreshMenus(); + } } /** {@inheritDoc} */ Modified: trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-09-24 14:32:13 UTC (rev 386) +++ trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-09-24 14:38:41 UTC (rev 387) @@ -39,6 +39,7 @@ final Point p = e.getMapLocation(); final MapCursor mapCursor = e.getMapCursor(); final MapControl mapControl = e.getMapControl(); + final boolean selChange = mapCursor.isActive(); if (p != null) { if (mapControl.isPickmap()) { // insert on pickmap @@ -52,6 +53,9 @@ } } } + if (!(selChange == mapCursor.isActive())) { + CMainControl.getInstance().getMainView().refreshMenus(); + } } /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 14:32:18
|
Revision: 386 http://svn.sourceforge.net/gridarta/?rev=386&view=rev Author: christianhujer Date: 2006-09-24 07:32:13 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Cosmetic changes to SplashScreen. Modified Paths: -------------- trunk/daimonin/src/daieditor/SplashScreen.java Modified: trunk/daimonin/src/daieditor/SplashScreen.java =================================================================== --- trunk/daimonin/src/daieditor/SplashScreen.java 2006-09-24 14:29:47 UTC (rev 385) +++ trunk/daimonin/src/daieditor/SplashScreen.java 2006-09-24 14:32:13 UTC (rev 386) @@ -37,12 +37,19 @@ * Class for a splash screen that's displayed while loading. * It is mainly a workaround to load stuff in the background which speeds up startup significantly. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @todo move this class to JAPI */ public final class SplashScreen { /** SplashScreen window. */ private JFrame splashScreen; + /** + * Create an instance of SplashScreen. + */ + public SplashScreen() { + } + /** Show the splash screen. */ public void show() { // Only show before Java 1.6.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-09-24 14:29:51
|
Revision: 385 http://svn.sourceforge.net/gridarta/?rev=385&view=rev Author: christianhujer Date: 2006-09-24 07:29:47 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Fixed bug: wrong bundle used for logging messages. Modified Paths: -------------- trunk/daimonin/src/daieditor/CFJavaEditor.java Modified: trunk/daimonin/src/daieditor/CFJavaEditor.java =================================================================== --- trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-09-24 12:56:12 UTC (rev 384) +++ trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-09-24 14:29:47 UTC (rev 385) @@ -54,9 +54,9 @@ public static void main(final String... args) { System.setProperty("net.sf.japi.swing.tod", "daieditor.tod"); try { - Logger.getLogger("daieditor", "daieditor.action").log(Level.INFO, "build number: " + ResourceBundle.getBundle("build").getString("build.number")); + Logger.getLogger("daieditor", "daieditor.messages").log(Level.INFO, "build number: " + ResourceBundle.getBundle("build").getString("build.number")); } catch (final MissingResourceException e) { - Logger.getLogger("daieditor", "daieditor.action").log(Level.WARNING, "No build number found:", e); + Logger.getLogger("daieditor", "daieditor.messages").log(Level.WARNING, "No build number found:", e); } // Make sure the locale is set before any ActionFactory is used. final String locName = userNodeForPackage(CMainControl.class).get(PREFS_LANGUAGE, null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |