Mercurial > hg > Members > tkaito > task_dandy
changeset 25:aa37f220b7a8
add new files, not working.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 24 Nov 2010 19:24:43 +0900 |
parents | a131729d6e4d |
children | 34fde39c0a31 |
files | charactor_id.h collision.c collision.cc collision.h game_task.h global_id.h ppe/PadAllocate.cc ppe/PadAllocate.h ppe/PadFree.cc ppe/PadFree.h ppe/PadUpdate.cc ppe/PadUpdate.h spe/PadAllocate.cc spe/PadAllocate.h spe/PadFree.cc spe/PadFree.h spe/PadUpdate.cc spe/PadUpdate.h spe/task_init.cc |
diffstat | 19 files changed, 1118 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/charactor_id.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,117 @@ +#ifndef INCLUDE_CHARACTOR_ID +#define INCLUDE_CHARACTOR_ID + +typedef enum { + PLAYER_LEFTMOVE = 1, + PLAYER_TURNTOLEFT = 2, + PLAYER_IDLE = 3, + PLAYER_TURNTORIGHT = 4, + PLAYER_RIGHTMOVE = 5, + BLUEBULLET_LEFT = 6, + BLUEBULLET_RIGHT = 7, + REDBULLET = 8, + LONGLASER = 9, + GAUGE_PANEL = 10, + OFFENSIVEPOWER_GAUGE = 11, + BURNER = 12, + LOCKON_SIGHT = 13, + SPECIAL_LASERGAUGE = 14, + DIFFENSIVEPOWER_GAUGE = 15, + GREENBULLET = 16, + BULEBARRIER = 17, + FONT_PLAYER_1 = 18, + FONT_GAMEOVER = 19, + FONT_0 = 20, + FONT_1 = 21, + FONT_2 = 22, + FONT_3 = 23, + FONT_4 = 24, + FONT_5 = 25, + FONT_6 = 26, + FONT_7 = 27, + FONT_8 = 28, + FONT_9 = 29, + REDBOMB_ANIM_0 = 30, + REDBOMB_ANIM_1 = 31, + REDBOMB_ANIM_2 = 32, + REDBOMB_ANIM_3 = 33, + REDBOMB_ANIM_4 = 34, + REDBOMB_ANIM_5 = 35, + REDBOMB_ANIM_6 = 36, + REDBOMB_ANIM_7 = 37, + FONT_HIGE = 38, + GREENBOMB_ANIM_0 = 40, + GREENBOMB_ANIM_1 = 41, + GREENBOMB_ANIM_2 = 42, + GREENBOMB_ANIM_3 = 43, + GREENBOMB_ANIM_4 = 44, + GREENBOMB_ANIM_5 = 45, + GREENBOMB_ANIM_6 = 46, + GREENBOMB_ANIM_7 = 47, + INFLATION_GAUGE = 48, + INFLATION_METER = 49, + ENEMY_GREENCRAB = 50, + ENEMY_PLANE = 51, + ENEMY_REDBULLET = 52, + FONT_PUSHSTART = 53, + BOSS1_ORGAN = 54, + ENEMY_LASER = 55, + ENEMY_BLUEBULLET = 56, + ENEMY_LIGHTNING = 57, + ENEMY_LASERSPLOSH_0 = 58, + ENEMY_LASERSPLOSH_1 = 59, + ENEMY_LASERSPLOSH_2 = 60, + ENEMY_LASERSPLOSH_3 = 61, + ASTEROID = 62, + ORBITMACHINE = 63, + BOSS2_BODY = 64, + BOSS2_RIGHTSHOULDER = 65, + BOSS2_LEFTSHOULDER = 66, + BOSS2_RIGHTARM = 67, + BOSS2_LEFTARM = 68, + BOSS2_BATTERY = 69, + BOSS2_OPENBATTERY = 70, + BOSS2_BROKENHATCH = 71, + BOSS2_DUMMY = 72, + BOSS2_RIGHTSHOULDERUP = 73, + BOSS2_LEFTSHOULDERUP = 74, + BOSS2_LEFTSHOULDERGIRD = 75, + BOSS2_RIGHTARMBATTERY = 76, + BOSS2_LEFTARMBATTERY = 77, + BOSS2_RIGHTHAND = 78, + BOSS2_RIGHTPALM = 79, + BOSS2_LEFTHAND = 80, + BOSS2_LEFTPALM = 81, + PLAYER_LASERSPLOSH_0 = 90, + PLAYER_LASERSPLOSH_1 = 91, + PLAYER_LASERSPLOSH_2 = 92, + PLAYER_LASERSPLOSH_3 = 93, + BOSS_POWERGAUGE = 94, + BLACKHOLE = 100, + FONT_DOYOUCONTINUE = 110, + FONT_ALLSTAGECLEAR = 111, + FONT_REST = 112, + FONT_STAGE = 113, + FONT_LINEOFZERO_000000 = 114, + FONT_LINEOFZERO_0000000 = 115, + FONT_THANKYOU = 116, + FONT_NYSOFT = 117, + FONT_1997YGGDRASIL = 118, + FONT_SUPERDANDY = 119, + FONT_1997YAS_K = 120, + GUNBATTERY = 180, + PURPLECORE = 181, + SPACEFISH = 182, + MISSILE = 183, + BOSS3_BODY = 184, + BODD4_BODY = 185, + TITLEFONT_SUPER = 190, + TITLEFONT_BATTLE = 191, + TITLEFONT_EMPEROR = 192, + GREENBARRIER = 193, + REMAINDER = 194, + EARTH = 195, + BOSS_CORPSE = 196, +} CharImageNumber; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collision.c Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,270 @@ +#include <stdio.h> +#include <stdlib.h> +#include <SDL.h> +#include "SDL_opengl.h" +#include "object.h" +#include "Character.h" +#include "Character_state.h" +#include "tokuten.h" +#include "collision.h" +//#include "atari.h" +#include "bom.h" +#include "count2.h" +#include "sound.h" +//#include "Enemy.h" +//#include "libps.h" +#include "sgoex.h" + +extern SpriteTable sptable[DEFOBJ]; + +void +nocollision(SceneGraphPtr node, int screen_w, int screen_h, + SceneGraphPtr tree){} + +CHARACTER * atari(CHARACTER *p) +{ + int i1, h, w, ex, ey, charno; + int n; + ex = p->x; + ey = p->y; + charno = p->charano; + 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 p; + } +#endif + + if (p->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; + p->vit -= TAMALV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + 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; + p->vit -= TAMALV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + } + + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + } + if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) + && (jiki.y > ey + h)) { + p->vit -= TAMALV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + jumping: + if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) + && (jiki.y + 128 > ey) && (jiki.y < ey + h)) { + p->vit -= TAMALV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + /*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; + p->vit -= LASERLV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + } + /*shield(laser lv2) */ + if ((p->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)) { + p->vit -= LASERLV2P; + lg.stg -= 26; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + /*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; + p->vit -= LASERLV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(p->x, p->y); + enemycount += (p->score * + ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + return p; + } + } + } + } + return p; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collision.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,309 @@ +#include <stdio.h> +#include <stdlib.h> +#include <SDL.h> +#include "collision.h" + + +/*** 当たり判定に使うパラメータや変数の定義 ***/ +#if 0 +CHARACTER * atari(CHARACTER *p) + + int i1, h, w, ex, ey, charno; + int n; + ex = p->x; + ey = node->xyz[1]; + charno = p->charano; + w = sptable[charno].w; + h = sptable[charno].h; + //i2 = playerno; + + +/*** 自機やられ ただし無敵時間中で無ければという条件付き ***/ +void +player_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + } + } +} + +//#endif + +// if (p->tama == TRUE) +// goto jumping; + +// for (i1 = 0; i1 < tama_lv1_end + 1; i1++) { + +/*** tama_lv1_end になるまで ***/ +void +collision_01(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +void +collision_02(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} +/*** tama_lv1_end ここまで ***/ + +// for (i1 = 0; i1 < tama_lv2_end + 1; i1++) { + +/*** tama_lv2_end になるまで ***/ +void +collision_03(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +void +collision_04(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +void +collision_05(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +void +collision_06(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= TAMALV2P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +/*** tama_lv2_end ここまで ***/ + +void +collision_07(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) + && (jiki.y > ey + h)) { + p->vit -= TAMALV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +// jumping: + +/*** ObjectのtamaフラグがTRUEの場合 ***/ + +void +collision_08(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + if ((tlv3[0].r > 0) && (jiki.x < ex + w) && (jiki.x + 128 > ex) + && (jiki.y + 128 > ey) && (jiki.y < ey + h)) { + p->vit -= TAMALV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +/*laser lv1 */ +// for (i1 = 0; i1 < laser_lv1_end + 1; i1++) { +// n = laser_lv1[i1].r * 128 / 4096; + +/*** laser_lv1_end になるまで ***/ + +void +collision_09(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= LASERLV1P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} +/*** laser_lv1_endここまで ***/ + +/*shield(laser lv2) */ +void +collision_10(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + if ((p->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)) { + p->vit -= LASERLV2P; + lg.stg -= 26; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } +} + +/*bomber(laser lv3) */ +void +collision_11(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree) +{ + 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; + p->vit -= LASERLV3P; + infg.stg++; + if (p->vit <= 0) { + infg.stg += 4; + Bom(node->xyz[0], node->xyz[1]); + enemycount += (p->score * ((infg.stg / 128) + infg_level + 1)); + p->state = delete_chara; + p->collision = noaction; + p->f = FALSE; + } + } + } + } +} +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collision.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,58 @@ +#ifndef INCLUDE_DANDY_H +#define INCLUDE_DANDY_H +#include "dandy.h" + +#endif + +#ifndef INCLUDE_COLLISION_H +#define INCLUDE_COLLISION_H + +void +player_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_01(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_02(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_03(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_04(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_05(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_06(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_07(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_08(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_09(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_10(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +void +collision_11(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, + SceneGraphPtr tree); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/game_task.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,51 @@ +// Game т戎 Task ID + + TITLE_MOVE, + CRAB_MOVE, + TITLE_COLL, + MOVE_00, + MOVE_01, + MOVE_02, + MOVE_03, + MOVE_04, + MOVE_05, + MOVE_06, + MOVE_07, + MOVE_08, + MOVE_09, + MOVE_10, + MOVE_11, + MOVE_12, + MOVE_13, + MOVE_20, + MOVE_21, + MOVE_22, + MOVE_23, + MOVE_24, + MOVE_25, + MOVE_26, + MOVE_27, + MOVE_28, + MOVE_29, + MOVE_30, + MOVE_31, + MOVE_32, + MOVE_33, + MOVE_34, + MOVE_35, + MOVE_40, + MOVE_41, + MOVE_400, + MOVE_401, + MOVE_402, + MOVE_410, + MOVE_411, + MOVE_500, + MOVE_501, + MOVE_600, + MOVE_601, + MOVE_602, + ASTEROID, + PAD_ALLOCATE, + PAD_UPDATE, + PAD_FREE,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/global_id.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,3 @@ +// global_alloc т戎 ID + + PAD_INPUT,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadAllocate.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,23 @@ +#include <stdio.h> +#include <string.h> +#include "PadAllocate.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadAllocate); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + void *idata = s->get_input(rbuf, 0); + int pad_id = (int)s->get_param(0); + int size = (int)s->get_param(1); + + void *buff = s->global_alloc(pad_id, size); + if (idata != NULL) { + memcpy(buff,idata,size); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadAllocate.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_ALLOCATE +#define INCLUDED_PAD_ALLOCATE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadFree.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <string.h> +#include "PadFree.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadFree); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + int pad_id = (int)s->get_param(0); + + s->global_free(pad_id); + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadFree.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_FREE +#define INCLUDED_PAD_FREE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadUpdate.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <string.h> +#include "PadUpdate.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadUpdate); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + void *idata = s->get_input(rbuf, 0); + int pad_id = (int)s->get_param(0); + int size = (int)s->get_param(1); + void *global_data = (void*)s->global_get(pad_id); + + memcpy(global_data,idata,size); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/PadUpdate.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_UPDATE +#define INCLUDED_PAD_UPDATE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadAllocate.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,23 @@ +#include <stdio.h> +#include <string.h> +#include "PadAllocate.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadAllocate); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + void *idata = s->get_input(rbuf, 0); + int pad_id = (int)s->get_param(0); + int size = (int)s->get_param(1); + + void *buff = s->global_alloc(pad_id, size); + if (idata != NULL) { + memcpy(buff,idata,size); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadAllocate.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_ALLOCATE +#define INCLUDED_PAD_ALLOCATE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadFree.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <string.h> +#include "PadFree.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadFree); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + int pad_id = (int)s->get_param(0); + + s->global_free(pad_id); + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadFree.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_FREE +#define INCLUDED_PAD_FREE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadUpdate.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <string.h> +#include "PadUpdate.h" +#include "Func.h" + +/* 綽 */ +SchedDefineTask(PadUpdate); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + void *idata = s->get_input(rbuf, 0); + int pad_id = (int)s->get_param(0); + int size = (int)s->get_param(1); + void *global_data = (void*)s->global_get(pad_id); + + memcpy(global_data,idata,size); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/PadUpdate.h Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,9 @@ +#ifndef INCLUDED_PAD_UPDATE +#define INCLUDED_PAD_UPDATE + +#ifndef INCLUDED_SCHED_TASK +#include "SchedTask.h" +#endif + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/task_init.cc Wed Nov 24 19:24:43 2010 +0900 @@ -0,0 +1,130 @@ +#include "Func.h" +#include "Scheduler.h" + +/* 綽篏臀吾 */ +SchedExternTask(TitleMove); +SchedExternTask(CrabMove); + +SchedExternTask(PadAllocate); +SchedExternTask(PadUpdate); +SchedExternTask(PadFree); +/* +SchedExternTask(Move00); +SchedExternTask(Move01); +SchedExternTask(Move02); +SchedExternTask(Move03); +SchedExternTask(Move04); +SchedExternTask(Move05); +SchedExternTask(Move06); +SchedExternTask(Move07); +SchedExternTask(Move08); +SchedExternTask(Move09); +SchedExternTask(Move10); +SchedExternTask(Move11); +SchedExternTask(Move12); +SchedExternTask(Move13); + +SchedExternTask(Move20); +SchedExternTask(Move21); +SchedExternTask(Move22); +SchedExternTask(Move23); +SchedExternTask(Move24); +SchedExternTask(Move25); +SchedExternTask(Move06); +SchedExternTask(Move27); +SchedExternTask(Move28); +SchedExternTask(Move29); +SchedExternTask(Move30); +SchedExternTask(Move31); +SchedExternTask(Move32); +SchedExternTask(Move33); +SchedExternTask(Move34); +SchedExternTask(Move35); + +SchedExternTask(Move40); +SchedExternTask(Move41); + +SchedExternTask(Move400); +SchedExternTask(Move401); +SchedExternTask(Move402); + +SchedExternTask(Move410); +SchedExternTask(Move411); + +SchedExternTask(Move500); +SchedExternTask(Move501); + +SchedExternTask(Move600); +SchedExternTask(Move601); +SchedExternTask(Move602); + +SchedExternTask(Asteroid); +*/ +/** + * ∽違 ../spe/spe-main c + * у若喝冴違∽違 + * 絅純∽医сk (SchedRegisterTask 綽) + */ + +void +task_init(void) +{ + SchedRegisterTask(TITLE_MOVE, TitleMove); + SchedRegisterTask(CRAB_MOVE, CrabMove); + + SchedRegisterTask(PAD_ALLOCATE, PadAllocate); + SchedRegisterTask(PAD_UPDATE, PadUpdate); + SchedRegisterTask(PAD_FREE, PadFree); + /* + SchedRegisterTask(MOVE_00, Move00); + SchedRegisterTask(MOVE_01, Move01); + SchedRegisterTask(MOVE_02, Move02); + SchedRegisterTask(MOVE_03, Move03); + SchedRegisterTask(MOVE_04, Move04); + SchedRegisterTask(MOVE_05, Move05); + SchedRegisterTask(MOVE_06, Move06); + SchedRegisterTask(MOVE_07, Move07); + SchedRegisterTask(MOVE_08, Move08); + SchedRegisterTask(MOVE_09, Move09); + SchedRegisterTask(MOVE_10, Move10); + SchedRegisterTask(MOVE_11, Move11); + SchedRegisterTask(MOVE_12, Move12); + SchedRegisterTask(MOVE_13, Move13); + + SchedRegisterTask(MOVE_20, Move20); + SchedRegisterTask(MOVE_21, Move21); + SchedRegisterTask(MOVE_22, Move22); + SchedRegisterTask(MOVE_23, Move23); + SchedRegisterTask(MOVE_24, Move24); + SchedRegisterTask(MOVE_25, Move25); + SchedRegisterTask(MOVE_06, Move06); + SchedRegisterTask(MOVE_27, Move27); + SchedRegisterTask(MOVE_28, Move28); + SchedRegisterTask(MOVE_29, Move29); + SchedRegisterTask(MOVE_30, Move30); + SchedRegisterTask(MOVE_31, Move31); + SchedRegisterTask(MOVE_32, Move32); + SchedRegisterTask(MOVE_33, Move33); + SchedRegisterTask(MOVE_34, Move34); + SchedRegisterTask(MOVE_35, Move35); + + SchedRegisterTask(MOVE_40, Move40); + SchedRegisterTask(MOVE_41, Move41); + + SchedRegisterTask(MOVE_400, Move400); + SchedRegisterTask(MOVE_401, Move401); + SchedRegisterTask(MOVE_402, Move402); + + SchedRegisterTask(MOVE_410, Move410); + SchedRegisterTask(MOVE_411, Move411); + + SchedRegisterTask(MOVE_500, Move500); + SchedRegisterTask(MOVE_501, Move501); + + SchedRegisterTask(MOVE_600, Move600); + SchedRegisterTask(MOVE_601, Move601); + SchedRegisterTask(MOVE_602, Move602); + + SchedRegisterTask(ASTEROID, Asteroid); + */ +}