view ppe/task_object.h @ 19:00c3272a801f

fix.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Sun, 26 Dec 2010 18:57:08 +0900
parents ppe/tobject.h@23d54565aa7b
children ee4c488d48a3
line wrap: on
line source

#ifndef INCLUDE_OBJECT
#define INCLUDE_OBJECT

#define TAMALV1P 14
#define TAMALV2P 50
#define TAMALV3P 24

#define LASERLV1P 17
#define LASERLV2P 154
#define LASERLV3P 51

#define TRUE 1
#define FALSE 0
#define BOOL char

typedef struct player {
    int x;
    int y;
    int ch;
    int point;
    BOOL bf;
    int muteki;
    int zanki;
    int ccount;
} player;

typedef struct tama {
    int x;
    int y;
} tama;

typedef struct tama1 {
    int x;
    int y;
    int r;
    int l;
} tama1;

typedef struct tama2 {
    int x;
    int y;
    int rr;
    int sr;
    int sl;
    int ll;
} tama2;

typedef struct stge {
    int stg;
} stge;

typedef struct laser {
    float x;
    float y;
    float sx;
    float sy;
    int r;
    int enemyno;
  float s;
} laser;

typedef struct bomchar {
    int x;
    int y;
    int f;
    int no;
} bomchar;

typedef struct CHARACTER{
  float x; //position
  float y;
 
  float vx; //velocity
  float vy;

  float vit; //vitality
  int score;
  int dt1;
  int dt2;
  int charano; //sprite_number
  BOOL tama; //bullet identifier
  BOOL f; //apiarance idenfifier
  float s;
  int task;

  struct CHARACTER * (*state)(struct CHARACTER *p);
  struct CHARACTER * (*collision)(struct CHARACTER *p);
  struct CHARACTER *next;
  struct CHARACTER *prev;

} CHARACTER;

typedef struct CollisionProperty {
  int bomend;
  int enemycount;
  int infg_level;

  stge lg;
  stge infg;
  player jiki;
  CHARACTER p;

  tama1 tama_lv1[20];
  tama2 tama_lv2[20];
  tama1 tlv3;
  laser laser_lv1[20];
  laser laser_lv2[20];
  laser laser_lv3[128];
  bomchar bchar[100];

} CollisionProperty, *CollisionPropertyPtr;

CHARACTER * noaction(CHARACTER *p);
CHARACTER * delete_chara(CHARACTER *p);
void Bom(int x, int y, int *bomend, bomchar *bchar);
void Puttama(int type, float x, float y);
void Putenemy(int charano, float x, float y, float vx, float vy, int task);

#endif