Changeset a10d422 in lost-perception for main


Ignore:
Timestamp:
Jun 4, 2020, 4:15:10 PM (4 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
master
Children:
57674f3
Parents:
5d846bb
Message:

Create a working makefile target for MapEditor

Location:
main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/Creature.java

    r5d846bb ra10d422  
    1313import java.awt.geom.Point2D;
    1414
    15 public class Creature extends MapObject
    16 {
     15public class Creature extends MapObject {
    1716    String name;
    1817    private Model model;
     
    7776        this.dead = false;
    7877        this.id = Creature.lastId;
    79         ++Creature.lastId;
     78        Creature.lastId++;
    8079    }
    8180   
  • main/Enemy.java

    r5d846bb ra10d422  
    88import java.awt.Point;
    99
    10 public class Enemy extends Creature
    11 {
     10public class Enemy extends Creature {
    1211    int xpReward;
    1312    Point patrolTarget;
  • main/Item.java

    r5d846bb ra10d422  
    99import utils.DynamicImage;
    1010
    11 public class Item extends MapObject
    12 {
     11public class Item extends MapObject {
    1312    private String name;
    1413    private DynamicImage img;
  • main/MapEditor.java

    r5d846bb ra10d422  
    4040import java.awt.event.KeyListener;
    4141
    42 public class MapEditor implements KeyListener, MouseListener
    43 {
     42public class MapEditor implements KeyListener, MouseListener {
    4443    public static final int RES_X = 1024;
    4544    public static final int RES_Y = 768;
     
    9695    boolean highLevelPlacement;
    9796    Point playerLoc;
    98     Point start;
    9997   
    10098    public MapEditor(final GraphicsDevice device) {
    10199        this.started = false;
    102         this.start = null;
    103100        try {
    104101            GraphicsConfiguration gc = device.getDefaultConfiguration();
    105             gc = device.getDefaultConfiguration();
    106102            (MapEditor.frmMain = new Frame(gc)).setUndecorated(true);
    107103            MapEditor.frmMain.setIgnoreRepaint(true);
     
    117113            this.mapBuffer = gc.createCompatibleImage(800, 600);
    118114            this.mapG = this.mapBuffer.getGraphics();
    119             Utils.init(gc, false);
     115            Utils.init(gc, RUNNING_FROM_JAR);
    120116            this.state = State.Main;
    121117            this.auxState = AuxState.None;
     
    152148                }
    153149            }
    154         }
    155         catch (Exception e) {
     150        } catch (Exception e) {
    156151            e.printStackTrace();
    157152            return;
    158         }
    159         finally {
     153        } finally {
    160154            device.setFullScreenWindow(null);
    161155        }
     
    11041098            final GraphicsDevice device = env.getDefaultScreenDevice();
    11051099            new MapEditor(device);
    1106         }
    1107         catch (Exception e) {
     1100        } catch (Exception e) {
    11081101            e.printStackTrace();
    11091102        }
  • main/MapObject.java

    r5d846bb ra10d422  
    55import java.awt.Point;
    66
    7 public class MapObject implements Comparable<MapObject>
    8 {
     7public class MapObject implements Comparable<MapObject> {
    98    public Point loc;
    109    public int z;
     
    1514        this.loc = new Point(x, y);
    1615        this.z = z;
    17         final Bound bound = null;
    18         this.selectionBound = bound;
    19         this.bound = bound;
     16        this.bound = null;
     17        this.selectionBound = null;
    2018    }
    2119   
Note: See TracChangeset for help on using the changeset viewer.