");
31 | }
32 | return this;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vef/PrimaryComponent.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vef;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public final class PrimaryComponent extends AbstractComponent {
12 | // VEF/Component1-specific field labels
13 | public static final String VEF_COMP_PRI = "Primary component";
14 |
15 | PrimaryComponent() throws Exception {
16 | super(VEF_COMP_PRI);
17 | }
18 |
19 | PrimaryComponent(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
20 | super(superStruct, buffer, offset, VEF_COMP_PRI + " " + nr);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vef/SecondaryComponent.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vef;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public final class SecondaryComponent extends AbstractComponent {
12 | // VEF/Component2-specific field labels
13 | public static final String VEF_COMP_SEC = "Secondary component";
14 |
15 | SecondaryComponent() throws Exception {
16 | super(VEF_COMP_SEC);
17 | }
18 |
19 | SecondaryComponent(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
20 | super(superStruct, buffer, offset, VEF_COMP_SEC + " " + nr);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vertex/ClosedVertex.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vertex;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class ClosedVertex extends Vertex {
13 | // ClosedVertex-specific field labels
14 | public static final String VERTEX_CLOSED = "Closed vertex";
15 |
16 | public ClosedVertex() throws Exception {
17 | super(null, VERTEX_CLOSED, StreamUtils.getByteBuffer(4), 0);
18 | }
19 |
20 | public ClosedVertex(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, VERTEX_CLOSED + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vertex/ClosedVertexImpeded.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vertex;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class ClosedVertexImpeded extends Vertex {
13 | // ClosedVertexImpeded-specific field labels
14 | public static final String VERTEX_CLOSED_IMPEDED = "Impeded cell (closed)";
15 |
16 | public ClosedVertexImpeded() throws Exception {
17 | super(null, VERTEX_CLOSED_IMPEDED, StreamUtils.getByteBuffer(4), 0);
18 | }
19 |
20 | public ClosedVertexImpeded(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, VERTEX_CLOSED_IMPEDED + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vertex/OpenVertex.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vertex;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class OpenVertex extends Vertex {
13 | // OpenVertex-specific field labels
14 | public static final String VERTEX_OPEN = "Open vertex";
15 |
16 | public OpenVertex() throws Exception {
17 | super(null, VERTEX_OPEN, StreamUtils.getByteBuffer(4), 0);
18 | }
19 |
20 | public OpenVertex(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, VERTEX_OPEN + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/vertex/OpenVertexImpeded.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.vertex;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class OpenVertexImpeded extends Vertex {
13 | // OpenVertexImpeded-specific field labels
14 | public static final String VERTEX_OPEN_IMPEDED = "Impeded cell (open)";
15 |
16 | public OpenVertexImpeded() throws Exception {
17 | super(null, VERTEX_OPEN_IMPEDED, StreamUtils.getByteBuffer(4), 0);
18 | }
19 |
20 | public OpenVertexImpeded(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, VERTEX_OPEN_IMPEDED + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wed/ClosedPolygon.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wed;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class ClosedPolygon extends Polygon {
13 | // WED/ClosedPolygon-specific field labels
14 | public static final String WED_POLY_CLOSED = "Closed polygon";
15 |
16 | public ClosedPolygon() throws Exception {
17 | super(null, WED_POLY_CLOSED, StreamUtils.getByteBuffer(18), 0);
18 | }
19 |
20 | public ClosedPolygon(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, WED_POLY_CLOSED + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wed/IndexNumber.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wed;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.datatype.DecNumber;
10 |
11 | /**
12 | * Subclassed from {@code DecNumber} to make field type identifiable by reflection.
13 | */
14 | public class IndexNumber extends DecNumber {
15 | public IndexNumber(ByteBuffer buffer, int offset, int length, String name) {
16 | super(buffer, offset, length, name);
17 | }
18 |
19 | public IndexNumber(ByteBuffer buffer, int offset, int length, String name, boolean signed) {
20 | super(buffer, offset, length, name, signed);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wed/OpenPolygon.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wed;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class OpenPolygon extends Polygon {
13 | // WED/OpenPolygon-specific field labels
14 | public static final String WED_POLY_OPEN = "Open polygon";
15 |
16 | public OpenPolygon() throws Exception {
17 | super(null, WED_POLY_OPEN, StreamUtils.getByteBuffer(18), 0);
18 | }
19 |
20 | public OpenPolygon(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, WED_POLY_OPEN + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wed/WallPolygon.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wed;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 | import org.infinity.util.io.StreamUtils;
11 |
12 | public final class WallPolygon extends Polygon {
13 | // WED/WallPolygon-specific field labels
14 | public static final String WED_POLY_WALL = "Wall polygon";
15 |
16 | public WallPolygon() throws Exception {
17 | super(null, WED_POLY_WALL, StreamUtils.getByteBuffer(18), 0);
18 | }
19 |
20 | public WallPolygon(AbstractStruct superStruct, ByteBuffer buffer, int offset, int nr) throws Exception {
21 | super(superStruct, WED_POLY_WALL + " " + nr, buffer, offset);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wmp/AreaLinkEast.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wmp;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public class AreaLinkEast extends AreaLink {
12 | // WMP/AreaLinkEast-specific field labels
13 | public static final String WMP_LINK_EAST = "East link";
14 |
15 | public AreaLinkEast() throws Exception {
16 | super(WMP_LINK_EAST);
17 | }
18 |
19 | public AreaLinkEast(AbstractStruct superStruct, ByteBuffer buffer, int offset, int number) throws Exception {
20 | super(superStruct, buffer, offset, WMP_LINK_EAST + " " + number);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wmp/AreaLinkNorth.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wmp;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public class AreaLinkNorth extends AreaLink {
12 | // WMP/AreaLinkNorth-specific field labels
13 | public static final String WMP_LINK_NORTH = "North link";
14 |
15 | public AreaLinkNorth() throws Exception {
16 | super(WMP_LINK_NORTH);
17 | }
18 |
19 | public AreaLinkNorth(AbstractStruct superStruct, ByteBuffer buffer, int offset, int number) throws Exception {
20 | super(superStruct, buffer, offset, WMP_LINK_NORTH + " " + number);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wmp/AreaLinkSouth.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wmp;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public class AreaLinkSouth extends AreaLink {
12 | // WMP/AreaLinkSouth-specific field labels
13 | public static final String WMP_LINK_SOUTH = "South link";
14 |
15 | public AreaLinkSouth() throws Exception {
16 | super(WMP_LINK_SOUTH);
17 | }
18 |
19 | public AreaLinkSouth(AbstractStruct superStruct, ByteBuffer buffer, int offset, int number) throws Exception {
20 | super(superStruct, buffer, offset, WMP_LINK_SOUTH + " " + number);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/resource/wmp/AreaLinkWest.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.resource.wmp;
6 |
7 | import java.nio.ByteBuffer;
8 |
9 | import org.infinity.resource.AbstractStruct;
10 |
11 | public class AreaLinkWest extends AreaLink {
12 | // WMP/AreaLinkWest-specific field labels
13 | public static final String WMP_LINK_WEST = "West link";
14 |
15 | public AreaLinkWest() throws Exception {
16 | super(WMP_LINK_WEST);
17 | }
18 |
19 | public AreaLinkWest(AbstractStruct superStruct, ByteBuffer buffer, int offset, int number) throws Exception {
20 | super(superStruct, buffer, offset, WMP_LINK_WEST + " " + number);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/search/SearchClient.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.search;
6 |
7 | public interface SearchClient {
8 | /**
9 | * Returns text of this object that will be matched with searched text. When returns {@code null}, search finished
10 | *
11 | * @param nr Index of the searched object
12 | * @return {@code null} if index is invalid, text for match otherwise
13 | */
14 | String getText(int nr);
15 |
16 | /**
17 | * Called when match found.
18 | *
19 | * @param nr Index of the matched object
20 | */
21 | void hitFound(int nr);
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/infinity/updater/update_v1.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/org/infinity/updater/update_v2.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/org/infinity/util/Operation.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util;
6 |
7 | /**
8 | * Represents an operation without explicit input and output.
9 | *
10 | *
11 | * This is a functional interface whose functional method is {@link #perform()}.
12 | *
13 | */
14 | @FunctionalInterface
15 | public interface Operation {
16 | /** Performs the operation. */
17 | void perform();
18 | }
19 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue0.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the first tuple element.
9 | */
10 | public interface TupleValue0 {
11 | /**
12 | * Returns the first element of the tuple.
13 | *
14 | * @return first element of the tuple.
15 | */
16 | T getValue0();
17 |
18 | /**
19 | * Assigns a new value to the first element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the first tuple element.
23 | */
24 | T setValue0(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue1.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the second tuple element.
9 | */
10 | public interface TupleValue1 {
11 | /**
12 | * Returns the second element of the tuple.
13 | *
14 | * @return second element of the tuple.
15 | */
16 | T getValue1();
17 |
18 | /**
19 | * Assigns a new value to the second element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the second tuple element.
23 | */
24 | T setValue1(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue2.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the third tuple element.
9 | */
10 | public interface TupleValue2 {
11 | /**
12 | * Returns the third element of the tuple.
13 | *
14 | * @return third element of the tuple.
15 | */
16 | T getValue2();
17 |
18 | /**
19 | * Assigns a new value to the third element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the third tuple element.
23 | */
24 | T setValue2(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue3.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the fourth tuple element.
9 | */
10 | public interface TupleValue3 {
11 | /**
12 | * Returns the fourth element of the tuple.
13 | *
14 | * @return fourth element of the tuple.
15 | */
16 | T getValue3();
17 |
18 | /**
19 | * Assigns a new value to the fourth element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the fourth tuple element.
23 | */
24 | T setValue3(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue4.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the fifth tuple element.
9 | */
10 | public interface TupleValue4 {
11 | /**
12 | * Returns the fifth element of the tuple.
13 | *
14 | * @return fifth element of the tuple.
15 | */
16 | T getValue4();
17 |
18 | /**
19 | * Assigns a new value to the fifth element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the fifth tuple element.
23 | */
24 | T setValue4(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/infinity/util/tuples/TupleValue5.java:
--------------------------------------------------------------------------------
1 | // Near Infinity - An Infinity Engine Browser and Editor
2 | // Copyright (C) 2001 Jon Olav Hauglid
3 | // See LICENSE.txt for license information
4 |
5 | package org.infinity.util.tuples;
6 |
7 | /**
8 | * Allows read/write access to the sixth tuple element.
9 | */
10 | public interface TupleValue5 {
11 | /**
12 | * Returns the sixth element of the tuple.
13 | *
14 | * @return sixth element of the tuple.
15 | */
16 | T getValue5();
17 |
18 | /**
19 | * Assigns a new value to the sixth element of the tuple.
20 | *
21 | * @param newValue the new value to assign.
22 | * @return the previously assigned value of the sixth tuple element.
23 | */
24 | T setValue5(T newValue);
25 | }
26 |
--------------------------------------------------------------------------------
/src/tinylog.properties:
--------------------------------------------------------------------------------
1 | writer = console
2 | writer.level = trace
3 | writer.format = {level}: {message}
4 | writer.stream = err@WARN
5 | writingthread = true
6 |
--------------------------------------------------------------------------------