Gridarta Editor
ProjectFactory.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.project;
21 
49 import org.jetbrains.annotations.NotNull;
50 import org.jetbrains.annotations.Nullable;
51 
56 public interface ProjectFactory<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> {
57 
62  int getDoubleFaceOffset();
63 
68  boolean getIncludeFaceNumbers();
69 
77  @NotNull
78  ArchetypeFactory<G, A, R> newArchetypeFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects);
79 
88  @NotNull
89  GameObjectFactory<G, A, R> newGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects, @NotNull ArchetypeTypeSet archetypeTypeSet);
90 
97  @NotNull
98  ArchetypeSet<G, A, R> newArchetypeSet(@NotNull ProjectSettings projectSettings, @NotNull ArchetypeFactory<G, A, R> archetypeFactory);
99 
108  @NotNull
109  GameObjectParserFactory<G, A, R> newGameObjectParserFactory(@NotNull GameObjectFactory<G, A, R> gameObjectFactory, @NotNull ArchetypeSet<G, A, R> archetypeSet, @NotNull ArchetypeTypeSet archetypeTypeSet);
110 
122  AbstractArchetypeParser<G, A, R, ?> newArchetypeParser(@NotNull ErrorView errorView, GameObjectParser<G, A, R> gameObjectParser, AnimationObjects animationObjects, ArchetypeSet<G, A, R> archetypeSet, @NotNull GameObjectFactory<G, A, R> gameObjectFactory, @NotNull ProjectSettings projectSettings, @NotNull SmoothFaces smoothFaces);
123 
137  @NotNull
138  AbstractResources<G, A, R> newResources(@NotNull GameObjectParser<G, A, R> gameObjectParser, @NotNull ArchetypeSet<G, A, R> archetypeSet, @NotNull AbstractArchetypeParser<G, A, R, ?> archetypeParser, @NotNull FaceObjects faceObjects, @NotNull AnimationObjects animationObjects, @NotNull ArchFaceProvider archFaceProvider, @NotNull FaceObjectProviders faceObjectProviders, @NotNull SmoothFaces smoothFaces);
139 
144  @NotNull
146 
152  @NotNull
154 
162  @NotNull
163  AttributeRangeChecker<G, A, R> loadAttributeRangeChecker(@NotNull ErrorViewCollector errorViewCollector, @NotNull GameObjectMatchers gameObjectMatchers, @NotNull ValidatorPreferences validatorPreferences);
164 
172  @NotNull
173  MapControlFactory<G, A, R> newMapControlFactory(@NotNull MapWriter<G, A, R> mapWriter, @NotNull ProjectSettings projectSettings, @NotNull MapModelFactory<G, A, R> mapModelFactory);
174 
179  int getSpellType();
180 
185  @Nullable
186  String getSpellFile();
187 
192  String getScriptsDir();
193 
194 }
A factory for creating MapModel instances.
A validator that checks for suspicious attribute values.
AbstractArchetypeParser< G, A, R, ?> newArchetypeParser(@NotNull ErrorView errorView, GameObjectParser< G, A, R > gameObjectParser, AnimationObjects animationObjects, ArchetypeSet< G, A, R > archetypeSet, @NotNull GameObjectFactory< G, A, R > gameObjectFactory, @NotNull ProjectSettings projectSettings, @NotNull SmoothFaces smoothFaces)
Creates a new AbstractArchetypeParser instance.
int getDoubleFaceOffset()
Returns the offset for drawing double faces.
Convenience class for adding messages to a ErrorView instance using a fixed category name...
MapControlFactory< G, A, R > newMapControlFactory(@NotNull MapWriter< G, A, R > mapWriter, @NotNull ProjectSettings projectSettings, @NotNull MapModelFactory< G, A, R > mapModelFactory)
Creates a new MapControlFactory instance.
Reading and writing of maps, handling of paths.
This package contains classes related to matching GameObjects, so called GameObjectMatchers.
Settings that apply to a project.
Manages ArchetypeType instances, list, and bitmask definitions.
Interface for classes that write map files.
Definition: MapWriter.java:34
This package contains the framework for validating maps.
ArchetypeFactory< G, A, R > newArchetypeFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects)
Creates a new ArchetypeFactory instance.
Gridarta can handle frame information of animations and allow the selection of an animation using a t...
MapArchObjectFactory< A > newMapArchObjectFactory(@NotNull ProjectSettings projectSettings)
Creates a new MapArchObjectFactory instance.
Factory for creating MapArchObject instances.
Interface for classes that read or write GameObject instances.
AbstractResources< G, A, R > newResources(@NotNull GameObjectParser< G, A, R > gameObjectParser, @NotNull ArchetypeSet< G, A, R > archetypeSet, @NotNull AbstractArchetypeParser< G, A, R, ?> archetypeParser, @NotNull FaceObjects faceObjects, @NotNull AnimationObjects animationObjects, @NotNull ArchFaceProvider archFaceProvider, @NotNull FaceObjectProviders faceObjectProviders, @NotNull SmoothFaces smoothFaces)
Creates a new AbstractResources instance.
String getScriptsDir()
Returns the default directory for editor scripts.
A factory for creating GameObjectParser instances.
Factory for creating MapArchObjectParser instances.
Interface for classes displaying error messages.
Definition: ErrorView.java:28
A factory for creating Archetype instances.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Definition: GameObject.java:36
Abstract factory for creating GameObject instances.
Collection of all smoothing information.
AnimationObjects is a container for AnimationObjects.
GameObjects are the objects based on Archetypes found on maps.
GameObjectFactory< G, A, R > newGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects, @NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a new GameObjectFactory instance.
Maintains GameObjectMatcher instances.
MapArchObjectParserFactory< A > newMapArchObjectParserFactory()
Creates a new MapArchObjectParserFactory instance.
FaceObjects is a container for FaceObjects.
Provider for faces of GameObjects and Archetypes.
The face is the appearance of an object.
String getSpellFile()
Returns the spell file name to load.
AttributeRangeChecker< G, A, R > loadAttributeRangeChecker(@NotNull ErrorViewCollector errorViewCollector, @NotNull GameObjectMatchers gameObjectMatchers, @NotNull ValidatorPreferences validatorPreferences)
Loads the attribute range checker for map validation.
boolean getIncludeFaceNumbers()
Returns whether the face file contains face numbers.
This package contains the checks for validating maps.
Interface that captures similarities between different ArchetypeSet implementations.
Implementation of FaceProvider which reads images from the arch directory.
int getSpellType()
Returns the archetype type for game object spells.
GameObjectParserFactory< G, A, R > newGameObjectParserFactory(@NotNull GameObjectFactory< G, A, R > gameObjectFactory, @NotNull ArchetypeSet< G, A, R > archetypeSet, @NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a new GameObjectParserFactory instance.
Abstract base implementation of ArchetypeParser.
Defines types of GameObjects with corresponding attributes.
ArchetypeSet< G, A, R > newArchetypeSet(@NotNull ProjectSettings projectSettings, @NotNull ArchetypeFactory< G, A, R > archetypeFactory)
Creates a new ArchetypeSet instance.
A factory to create project-dependent objects.
Factory for creating MapControl instances.