cleanup todo
This commit is contained in:
parent
64bb46d3d5
commit
0a165de74b
@ -44,7 +44,9 @@ public class Engine {
|
|||||||
/**
|
/**
|
||||||
* Create the engine and initial attributes use .init() to start the engine
|
* Create the engine and initial attributes use .init() to start the engine
|
||||||
* Initial projection is -1000;1000 in width and -1000*aspectRatio; 1000*aspectRatio
|
* Initial projection is -1000;1000 in width and -1000*aspectRatio; 1000*aspectRatio
|
||||||
* Initial Camera position is (0, 0, -1) //TODO vérifiez
|
* Initial Camera position is (0, 0, -1)
|
||||||
|
* Because the camera is inverted the translation on his axis is also
|
||||||
|
* @author Antoine Dupuis
|
||||||
*/
|
*/
|
||||||
public Engine(int width, int height, boolean fullscreen, Vector3f aspectRatio) {
|
public Engine(int width, int height, boolean fullscreen, Vector3f aspectRatio) {
|
||||||
this.running = false;
|
this.running = false;
|
||||||
@ -238,6 +240,13 @@ public class Engine {
|
|||||||
this.translateView(trackingVector);
|
this.translateView(trackingVector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param obj1
|
||||||
|
* @param obj2
|
||||||
|
* @param deadZone
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public void setCameraTrackingBetweenTwoObjectGl(ObjectGl obj1, ObjectGl obj2, float deadZone){
|
public void setCameraTrackingBetweenTwoObjectGl(ObjectGl obj1, ObjectGl obj2, float deadZone){
|
||||||
// obj2 est considéré à droite probablement à modifier
|
// obj2 est considéré à droite probablement à modifier
|
||||||
this.tracking = new TrackingTore(
|
this.tracking = new TrackingTore(
|
||||||
|
@ -5,7 +5,7 @@ import engine.math.Vector3f;
|
|||||||
import engine.object.ObjectGl;
|
import engine.object.ObjectGl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pas fini et c'est de la merde
|
* @deprecated buggy and will never be fixed
|
||||||
*/
|
*/
|
||||||
public class TrackingTore implements TrackingDummy {
|
public class TrackingTore implements TrackingDummy {
|
||||||
|
|
||||||
@ -16,11 +16,13 @@ public class TrackingTore implements TrackingDummy {
|
|||||||
private final Engine engine;
|
private final Engine engine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Centre la camera entre les deux objets assure un niveau de zoom suffisant pour voir les deux objets //TODO ajouter une zone morte + interpolation
|
* Centre la camera entre les deux objets assure un niveau de zoom suffisant pour voir les deux objets
|
||||||
* @param offset
|
* @param offset
|
||||||
* @param obj1
|
* @param obj1
|
||||||
* @param obj2
|
* @param obj2
|
||||||
* @param engine
|
* @param engine
|
||||||
|
* @author Antoine Dupuis
|
||||||
|
* @deprecated buggy and will never be fixed
|
||||||
*/
|
*/
|
||||||
public TrackingTore(float offset, ObjectGl obj1, ObjectGl obj2, Engine engine){
|
public TrackingTore(float offset, ObjectGl obj1, ObjectGl obj2, Engine engine){
|
||||||
this.rayonExt = offset;
|
this.rayonExt = offset;
|
||||||
|
@ -46,6 +46,7 @@ public class ObjectGl {
|
|||||||
* @param size scaling factor of the rectangle, the model could not show up because this value is too small or too large, a good compromise is between 2 and 15
|
* @param size scaling factor of the rectangle, the model could not show up because this value is too small or too large, a good compromise is between 2 and 15
|
||||||
* @param tex set to null if you don't want a tex on your model
|
* @param tex set to null if you don't want a tex on your model
|
||||||
* @param color set to null if you don't want a Color on your model
|
* @param color set to null if you don't want a Color on your model
|
||||||
|
* @author Antoine Dupuis
|
||||||
*/
|
*/
|
||||||
public ObjectGl(float z, float w, float h, float size, String tex, Vector3f color){
|
public ObjectGl(float z, float w, float h, float size, String tex, Vector3f color){
|
||||||
float[] colorBuffer = null;
|
float[] colorBuffer = null;
|
||||||
|
@ -638,7 +638,6 @@ public class BlueBaseFrames {
|
|||||||
return blueStandframe1;
|
return blueStandframe1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO avoir plusieurs sprite pour crée un cycle de marche
|
|
||||||
protected static Frame[] blueFWalk() {
|
protected static Frame[] blueFWalk() {
|
||||||
Frame[] f = new Frame[12];
|
Frame[] f = new Frame[12];
|
||||||
f[0] = walkForwardFrame1();
|
f[0] = walkForwardFrame1();
|
||||||
|
@ -39,7 +39,8 @@ public enum ButtonIG {
|
|||||||
try {
|
try {
|
||||||
return b[i];
|
return b[i];
|
||||||
} catch (ArrayIndexOutOfBoundsException e) {
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||||||
//TODO: put error message here
|
System.out.println("the identifier " + i + " is not defined");
|
||||||
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,13 +107,13 @@ public class match {
|
|||||||
timer = 99;
|
timer = 99;
|
||||||
inputsP1 = new InputBuffer(inputBufferSize);
|
inputsP1 = new InputBuffer(inputBufferSize);
|
||||||
inputsP2 = new InputBuffer(inputBufferSize);
|
inputsP2 = new InputBuffer(inputBufferSize);
|
||||||
p1.setPos(-750, groundLevel); //TODO : change to better values if needed
|
p1.setPos(-750, groundLevel);
|
||||||
p2.setPos((int) (750 - objP2.getWidth() * objP2.getScalingFactor()), groundLevel); //TODO : change to better values if needed
|
p2.setPos((int) (750 - objP2.getWidth() * objP2.getScalingFactor()), groundLevel);
|
||||||
p1.setCurrentHP(p1.getMaxHP());
|
p1.setCurrentHP(p1.getMaxHP());
|
||||||
p2.setCurrentHP(p2.getMaxHP());
|
p2.setCurrentHP(p2.getMaxHP());
|
||||||
objP1.translate(new Vector3f(p1.getPosX(),p1.getPosY(),0));
|
objP1.translate(new Vector3f(p1.getPosX(),p1.getPosY(),0));
|
||||||
objP2.translate(new Vector3f(p2.getPosX(),p2.getPosY(),0));
|
objP2.translate(new Vector3f(p2.getPosX(),p2.getPosY(),0));
|
||||||
// TODO meilleur implémentation possible
|
|
||||||
objP1.getShadow().translate(new Vector3f(0f,p1.getPosY(),0));
|
objP1.getShadow().translate(new Vector3f(0f,p1.getPosY(),0));
|
||||||
objP2.getShadow().translate(new Vector3f(0f,p2.getPosY(),0));
|
objP2.getShadow().translate(new Vector3f(0f,p2.getPosY(),0));
|
||||||
// Crée l'InputList
|
// Crée l'InputList
|
||||||
@ -154,7 +154,6 @@ public class match {
|
|||||||
/**
|
/**
|
||||||
* Ends the match.
|
* Ends the match.
|
||||||
* Used for playing animations and such.
|
* Used for playing animations and such.
|
||||||
* TODO : Implement this once we know what to do.
|
|
||||||
*/
|
*/
|
||||||
private static void endMatch() {
|
private static void endMatch() {
|
||||||
String victoryTxt = roundsWonP1 > roundsWonP2 ? "P1 won the match" : "P2 won the match";
|
String victoryTxt = roundsWonP1 > roundsWonP2 ? "P1 won the match" : "P2 won the match";
|
||||||
@ -171,6 +170,8 @@ public class match {
|
|||||||
|
|
||||||
engine.setRunning(false);
|
engine.setRunning(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void parse() throws FileNotFoundException {
|
public static void parse() throws FileNotFoundException {
|
||||||
|
|
||||||
JSONParser jsonP = new JSONParser();
|
JSONParser jsonP = new JSONParser();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user