Package starlight.taliis.helpers

Examples of starlight.taliis.helpers.adtObjHelper


                "No Objects registered!",
                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addWMO(0, r.nextInt(100000)+1);
         
          table.updateUI();
        }
        else if (DEL.equals(cmd)) {
          if(table.getSelectedRow()==-1) return;
View Full Code Here


                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          // add dirty empty new doodad
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addDoodad(0, r.nextInt(100000)+1);
         
          table.updateUI();
        }
        else if (ICON_DEL.equals(cmd)) {
          if(table.getSelectedRow()==-1) return;
View Full Code Here

                "No Objects registered!",
                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addWMO(0, r.nextInt(100000)+1);
         
          table.updateUI();
        }
        else if (ADD.equals(cmd)) {
          if(table.getSelectedRow()==-1) return;
          obj.modf.remove( table.getSelectedRow()  );
          table.updateUI();
        }
        else if(e.getSource()==miDelete){
          if(table.getSelectedRow()==-1) return;
          obj.modf.remove( table.getSelectedRow()  );
          table.updateUI();
        }
        else if(e.getSource()==miCopy){
          int row = table.getSelectedRow();
      if(row==-1) return;
          if(obj.mwmo.getLenght()==0) {
            JOptionPane.showMessageDialog(this.getParent(),
                "No Objects registered!",
                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addWMO(obj.modf.entrys[row].getNameID(), r.nextInt(100000)+1,MDDF_Entry.translate(obj.modf.entrys[row].getX()),MDDF_Entry.translate(obj.modf.entrys[row].getY()),obj.modf.entrys[row].getZ());
         
          table.updateUI();
        }
    }
View Full Code Here

                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          // add dirty empty new doodad
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addDoodad(0, r.nextInt(100000)+1);
         
          table.updateUI();
        }
        else if (ADD.equals(cmd)) {
          if(table.getSelectedRow()==-1) return;
          obj.mddf.remove( table.getSelectedRow()  );
          table.updateUI();
        }
     // delete rows
        else if(e.getSource()==miDelete) {
          if(table.getSelectedRow()==-1) return;
          obj.mddf.remove( table.getSelectedRow()  );
          table.updateUI();
    }
       
        else if(e.getSource()==miCopy) {
      int row = table.getSelectedRow();
      if(row==-1) return;
     
      if(obj.mmdx.getLenght()==0) {
            JOptionPane.showMessageDialog(this.getParent(),
                "No Doodads registered!",
                "Error",
                JOptionPane.ERROR_MESSAGE);
            return;
          }
          // add dirty empty new doodad
          adtObjHelper objh = new adtObjHelper(obj);
          Random r = new Random();
          objh.addDoodad(obj.mddf.entrys[row].getNameID(), r.nextInt(100000)+1,MDDF_Entry.translate(obj.mddf.entrys[row].getX()),MDDF_Entry.translate(obj.mddf.entrys[row].getY()), obj.mddf.entrys[row].getZ());
          table.updateUI();

    }
    }
View Full Code Here

    obj = new adt();
   
    // setup some helpers
    check = new adtChecker(obj);
    adtCoordHelper cordh = new adtCoordHelper(obj);
    adtObjHelper objh = new adtObjHelper(obj);
   
    // Add some Textures
    int texID = obj.mtex.addString("Tileset\\SilverPine\\SilverPineDirt.blp");
    obj.mtex.addString("Tileset\\Elwynn\\ElwynnFlowerBase.blp");
   
    // add a dd
    int ddID = obj.mmdx.addString("world\\Kalimdor\\Ashenvale\\ActiveDoodads\\MannarothSpear\\AshenvaleMannarothSpear.m2");
   
    // add a wmo
    int wmoID = obj.mwmo.addString("world\\wmo\\azeroth\\buildings\\guildhouses\\guildhouseb.wmo");
    obj.mwmo.addString("World\\wmo\\Dungeon\\LD_ShadowFang\\LD_ShadowFang.wmo");

    // set our coordinates
    cordh.calcCoordinates(49, 31, 60F, texID);
    cordh.loadHeightMap("./images/hmap.jpg", 0.5F);
   
    // place a DD
    objh.addDoodad(ddID, 96050, -9270F, 300F, 60.5F);
    objh.addDoodad(ddID, 96051, -9260F, 300F, 60.5F);
    objh.addDoodad(ddID, 96052, -9280F, 300F, 60.5F);
    objh.addDoodad(ddID, 96053, -9250F, 300F, 60.5F);/**/
   
    // place a wmo building
    objh.addWMO(wmoID, 96049, -9288F, 300F, 60.5F);
   
   
    // register appeareances
    objh.generateAppeareances();
   
    // render
    obj.render();
    if(check.check()==0)
      write();
View Full Code Here

    //TODO: catch failures and so on
    if(f.obj instanceof wowfile) {
      wowfile o = (wowfile)f.obj;
     
      // re-render object appears
      adtObjHelper objh = new adtObjHelper((adt)o);
      objh.generateAppeareances();
     
      o.render();
     
      // check
      adtChecker check = new adtChecker((adt)o);
View Full Code Here

TOP

Related Classes of starlight.taliis.helpers.adtObjHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.