Mercurial > hg > Members > kono > tree_dandy2
view scheduletest.c @ 0:01387a2e419e
initial version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 15:39:45 +0900 |
parents | |
children |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <SDL.h> #include "schedule.h" #include "Character.h" #include "Character_state.h" #include "sound.h" #include "bom.h" #include "tokuten.h" #include "count2.h" //#include "libps.h" #include"debug.h" #include "SDL_opengl.h" enum { FRAME_RATE = 32, }; /*enemy schedule*/ int kyeenemyno = -1; void schedule() { int i; if (stage == 0) { switch (filpcount) { case 1: SoundStop(); SoundPlay(0); break; case FRAME_RATE * 2: Putenemy(1, 120, -128, 0, 4, chara_state0); break; case FRAME_RATE * 3: Putenemy(1, 56, -128, 0, 8, chara_state0); Putenemy(1, 184, -128, 0, 8, chara_state0); break; case FRAME_RATE * 4: Putenemy(1, 120, -128, 0, 4, chara_state0); break; case FRAME_RATE * 5: Putenemy(1, 224, -128, 1, 1, chara_state0); Putenemy(1, 184, -128, 1, 1, chara_state0); break; case FRAME_RATE * 6: Putenemy(1, 120, -128, 1, 2, chara_state0); break; case FRAME_RATE * 7: Putenemy(1, 56, -128, 0, 1, chara_state0); Putenemy(1, 184, -128, 0, 1, chara_state0); break; case FRAME_RATE * 8: Putenemy(2, 120, -128, 0, 1, chara_state0); break; case FRAME_RATE * 12: Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4); break; case FRAME_RATE * 13: Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4); break; case FRAME_RATE * 14: Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4); break; case FRAME_RATE * 15: Putenemy(2, 1280 - 128 - 120, -128, -1, 1, chara_state4); break; case FRAME_RATE * 16: Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4); break; case FRAME_RATE * 17: Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4); break; case FRAME_RATE * 18: Putenemy(1, 1280 - 128 - 120, -32, 0, 1, chara_state4); Putenemy(1, 1280 - 128, -128, -2, 1, chara_state4); Putenemy(1, 800, -88, -1, 1, chara_state4); break; case FRAME_RATE * 24: Putenemy(1, 256, -128, 0, 1, chara_state4); Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4); break; case FRAME_RATE * 25: Putenemy(2, 512, -128, 0, 1, chara_state4); Putenemy(2, 1280 - 128, -128, 0, 1, chara_state4); break; case FRAME_RATE * 26: Putenemy(1, 384, -128, 0, 1, chara_state4); Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4); Putenemy(1, 512, -128, 0, 3, chara_state4); Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4); break; case FRAME_RATE * 27: Putenemy(2, 512, -128, 0, 3, chara_state2); Putenemy(2, 256 - 128, -128, 0, 2, chara_state2); Putenemy(2, 768, -128, 0, 4, chara_state2); Putenemy(2, 128, -128, 0, 3, chara_state2); break; case FRAME_RATE * 28: Putenemy(1, 256, -128, 0, 1, chara_state4); Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4); break; case FRAME_RATE * 29: Putenemy(2, 256, -128, 0, 1, chara_state4); Putenemy(2, 1280 - 256 - 128, -128, 0, 1, chara_state4); break; case FRAME_RATE * 30: Putenemy(1, 256, -128, 0, 1, chara_state4); Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4); break; case FRAME_RATE * 33: Putenemy(1, 256, 1088, 0, -1, chara_state5); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);//5/22/pm5:300 break; case FRAME_RATE * 34: Putenemy(2, 256, 1088, 0, -1, chara_state5); Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 35: Putenemy(1, 256, 1088, 0, -1, chara_state5); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 36: Putenemy(2, 256, 1088, 0, -1, chara_state5); Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 37: Putenemy(1, 256, 1088, 0, -1, chara_state5); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 38: Putenemy(2, 256, 1088, 0, -1, chara_state5); Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 39: Putenemy(1, 256, 1088, 0, -1, chara_state5); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5); break; case FRAME_RATE * 50: Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3); break; case FRAME_RATE * 46: Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3); break; case FRAME_RATE * 54: Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3); break; case FRAME_RATE * 60: Putenemy(1, 256, 1088, 0, -1, chara_state6); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 61: Putenemy(1, 256, 1088, 0, -1, chara_state6); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 62: Putenemy(1, 256, 1088, 0, -1, chara_state6); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 63: Putenemy(1, 256, 1088, 0, -1, chara_state6); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 64: Putenemy(1, 256, 1088, 0, -1, chara_state6); Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 65: Putenemy(40, 256, 1088, 0, -1, chara_state6); Putenemy(40, 1280 - 256 - 128, 1088, 0, -1, chara_state6); break; case FRAME_RATE * 80: Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 66: Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 84: Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 70: Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 88: Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 74: Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 92: Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 78: Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 100: Putenemy(41, 256, -128, 0, 1, chara_state7); Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 81: Putenemy(42, 256, -128, 0, 1, chara_state7); Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 104: Putenemy(41, 256, -128, 0, 1, chara_state7); Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 83: Putenemy(42, 256, -128, 0, 1, chara_state7); Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 108: Putenemy(41, 256, -128, 0, 1, chara_state7); Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 85: Putenemy(42, 256, -128, 0, 1, chara_state7); Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; case FRAME_RATE * 112: Putenemy(41, 256, -128, 0, 1, chara_state7); Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7); break; } //caseć–‡ } }