taisei/src/item.h

50 lines
781 B
C
Raw Normal View History

2011-04-29 10:26:37 +02:00
/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
* Code by: Juergen Kieslich
*/
#ifndef ITEM_H
#define ITEM_H
#include <complex.h>
2011-06-24 12:35:03 +02:00
typedef struct Item Item;
2011-04-29 10:26:37 +02:00
typedef enum {
Power,
Point,
BPoint,
2011-04-29 10:26:37 +02:00
Life,
Bomb
} Type;
2011-06-24 12:35:03 +02:00
struct Item{
Item *next;
Item *prev;
2011-04-29 10:26:37 +02:00
int birthtime;
2011-04-29 10:26:37 +02:00
complex pos;
complex pos0;
int auto_collect;
Type type;
complex v;
2011-06-24 12:35:03 +02:00
};
2011-04-29 10:26:37 +02:00
Item *create_item(complex pos, complex v, Type type);
2011-04-29 10:26:37 +02:00
void delete_item(Item *item);
void draw_items();
void delete_items();
int collision_item(Item *p);
2011-04-29 10:26:37 +02:00
void process_items();
void spawn_item(complex pos, Type type);
void spawn_items(complex pos, int point, int power, int bomb, int life);
2011-04-29 10:26:37 +02:00
#endif