Mercurial > hg > Members > kono > tree_dandy2
view tama2.c @ 21:b7654db65a34
add TODO
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Dec 2010 19:04:17 +0900 |
parents | 01387a2e419e |
children |
line wrap: on
line source
#include <stdlib.h> #include "Character.h" #include "Character_state.h" //#include "Enemy.h" #include "sankaku.h" #include"debug.h" #include <SDL_mixer.h> #include "sound.h" /*たまたまたま*/ /*tama.h*/ void Puttama(int type, float x, float y) { PlaySdlMixer(0, SHOT_B) ;// Enemys atack !! TFon(); switch (type) { case 0: Putenemy(3, x, y, 0, 2, chara_state0); Putenemy(3, x, y, (float) Mysin(15) * 2 / SANKAKU, (float) Mycos(15) * 2 / SANKAKU, chara_state0); Putenemy(3, x, y, (float) Mysin(30) * 2 / SANKAKU, (float) Mycos(30) * 2 / SANKAKU, chara_state0); Putenemy(3, x, y, (float) Mysin(-15) * 2 / SANKAKU, (float) Mycos(-15) * 2 / SANKAKU, chara_state0); Putenemy(3, x, y, (float) Mysin(-30) * 2 / SANKAKU, (float) Mycos(-30) * 2 / SANKAKU, chara_state0); break; case 1: Putenemy(3, x, y, (float) Mysin(rand() % 15) * 2 / SANKAKU, (float) Mycos(rand() % 15) * 2 / SANKAKU, chara_state0); Putenemy(3, x, y, (float) Mysin(rand() % 15) * 2 / SANKAKU, (float) Mycos(rand() % 15) * 2 / SANKAKU, chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15)*2/SANKAKU,(float)Mycos(rand()%15)*2/SANKAKU,chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15)*2/SANKAKU,(float)Mycos(rand()%15)*2/SANKAKU,chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15)*2/SANKAKU,(float)Mycos(rand()%15)*2/SANKAKU,chara_state0); Putenemy(3, x, y, (float) Mysin(rand() % 15 * -1) * 2 / SANKAKU, (float) Mycos(rand() % 15 * -1) * 2 / SANKAKU, chara_state0); Putenemy(3, x, y, (float) Mysin(rand() % 15 * -1) * 2 / SANKAKU, (float) Mycos(rand() % 15 * -1) * 2 / SANKAKU, chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15*-1)*2/SANKAKU,(float)Mycos(rand()%15*-1)*2/SANKAKU,chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15*-1)*2/SANKAKU,(float)Mycos(rand()%15*-1)*2/SANKAKU,chara_state0); // Putenemy(3,x,y,(float) Mysin(rand()%15*-1)*2/SANKAKU,(float)Mycos(rand()%15*-1)*2/SANKAKU,chara_state0); break; case 2: Putenemy(6, x, y, 10, -3, chara_state20); break; case 3: Putenemy(6, x, y, -10, -3, chara_state21); break; case 4: Putenemy(7, x, y, 0, 15, chara_state0); break; case 5: Putenemy(8, x, y, 0, 30, chara_state0); break; case 6: //本体 Putenemy(10, x, y, 0, 0, chara_state30); break; case 7: Putenemy(6, x, y, 0, 4, chara_state0); Putenemy(6, x, y, (float) Mysin(15) * 4 / SANKAKU, (float) Mycos(15) * 4 / SANKAKU, chara_state0); Putenemy(6, x, y, (float) Mysin(30) * 4 / SANKAKU, (float) Mycos(30) * 4 / SANKAKU, chara_state0); Putenemy(6, x, y, (float) Mysin(-15) * 4 / SANKAKU, (float) Mycos(-15) * 4 / SANKAKU, chara_state0); Putenemy(6, x, y, (float) Mysin(-30) * 4 / SANKAKU, (float) Mycos(-30) * 4 / SANKAKU, chara_state0); break; case 8: Putenemy(3, x + 8, y + 8, -4, 0, chara_state0); Putenemy(3, x + 8, y + 8, 4, 0, chara_state0); Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0); Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0); break; case 9: Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0); Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0); Putenemy(3, x + 8, y, -4, Mysin(30) * 8 / SANKAKU, chara_state0); Putenemy(3, x + 8, y, 4, Mysin(30) * 8 / SANKAKU, chara_state0); break; case 10: Putenemy(3, x + 8, y, -4, 0, chara_state0); Putenemy(3, x + 8, y, 4, 0, chara_state0); Putenemy(3, x + 8, y, 0, 4, chara_state0); Putenemy(3, x + 8, y, 0, -4, chara_state0); break; case 11: { int a; a = rand() % 360; Putenemy(3, x + 8, y, (float) Mycos(a) / SANKAKU, (float) Mysin(a) / SANKAKU, chara_state0); } } TFoff(); }