diff --git a/bin/back b/bin/back index 9eb46d5..3ab9365 100755 Binary files a/bin/back and b/bin/back differ diff --git a/obj/base.o b/obj/base.o index 9266064..79a5fbb 100644 Binary files a/obj/base.o and b/obj/base.o differ diff --git a/obj/display.o b/obj/display.o index dc4f10f..43f99e7 100644 Binary files a/obj/display.o and b/obj/display.o differ diff --git a/obj/entities.o b/obj/entities.o index cb5c145..e567e3d 100644 Binary files a/obj/entities.o and b/obj/entities.o differ diff --git a/obj/generation.o b/obj/generation.o index eeda91f..c4acedf 100644 Binary files a/obj/generation.o and b/obj/generation.o differ diff --git a/obj/hash.o b/obj/hash.o index c74a4c0..4ea071c 100644 Binary files a/obj/hash.o and b/obj/hash.o differ diff --git a/obj/main.o b/obj/main.o index 9c6392d..a0a082a 100644 Binary files a/obj/main.o and b/obj/main.o differ diff --git a/obj/menus.o b/obj/menus.o index e03ae07..9fa34d6 100644 Binary files a/obj/menus.o and b/obj/menus.o differ diff --git a/obj/move.o b/obj/move.o index 1f32aec..2260b57 100644 Binary files a/obj/move.o and b/obj/move.o differ diff --git a/obj/proj.o b/obj/proj.o index 8df7c01..c67b085 100644 Binary files a/obj/proj.o and b/obj/proj.o differ diff --git a/src/entities.c b/src/entities.c index 5f31050..7efe2ad 100644 --- a/src/entities.c +++ b/src/entities.c @@ -90,6 +90,27 @@ void moving_xyz(double x, double y, double z, double w, double h, double d, doub //printf("%lf %lf %lf\n", ret->x, ret->y, ret->z); } +// metad{1,2,3} = og pos +// metad{4,5,6} = speed +// metad{7,8,9} = max_delta +// metai{1} = x_side (+/- 1) +// metai{2} = y_side (+/- 1) +// metai{3} = z_side (+/- 1) +void moving_xyz_line(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { + ret->x += (ent->metai1)*ent->metad4*dtime; + if(absf(ent->metad1 - ret->x) > ent->metad7) { + ent->metai1 *= (-1); + } + ret->y += (ent->metai2)*ent->metad5*dtime; + if(absf(ent->metad2 - ret->y) > ent->metad8) { + ent->metai2 *= (-1); + } + ret->z += (ent->metai3)*ent->metad6*dtime; + if(absf(ent->metad3 - ret->z) > ent->metad9) { + ent->metai3 *= (-1); + } +} + void detectHit(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret) { if(ret->red == 193) { ret->red = 0; @@ -113,6 +134,15 @@ void translatePlayer(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret) { //fz += dz/(dtime*dtime); } +void translatePlayerLine(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret) { + double dx = ent->metad4*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + double dy = ent->metad5*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + double dz = ent->metad6*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + //fx += dx/(dtime*dtime); + fy += dy/(dtime*dtime); + //fz += dz/(dtime*dtime); +} + void go_to_player(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { double dx = (x+w/2 - camx); double dy = (y+h/2 - camy); diff --git a/src/entities.h b/src/entities.h index e42f81d..b262df0 100644 --- a/src/entities.h +++ b/src/entities.h @@ -11,10 +11,12 @@ void speen(double x, double y, double z, double w, double h, double d, double hz void speen2(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void speen3(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void moving_xyz(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); +void moving_xyz_line(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void go_to_player(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void detectHit(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret); void explodeOnHit(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret); void translatePlayer(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret); +void translatePlayerLine(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret); #endif \ No newline at end of file diff --git a/src/generation.c b/src/generation.c index e486791..f01645b 100644 --- a/src/generation.c +++ b/src/generation.c @@ -30,6 +30,7 @@ int fct_entry_size; fct_entry* hashtbl_entities; void init_ent_generator(int n) { + //!\\ size = 10 now hashtbl_entities = malloc(sizeof(fct_entry)*n); fct_entry_size = n; for(int k = 0; k < 10; k++) { @@ -61,10 +62,16 @@ void init_ent_generator(int n) { hashtbl_entities[3].onDeath = NULL; hashtbl_entities[4].id = 4; - hashtbl_entities[4].name = "Platform"; + hashtbl_entities[4].name = "SinePlatform"; hashtbl_entities[4].updatePos = &moving_xyz; hashtbl_entities[4].onHit = &translatePlayer; hashtbl_entities[4].onDeath = NULL; + + hashtbl_entities[5].id = 5; + hashtbl_entities[5].name = "LinePlatform"; + hashtbl_entities[5].updatePos = &moving_xyz_line; + hashtbl_entities[5].onHit = &translatePlayerLine; + hashtbl_entities[5].onDeath = NULL; } fct_entry* get_entry(int k0) { @@ -122,6 +129,9 @@ void copy_room(room* src, room* dest, int chx, int chy) { dest->ents[k]->metad4 = src->ents[k]->metad4; dest->ents[k]->metad5 = src->ents[k]->metad5; dest->ents[k]->metad6 = src->ents[k]->metad6; + dest->ents[k]->metad7 = src->ents[k]->metad7; + dest->ents[k]->metad8 = src->ents[k]->metad8; + dest->ents[k]->metad9 = src->ents[k]->metad9; *(dest->ents[k]->hitpoints) = *(src->ents[k]->hitpoints); dest->ents[k]->pos = create_cube_0( (*(src->ents[k]->pos)).x, (*(src->ents[k]->pos)).y, (*(src->ents[k]->pos)).z, @@ -384,6 +394,9 @@ void parse_one_room(int id, char* filename) { pool[id].area->ents[k]->metad4 = entry->metad4; pool[id].area->ents[k]->metad5 = entry->metad5; pool[id].area->ents[k]->metad6 = entry->metad6; + pool[id].area->ents[k]->metad7 = entry->metad7; + pool[id].area->ents[k]->metad8 = entry->metad8; + pool[id].area->ents[k]->metad9 = entry->metad9; if(entry->id == 4) { double ccw = read_float(ptr); double cch = read_float(ptr); @@ -400,6 +413,22 @@ void parse_one_room(int id, char* filename) { pool[id].area->ents[k]->metai1 = mult; pool[id].area->ents[k]->metai2 = divd; pool[id].area->ents[k]->metai3 = phase; + } else if(entry->id == 5) { + double amp_x = read_float(ptr); + double amp_y = read_float(ptr); + double amp_z = read_float(ptr); + double speed_x = read_float(ptr); + double speed_y = read_float(ptr); + double speed_z = read_float(ptr); + pool[id].area->ents[k]->metad4 = speed_x; + pool[id].area->ents[k]->metad5 = speed_y; + pool[id].area->ents[k]->metad6 = speed_z; + pool[id].area->ents[k]->metad7 = amp_x; + pool[id].area->ents[k]->metad8 = amp_y; + pool[id].area->ents[k]->metad9 = amp_z; + pool[id].area->ents[k]->metai1 = 1; + pool[id].area->ents[k]->metai2 = 1; + pool[id].area->ents[k]->metai3 = 1; } //pool[id].area->ents[k]->updatePos = &speen2; //pool[id].area->ents[k]->onHit = &detectHit ; diff --git a/src/generation.h b/src/generation.h index 8baada6..cd37bd6 100644 --- a/src/generation.h +++ b/src/generation.h @@ -28,6 +28,9 @@ typedef struct fct_entry { double metad4; double metad5; double metad6; + double metad7; + double metad8; + double metad9; } fct_entry ; void init_ent_generator(int n); diff --git a/src/main.c b/src/main.c index bef1f0b..aeb3ec4 100644 --- a/src/main.c +++ b/src/main.c @@ -23,80 +23,95 @@ double sim_time; int triCount; unsigned int fffff; +int gamemode; double jPress = false; +double gPress = false; void processInput(GLFWwindow *window, float dtime) { + // quit w if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) { glfwSetWindowShouldClose(window, true); } + + // horizontal movement bool pressed = false; if(glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) { - /* - for(int k = 0; k < 10; k++) { - camz -= speed*cos(rot_hz)*cos(rot_vt)/10; - camx -= speed*sin(rot_hz)*cos(rot_vt)/10; - camy += speed*sin(rot_vt)/10; - if(is_colliding(dtime)) { - camz += speed*cos(rot_hz)*cos(rot_vt)/10; - camx += speed*sin(rot_hz)*cos(rot_vt)/10; - camy -= speed*sin(rot_vt)/10; - k=11; + if(gamemode == 1) { + for(int k = 0; k < 10; k++) { + camz -= creative_speed*cos(rot_hz)*cos(rot_vt)/10; + camx -= creative_speed*sin(rot_hz)*cos(rot_vt)/10; + camy += creative_speed*sin(rot_vt)/10; + if(is_colliding(dtime)) { + camz += creative_speed*cos(rot_hz)*cos(rot_vt)/10; + camx += creative_speed*sin(rot_hz)*cos(rot_vt)/10; + camy -= creative_speed*sin(rot_vt)/10; + k=11; + } } + } else { + camvz = -speed*cos(rot_hz); + camvx = -speed*sin(rot_hz); } - */ - camvz = -speed*cos(rot_hz); - camvx = -speed*sin(rot_hz); pressed = true; //camvy = vtmult*speed*sin(rot_vt); } if(glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS) { - /* - for(int k = 0; k < 10; k++) { - camx -= speed*cos(rot_hz)/10; - camz += speed*sin(rot_hz)/10; - if(is_colliding(dtime)) { - camx += speed*cos(rot_hz)/10; - camz -= speed*sin(rot_hz)/10; - k=11; + if(gamemode == 1) { + for(int k = 0; k < 10; k++) { + camx -= creative_speed*cos(rot_hz)/10; + camz += creative_speed*sin(rot_hz)/10; + if(is_colliding(dtime)) { + camx += creative_speed*cos(rot_hz)/10; + camz -= creative_speed*sin(rot_hz)/10; + k=11; + } } - }*/ - camvx = -speed*cos(rot_hz); - camvz = speed*sin(rot_hz); + } else { + camvx = -speed*cos(rot_hz); + camvz = speed*sin(rot_hz); + } pressed = true; } if(glfwGetKey(window, GLFW_KEY_Z) == GLFW_PRESS) { - /*for(int k = 0; k < 10; k++) { - camz += speed*cos(rot_hz)*cos(rot_vt)/10; - camx += speed*sin(rot_hz)*cos(rot_vt)/10; - camy -= speed*sin(rot_vt)/10; - if(is_colliding(dtime)) { - camz -= speed*cos(rot_hz)*cos(rot_vt)/10; - camx -= speed*sin(rot_hz)*cos(rot_vt)/10; - camy += speed*sin(rot_vt)/10; - k=11; + if(gamemode == 1) { + for(int k = 0; k < 10; k++) { + camz += creative_speed*cos(rot_hz)*cos(rot_vt)/10; + camx += creative_speed*sin(rot_hz)*cos(rot_vt)/10; + camy -= creative_speed*sin(rot_vt)/10; + if(is_colliding(dtime)) { + camz -= creative_speed*cos(rot_hz)*cos(rot_vt)/10; + camx -= creative_speed*sin(rot_hz)*cos(rot_vt)/10; + camy += creative_speed*sin(rot_vt)/10; + k=11; + } } - }*/ - camvz = speed*cos(rot_hz); - camvx = speed*sin(rot_hz); + } else { + camvz = speed*cos(rot_hz); + camvx = speed*sin(rot_hz); + } pressed = true; //camvy = -vtmult*speed*sin(rot_vt); } if(glfwGetKey(window, GLFW_KEY_Q) == GLFW_PRESS) { - /*for(int k = 0; k < 10; k++) { - camx += speed*cos(rot_hz)/10; - camz -= speed*sin(rot_hz)/10; - if(is_colliding(dtime)) { - camx -= speed*cos(rot_hz)/10; - camz += speed*sin(rot_hz)/10; - k=11; + if(gamemode == 1) { + for(int k = 0; k < 10; k++) { + camx += creative_speed*cos(rot_hz)/10; + camz -= creative_speed*sin(rot_hz)/10; + if(is_colliding(dtime)) { + camx -= creative_speed*cos(rot_hz)/10; + camz += creative_speed*sin(rot_hz)/10; + k=11; + } } - }*/ - camvx = speed*cos(rot_hz); - camvz = -speed*sin(rot_hz); + } else { + camvx = speed*cos(rot_hz); + camvz = -speed*sin(rot_hz); + } pressed = true; } - if(njumps > 0 && glfwGetKey(window, GLFW_KEY_SPACE) == GLFW_PRESS) { + // jumps + if(gamemode == 0 && njumps > 0 && glfwGetKey(window, GLFW_KEY_SPACE) == GLFW_PRESS) { if(jPress) { camvy = vtmult*speed; njumps -= 1; @@ -110,6 +125,21 @@ void processInput(GLFWwindow *window, float dtime) { camvz *= (1.0-1.0*5.0*((double)dtime)); } + // gamemode + if(glfwGetKey(window, GLFW_KEY_G) == GLFW_PRESS) { + if(!gPress) { + gPress = true; + gamemode = 1-gamemode; + njumps = 3; + camvx = 0.0; + camvy = 0.0; + camvz = 0.0; + } + } else { + gPress = false; + } + + // camera rotation if(glfwGetKey(window, GLFW_KEY_E) == GLFW_PRESS) { rot_hz -= sensitivity; } @@ -359,7 +389,9 @@ int main_alt() { // glfw: swap buffers and poll IO events (keys pressed/released, mouse moved etc.) // ------------------------------------------------------------------------------- processInput(window, delta); - movePlayerG(delta); + if(gamemode == 0) { + movePlayerG(delta); + } teleport_on_edge(); update_entities(delta); updateProj(delta); @@ -397,5 +429,6 @@ int main(int argc, char** argv) { srand(time(NULL)); triCount = 0; sim_time = 0.0; + gamemode = 0; return main_alt(); } \ No newline at end of file diff --git a/src/menus.c b/src/menus.c index 8be9314..5f54c56 100644 --- a/src/menus.c +++ b/src/menus.c @@ -319,6 +319,7 @@ void gl_printf(unsigned int fragShader, float x, float y, float size, float widt curx += (size+4*width)*(1+get_string_len(chval)); break; default: + fprintf(stderr, "warning : format %%%c is not supported\n", cur); break; } } else { diff --git a/src/move.c b/src/move.c index 9d31fa1..9301086 100644 --- a/src/move.c +++ b/src/move.c @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------------------------------- // double sensitivity = 0.06; double fov = 90.0; -double creative_speed = 0.3; -double speed = 8.0; +double creative_speed = 0.5; +double speed = 5.0; double vtmult = 1.5; double min_dist = 0.4; double friction = 0.3; diff --git a/src/structure.h b/src/structure.h index dae08a5..6c219af 100644 --- a/src/structure.h +++ b/src/structure.h @@ -53,6 +53,9 @@ typedef struct entity { double metad4; double metad5; double metad6; + double metad7; + double metad8; + double metad9; int damage; int* hitpoints; @@ -139,6 +142,7 @@ extern double room_depth; extern double sensitivity; extern double fov; extern double speed; +extern double creative_speed; extern double min_dist; // ---------------------------------------------------------------------------------------------------- // @@ -156,5 +160,6 @@ extern double fz; extern int njumps; extern unsigned int fffff; +extern int gamemode; #endif \ No newline at end of file diff --git a/templates/room_0 b/templates/room_0 index fe27627..c513f43 100644 --- a/templates/room_0 +++ b/templates/room_0 @@ -7,10 +7,10 @@ Blocks : [9.0, 1.0, 9.0, 1.0, 8.0, 1.0, 0.0, 0.0, 128, 128, 128] Teleporters : -[4.0, 1.0, 0.0, 2.0, 4.0, 1.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[0.0, 1.0, 4.0, 1.0, 4.0, 2.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[4.0, 1.0, 9.0, 2.0, 4.0, 1.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[9.0, 1.0, 4.0, 1.0, 4.0, 2.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[4.0, 1.0, 0.0, 2.0, 4.0, 1.0, 0.0, 0.0, 255, 0, 0; -1, 0] +[0.0, 1.0, 4.0, 1.0, 4.0, 2.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[4.0, 1.0, 9.0, 2.0, 4.0, 1.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[9.0, 1.0, 4.0, 1.0, 4.0, 2.0, 0.0, 0.0, 0, 0, 255; 0, 1] Weight : 50 diff --git a/templates/room_1 b/templates/room_1 index 37183cf..d891311 100644 --- a/templates/room_1 +++ b/templates/room_1 @@ -6,10 +6,10 @@ Blocks : [-1.0, 0.0, 3.0, 2.0, 1.0, 2.0, 0.0, 0.0, 255, 255, 255] Teleporters : -[-1.0, 0.0, -9.0, 2.0, 1.0, 2.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[-9.0, 0.0, -1.0, 2.0, 1.0, 2.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[-1.0, 0.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[7.0, 0.0, -1.0, 2.0, 1.0, 2.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[-1.0, 0.0, -9.0, 2.0, 1.0, 2.0, 0.0, 0.0, 255, 0, 0; -1, 0] +[-9.0, 0.0, -1.0, 2.0, 1.0, 2.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[-1.0, 0.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[7.0, 0.0, -1.0, 2.0, 1.0, 2.0, 0.0, 0.0, 0, 0, 255; 0, 1] Entities : [1.0, 3.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 193, 192, 0, 1, 0, 0] diff --git a/templates/room_2 b/templates/room_2 index 22af1e6..c0d60ec 100644 --- a/templates/room_2 +++ b/templates/room_2 @@ -8,10 +8,10 @@ Blocks : [-0.4, 1.0, -0.4, 0.8, 6.0, 0.8, 0.0, 0.0, 128, 128, 128] Teleporters : -[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; -1, 0] +[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 0, 1] Entities : [3.0, 3.0, 3.0, 0.5, 0.5, 0.5, 0.0, 0.0, 255, 192, 0, 1, 0, 3] diff --git a/templates/room_3 b/templates/room_3 index 0248989..215f62c 100644 --- a/templates/room_3 +++ b/templates/room_3 @@ -6,9 +6,9 @@ Blocks : Teleporters : [-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 0, 1] Weight : 50 diff --git a/templates/room_4 b/templates/room_4 index bfb60fe..c00fc1e 100644 --- a/templates/room_4 +++ b/templates/room_4 @@ -3,10 +3,10 @@ Blocks : [-10.0, 7.1, -10.0, 20.0, 0.9, 20.0, 0.0, 0.0, 192, 192, 192] Teleporters : -[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; -1, 0] +[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 0, 1] Entities : [0.0, 3.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 255, 64, 0, 5, 100, 1] diff --git a/templates/room_5 b/templates/room_5 index bf3f484..f8baf58 100644 --- a/templates/room_5 +++ b/templates/room_5 @@ -2,18 +2,18 @@ Blocks : [-10.0, 0.0, -10.0, 20.0, 1.0, 20.0, 0.0, 0.0, 192, 192, 192] Teleporters : -[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; 0, -1] -[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; -1, 0] -[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 0, 1] -[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 1, 0] +[-10.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 255, 0, 0; -1, 0] +[-5.0, 1.0, -10.0, 10.0, 2.0, 1.0, 0.0, 0.0, 255, 255, 0; 0, -1] +[9.0, 1.0, -5.0, 1.0, 2.0, 10.0, 0.0, 0.0, 0, 255, 0; 1, 0] +[-5.0, 1.0, 9.0, 10.0, 2.0, 1.0, 0.0, 0.0, 0, 0, 255; 0, 1] Entities: -[-15.0, 4.0, -15.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 4, 0.0, 5.0, 0.0, 2, 1, 90] -[-5.0, 9.0, -15.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 4, 5.0, 0.0, 0.0, 2, 1, 0] -[0.0, 10.0, -5.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 4, 0.0, 0.0, 5.0, 2, 1, 270] +[-15.0, 4.0, -15.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 4, 0.0, 5.0, 0.0, 2, 1, 0] +[-5.0, 9.0, -15.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 5, 5.0, 0.0, 0.0, 6.0, 0.0, 0.0] +[0.0, 10.0, -5.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 128, 192, 10, 0, 4, 0.0, 0.0, 5.0, 2, 1, 35] Weight : -50 +100 $ entities: @@ -21,8 +21,14 @@ entities: if entityType = 4 (moving platform) [.. amplitude_x, amplitude_y, amplitude_z, mult, divd, phase] with - amplitude_{x,y,z} = doubles[>= 0.0] + amplitude_{x,y,z} = double[>= 0.0] {mult,divd} = int {phase} = int[0, 360] + +else if entityType = 5 (linear moving platform) + [.. amplitude_x, amplitude_y, amplitude_z, speed_x, speed_y, speed_z] with + amplitude_{x,y,z} = double[>= 0.0] + speed_{x,y,z} = double + else [..] \ No newline at end of file