Mercurial > hg > Game > S_Dandy
changeset 5:93bdb789e60d
remove unused file.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 18:48:25 +0900 |
parents | bb2fbe78c7cd |
children | 446447936e9f |
files | src/Enemy.cc src/Enemy.h src/Makefile.def src/atari.cc src/atari.h src/back.cc src/back.h |
diffstat | 7 files changed, 1 insertions(+), 441 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Enemy.cc Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -l#include "Enemy.h" -#include"syokika.h" - -int filpcount = 0; -int stage = 0; - -teki enemy[300]; -teki *e; -BOOL tf = FALSE; - -#define ENEMY_STATUS(id,charno,score,hardness) {charno,score,hardness} -const state enemystate[] = ENEMY_STATUS_TABLE; - -void TFon() -{ - tf = TRUE; -} - -void TFoff() -{ - tf = FALSE; -} - -void Putenemy(int charno, float x, float y, float sx, float sy, int move) -{ - int ii = 0; - e = &enemy[0]; - while ((e->f) == TRUE) { - ii++; - if (ii == 100) - return; - e++; - } - e->x = x; - e->y = y; - e->sx = sx; - e->sy = sy; - e->charno = enemystate[charno].charno; - e->f = TRUE; - e->p = enemystate[charno].p; - e->move = move; - e->sc = enemystate[charno].sc; - e->dt1 = e->dt2 = 0; - e->tama = tf; -} - -void -Putenemyb(int b, int charno, float x, float y, float sx, float sy, - int move) -{ - //int ii=0; - e = &enemy[b]; - e->x = x; - e->y = y; - e->sx = sx; - e->sy = sy; - e->charno = enemystate[charno].charno; - e->f = TRUE; - e->p = enemystate[charno].p; - e->move = move; - e->sc = enemystate[charno].sc; - e->dt1 = e->dt2 = 0; - e->tama = tf; -}
--- a/src/Enemy.h Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -#include "bool.h" - -#ifndef _ENEMY_H_ -#define _ENEMY_H_ - -typedef struct enemy_status { - int charno; // sprite image number - int sc; // score - int p; // hardness -} state; - -typedef struct teki { - float x; - float y; - float sx; - float sy; - int charno; - BOOL tama; /*たま */ - BOOL f; /*表示フラグ */ - int p; /*かたさです */ - int move; - int sc; /*スコア */ - int dt1; - int dt2; - float s; -} teki; - - -// prote type -extern void Puttama(int type, float x, float y); -extern void Defenemy(int no, int charno, int sc, int p); -extern void TFon(); -extern void TFoff(); -extern void Putenemy(int charno, float x, float y, float sx, float sy, - int move); -extern void Putenemyb(int b, int charno, float x, float y, float sx, - float sy, int move); -extern void En0(); - - -extern int filpcount; -extern int stage; -extern teki enemy[300]; -extern const state enemystate[50]; - -/** - * enemyの種類一覧 - */ -#define ENEMY_STATUS_TABLE {\ - ENEMY_STATUS(UNUSED0, 0, 0, 0),\ - ENEMY_STATUS(ID_GREENCRAB, ENEMY_GREENCRAB, 330, 98),\ - ENEMY_STATUS(ID_PLANE, ENEMY_PLANE, 470, 37),\ - ENEMY_STATUS(ID_REDBULLET, ENEMY_REDBULLET, 30, 16),\ - ENEMY_STATUS(ID_BOSS1ORGAN, BOSS1_ORGAN, 25000, 10000),\ - ENEMY_STATUS(ID_BOSS1SIDEPARTS, BOSS1_ORGAN, 10000, 10000),\ - ENEMY_STATUS(ID_BLUEBULLET, ENEMY_BLUEBULLET, 40, 39),\ - ENEMY_STATUS(ID_LASER, ENEMY_LASER, 100, 100000),\ - ENEMY_STATUS(ID_LIGHTNING, ENEMY_LIGHTNING, 100, 100000),\ - ENEMY_STATUS(ID_ASTEROID, ASTEROID, 170, 500),\ - ENEMY_STATUS(ID_ASTEROIDID_BOSS2BODY, BOSS2_BODY, 100, 500),\ - ENEMY_STATUS(ID_BOSS2LEFTSHOULDER, BOSS2_LEFTSHOULDER, 10000, 12000),\ - ENEMY_STATUS(ID_BOSS2RIGHTSHOULDER, BOSS2_RIGHTSHOULDER, 10000, 12000),\ - ENEMY_STATUS(ID_BOSS2RIGHTARM, BOSS2_RIGHTARM, 5000, 15000),\ - ENEMY_STATUS(ID_BOSS2LEFTARM, BOSS2_LEFTARM, 5000, 15000),\ - ENEMY_STATUS(ID_BOSS2BATTERY, BOSS2_BATTERY, 10000, 5000),\ - ENEMY_STATUS(ID_BOSS2OPENBATTERY, BOSS2_OPENBATTERY, 10000, 5000),\ - ENEMY_STATUS(ID_BOSS2BROKENHATCH, BOSS2_BROKENHATCH, 100, 500),\ - ENEMY_STATUS(ID_BOSS2DUMMY, BOSS2_DUMMY, 50000, 15000),\ - ENEMY_STATUS(ID_BOSS2RIGHTSHOULDERUP, BOSS2_RIGHTSHOULDERUP, 10000, 20000),\ - ENEMY_STATUS(ID_BOSS2LEFTSHOULDERUP, BOSS2_LEFTSHOULDERUP, 10000, 15000),\ - ENEMY_STATUS(ID_BOSS2LEFTSHOULDERGIRD, BOSS2_LEFTSHOULDERGIRD, 100, 20000),\ - ENEMY_STATUS(ID_BOSS2RIGHTARMBATTERY, BOSS2_RIGHTARMBATTERY, 100, 500),\ - ENEMY_STATUS(ID_BOSS2LEFTARMBATTERY, BOSS2_LEFTARMBATTERY, 100, 500),\ - ENEMY_STATUS(ID_ORBIT, ORBITMACHINE, 20, 1000000),\ - ENEMY_STATUS(UNUSED1, 0, 0, 0),\ - ENEMY_STATUS(UNUSED2, 0, 0, 0),\ - ENEMY_STATUS(UNUSED3, 0, 0, 0),\ - ENEMY_STATUS(UNUSED4, 0, 0, 0),\ - ENEMY_STATUS(UNUSED5, 0, 0, 0),\ - ENEMY_STATUS(ID_BLACK_HOLE, BLACKHOLE, 200000, 30000),\ - ENEMY_STATUS(UNUSED6, 0, 0, 0),\ - ENEMY_STATUS(UNUSED7, 0, 0, 0),\ - ENEMY_STATUS(UNUSED8, 0, 0, 0),\ - ENEMY_STATUS(UNUSED9, 0, 0, 0),\ - ENEMY_STATUS(UNUSED10, 0, 0, 0),\ - ENEMY_STATUS(UNUSED11, 0, 0, 0),\ - ENEMY_STATUS(UNUSED12, 0, 0, 0),\ - ENEMY_STATUS(UNUSED13, 0, 0, 0),\ - ENEMY_STATUS(UNUSED14, 0, 0, 0),\ - ENEMY_STATUS(ID_GUN_BATTERY, GUNBATTERY, 540, 137),\ - ENEMY_STATUS(ID_PURPLE_CORE, PURPLECORE, 840, 287),\ - ENEMY_STATUS(ID_SPACE_FISH, SPACEFISH, 370, 137),\ - ENEMY_STATUS(ID_AUTOMISSILE, MISSILE, 210, 24),\ - ENEMY_STATUS(ID_BOSS3, BOSS3_BODY, 100000, 9600),\ - ENEMY_STATUS(UNUSED15, 0, 0, 0),\ - ENEMY_STATUS(UNUSED16, 0, 0, 0),\ - ENEMY_STATUS(UNUSED17, 0, 0, 0),\ - ENEMY_STATUS(UNUSED18, 0, 0, 0),\ - ENEMY_STATUS(ID_BOSS4, BODD4_BODY, 300000, 20400)\ -} - -#define ENEMY_STATUS(id,charno,score,hardness) id -typedef enum ENEMY_STATUS EnemyId; -#undef ENEMY_STATUS - -#endif // _ENEMY_H_
--- a/src/Makefile.def Tue Dec 07 18:37:43 2010 +0900 +++ b/src/Makefile.def Tue Dec 07 18:48:25 2010 +0900 @@ -1,6 +1,6 @@ TARGET = s_dandy -CERIUM = ../../Cerium +CERIUM = ../../../HG/Cerium ABIBIT = 32 ABI = -m$(ABIBIT)
--- a/src/atari.cc Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -#include <SDL.h> -#include "atari.h" -#include "bom.h" -#include "count2.h" -#include "sound.h" -#include "Enemy.h" -//#include "libps.h" - -//#include<libps.h> -#include "SDL_image.h" -//#include "libps2.h" -#include "SDL_opengl.h" -//#include "texture.h" -#include "object.h" -//#include "tree_controll.h" -#include "sgoex.h" -//#include "trace.h" -//#include "syokika.h" -//#include "LoadSprite.h" - - -extern SpriteTable sptable[DEFOBJ]; - - -int atari(int playerno, int enemyno) -{ - int i1, i2, h, w, ex, ey, charno; - int n; - ex = enemy[enemyno].x; - ey = enemy[enemyno].y; - charno = enemy[enemyno].charno; - w = sptable[charno].w; - h = sptable[charno].h; - i2 = playerno; - - - //自機やられ -#ifndef INVISIBLE_MODE - if ((ex < jiki.x + 128 / 2) && (ex + w > jiki.x + 128 / 2) - && (ey < jiki.y + 128 / 2) && (ey + h > jiki.y + 128 / 2) - && jiki.muteki == 0) { - //se_voice[0] = SsUtKeyOn(vab[JIKIOUT], 0, 0, 65, 0, 60, 60); - Bom(jiki.x + 16, jiki.y + 16); - jiki.bf = FALSE; - jiki.zanki--; - jiki.muteki = 120; - - infg.stg = 0; - infg_level--; - if (infg_level < 0) - infg_level = 0; - - return (0); - } -#endif - - if (enemy[enemyno].tama == TRUE) - goto jumping; - for (i1 = 0; i1 < tama_lv1_end + 1; i1++) { - - if ((tama_lv1[i1].x + 64 + 64 > ex) - && (ex + w > tama_lv1[i1].x + 16) - && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + h) - && (tama_lv1[i1].r != -1)) { - tama_lv1[i1].r = -1; - enemy[enemyno].p -= TAMALV1P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - if ((tama_lv1[i1].x + 64 > ex) && (ex + w > tama_lv1[i1].x) - && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + h) - && (tama_lv1[i1].l != -1)) { - tama_lv1[i1].l = -1; - enemy[enemyno].p -= TAMALV1P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - } - - for (i1 = 0; i1 < tama_lv2_end + 1; i1++) { - if ((tama_lv2[i1].x + 128 + 64 > ex) - && (ex + w > tama_lv2[i1].x + 128) - && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + h) - && (tama_lv2[i1].rr != -1)) { - tama_lv2[i1].rr = -1; - enemy[enemyno].p -= TAMALV2P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - - if ((tama_lv2[i1].x + 64 + 64 > ex) - && (ex + w > tama_lv2[i1].x + 16) - && (tama_lv2[i1].y - 32 + 192 > ey) - && (tama_lv2[i1].y - 32 < ey + h) - && (tama_lv2[i1].sr != -1)) { - tama_lv2[i1].sr = -1; - enemy[enemyno].p -= TAMALV2P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - if ((tama_lv2[i1].x + 64 > ex) && (ex + w > tama_lv2[i1].x) - && (tama_lv2[i1].y - 32 + 192 > ey) - && (tama_lv2[i1].y - 32 < ey + h) - && (tama_lv2[i1].sl != -1)) { - tama_lv2[i1].sl = -1; - enemy[enemyno].p -= TAMALV2P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - if ((tama_lv2[i1].x - 64 + 64 > ex) - && (ex + w > tama_lv2[i1].x - 64) - && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + h) - && (tama_lv2[i1].ll != -1)) { - tama_lv2[i1].ll = -1; - enemy[enemyno].p -= TAMALV2P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - } - if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) - && (jiki.y > ey + h)) { - enemy[enemyno].p -= TAMALV3P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - jumping: - if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) - && (jiki.y + 128 > ey) && (jiki.y < ey + h)) { - enemy[enemyno].p -= TAMALV3P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - /*laser lv1 */ - for (i1 = 0; i1 < laser_lv1_end + 1; i1++) { - n = laser_lv1[i1].r * 128 / 4096; - - if ((laser_lv1[i1].x + n > ex) && (ex + w > laser_lv1[i1].x) - && (laser_lv1[i1].y + n > ey) && (laser_lv1[i1].y < ey + h) - && (laser_lv1[i1].r != -1)) { - laser_lv1[i1].r = -1; - laser_lv1[i1].y = -1; - enemy[enemyno].p -= LASERLV1P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - } - /*shield(laser lv2) */ - if ((enemy[enemyno].tama == TRUE) && (lg.stg > 0) && - (laser_lv2[0].x + 128 > ex) && (ex + w > laser_lv2[0].x - 128) - && (laser_lv2[0].y + 128 > ey) && (laser_lv2[0].y - 128 < ey + h) - && (laser_lv2[0].r != 0)) { - enemy[enemyno].p -= LASERLV2P; - lg.stg -= 26; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - /*bomber(laser lv3) */ - if (laser_lv3[0].r < 62) { - for (i1 = 1; i1 < 128; i1++) { - if ((laser_lv3[i1].x + 128 > ex) && (ex + w > laser_lv3[i1].x) - && (laser_lv3[i1].y + 128 > ey) - && (laser_lv3[i1].y < ey + h) - && (laser_lv3[i1].r > 0)) { - tama_lv2[i1].rr = -1; - enemy[enemyno].p -= LASERLV3P; - infg.stg++; - if (enemy[enemyno].p <= 0) { - infg.stg += 4; - return 1; - } - } - } - } - return (0); -}
--- a/src/atari.h Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#include "Enemy.h" -#ifndef _ATARI_H_ -#define _ATARI_H_ - - -extern int atari(int playerno, int enemyno); - -extern teki enemy[300]; - - - -#endif //_BOM_H_
--- a/src/back.cc Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -#include <stdlib.h> -#include <SDL.h> -//#include "libps.h" -#include "back.h" -#include "debug.h" - -//GsBOXF *boxs, box[BOX_NUM]; - -//BOXDT boxdt[BOX_NUM]; - -void Back(GsOT * j) -{ - int i1; - - for (i1 = 0; i1 < BOX_NUM - 1; i1++) { - boxdt[i1].y += boxdt[i1].s; - if (boxdt[i1].y > 240) { - boxdt[i1].x = rand() % 320; - boxdt[i1].y = 0; - } - } - - boxs = box; - for (i1 = 1; i1 < BOX_NUM - 1; i1++, boxs++) { - boxs->attribute = 0; - boxs->x = boxdt[i1].x; - boxs->y = boxdt[i1].y; - boxs->w = 1; - boxs->h = 1; - boxs->r = rand() % 256; - boxs->g = rand() % 256; - boxs->b = rand() % 256; - GsSortBoxFill(boxs, j, 0); - } -}
--- a/src/back.h Tue Dec 07 18:37:43 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -#ifndef _BACK_H_ -#define _BACK_H_ - -#define BOX_NUM 11 - -//extern GsBOXF *boxs, box[BOX_NUM]; - -typedef - struct boxdt { - int x; - int y; - int s; -} BOXDT; - -//extern void Back(GsOT * j); -extern BOXDT boxdt[BOX_NUM]; - -#endif // _BACK_H_