add fast_1 platforms

This commit is contained in:
Lephenixnoir 2021-08-21 22:52:08 +02:00
parent e40380b02b
commit f339d18ae2
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
7 changed files with 25 additions and 8 deletions

View File

@ -29,6 +29,9 @@ set(ASSETS
assets-cg/level/level8.txt
assets-cg/level/level9.txt
assets-cg/level/level10.txt
assets-cg/level/level11.txt
assets-cg/level/level12.txt
assets-cg/level/level13.txt
)
fxconv_declare_converters(converters.py)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 960 B

View File

@ -1,5 +1,4 @@
#anger
#Anger may make certain choices clearer.
#Anger may make certain\nchoices clearer.
right

View File

@ -45,7 +45,7 @@ def convert_level(input, output, params, target):
action = 1
if "rotate_right" in r:
action = 2
if "speed" in r:
if "fast_1" in r:
action = 3
if "fadeout" in r:
action = 4
@ -55,6 +55,10 @@ def convert_level(input, output, params, target):
action = 6
if "slide" in r:
action = 7
if "fast_2" in r:
action = 8
if "fast_3" in r:
action = 9
# Position
if "left" in r:
@ -72,8 +76,8 @@ def convert_level(input, output, params, target):
# In the middle -> medium
if shape < 0 and position == 2:
shape = 3
# No properties whatsoever -> normal
if shape < 0 and action == 0:
# No special properties -> normal
if shape < 0 and action in [0, 3, 8, 9]:
shape = 4
if shape < 0 or action < 0 or position < 0:

View File

@ -27,11 +27,13 @@ typedef enum {
Action_Normal = 0,
Action_RotateLeft = 1,
Action_RotateRight = 2,
Action_Speed = 3,
Action_Speed1 = 3,
Action_FadeOut = 4,
Action_OuterRotateLeft = 5,
Action_OuterRotateRight = 6,
Action_Slide = 7,
Action_Speed2 = 8,
Action_Speed3 = 9,
} action_t;
typedef enum {
@ -136,7 +138,8 @@ void rect_physics(rect_t *r, rectmeta_t const *meta, float time);
extern level_t level1, level2, level3, level4;
extern level_t level5, level6, level7, level8;
extern level_t level9, level10;
extern level_t level9, level10, level11, level12;
extern level_t level13;
//---
// Menu

View File

@ -53,11 +53,14 @@ int main(void)
level_t const *story_levels[] = {
&level1, &level2, &level3, &level4, &level5, &level6, &level7,
&level8, &level9, &level10, NULL,
&level8, &level9, &level10, &level11, &level12, &level13, NULL,
};
int story_position = main_menu();
story_position = 11;
game_t game;
game.forced_player_rota = 0;
load_level(&game, story_levels[story_position]);
state_t state = State_Playing;

View File

@ -127,4 +127,9 @@ void rect_physics(rect_t *r, rectmeta_t const *meta, float absolute_time)
float vr = 2.0; /* rad/tempo */
r->r = 0.3 - time * vr;
}
else if(meta->action == Action_Speed1) {
/* Double speed between -8 and -6 to skip 2 tempos */
float speeding_period = fminf(2.0, fmaxf(0.0, time + 6.0));
r->x -= RECT_SPEED * speeding_period;
}
}