Dash emits rotating particles
This commit is contained in:
parent
a84c68850d
commit
5698bca940
4
player.c
4
player.c
@ -88,8 +88,8 @@ void player_Advance(System_Player *sys, Duration deltaTime) {
|
|||||||
sys->super->particle,
|
sys->super->particle,
|
||||||
vec2_Add(vec2_Random(-5, 5, -30, 30), to_pos),
|
vec2_Add(vec2_Random(-5, 5, -30, 30), to_pos),
|
||||||
vec2(rand_DoubleRange(650, 700) * -p->faceDirection, rand_DoubleRange(-100, 100)),
|
vec2(rand_DoubleRange(650, 700) * -p->faceDirection, rand_DoubleRange(-100, 100)),
|
||||||
7, rand_DoubleRange(10, 16), 3,
|
7, rand_DoubleRange(10, 16), 4,
|
||||||
duration_FromSeconds(rand_DoubleRange(1.5, 2.0)), &render_ModeInverse);
|
duration_FromSeconds(rand_DoubleRange(4.0, 5.0)), &render_ModeRotate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,13 @@ const FillMode render_ModeInverse = {
|
|||||||
.rotate = {.microseconds = 0},
|
.rotate = {.microseconds = 0},
|
||||||
.dissolve = {.microseconds = 0},
|
.dissolve = {.microseconds = 0},
|
||||||
.fadein = false};
|
.fadein = false};
|
||||||
|
extern const FillMode render_ModeRotate = {
|
||||||
|
.rop2 = R2_COPYPEN,
|
||||||
|
.style = BS_SOLID,
|
||||||
|
.hatch = 0,
|
||||||
|
.rotate = {.microseconds = 100000},
|
||||||
|
.dissolve = {.microseconds = 0},
|
||||||
|
.fadein = false};
|
||||||
|
|
||||||
|
|
||||||
void render_SetModes(FillMode mode, TimePoint since) {
|
void render_SetModes(FillMode mode, TimePoint since) {
|
||||||
|
@ -50,12 +50,13 @@ typedef struct {
|
|||||||
// style = BS_SOLID,
|
// style = BS_SOLID,
|
||||||
// others = 0
|
// others = 0
|
||||||
extern const FillMode render_ModeDefault;
|
extern const FillMode render_ModeDefault;
|
||||||
|
|
||||||
// Fill mode that inverses the screen.
|
// Fill mode that inverses the screen.
|
||||||
// rop2 = R2_NOT,
|
// rop2 = R2_NOT,
|
||||||
// style = BS_SOLID,
|
// style = BS_SOLID,
|
||||||
// others = 0
|
// others = 0
|
||||||
extern const FillMode render_ModeInverse;
|
extern const FillMode render_ModeInverse;
|
||||||
|
// Fill mode that rotates.
|
||||||
|
extern const FillMode render_ModeRotate;
|
||||||
|
|
||||||
typedef struct _App App;
|
typedef struct _App App;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user