taisei/src/plrmodes/marisa.c

68 lines
1.6 KiB
C
Raw Normal View History

/*
* 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>.
*/
#include "taisei.h"
#include "global.h"
#include "plrmodes.h"
2017-12-06 00:33:19 +01:00
#include "marisa.h"
PlayerCharacter character_marisa = {
.id = PLR_CHAR_MARISA,
.lower_name = "marisa",
.proper_name = "Marisa",
.full_name = "Kirisame Marisa",
.title = "Black Magician",
.dialog_sprite_name = "dialog/marisa",
.player_sprite_name = "marisa",
.ending = {
.good = good_ending_marisa,
.bad = bad_ending_marisa,
},
};
2017-12-06 00:33:19 +01:00
void marisa_common_shot(Player *plr, int dmg) {
if(!(global.frames % 4)) {
play_sound("generic_shot");
}
if(!(global.frames % 6)) {
Color c = rgb(1, 1, 1);
PROJECTILE("marisa", plr->pos + 10 - 15.0*I, c, linear, { -20.0*I },
.type = PlrProj+dmg,
.color_transform_rule = proj_clrtransform_particle,
);
PROJECTILE("marisa", plr->pos - 10 - 15.0*I, c, linear, { -20.0*I },
.type = PlrProj+dmg,
.color_transform_rule = proj_clrtransform_particle,
);
}
}
void marisa_common_slave_visual(Enemy *e, int t, bool render) {
if(!render) {
return;
}
glPushMatrix();
glTranslatef(creal(e->pos), cimag(e->pos), -1);
// glRotatef(global.frames * 3, 0, 0, 1);
draw_texture(0,0,"part/lasercurve");
glPopMatrix();
}
2017-11-18 10:16:03 +01:00
void marisa_common_masterspark_draw(int t) {
Shader *mshader = get_shader("masterspark");
glUseProgram(mshader->prog);
glUniform1f(uniloc(mshader,"t"),t);
draw_quad();
glUseProgram(0);
2017-11-18 10:16:03 +01:00
}