2017-10-08 13:30:51 +02:00
|
|
|
/*
|
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
2018-01-04 18:14:31 +01:00
|
|
|
* Copyright (c) 2011-2018, Lukas Weber <laochailan@web.de>.
|
|
|
|
* Copyright (c) 2012-2018, Andrei Alexeyev <akari@alienslab.net>.
|
2017-10-08 13:30:51 +02:00
|
|
|
*/
|
|
|
|
|
2017-11-25 20:45:11 +01:00
|
|
|
#include "taisei.h"
|
|
|
|
|
2017-10-08 13:30:51 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include "plrmodes.h"
|
2017-12-06 00:33:19 +01:00
|
|
|
#include "marisa.h"
|
2018-04-12 16:08:48 +02:00
|
|
|
#include "renderer/api.h"
|
2017-10-08 13:30:51 +02:00
|
|
|
|
|
|
|
PlayerCharacter character_marisa = {
|
2018-01-12 19:26:07 +01:00
|
|
|
.id = PLR_CHAR_MARISA,
|
|
|
|
.lower_name = "marisa",
|
|
|
|
.proper_name = "Marisa",
|
|
|
|
.full_name = "Kirisame Marisa",
|
|
|
|
.title = "Black Magician",
|
|
|
|
.dialog_sprite_name = "dialog/marisa",
|
2018-02-06 07:19:25 +01:00
|
|
|
.player_sprite_name = "player/marisa",
|
2018-01-12 19:26:07 +01:00
|
|
|
.ending = {
|
|
|
|
.good = good_ending_marisa,
|
|
|
|
.bad = bad_ending_marisa,
|
|
|
|
},
|
2017-10-08 13:30:51 +02:00
|
|
|
};
|
|
|
|
|
2017-12-06 00:33:19 +01:00
|
|
|
void marisa_common_shot(Player *plr, int dmg) {
|
2018-01-12 19:26:07 +01:00
|
|
|
if(!(global.frames % 4)) {
|
|
|
|
play_sound("generic_shot");
|
|
|
|
}
|
2017-10-08 13:30:51 +02:00
|
|
|
|
2018-01-12 19:26:07 +01:00
|
|
|
if(!(global.frames % 6)) {
|
|
|
|
Color c = rgb(1, 1, 1);
|
2017-11-10 21:49:16 +01:00
|
|
|
|
2018-01-12 19:26:07 +01:00
|
|
|
PROJECTILE("marisa", plr->pos + 10 - 15.0*I, c, linear, { -20.0*I },
|
|
|
|
.type = PlrProj+dmg,
|
2018-04-12 16:08:48 +02:00
|
|
|
.shader = "sprite_default",
|
2018-01-12 19:26:07 +01:00
|
|
|
);
|
2017-11-10 21:49:16 +01:00
|
|
|
|
2018-01-12 19:26:07 +01:00
|
|
|
PROJECTILE("marisa", plr->pos - 10 - 15.0*I, c, linear, { -20.0*I },
|
|
|
|
.type = PlrProj+dmg,
|
2018-04-12 16:08:48 +02:00
|
|
|
.shader = "sprite_default",
|
2018-01-12 19:26:07 +01:00
|
|
|
);
|
|
|
|
}
|
2017-10-08 13:30:51 +02:00
|
|
|
}
|
|
|
|
|
2017-11-15 07:05:47 +01:00
|
|
|
void marisa_common_slave_visual(Enemy *e, int t, bool render) {
|
2018-01-12 19:26:07 +01:00
|
|
|
if(!render) {
|
|
|
|
return;
|
|
|
|
}
|
2017-11-15 07:05:47 +01:00
|
|
|
|
2018-04-12 16:08:48 +02:00
|
|
|
draw_sprite_batched(creal(e->pos), cimag(e->pos), "part/smoothdot");
|
2017-10-08 13:30:51 +02:00
|
|
|
}
|
2017-11-18 10:16:03 +01:00
|
|
|
|
|
|
|
void marisa_common_masterspark_draw(int t) {
|
2018-04-12 16:08:48 +02:00
|
|
|
ShaderProgram *prog_saved = r_shader_current();
|
|
|
|
r_shader("masterspark");
|
|
|
|
r_uniform_float("t", t);
|
|
|
|
r_draw_quad();
|
|
|
|
r_shader_ptr(prog_saved);
|
2017-11-18 10:16:03 +01:00
|
|
|
}
|