view dandy.h @ 3:7b4c2cfeba45

task not move 2%
author tkaito
date Thu, 17 Jun 2010 06:31:01 +0900
parents 6e1afe1016dc
children ccc811ee5f55
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;
  double vx, vy;
  int frame;
  const char *chara;
  int vital;
  int score;
  void *parent;
  void *root;
  
} *ObjPropertyPtr, ObjProperty;

static const int ENEMY_NUM = 1;
extern ObjPropertyPtr charactor;

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_title(void *sgroot, int w, int h);
extern void create_stage(void *sgroot, int w, int h);

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

#define ENEMY_STATUS_TABLE { \
    ENEMY_STATUS("test00", 0, 0),	   \
    ENEMY_STATUS("greencrab", 330, 98)   \
}