Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	sh.exe.stackdump
  • Loading branch information
Lijwent committed Dec 13, 2017
2 parents 26174a4 + 93211ee commit 312041a
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 187 deletions.
31 changes: 23 additions & 8 deletions sh.exe.stackdump
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
Exception: STATUS_STACK_OVERFLOW at rip=7FFA652E4B57
rax=0000000000001250 rbx=00000000FFFF96A0 rcx=0000000000000000
rdx=0000000180010018 rsi=0000000180271780 rdi=000000018021C490
r8 =0000000002782C14 r9 =0000000180271780 r10=00000000FFFF8000
r11=00000000FFE03A40 r12=00000000FFFF9580 r13=000000018021C490
r14=00000000FFFF9520 r15=00000000FFFF96A8
rbp=0000000000000420 rsp=00000000FFFF9388
program=C:\Users\cleme\AppData\Local\GitHubDesktop\app-1.0.9\resources\app\git\usr\bin\sh.exe, pid 77836, thread unknown (0x12D78)
Exception: STATUS_STACK_OVERFLOW at rip=7FFB68D24B57
rax=0000000000001058 rbx=00000000026D3D90 rcx=5F09801869110000
rdx=00000000000283F0 rsi=00000000026D4CEC rdi=0000000000000001
r8 =000000000000015A r9 =000000000000001B r10=00000000FFFFA000
r11=00000000FFE03E30 r12=0000000000000424 r13=00000000026D4CD0
r14=0000000000000000 r15=0000000000000000
rbp=00000000026D3D90 rsp=00000000FFFFB520
program=C:\Program Files\Git\usr\bin\sh.exe, pid 6648, thread unknown (0x2EF0)
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
000026D3D90 7FFB68D24B57 (00180010018, 000026B3720, 000026D4CEC, 00180010018)
000026D3D90 7FFB64D0617A (000026B3720, 000026D4CEC, 00180010018, 000FFFFB900)
000026D3D90 7FFB64D07F3E (000026D3DDC, 000FFFFB960, 00000000420, 000026D4F3C)
000FFFFB960 7FFB64D08636 (000FFFFB840, 00000000240, 00000000000, 00180277400)
000FFFFB960 7FFB65E3D7A6 (00000000001, 00000000000, 000FFFFBC30, 00000000001)
000FFFFB960 7FFB68B7E4E3 (000FFFFBA80, 00000000020, 00000000420, 00000000001)
000FFFFB960 001800AA02B (000FFFFBA20, 00000000030, 00000000000, 00000000000)
000FFFFBAA0 001800AABD5 (006000444E0, 00000000000, 0010040FDFE, 00000000001)
00000000000 0018011A43B (006000444E0, 00000000000, 0010040FDFE, 00000000001)
00000000000 00004A5E458 (00000000000, 0010040FDFE, 00000000001, 00000080002)
00000000000 001004E172E (0010040FDFE, 00000000001, 00000080002, 00000080000)
00000000000 006000444E0 (0010040FDFE, 00000000001, 00000080002, 00000080000)
End of stack trace
7 changes: 5 additions & 2 deletions src/main/game/BikeGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
*/
package main.game;

import main.game.levels.*;
import main.game.levels.Level;
import main.game.levels.Level0;
import main.game.levels.Level1;
import main.game.levels.Level2;
import main.io.FileSystem;
import main.window.Window;

Expand All @@ -28,7 +31,7 @@ public void update(float deltaTime) {
@Override
protected List<Level> createLevelList() {

return Arrays.asList(new Level0(this), new Level1(this), new Level2(this), new Level3(this));
return Arrays.asList(new Level0(this), new Level1(this), new Level2(this));
}

}
7 changes: 2 additions & 5 deletions src/main/game/levels/Level1.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
import java.util.Arrays;

public class Level1 extends Level {

private FinishActor finishActor;

public Level1(ActorGame game) {
super(game);
}
Expand Down Expand Up @@ -228,7 +225,7 @@ public void createAllActors() {
boomBarrel2.setPosition(new Vector(223.5f, 75f));
}, 10);

this.finishActor = new FinishActor(this.game, new Vector(245,30));
FinishActor finishActor = new FinishActor(this.game, new Vector(245,30));

this.addActors(new ArrayList<>(Arrays.asList(terrain, insideTerrain)));
this.addActors(new ArrayList<>(Arrays.asList(obstacle, obstacle1, obstacle2, obstacle3)));
Expand All @@ -248,7 +245,7 @@ public void createAllActors() {
this.addActor(gravityWell);
this.addActors(new ArrayList<>(Arrays.asList(boomBarrel, boomBarrel1, boomBarrel2)));
this.addActor(drawer);
this.addActor(this.finishActor);
this.addActor(finishActor);
}

@Override
Expand Down
207 changes: 168 additions & 39 deletions src/main/game/levels/Level2.java
Original file line number Diff line number Diff line change
@@ -1,52 +1,181 @@
package main.game.levels;

import main.game.ActorGame;
import main.game.actor.entities.MovingPlatform;
import main.game.actor.entities.Terrain;
import main.game.actor.entities.TerrainType;
import main.game.actor.entities.*;
import main.game.actor.entities.switchers.Lever;
import main.game.actor.sensors.Checkpoint;
import main.game.actor.sensors.FinishActor;
import main.game.actor.sensors.SpawnCheckpoint;
import main.math.Polygon;
import main.math.Polyline;
import main.math.Vector;

import java.util.ArrayList;
import java.util.Arrays;

public class Level2 extends Level {
public Level2(ActorGame game) {
super(game);
}

@Override
public void createAllActors() {
Polyline polyline = new Polyline(-20, -100, -20.f, 0.f, 0.f, 0.f, 4.f, 0.f, 5.1235f, -0.558f,
6.2645f, -1.410f, 7.3693f, -2.514f, 7.9308f, -3.728f, 8.5104f, -4.905f, 9.1986f, -5.648f, 10.176f, -6.644f,
11.263f, -7.894f, 12.984f, -9.125f, 14.729f, -10.10f, 17.798f, -11.37f, 21.583f, -11.80f, 24.f, -12.f,
49.720f, -11.98f, 49.947f, -12.55f, 50.f, -14.f, 49.843f, -15.25f, 49.804f, -16.92f, 49.904f, -18.90f,
49.594f, -20.38f, 49.726f, -23.30f, 49.835f, -25.09f, 49.532f, -27.53f, 49.570f, -30.87f, 50.f, -32.f,
50.f, -36.f, 55.008f, -35.96f, 55.030f, -34.96f, 59.777f, -35.21f, 63.989f, -35.25f, 66.875f, -34.84f,
68.718f, -34.72f, 70.954f, -34.24f, 74.f, -34.f, 77.283f, -33.38f, 80.698f, -32.40f, 84.383f, -30.02f,
87.089f, -25.03f, 88.488f, -18.40f, 88.442f, -14.49f, 85.643f, -8.146f, 83.870f, -5.626f, 79.112f, -4.600f,
78.272f, -1.801f, 77.665f, 1.2306f, 77.769f, 5.6930f, 77.183f, 9.5060f, 79.138f, 15.323f, 79.285f, 19.625f,
78.503f, 24.562f, 79.725f, 27.153f, 79.334f, 29.500f, 79.040f, 32.482f, 79.774f, 36.881f, 79.334f, 44.556f,
80.f, 48.f, 83.077f, 49.955f, 145.f, 50.f, 145, -100);

Polygon polygon = new Polygon(-20, 6f, 0.f, 5.9989f, 4.9507f, 4.6117f, 8.3218f, 3.0666f,
11.973f, 1.5214f, 16.047f, 0.6787f, 20.963f, 0.f, 27.003f, -1.006f, 34.448f, -2.832f, 38.381f, -2.130f,
42.876f, -1.006f, 45.295f, 0.1723f, 47.792f, 0.9596f, 49.758f, 3.7689f, 50.084f, 5.7324f, 49.461f, 8.2208f,
50.f, 10.f, 49.507f, 10.812f, 49.414f, 11.669f, 49.565f, 12.676f, 49.970f, 14.353f, 47.722f, 14.377f,
35.748f, 14.517f, 28.741f, 14.802f, 27.146f, 15.030f, 25.f, 15.f, 17.689f, 15.087f, 12.277f, 15.827f,
9.3151f, 17.138f, 5.f, 20.f, 3.0486f, 24.487f, 2.9916f, 29.386f, 3.3198f, 36.557f, 4.4709f, 42.313f,
7.2336f, 49.219f, 12.298f, 54.745f, 18.514f, 55.666f, 24.961f, 55.436f, 30.716f, 57.738f, 33.249f, 90f,
80, 90, 85, 60, 150f, 60f, 150f, 60f, -20.f, 150.f);

Terrain terrain1 = new Terrain(this.game, Vector.ZERO, polyline, TerrainType.NORMAL);

Terrain terrain2 = new Terrain(this.game, Vector.ZERO, polygon, TerrainType.NORMAL);

Obstacle obstacle1 = new Obstacle(this.game, new Vector(55, -12), new Polygon(0.48f, 0.f, 0.f, -0.66f, 0.12f, -1.6f, 0.f, -2.5f,
0.42f, -3.46f, 0.14f, -4.14f, 0.14f, -5.1f, 0.56f, -5.7f, 0.16f, -6.38f, 0.38f, -7.16f,
0.2f, -8.24f, 0.52f, -9.02f, 0.22f, -11.56f, 0.34f, -12.58f, 0.18f, -13.84f, 1.34f, -14.6f,
4.4f, -14.44f, 5.06f, -14.8f, 5.42f, -14.64f, 7.94f, -14.26f, 9.62f, -13.64f, 11.38f, -13.04f,
13.92f, -12.66f, 17.364f, -13.09f, 19.031f, -11.12f, 19.947f, -9.290f, 19.892f, -7.484f, 20.058f, -5.623f,
19.503f, -4.123f, 20.336f, -2.789f, 19.725f, -0.900f, 18.f, 0.f, 14.475f, -0.067f, 10.76f, 0.f,
8.56f, -0.12f, 6.24f, 0.12f, 2.72f, -0.36f));

Obstacle obstacle2 = new Obstacle(this.game, new Vector(22, 22), new Polygon(0.f, 0.f, -1.76f, 0.36f, -3.04f, 0.82f, -3.94f, 1.3f,
-4.72f, 2.16f, -5.f, 3.f, -4.94f, 4.28f, -4.68f, 5.14f, -5.f, 6.f, -4.68f, 7.06f,
-5.f, 8.f, -4.54f, 8.86f, -5.02f, 10.44f, -5.f, 11.f, 1.f, 11.f, 1.f, 16.f,
-5.f, 16.f, -5.f, 17.f, -4.9f, 17.54f, -4.72f, 18.26f, -4.78f, 18.96f, -4.72f, 19.94f,
-4.44f, 21.32f, -4.72f, 22.26f, -4.1f, 23.58f, -2.7f, 23.96f, -1.14f, 23.96f, 4.16f, 23.96f,
5.38f, 23.76f, 7.36f, 23.8f, 9.4f, 23.94f, 11.7f, 23.54f, 12.24f, 23.62f, 12.76f, 23.64f,
14.f, 24.f, 17.34f, 23.6f, 18.02f, 23.34f, 18.f, 22.f, 18.362f, 19.871f, 18, 18, 18, 14f,
37, 14, 37f, 18, 38.360f, 24.388f, 40.f, 26.f, 62.f, 26.f, 63.046f, 23.191f, 61.077f, 20.180f,
62.351f, 18.173f, 61.424f, 15.586f, 62.390f, 14.119f, 61.086f, 11.224f, 62.119f, 9.1781f, 62.360f, 7.3250f,
62.051f, 5.5492f, 63.239f, 4.4296f, 60.807f, 0.8779f, 59.400f, 0.f, 54.844f, 0.4147f, 50.906f, -1.168f,
46.814f, 0.4919f, 42.684f, -0.936f, 38.012f, 0.3375f, 32.762f, -0.318f, 28.786f, 1.1482f, 22.570f, -0.627f,
20.061f, 0.8393f, 15.583f, 0.3375f, 11.645f, -1.361f, 10.448f, 1.4184f, 5.8932f, -0.704f));

TriggeredPlatform platformDoor = new TriggeredPlatform(this.game, new Vector(-1, -1), null, 0, 0, 0, 0, 0, new Polygon(0, 0, 1, 0, 1, 7, 0, 7),1, 7);

Checkpoint checkpoint1 = new Checkpoint(this.game, new Vector(45, -12));

TriggeredPlatform platform1 = new TriggeredPlatform(this.game, new Vector(83, -18), null, 0,
0, 0, 0, 0, new Polygon(0, 0, 5, 0, 5, 1, 0, 1), 5, 1);
//GravityWell well = new GravityWell(this.game, new Vector(75, -8), new Vector(0, 0.06f), new Polygon(0, 0, 7, 0, 7, -32, 0, -32), (float) Math.PI * 1.5f);

TriggeredPlatform platform2 = new TriggeredPlatform(this.game, new Vector(77, -28), null, 0,
0, 0, 0, 0, new Polygon(0, 0, 5, 0, 5, 1, 0, 1), 5, 1);

Checkpoint checkpoint2 = new Checkpoint(this.game, new Vector(60, -35.25f));

TriggeredPlatform platform3 = new TriggeredPlatform(this.game, new Vector(50, -36), new Vector(0, 1), 50, 28, 5, 2, 2);
TriggeredPlatform platform4 = new TriggeredPlatform(this.game, new Vector(50, -14), new Vector(-1, 0), 5, 1, 1000, 9, 2);

BoumBarder boumbarder1 = new BoumBarder(this.game, new Vector(55, 10));
boumbarder1.setPath(new Vector(55, 10), new Vector(70, 10), 2);

Lever lever1 = new Lever(this.game, new Vector(57, -35));
lever1.addAction(() -> {
platform3.triggerAction();
platform4.triggerAction();
}, 10);

Checkpoint checkpoint3 = new Checkpoint(this.game, new Vector(26, 15));

TriggeredPlatform platform5 = new TriggeredPlatform(this.game, new Vector(20, 14), new Vector(0, -1),
11, 3, 10000, 1, 1, new Polygon(0, 0, 1, 0, 1, 9, 0, 9), 1, 9);

TriggeredPlatform platform6 = new TriggeredPlatform(this.game, new Vector(6, 16), null, 0,0,0,0,0, new Polygon(0, 0, 5, 0, 5, 3, 0, 3), 5, 3);

TriggeredPlatform platform7 = new TriggeredPlatform(this.game, new Vector(12.5f, 25), null, 0, 0, 0,0 ,0);

TriggeredPlatform platform8 = new TriggeredPlatform(this.game, new Vector(3, 31), null, 0, 0, 0,0, 0);

TriggeredPlatform platform9 = new TriggeredPlatform(this.game, new Vector(18, 32), new Vector(0, -1),
7, 3, 10000, 1, 1, new Polygon(0, 0, 1, 0, 1, 7, 0, 7), 1, 7);

TriggeredPlatform platform10 = new TriggeredPlatform(this.game, new Vector(12.5f, 38), null, 0, 0, 0, 0, 0);

Laser laser1 = new Laser(this.game, new Vector(12, 54.5f), 38.35f, 3, false);
Laser laser2 = new Laser(this.game, new Vector(3.5f, 23), 15.5f, 0, false);
Laser laser3 = new Laser(this.game, new Vector(4.5f, 43), 14.25f, 0, false);

Lever lever2 = new Lever(this.game, new Vector(23, 15));
lever2.addAction(() -> {
platform5.triggerAction();
laser1.switchState();
laser2.switchState();
laser3.switchState();
}, 500);

Lever lever3 = new Lever(this.game, new Vector(5, 32));
lever3.addAction(() -> platform9.triggerAction(), 500);

TriggeredPlatform platform11 = new TriggeredPlatform(this.game, new Vector(26, 45), new Vector(0, 1),
12, 3, 10, 1, 1, new Polygon(0, 0, 1, 0, 1, 12, 0, 12), 1, 12);

Lever lever4 = new Lever(this.game, new Vector(24, 46));
lever4.addAction(() -> {
platform11.triggerAction();
laser1.switchState();
laser2.switchState();
laser3.switchState();
}, 500);

Checkpoint checkpoint4 = new Checkpoint(this.game, new Vector(30, 45.75f));

BoumBarder boumbarder2 = new BoumBarder(this.game, new Vector(35, 70));
boumbarder2.setPath(new Vector(35, 70), new Vector(59, 70), .5f);

BoumBarder boumbarder3 = new BoumBarder(this.game, new Vector(62, 55));
boumbarder3.setPath(new Vector(62, 70), new Vector(80, 70), .5f);

TriggeredPlatform platform12 = new TriggeredPlatform(this.game, new Vector(39.5f, 44.5f), null, 0, 0, 0, 0, 0);

Liquid liquid = new Liquid(this.game, new Vector(40, 36), new Polygon(0, 0, 19, 0, 19, 4, 0, 4), true);

FinishActor finishActor = new FinishActor(this.game, new Vector(115, 50));

addActors(new ArrayList<>(Arrays.asList(terrain1, terrain2, obstacle1, obstacle2)));

addActors(new ArrayList<>(Arrays.asList(checkpoint1, checkpoint2, checkpoint3, checkpoint4)));
addActors(new ArrayList<>(Arrays.asList(platformDoor, platform1, platform2, platform3, platform4, platform5, platform6, platform7,
platform8, platform9, platform10, platform11, platform12)));
addActors(new ArrayList<>(Arrays.asList(lever1, lever2, lever3, lever4)));
addActors(new ArrayList<>(Arrays.asList(laser1, laser2, laser3)));
addActors(new ArrayList<>(Arrays.asList(boumbarder1, boumbarder2, boumbarder3)));
addActor(liquid);
addActor(finishActor);
}

@Override
public void update(float deltaTime) {
super.update(deltaTime);
}

@Override
public boolean isFinished() {
return getPayload() != null && getPayload().getVictoryStatus() | getPayload().getDeathStatus();
}

@Override
public void dispose() {
}

public Level2(ActorGame game) {
super(game);
}

@Override
public void createAllActors() {
Polyline p = new Polyline(-1000.0f, -1000.0f, -1000.0f, 0.0f, 0.0f, 0.0f, 3.0f, 1.0f, 8.0f, 1.0f, 15.0f, 3.0f,
16.0f, 3.0f, 25.0f, 0.0f, 35.0f, -5.0f, 50.0f, -5.0f, 55.0f, -4.0f, 65.0f, 0.0f, 6500.0f, -1000.0f);
addActor(new Terrain(game, null, p, TerrainType.MUD));
addActor(new FinishActor(game, new Vector(-40, 0)));
addActor(new Checkpoint(game, new Vector(-20, 0)));

// Bombarder b = new Bombarder(game, new Vector (-30, 3));
// b.setPath(new Vector(-35, 10), new Vector(-30, 7), 1f);
// addActor(b);

addActor(new MovingPlatform(game, new Vector(-42, 5), new Vector(-30, 7), 1, 2));
addActor(new MovingPlatform(game, new Vector(-40, 3), new Vector(1, 0), 10, .1f, 1));
}

@Override
public boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
public SpawnCheckpoint getSpawnCheckpoint() {
return new SpawnCheckpoint(game, new Vector(-22, 1));
}

@Override
public void dispose() {
// TODO Auto-generated method stub

}
@Override
public SpawnCheckpoint getSpawnCheckpoint() {
return new SpawnCheckpoint(this.game, new Vector(0, 0));
}

}
Loading

0 comments on commit 312041a

Please sign in to comment.