mirror of
https://git.planet-casio.com/Fcalva/Copy3DEngine.git
synced 2024-12-28 04:23:44 +01:00
parent
ce0a319a52
commit
3a5adfac64
5 changed files with 8 additions and 4 deletions
|
@ -37,6 +37,7 @@ void move(RcGame *game) {
|
||||||
V2d *dir = &game->player.dir;
|
V2d *dir = &game->player.dir;
|
||||||
V2d *pos = &game->player.pos;
|
V2d *pos = &game->player.pos;
|
||||||
int map_w = game->current_map->w;
|
int map_w = game->current_map->w;
|
||||||
|
int map_h = game->current_map->h;
|
||||||
|
|
||||||
fixed_t oldDirX;
|
fixed_t oldDirX;
|
||||||
fixed_t oldPlaneX;
|
fixed_t oldPlaneX;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#define screen_w 128
|
#define screen_w 128
|
||||||
#define screen_h 64
|
#define screen_h 64
|
||||||
#define viewport_w 109
|
#define viewport_w 100
|
||||||
#define viewport_h 64
|
#define viewport_h 64
|
||||||
#define max_dist fix(32)
|
#define max_dist fix(32)
|
||||||
//Max sprites to attempt to render
|
//Max sprites to attempt to render
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
|
|
||||||
//===== Paramètres de debug =====
|
//===== Paramètres de debug =====
|
||||||
|
|
||||||
#define debug 0 //pour afficher les infos de debug
|
#define debug 1 //pour afficher les infos de debug
|
||||||
|
|
||||||
#define asm_opti 0
|
#define asm_opti 0
|
||||||
|
|
BIN
src/.game.c
BIN
src/.game.c
Binary file not shown.
|
@ -129,10 +129,13 @@ WeaponStat weapon_stats[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void weapon_hurt_stuff(CCGame *game){
|
void weapon_hurt_stuff(CCGame *game){
|
||||||
Sprite *hit = NULL;
|
Sprite *hit;
|
||||||
int dist = raycast((RcGame*)game, &((RcGame*)game)->player, &hit);
|
int dist = raycast((RcGame*)game, &((RcGame*)game)->player, &hit);
|
||||||
if(dist > weapon_stats[game->curr_weapon].range || !hit)
|
if(dist > weapon_stats[game->curr_weapon].range || !hit)
|
||||||
return;
|
return;
|
||||||
|
//:p
|
||||||
|
if(hit > 0x90000000)
|
||||||
|
return;
|
||||||
hit->hp -= weapon_stats[game->curr_weapon].dmg;
|
hit->hp -= weapon_stats[game->curr_weapon].dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ void draw_hands(CCGame *game){
|
||||||
|
|
||||||
void draw_gui(CCGame *game){
|
void draw_gui(CCGame *game){
|
||||||
draw_hands(game);
|
draw_hands(game);
|
||||||
dline(109,0,109,63,3);
|
dline(100,0,100,63,3);
|
||||||
dprint_opt(127,10,3,C_NONE,DTEXT_RIGHT,DTEXT_TOP,"%d",game->_bgame.player.hp);
|
dprint_opt(127,10,3,C_NONE,DTEXT_RIGHT,DTEXT_TOP,"%d",game->_bgame.player.hp);
|
||||||
//TODO : replace w/ icon
|
//TODO : replace w/ icon
|
||||||
dtext_opt(127,20,3,C_NONE,DTEXT_RIGHT,DTEXT_TOP,"HP",-1);
|
dtext_opt(127,20,3,C_NONE,DTEXT_RIGHT,DTEXT_TOP,"HP",-1);
|
||||||
|
|
Loading…
Reference in a new issue