view dandy.h @ 8:7c60ef3fca5b

test
author tkaito
date Wed, 07 Jul 2010 03:11:52 +0900
parents c015109a6041
children dea6d34c8e91
line wrap: on
line source

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "TaskManager.h"
#include "SceneGraph.h"
#include "Application.h"
#include "MainLoop.h"
#include "Func.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 {
  double x, y; //8?
  double vx, vy; //8?
  int frame; //4
  const char *chara;
  int vital; //4
  int score; //4
  void *parent; 
  void *root;
  int flag;
  
} *ObjPropertyPtr, ObjProperty;

extern ObjProperty back_property;
extern ObjPropertyPtr charactor;

static const int ENEMY_NUM = 1;

static const float player_speed = 10.0f;
static const float player_radius = 42.0f;

static const float boss_radius_x = 65.4f;
static const float boss_radius_y = 130.8f;
static const float first_boss1_speed = 10.0;
static const float first_boss1_depth = 500.0;
static const float return_boss1_depth_speed = 10.0;

static const float shot_speed = 30.0f;
static const float shot_radius = 42.4f;

extern void title_move(SceneGraphPtr node, void *sgroot_, int w, int h);
extern void title_coll(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree);
extern void dandy_move(SceneGraphPtr node, void *sgroot_, int w, int h);
extern void dandy_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree);
extern void create_back(void *sgroot, int w, int h);
extern void create_stage(void *sgroot, int w, int h);
extern void schedule(SceneGraphPtr node, void *sgroot_, int w, int h);

typedef struct enemy_state {
  const char *charano;
  int score;
  int vital;
  
} state;


//const state enemystate[50];

#define ENEMY_STATUS_TABLE {\
    ENEMY_STATUS("title001"   , 0  , 0),				\
    ENEMY_STATUS("greencrab", 330, 98),				\
    ENEMY_STATUS("plane", 470, 37),					\
    ENEMY_STATUS("e_redbullet", 30, 16),				\
    ENEMY_STATUS("bass1_organ", 25000, 10000),				\
    ENEMY_STATUS("boss1_parts1", 10000, 10000),				\
    ENEMY_STATUS("bluebullet", 40, 39),					\
    ENEMY_STATUS("e_laser", 100, 100000),				\
    ENEMY_STATUS("lightning", 100, 100000),				\
    ENEMY_STATUS("asteroid", 170, 500),					\
    ENEMY_STATUS("asteroid_boss2body", 100, 500),			\
    ENEMY_STATUS("boss2_leftshoulder", 10000, 12000),			\
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
    ENEMY_STATUS("t",	0, 0), \
}