Skip to content

Commit ac8261f

Browse files
committed
WIP
Signed-off-by: Dan Printzell <[email protected]>
1 parent c1a6f7b commit ac8261f

File tree

6 files changed

+79
-5
lines changed

6 files changed

+79
-5
lines changed

assets/maps/room1-enemy.png

373 Bytes
Loading

assets/maps/room1.json

+75-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
{
22
"name": "room1",
33
"map": "room1.png",
4-
"entities": []
4+
"entities": [
5+
{
6+
"template": "enemy_longRange",
7+
"components": {
8+
"TransformComponent": {
9+
"position": [
10+
4,
11+
0.2,
12+
8
13+
]
14+
}
15+
}
16+
},
17+
{
18+
"template": "enemy_longRange",
19+
"components": {
20+
"TransformComponent": {
21+
"position": [
22+
15,
23+
0.2,
24+
12
25+
]
26+
}
27+
}
28+
},
29+
{
30+
"template": "enemy_longRange",
31+
"components": {
32+
"TransformComponent": {
33+
"position": [
34+
27,
35+
0.2,
36+
6
37+
]
38+
}
39+
}
40+
},
41+
{
42+
"template": "enemy_longRange",
43+
"components": {
44+
"TransformComponent": {
45+
"position": [
46+
28,
47+
0.2,
48+
10
49+
]
50+
}
51+
}
52+
},
53+
54+
{
55+
"template": "enemy_closeRange",
56+
"components": {
57+
"TransformComponent": {
58+
"position": [
59+
11,
60+
0.2,
61+
3
62+
]
63+
}
64+
}
65+
},
66+
{
67+
"template": "enemy_closeRange",
68+
"components": {
69+
"TransformComponent": {
70+
"position": [
71+
20,
72+
0.2,
73+
4
74+
]
75+
}
76+
}
77+
}
78+
]
579
}

assets/maps/room2.-enemypng

358 Bytes
Binary file not shown.

assets/maps/smileyface.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "smileyface",
33
"map": "smileyface.png",
44
"entities": [
5-
{
5+
{
66
"template": "enemy_closeRange",
77
"components": {
88
"TransformComponent": {

reggaefile.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import reggae;
22
// -Wsuggest-override -Wno-error=suggest-override
3-
enum CFLAGS = "-std=c++17 -O0 -D_DEBUG -ggdb -Wall -Werror -Wno-unused-value -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -fdiagnostics-color=always -fopenmp -I/usr/include/bullet/";
3+
enum CFLAGS = "-std=c++17 -O3 -D_DEBUG -ggdb -Wall -Werror -Wno-unused-value -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -fdiagnostics-color=always -fopenmp -I/usr/include/bullet/";
44

55
enum CompileCommand {
66
Compile = "g++ -c " ~ CFLAGS ~ " $in -o $out",
7-
Link = "g++ -std=c++17 -O0 -ggdb -Wall -Werror -pedantic -Wno-maybe-uninitialized -fdiagnostics-color=always -fopenmp -lm -ldl -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lGL -lassimp -lBullet3Common -lBullet3Dynamics -lBullet3Geometry -lBullet3OpenCL_clew -lBulletCollision -lBulletDynamics -lBulletInverseDynamics -lBulletSoftBody -lLinearMath $in -o $out"
7+
Link = "g++ -std=c++17 -O3 -ggdb -Wall -Werror -pedantic -Wno-maybe-uninitialized -fdiagnostics-color=always -fopenmp -lm -ldl -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lGL -lassimp -lBullet3Common -lBullet3Dynamics -lBullet3Geometry -lBullet3OpenCL_clew -lBulletCollision -lBulletDynamics -lBulletInverseDynamics -lBulletSoftBody -lLinearMath $in -o $out"
88
}
99

1010
Target[] MakeObjects(string src)() {

src/world/system/roomloadingsystem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void RoomLoadingSystem::newRoom(World* world, coord_t coord) {
328328
static MapLoader* mapLoader = engine->getMapLoader().get();
329329
static BulletPhysicsSystem* bulletphyiscs = engine->getSystem<BulletPhysicsSystem>();
330330

331-
auto mapInfo = _maps[rand() % 8];
331+
auto mapInfo = _maps[rand() % _maps.size()];
332332

333333
MapData map = mapLoader->loadFromImage("assets/maps/" + mapInfo->map);
334334
Entity * room = world->addEntity("Room");

0 commit comments

Comments
 (0)