view ppe/tobject.h @ 2:6382d8f6a973

not working.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Tue, 14 Dec 2010 00:54:07 +0900
parents b4c797eee72a
children 23d54565aa7b
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;
  
  struct CHARACTER * (*state)(struct CHARACTER *p);
  struct CHARACTER * (*collision)(struct CHARACTER *p);
  struct CHARACTER *next;
  struct CHARACTER *prev;

} CHARACTER;

typedef struct CollisionProperty {
  int infg_level;
  int enemycount;

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

  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);
extern void Bom(int x, int y, int bchar, bomchar *bchar);

#endif