Changeset a10d422 in lost-perception
- Timestamp:
- Jun 4, 2020, 4:15:10 PM (4 years ago)
- Branches:
- master
- Children:
- 57674f3
- Parents:
- 5d846bb
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r5d846bb ra10d422 1 1 .DS_Store 2 2 *.class 3 LostPerception.jar 4 MapEditor.jar 3 5 err.txt 4 LostPerception.jar 6 errMapEditor.txt -
main/Creature.java
r5d846bb ra10d422 13 13 import java.awt.geom.Point2D; 14 14 15 public class Creature extends MapObject 16 { 15 public class Creature extends MapObject { 17 16 String name; 18 17 private Model model; … … 77 76 this.dead = false; 78 77 this.id = Creature.lastId; 79 ++Creature.lastId;78 Creature.lastId++; 80 79 } 81 80 -
main/Enemy.java
r5d846bb ra10d422 8 8 import java.awt.Point; 9 9 10 public class Enemy extends Creature 11 { 10 public class Enemy extends Creature { 12 11 int xpReward; 13 12 Point patrolTarget; -
main/Item.java
r5d846bb ra10d422 9 9 import utils.DynamicImage; 10 10 11 public class Item extends MapObject 12 { 11 public class Item extends MapObject { 13 12 private String name; 14 13 private DynamicImage img; -
main/MapEditor.java
r5d846bb ra10d422 40 40 import java.awt.event.KeyListener; 41 41 42 public class MapEditor implements KeyListener, MouseListener 43 { 42 public class MapEditor implements KeyListener, MouseListener { 44 43 public static final int RES_X = 1024; 45 44 public static final int RES_Y = 768; … … 96 95 boolean highLevelPlacement; 97 96 Point playerLoc; 98 Point start;99 97 100 98 public MapEditor(final GraphicsDevice device) { 101 99 this.started = false; 102 this.start = null;103 100 try { 104 101 GraphicsConfiguration gc = device.getDefaultConfiguration(); 105 gc = device.getDefaultConfiguration();106 102 (MapEditor.frmMain = new Frame(gc)).setUndecorated(true); 107 103 MapEditor.frmMain.setIgnoreRepaint(true); … … 117 113 this.mapBuffer = gc.createCompatibleImage(800, 600); 118 114 this.mapG = this.mapBuffer.getGraphics(); 119 Utils.init(gc, false);115 Utils.init(gc, RUNNING_FROM_JAR); 120 116 this.state = State.Main; 121 117 this.auxState = AuxState.None; … … 152 148 } 153 149 } 154 } 155 catch (Exception e) { 150 } catch (Exception e) { 156 151 e.printStackTrace(); 157 152 return; 158 } 159 finally { 153 } finally { 160 154 device.setFullScreenWindow(null); 161 155 } … … 1104 1098 final GraphicsDevice device = env.getDefaultScreenDevice(); 1105 1099 new MapEditor(device); 1106 } 1107 catch (Exception e) { 1100 } catch (Exception e) { 1108 1101 e.printStackTrace(); 1109 1102 } -
main/MapObject.java
r5d846bb ra10d422 5 5 import java.awt.Point; 6 6 7 public class MapObject implements Comparable<MapObject> 8 { 7 public class MapObject implements Comparable<MapObject> { 9 8 public Point loc; 10 9 public int z; … … 15 14 this.loc = new Point(x, y); 16 15 this.z = z; 17 final Bound bound = null; 18 this.selectionBound = bound; 19 this.bound = bound; 16 this.bound = null; 17 this.selectionBound = null; 20 18 } 21 19 -
makefile
r5d846bb ra10d422 1 ASTAR_DEPS = astar/AStarMap.class astar/AStarNode.class astar/AStarSearch.class astar/BinaryHeap.class astar/QuadTree.class 1 # Use something like "LostPerception: MAP_FILE_DEPS = maps/*.txt" to specify var for a specific target 2 3 #ASTAR_DEPS = astar/AStarMap.class astar/AStarNode.class astar/AStarSearch.class astar/BinaryHeap.class astar/QuadTree.class 4 #COLLISION_DEPS = collision/Bound.class 5 #GAMEGUI_DEPS = gamegui/Align.class gamegui/Animation.class gamegui/Button.class gamegui/Label.class gamegui/Listable.class gamegui/Member.class gamegui/ScrollBar.class gamegui/ScrollList.class gamegui/Textbox.class gamegui/Window.class 6 #UTILS_DEPS = utils/DynamicImage.class utils/Utils.class utils/WrappedString.class 7 8 #MAIN_DEPS = main/Action.class main/Armor.class main/Creature.class main/Dialog.class main/Direction.class main/Effect.class main/Enemy.class main/Item.class main/Location.class main/LostHavenRPG.class main/Map.class main/MapImage.class main/MapObject.class main/MapType.class main/Model.class main/NPC.class main/Player.class main/StatType.class main/Tile.class main/Weapon.class 9 10 #GAMEGUI_INNER_DEPS = gamegui/Button\$$1.class gamegui/Label\$$1.class 11 #MAIN_INNER_DEPS = main/Armor\$$ArmorType.class main/Effect\$$MoveSpeed.class main/Effect\$$Hitpoints.class main/Effect\$$Manapoints.class main/Effect\$$Damage.class main/Effect\$$AttackSpeed.class main/LostHavenRPG\$$1.class main/LostHavenRPG\$$AuxState.class main/LostHavenRPG\$$GameState.class main/Model\$$1.class 12 #UTILS_INNER_DEPS = utils/Utils\$$1.class 13 14 #INNER_DEPS = $(GAMEGUI_INNER_DEPS) $(MAIN_INNER_DEPS) $(UTILS_INNER_DEPS) 15 16 #DIALOG_FILE_DEPS = dialog/*.txt 17 #IMAGE_FILE_DEPS = images/*/*.png images/creatures/*/*/*.png images/*/*.ttf 18 #MAP_FILE_DEPS = maps/*.txt 19 20 #CLASS_DEPS = $(MAIN_DEPS) $(ASTAR_DEPS) $(GAMEGUI_DEPS) $(COLLISION_DEPS) $(UTILS_DEPS) 21 #FILE_DEPS = $(DIALOG_FILE_DEPS) $(IMAGE_FILE_DEPS) $(MAP_FILE_DEPS) 22 23 #LostPerception: $(CLASS_DEPS) $(FILE_DEPS) 24 # jar cfe [email protected] main.LostHavenRPG $^ $(INNER_DEPS) 25 26 ASTAR_DEPS = astar/AStarMap.class astar/AStarNode.class astar/QuadTree.class 2 27 COLLISION_DEPS = collision/Bound.class 3 GAMEGUI_DEPS = gamegui/Align.class gamegui/Animation.class gamegui/Button.class gamegui/Label.class gamegui/ Listable.class gamegui/Member.class gamegui/ScrollBar.class gamegui/ScrollList.class gamegui/Textbox.class gamegui/Window.class4 UTILS_DEPS = utils/DynamicImage.class utils/Utils.class utils/WrappedString.class28 GAMEGUI_DEPS = gamegui/Align.class gamegui/Animation.class gamegui/Button.class gamegui/Label.class gamegui/Member.class gamegui/ScrollBar.class gamegui/Textbox.class gamegui/Window.class 29 UTILS_DEPS = utils/DynamicImage.class utils/Utils.class 5 30 6 MAIN_DEPS = main/Action.class main/ Armor.class main/Creature.class main/Dialog.class main/Direction.class main/Effect.class main/Enemy.class main/Item.class main/Location.class main/LostHavenRPG.class main/Map.class main/MapImage.class main/MapObject.class main/MapType.class main/Model.class main/NPC.class main/Player.class main/StatType.class main/Tile.class main/Weapon.class31 MAIN_DEPS = main/Action.class main/Creature.class main/Direction.class main/Enemy.class main/Item.class main/Location.class main/Map.class main/MapEditor.class main/MapImage.class main/MapObject.class main/MapType.class main/Model.class main/Player.class main/StatType.class main/Tile.class 7 32 8 33 GAMEGUI_INNER_DEPS = gamegui/Button\$$1.class gamegui/Label\$$1.class 9 MAIN_INNER_DEPS = main/ Armor\$$ArmorType.class main/Effect\$$MoveSpeed.class main/Effect\$$Hitpoints.class main/Effect\$$Manapoints.class main/Effect\$$Damage.class main/Effect\$$AttackSpeed.class main/LostHavenRPG\$$1.class main/LostHavenRPG\$$AuxState.class main/LostHavenRPG\$$GameState.class main/Model\$$1.class34 MAIN_INNER_DEPS = main/MapEditor\$$1.class main/MapEditor\$$AuxState.class main/MapEditor\$$GroundType.class main/MapEditor\$$State.class main/Model\$$1.class 10 35 UTILS_INNER_DEPS = utils/Utils\$$1.class 11 36 12 37 INNER_DEPS = $(GAMEGUI_INNER_DEPS) $(MAIN_INNER_DEPS) $(UTILS_INNER_DEPS) 13 38 14 DIALOG_FILE_DEPS = dialog/*.txt 15 IMAGE_FILE_DEPS = images/*/*.png images/creatures/*/*/*.png images/*/*.ttf 16 MAP_FILE_DEPS = maps/*.txt 39 IMAGE_FILE_DEPS = images/*/*.png images/creatures/*/*/*.png 17 40 18 41 CLASS_DEPS = $(MAIN_DEPS) $(ASTAR_DEPS) $(GAMEGUI_DEPS) $(COLLISION_DEPS) $(UTILS_DEPS) 19 FILE_DEPS = $( DIALOG_FILE_DEPS) $(IMAGE_FILE_DEPS) $(MAP_FILE_DEPS)42 FILE_DEPS = $(IMAGE_FILE_DEPS) 20 43 21 LostPerception: $(CLASS_DEPS) $(FILE_DEPS)22 jar cfe [email protected] main. LostHavenRPG$^ $(INNER_DEPS)44 MapEditor: $(CLASS_DEPS) $(FILE_DEPS) 45 jar cfe [email protected] main.MapEditor $^ $(INNER_DEPS)
Note:
See TracChangeset
for help on using the changeset viewer.