|

楼主 |
发表于 2004-8-14 05:43:12
|
显示全部楼层
可以打坦克了。我只下载到了 V0.06 版。正在读代码呢。能不能介绍一下这二个结构啊。
- typedef struct GameEngine {
- SDL_Surface *screen,
- *swapscreen,
- *bg1,*bg2,
- *player1,
- *player2,
- *enemys,
- *bullets;
- SDL_Event event;
- int FULLSCREEN;
- Uint32 last_time;
- Uint32 now_time;
- }GameEngine;
- typedef struct Sprite_t {
- int type;
- int width;
- int height;
- int x;
- int y;
- int ox;
- int oy;
- int boring;
- int active;
- int dir;
- int speed;
- int timer1; /* use to show subframe */
- int clock;
- SDL_Surface *image;
- // SDL_Rect grid;
- // SDL_Rect pos;
- // SDL_Rect mask;
- }Sprite_t;
复制代码
最好详细些。只是想读的更懂。把游戏改的更好玩。:) |
|