changeset 27:34fde39c0a31

commit test.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 10 Dec 2010 02:57:29 +0900
parents 6bea374ee604 (diff) aa37f220b7a8 (current diff)
children 0263721e7df8
files Func.h charactor_id.h dandy.h game_task.h global_id.h main.cc ppe/PadFree.cc ppe/TitleMove.cc ppe/TitleMove.cc.orig ppe/task_init.cc ppe/task_init.cc.orig schedule.cc schedule.o stage_init.cc stage_init.o
diffstat 19 files changed, 377 insertions(+), 1117 deletions(-) [+]
line wrap: on
line diff
--- a/Func.h	Wed Nov 24 19:24:43 2010 +0900
+++ b/Func.h	Fri Dec 10 02:57:29 2010 +0900
@@ -1,12 +1,14 @@
+// Task ID
 enum {
 #include "SysTasks.h"
 #include "RenderingTasks.h"
 #include "game_task.h"
 };
 
+// global alloc ID
 enum {
 #include "RenderingGlobal.h"
 #include "global_alloc.h"
 #include "KeyID.h"
 #include "global_id.h"
-}
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/character_id.h	Fri Dec 10 02:57:29 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
--- a/charactor_id.h	Wed Nov 24 19:24:43 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-#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
--- a/collision.c	Wed Nov 24 19:24:43 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-#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;
-}
--- a/collision.cc	Wed Nov 24 19:24:43 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-#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
--- a/collision.h	Wed Nov 24 19:24:43 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#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
--- a/dandy.h	Wed Nov 24 19:24:43 2010 +0900
+++ b/dandy.h	Fri Dec 10 02:57:29 2010 +0900
@@ -1,3 +1,6 @@
+#ifndef INCLUDE_DANDY_H
+#define INCLUDE_DANDY_H
+
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -8,17 +11,12 @@
 #include "Application.h"
 #include "MainLoop.h"
 #include "Func.h"
-
-#ifndef INCLUDE_DANDY_H
-#define INCLUDE_DANDY_H
+#include "character_id.h"
 
 class Dandy : public Application {
   MainLoopPtr init(Viewer *viewer, int w, int h);
 };
 
-typedef void (*move)(SceneGraphPtr node, void *sgroot_, int w, int h);
-typedef void (*coll)(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree);
-
 typedef struct {
   int chara_id;
   const char *name;
@@ -35,25 +33,21 @@
 } *ObjPropertyPtr, ObjProperty;
 
 typedef struct enemy_state {
-  const int char_id;
+  const int charano;
   int score;
   int vital;
   
 } state;
 
-//c膩
-static const int CHAR_NUM = 300;
-//泣膩
-static const int ENEMY_NUM = 50;
-
 extern ObjPropertyPtr charactor;
 
+//c帥若膩
+static const int ENEMY_NUM = 1;
+
+extern void create_title_back(Viewer *sgroot, int w, int h);
 extern void init_game(Viewer *sgroot, int w, int h);
 extern void schedule(SceneGraphPtr node, void *sgroot_, int w, int h);
 
-//extern create_enemy(SchedTask *s, void *enemy_, void *b);
-
-
 #define ENEMY_STATUS_TABLE {						\
       ENEMY_STATUS(0, 0, 0),						\
       ENEMY_STATUS(ENEMY_GREENCRAB, 330, 98),				\
--- a/game_task.h	Wed Nov 24 19:24:43 2010 +0900
+++ b/game_task.h	Fri Dec 10 02:57:29 2010 +0900
@@ -1,8 +1,7 @@
 // Game т戎 Task ID
-
     TITLE_MOVE,
+    TITLE_COLL,
     CRAB_MOVE,
-    TITLE_COLL,
     MOVE_00,
     MOVE_01,
     MOVE_02,
@@ -45,7 +44,6 @@
     MOVE_600,
     MOVE_601,
     MOVE_602,
-    ASTEROID,
     PAD_ALLOCATE,
     PAD_UPDATE,
     PAD_FREE,
--- a/global_id.h	Wed Nov 24 19:24:43 2010 +0900
+++ b/global_id.h	Fri Dec 10 02:57:29 2010 +0900
@@ -1,3 +1,2 @@
 // global_alloc т戎 ID
-
     PAD_INPUT,
--- a/main.cc	Wed Nov 24 19:24:43 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-#include "dandy.h"
-
-#define ENEMY_STATUS(charano,score,hardness) {charano,score,hardness}
-const state enemy_status[ENEMY_NUM] = ENEMY_STATUS_TABLE;
-
-extern void task_init(void);
-
-TaskManager *manager;
-ObjPropertyPtr charactor;
-
-const char *usr_help_str = "Usage: ./twice [-length data_length] [-count task_num]\n\
-  -length  Number of data (default DATA_NUM (Func.h))\n\
-  -count   Number of task (default 1)\n";
-
-HTaskPtr
-pad_alloc(Viewer *sgroot)
-{
-    HTaskPtr task = sgroot->tmanager->create_task(PAD_ALLOCATE);
-    void *pad = (void*)sgroottmp->getController();
-    int size = sizeof(Pad);
-
-    task->set_param(0, PAD_INPUT);
-    task->set_param(1, size);
-    task->add_inData(pad, size);
-    task->set_cpu(SPE_ANY);
-    task->spawn();
-
-    return task;
-}
-
-HTaskPtr
-pad_update(Viewer *sgroot)
-{
-    HTaskPtr task = sgroot->tmanager->create_task(PAD_UPDATE);
-    void *pad = (void*)sgroottmp->getController();
-    int size = sizeof(Pad);
-
-    task->set_param(0, PAD_INPUT);
-    task->set_param(1, size);
-    task->add_inData(pad, size);
-    task->set_cpu(SPE_ANY);
-    task->spawn();
-
-    return task;
-}
-
-HTaskPtr
-pad_free(Viewer *sgroot)
-{
-    HTaskPtr task = sgroot->tmanager->create_task(PAD_FREE);
-    void *pad = (void*)sgroottmp->getController();
-    int size = sizeof(Pad);
-
-    task->set_param(0, PAD_INPUT);
-    task->set_cpu(SPE_ANY);
-    task->spawn();
-
-    return task;
-}
-
-int
-init(int argc, char **argv)
-{
-    for (int i = 1; argv[i]; ++i) {
-        if (strcmp(argv[i], "-length") == 0) {
-	    //length = atoi(argv[++i]);
-        } else if (strcmp(argv[i], "-count") == 0) {
-	    //task = atoi(argv[++i]);
-        }
-    }
-
-    return 0;
-}
-
-//API篋∽
-void
-PutSprite(float x, float y, int number)
-{
-    char* name = charactor[number].name;
-    SceneGraphPtr object = sgroot->createSceneGraph(name);
-    
-    title->xyz[0] = x;
-    title->xyz[1] = y;
-
-    charactor[number].x = x;
-    charactor[number].y = y;
-    charactor[number].flag = 0;
-    charactor[number].root = (void*)object;
-}
-
-void
-create_sg(Viewer *sgroot, int w, int h)
-{
-    sgroot->createFromXMLfile("xml/mydandy.xml");
-    sgroot->createFromXMLfile("xml/greencrab.xml");
-    sgroot->createFromXMLfile("xml/gameover.xml");
-    sgroot->createFromXMLfile("xml/greencrab.xml");
-    sgroot->createFromXMLfile("xml/bluebullet.xml");
-    sgroot->createFromXMLfile("xml/redbullet.xml");
-    sgroot->createFromXMLfile("xml/title2.xml");
-}
-
-void
-def_charactor(int number, char *name, float w, float h)
-{
-    charactor[number].chara_id = number;
-    charactor[number].name = name;
-    charactor[number].width = w;
-    charactor[number].height = h;
-    charactor[number].mid_w = w / 2;
-    charactor[number].mid_h = h / 2;
-}
-
-void
-set_parameter()
-{
-     /**
-     * 1綣:c帥ID;
-     * 2綣:c帥弱;
-     * 3綣:綛
-     * 4綣:蕭
-     */
-
-    def_charactor(PLAYER_IDLE, "player_idle", 128, 128);
-    def_charactor(PLAYER_LEFTMOVE, "player_leftmove", 128, 128);
-    def_charactor(PLAYER_TURNTOLEFT, "player_turntoleft", 128, 128);
-    def_charactor(PLAYER_TURNTORIGHT, "player_turntoright", 128, 128);
-    def_charactor(PLAYER_RIGHTMOVE, "player_rightmove", 128, 128);
-    def_charactor(BLUEBULLET_LEFT, "bulebullet_left", 45, 128);
-    def_charactor(BLUEBULLET_RIGHT, "blebullet_right", 38, 128);
-    def_charactor(REDBULLET, "redbullet", 128, 256);
-    def_charactor(LONGLASER, "longlaser", 64, 256);
-    def_charactor(GAUGE_PANEL, "gauge_panel", 128, 512);
-    def_charactor(OFFENSIVEPOWER_GAUGE, "offensivepower_gauge", 27, 220);
-    def_charactor(BURNER, "burner", 63, 122);
-    def_charactor(LOCKON_SIGHT, "lockon_sight", 64, 64);
-    //def_charactor(SPECIAL_LASERGAUGE, "special_lasergauge", 0, 0);
-    def_charactor(DIFFENSIVEPOWER_GAUGE, "diffensivepower_gauge", 20, 215);
-    def_charactor(GREENBULLET, "greenbullet", 128, 128);
-    def_charactor(BULEBARRIER, "bulebarrier", 128, 128);
-    //def_charactor(FONT_PLAYER_1, "font_player1", 128, 32);
-    //def_charactor(FONT_GAMEOVER, "font_gameover", 256, 32);
-    def_charactor(FONT_0, "font_0", 32, 32);
-    def_charactor(FONT_1, "font_1", 32, 32);
-    def_charactor(FONT_2, "font_2", 32, 32);
-    def_charactor(FONT_3, "font_3", 32, 32);
-    def_charactor(FONT_4, "font_4", 32, 32);
-    def_charactor(FONT_5, "font_5", 32, 32);
-    def_charactor(FONT_6, "font_6", 32, 32);
-    def_charactor(FONT_7, "font_7", 32, 32);
-    def_charactor(FONT_8, "font_8", 32, 32);
-    def_charactor(FONT_9, "font_9", 32, 32);
-    def_charactor(REDBOMB_ANIM_0, "redbomb_anim_0", 64, 64);
-    def_charactor(REDBOMB_ANIM_1, "redbomb_anim_1", 64, 64);
-    def_charactor(REDBOMB_ANIM_2, "redbomb_anim_2", 64, 64);
-    def_charactor(REDBOMB_ANIM_3, "redbomb_anim_3", 64, 64);
-    def_charactor(REDBOMB_ANIM_4, "redbomb_anim_4", 64, 64);
-    def_charactor(REDBOMB_ANIM_5, "redbomb_anim_5", 64, 64);
-    def_charactor(REDBOMB_ANIM_6, "redbomb_anim_6", 64, 64);
-    def_charactor(REDBOMB_ANIM_7, "redbomb_anim_7", 64, 64);
-    def_charactor(FONT_HIGE, "font_hige", 128, 32);
-    def_charactor(GREENBOMB_ANIM_0, "greenbomb_anim_0", 64, 64);
-    def_charactor(GREENBOMB_ANIM_1, "greenbomb_anim_1", 64, 64);
-    def_charactor(GREENBOMB_ANIM_2, "greenbomb_anim_2", 64, 64);
-    //def_charactor(GREENBOMB_ANIM_3, "greenbomb_anim_3", 64, 64);
-    def_charactor(GREENBOMB_ANIM_4, "greenbomb_anim_4", 64, 64);
-    def_charactor(GREENBOMB_ANIM_5, "greenbomb_anim_5", 64, 64);
-    def_charactor(GREENBOMB_ANIM_6, "greenbomb_anim_6", 64, 64);
-    def_charactor(GREENBOMB_ANIM_7, "greenbomb_anim_7", 64, 64);
-    def_charactor(INFLATION_GAUGE, "inflation_gauge", 64, 512);
-    def_charactor(INFLATION_METER, "inflation_meter", 32, 512);
-    def_charactor(ENEMY_GREENCRAB, "enemy_greenclab", 128, 128);
-    def_charactor(ENEMY_PLANE, "enemy_plane", 128, 128);
-    def_charactor(ENEMY_REDBULLET, "enemy_redbullet", 32, 32);
-    def_charactor(FONT_PUSHSTART, "font_pushstart", 512, 32);
-    def_charactor(BOSS1_ORGAN, "boss1_organ", 128, 256);
-    def_charactor(ENEMY_LASER, "enemy_laser", 64, 251);
-    def_charactor(ENEMY_BLUEBULLET, "enemy_bluebullet", 36, 28);
-    def_charactor(ENEMY_LIGHTNING, "enemy_lightning", 64, 252);
-    def_charactor(ENEMY_LASERSPLOSH_0, "enemy_lasersplosh_0", 126, 127);
-    def_charactor(ENEMY_LASERSPLOSH_1, "enemy_lasersplosh_1", 124, 119);
-    def_charactor(ENEMY_LASERSPLOSH_2, "enemy_lasersplosh_2", 126, 127);
-    def_charactor(ENEMY_LASERSPLOSH_3, "enemy_lasersplosh_3", 112, 102);
-    def_charactor(ASTEROID, "meteo", 128, 128); //inseki
-    def_charactor(ORBITMACHINE, "orbitmachine", 128, 64); //inseki no shita maruiyatsu
-    def_charactor(BOSS2_BODY, "boss2_body", 512, 512);
-    def_charactor(BOSS2_RIGHTSHOULDER, "boss2_rightshoulder", 256, 256);
-    def_charactor(BOSS2_LEFTSHOULDER, "boss2_leftshoulder", 256, 256);
-    def_charactor(BOSS2_RIGHTARM, "boss2_rightarm", 128, 256);
-    def_charactor(BOSS2_LEFTARM, "boss2_leftarm", 128, 256);
-    def_charactor(BOSS2_BATTERY, "boss2_battery", 128, 128);
-    def_charactor(BOSS2_OPENBATTERY, "boss2_openbattery", 256, 128);
-    def_charactor(BOSS2_BROKENHATCH, "boss2_brokenhatch", 128, 64);
-    def_charactor(BOSS2_DUMMY, "boss2_dummy", 128, 64);
-    def_charactor(BOSS2_RIGHTSHOULDERUP, "boss2_r_shoulderup", 256, 128);
-    def_charactor(BOSS2_LEFTSHOULDERUP, "boss2_left_s_up", 256, 128);
-    def_charactor(BOSS2_LEFTSHOULDERGIRD, "boss2_left_s_gird", 256, 256);
-    def_charactor(BOSS2_RIGHTARMBATTERY, "boss2_rightarm_b", 64, 64);
-    def_charactor(BOSS2_LEFTARMBATTERY, "boss2_leftarmbattery", 64, 64);
-    def_charactor(BOSS2_RIGHTHAND, "boss2_righthand", 64, 64);
-    def_charactor(BOSS2_RIGHTPALM, "boss2_rightpalm", 64, 64);
-    def_charactor(BOSS2_LEFTHAND, "boss2_lefthand", 64, 64);
-    def_charactor(BOSS2_LEFTPALM, "boss2_leftpalm", 64, 64);
-    def_charactor(PLAYER_LASERSPLOSH_0, "player_lasersplosh_0", 115, 91);
-    def_charactor(PLAYER_LASERSPLOSH_1, "player_lasersplosh_1", 133, 121);
-    def_charactor(PLAYER_LASERSPLOSH_2, "player_lasersplosh_2", 135, 119);
-    def_charactor(PLAYER_LASERSPLOSH_3, "player_lasersplosh_3", 131, 120);
-    def_charactor(BOSS_POWERGAUGE, "boss_powergauge", 69, 762);
-    def_charactor(BLACKHOLE, "blackhole", 128, 128);
-    def_charactor(FONT_DOYOUCONTINUE, "font_doyoucontinue", 512, 32);
-    def_charactor(FONT_ALLSTAGECLEAR, "font_allstageclear", 512, 32);
-    def_charactor(FONT_REST, "font_rest", 128, 32);
-    def_charactor(FONT_STAGE, "font_stage", 256, 32);
-    def_charactor(FONT_LINEOFZERO_000000, "font_000000", 256, 32);
-    def_charactor(FONT_LINEOFZERO_0000000, "font_0000000", 256, 32);
-    def_charactor(FONT_THANKYOU, "font_thankyou", 512, 32);
-    def_charactor(FONT_NYSOFT, "font_nysoft", 512, 32);
-    def_charactor(FONT_1997YGGDRASIL, "font_1997yggdrasil", 512, 32);
-    def_charactor(FONT_SUPERDANDY, "font_superdandy", 256, 64);
-    def_charactor(FONT_1997YAS_K, "font_1997yas_k", 512, 32);
-    def_charactor(GUNBATTERY, "gunbattery", 128, 128);
-    def_charactor(PURPLECORE, "purplecore", 128, 128);
-    def_charactor(SPACEFISH, "spacefish", 128, 128);
-    def_charactor(MISSILE, "missile", 64, 128);
-    def_charactor(BOSS3_BODY, "boss3_body", 256, 256);
-    def_charactor(BODD4_BODY, "boss_4", 256, 256);
-    def_charactor(TITLEFONT_SUPER, "titlefont_super", 256, 256);
-    def_charactor(TITLEFONT_BATTLE, "titlefont_battle", 256, 256);
-    def_charactor(TITLEFONT_EMPEROR, "titlefont_emperor", 256, 256);
-    def_charactor(GREENBARRIER, "greenbarrier", 130, 133);
-    def_charactor(REMAINDER, "remainder", 126, 34);
-    def_charactor(EARTH, "earth", 256, 256);
-    def_charactor(BOSS_CORPSE, "boss_corpse", 64, 256);
-    def_charactor(211, "rank_c_mins", 64, 32);
-    def_charactor(210, "rank_c", 64, 32);
-    def_charactor(209, "rank_c_pla", 64, 32);
-    def_charactor(208, "rank_b_mins", 64, 32);
-    def_charactor(207, "rank_b", 64, 32);
-    def_charactor(206, "rank_b_pla", 64, 32);
-    def_charactor(205, "rank_a_mins", 64, 32);
-    def_charactor(204, "rank_a", 64, 32);
-    def_charactor(203, "rank_a_pla", 64, 32);
-    def_charactor(202, "rank_s", 64, 32);
-}
-
-void
-init_charactor(Viewer *sgroot, int w, int h)
-{
-    create_sg(sgroot, w, h);
-    set_parameter();
-
-    for (int i = 0; i < ENEMY_NUM; i++) {
-	int char_id = enemy_status[i].char_id;
-
-	charactor[char_id].score = enemy_status[i].score;
-	charactor[char_id].vital = enemy_status[i].vital;
-    }
-}
-
-MainLoopPtr
-Dandy::init(Viewer *sgroot, int w, int h)
-{
-    charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjProperty)*CHAR_NUM);
-    init_charactor(sgroot, w, h);
-    init_game(sgroot, w, h);
-
-    return sgroot;
-}
-
-extern Application *
-application() {
-    return new Dandy();
-}
-
-extern int init(TaskManager *manager, int argc, char *argv[]);
-extern void task_initialize();
-static void TMend(TaskManager *manager);
-
-int
-TMmain(TaskManager *manager,int argc, char *argv[])
-{
-    task_init();
-    task_initialize();
-    manager->set_TMend(TMend);
-
-    return init(manager,argc, argv);
-}
-
-void
-TMend(TaskManager *manager)
-{
-    printf("game end\n");
-}
--- a/ppe/PadFree.cc	Wed Nov 24 19:24:43 2010 +0900
+++ b/ppe/PadFree.cc	Fri Dec 10 02:57:29 2010 +0900
@@ -11,9 +11,9 @@
 {
 
     int pad_id = (int)s->get_param(0);
-
+    
     s->global_free(pad_id);
-
+    
     return 0;
 }
 
--- a/ppe/TitleMove.cc	Wed Nov 24 19:24:43 2010 +0900
+++ b/ppe/TitleMove.cc	Fri Dec 10 02:57:29 2010 +0900
@@ -10,21 +10,12 @@
 static int
 titlemove(SchedTask *s,void *rbuf, void *wbuf)
 {
-    ObjPropertyPtr i_obj, o_obj;
-    
-    i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0);
-    o_obj = (ObjPropertyPtr)s->get_output(wbuf, 0);
-
+    ObjPropertyPtr i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0);
     int pad_id = (int)s->get_param(0);
-    int size = (int)s->get_param(1);
-    Pad *pad = (Pad*)s->pad(pad_id);
+    Pad *pad = (Pad*)s->global_get(pad_id);
     
-    if (pad->start.isPush && pad->start.isHold) {
-	i_obj->flag = 1;
-    }
-    if ((pad->select.isPush && pad->select.isHold) &&
-	(pad->start.isPush && pad->start.isHold)) {
-	i_obj->flag = 0;
+    if(pad->start.isPush() || pad->start.isHold()) {
+	printf("success \n");
     }
     
     s->swap();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ppe/TitleMove.cc.orig	Fri Dec 10 02:57:29 2010 +0900
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include "SchedTask.h"
+#include "Property.h"
+#include "Pad.h"
+#include "Func.h"
+
+/* 綽 */
+SchedDefineTask1(TitleMove, titlemove);
+
+static int
+titlemove(SchedTask *s,void *rbuf, void *wbuf)
+{
+  Pad* pad;
+  ObjPropertyPtr i_obj, o_obj;
+
+  i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0);
+  o_obj = (ObjPropertyPtr)s->get_output(wbuf, 0);
+  int pad_id = (int)s->get_param(0);
+  pad = (Pad*)s->global_get(pad_id);
+  
+  if(pad->start.isPush() || pad->start.isHold()) {
+      printf("success \n");
+  }
+  
+  s->swap();
+  
+  return 0;
+}
--- a/ppe/task_init.cc	Wed Nov 24 19:24:43 2010 +0900
+++ b/ppe/task_init.cc	Fri Dec 10 02:57:29 2010 +0900
@@ -4,6 +4,11 @@
 /* 綽篏臀吾 */
 SchedExternTask(TitleMove);
 SchedExternTask(CrabMove);
+SchedExternTask(TitleColl);
+SchedExternTask(PadAllocate);
+SchedExternTask(PadUpdate);
+SchedExternTask(PadFree);
+
 /*
 SchedExternTask(Move00);
 SchedExternTask(Move01);
@@ -56,17 +61,21 @@
 
 SchedExternTask(Asteroid);
 */
+
 /**
  * ∽違 ../spe/spe-main c
  * у若喝冴違∽違
  * 絅純∽医сk (SchedRegisterTask 綽)
  */
-
 void
 task_init(void)
 {
   SchedRegisterTask(TITLE_MOVE, TitleMove);
   SchedRegisterTask(CRAB_MOVE, CrabMove);
+  SchedRegisterTask(TITLE_COLL, TitleColl);
+  SchedRegisterTask(PAD_ALLOCATE, PadAllocate);
+  SchedRegisterTask(PAD_UPDATE, PadUpdate);
+  SchedRegisterTask(PAD_FREE, PadFree);
   /*
   SchedRegisterTask(MOVE_00, Move00);
   SchedRegisterTask(MOVE_01, Move01);
@@ -81,8 +90,7 @@
   SchedRegisterTask(MOVE_10, Move10);
   SchedRegisterTask(MOVE_11, Move11);
   SchedRegisterTask(MOVE_12, Move12);
-  SchedRegisterTask(MOVE_13, Move13);
-  
+  SchedRegisterTask(MOVE_13, Move13);  
   SchedRegisterTask(MOVE_20, Move20);
   SchedRegisterTask(MOVE_21, Move21);
   SchedRegisterTask(MOVE_22, Move22);
@@ -99,24 +107,18 @@
   SchedRegisterTask(MOVE_33, Move33);
   SchedRegisterTask(MOVE_34, Move34);
   SchedRegisterTask(MOVE_35, Move35);
-  
   SchedRegisterTask(MOVE_40, Move40);
-  SchedRegisterTask(MOVE_41, Move41);
-  
+  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_411, Move411);  
   SchedRegisterTask(MOVE_500, Move500);
-  SchedRegisterTask(MOVE_501, Move501);
-  
+  SchedRegisterTask(MOVE_501, Move501);  
   SchedRegisterTask(MOVE_600, Move600);
   SchedRegisterTask(MOVE_601, Move601);
-  SchedRegisterTask(MOVE_602, Move602);
-  
+  SchedRegisterTask(MOVE_602, Move602);  
   SchedRegisterTask(ASTEROID, Asteroid);
   */
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ppe/task_init.cc.orig	Fri Dec 10 02:57:29 2010 +0900
@@ -0,0 +1,132 @@
+#include "Func.h"
+#include "Scheduler.h"
+
+/* 綽篏臀吾 */
+SchedExternTask(TitleMove);
+SchedExternTask(CrabMove);
+SchedExternTask(TitleColl);
+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(TITLE_COLL, TitleColl);
+  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);
+  */
+}
--- a/schedule.cc	Wed Nov 24 19:24:43 2010 +0900
+++ b/schedule.cc	Fri Dec 10 02:57:29 2010 +0900
@@ -9,6 +9,7 @@
 void
 schedule(SceneGraphPtr node, void *sgroot_, int w, int h) 
 {
+#if 0
   SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
   Pad *pad = sgroot->getController();
   // Title 脂
@@ -242,6 +243,7 @@
     */
   }
   }
+#endif
 }
 
 ObjProperty enemy[300];
@@ -292,6 +294,6 @@
 
   int size = sizeof(ObjProperty)*16;
   //printf("size = %d\n", size);
-  sgroot->set_move_task(obj, move, (void*)e, size);
+//  sgroot->set_move_task(obj, move, (void*)e, size, create_enemy);
 }
 #endif
Binary file schedule.o has changed
--- a/stage_init.cc	Wed Nov 24 19:24:43 2010 +0900
+++ b/stage_init.cc	Fri Dec 10 02:57:29 2010 +0900
@@ -1,43 +1,85 @@
-#include "collision.h"
+#include "dandy.h"
+
+HTaskPtr
+pad_alloc(Viewer *sgroot)
+{
+    HTaskPtr task = sgroot->manager->create_task(PAD_ALLOCATE);
+    void *pad = (void*)sgroot->getController();
+    int size = sizeof(Pad);
 
-#if 0
-void
-opening()
+    task->set_param(0, PAD_INPUT);
+    task->set_param(1, size);
+    task->add_inData(pad, size);
+    task->set_cpu(SPE_ANY);
+    task->spawn();
+
+    return task;
+}
+
+HTaskPtr
+pad_update(SceneGraphRoot *sgroot)
 {
-    PutSprite(700, 480, 53); //  put `push start' string on screen.                                                                              
-    PutSprite(224, 776, 119); //  put `super dandy'                                                                                              
-//  Cerium ≦ぇ膰絨閟純
-//    PutSpriteEx(190, 800, 264, 2, 2, 5);
-    PutSprite(800, 264, 190);
-    PutSprite(396, 432, 191);
-    PutSprite(640, 640, 192);
+    HTaskPtr task = sgroot->tmanager->create_task(PAD_UPDATE);
+    void *pad = (void*)sgroot->getController();
+    int size = sizeof(Pad);
+
+    task->set_param(0, PAD_INPUT);
+    task->set_param(1, size);
+    task->add_inData(pad, size);
+    task->set_cpu(SPE_ANY);
+    task->spawn();
+
+    return task;
+}
+
+HTaskPtr
+pad_free(SceneGraphRoot *sgroot)
+{
+    HTaskPtr task = sgroot->tmanager->create_task(PAD_FREE);
+
+    task->set_param(0, PAD_INPUT);
+    task->set_cpu(SPE_ANY);
+    task->spawn();
+
+    return task;
 }
 
 void
-init_game(Viewer *sgroot_, int w, int h) 
+title_move(SceneGraphPtr node, void *sgroot_, int w, int h)
+{
+    SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
+
+    HTaskPtr update = pad_update(sgroot);
+    HTaskPtr title_task = sgroot->tmanager->create_task(TITLE_MOVE);
+    int size = sizeof(ObjProperty);
+    title_task->set_param(0, PAD_INPUT);
+    title_task->add_inData((void *)&charactor[0], size);
+    title_task->add_outData((void *)&charactor[0], size);
+    title_task->set_cpu(SPE_ANY);
+    title_task->wait_for(update);
+    title_task->spawn();
+}
+
+void
+create_title_back(Viewer *sgroot_, int w, int h) 
 { 
     Viewer *sgroot = sgroot_;
     SceneGraphPtr root = sgroot->createSceneGraph();
 
     SceneGraphPtr title = (SceneGraphPtr)charactor[0].root;
-    title->set_move_collision(title_collision);
+    title->set_move_collision(title_move);
     charactor[0].x = w/2;
     charactor[0].y = h/2;
     charactor[0].vx = 1.0;
     charactor[0].vy = 1.0;
     charactor[0].flag = 0;
     charactor[0].parent = (void*)root;
-    
+
     title->xyz[0] = charactor[0].x;
     title->xyz[1] = charactor[0].y;
+    title->set_move_collision(title_move);
 
-    int size = sizeof(ObjProperty);
-    sgroot->set_pad_task(title, TITLE_MOVE, (void*)&charactor[0], size);
-//    sgroot->set_pad_task(crab, CRAB_MOVE, (void*)&charactor[1], size);
-    
+    pad_alloc(sgroot);
     root->addChild(title);
-//    root->addChild(crab);
     sgroot->setSceneData(root);
 }
-
-#endif
Binary file stage_init.o has changed