añadidos nuevos ficheros de clases
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
#include "jail_audio.h"
|
||||
#include "const.h"
|
||||
#include "ltexture.h"
|
||||
|
||||
#include "director.h"
|
||||
/*
|
||||
struct Tanimation
|
||||
{
|
||||
bool loops; // Salta a true cuando se reinicia la animación
|
||||
@@ -32,9 +33,9 @@ struct Tprogram
|
||||
struct Tgame
|
||||
{
|
||||
bool enabled;
|
||||
Mix_Chunk *sound_drop_enemy;
|
||||
Mix_Chunk *sound_drop_splat;
|
||||
Mix_Music *music;
|
||||
JA_Sound sound_drop_enemy;
|
||||
JA_Sound sound_drop_splat;
|
||||
JA_Music music;
|
||||
Uint8 zone; // Zona en la que estamos
|
||||
};
|
||||
|
||||
@@ -45,9 +46,9 @@ struct Tmenu
|
||||
int timer;
|
||||
LTexture *sprite_animation;
|
||||
LTexture *sprite;
|
||||
Mix_Chunk *sound_logo;
|
||||
Mix_Chunk *sound_start;
|
||||
Mix_Music *music;
|
||||
JA_Sound sound_logo;
|
||||
JA_Sound sound_start;
|
||||
JA_Music music;
|
||||
SDL_Rect dst_rect_animation;
|
||||
SDL_Rect dst_rect_fondo;
|
||||
SDL_Rect dst_rect_logo_zoom;
|
||||
@@ -63,34 +64,7 @@ struct Tmenu
|
||||
Uint8 section;
|
||||
};
|
||||
|
||||
struct Tplayer
|
||||
{
|
||||
bool can_jump; // Si puede saltar
|
||||
bool enabled; // Si está habilitado
|
||||
bool jump_pressed_before; // Si se ha pulsado el botón de salto previamente
|
||||
bool jump_pressed_now; // Si se acaba de pulsar el salto
|
||||
bool key[6]; // Indica las llaves que posee el jugador
|
||||
bool standing; // Si esta de pie (o quieto?)
|
||||
bool was_on_background; // Si viene de una zona atravesable
|
||||
int coins; // Cantidad de monedas
|
||||
int cooldown; // Tiempo de inhabilitación
|
||||
int jumpforce; // Cantidad de pixels a desplazarse y velocidad que pilla al saltar
|
||||
int respawn_x; // Coordenadas para revivir
|
||||
int respawn_y; // Coordenades para revivir
|
||||
int speed_x; // Cantidad de pixeles a desplazarse
|
||||
int speed_y; // Cantidad de pixels a desplazarse
|
||||
LTexture *sprite; // Textura con los graficos del jugador
|
||||
Mix_Chunk *sound_coin; // Sonido al coger monedas
|
||||
Mix_Chunk *sound_death; // Sonido al morir
|
||||
Mix_Chunk *sound_jump; // Sonido al saltar
|
||||
SDL_Rect dst_rect; // Rectangulo donde dibujar el sprite del jugador. Es la posición del jugador
|
||||
SDL_Rect src_rect; // Rectangulo con el dibujo del jugador a pintar
|
||||
Tanimation animation[8]; // Vector con las animaciones del jugador
|
||||
Uint8 active_animation; // Animación activa
|
||||
Uint8 direction; // Sentido del desplazamiento
|
||||
Uint8 lifes; // Cantidad de vidas
|
||||
Uint8 respawn_direction; // Dirección para revivir
|
||||
};
|
||||
|
||||
|
||||
struct Tactor
|
||||
{
|
||||
@@ -154,7 +128,6 @@ Tgame game;
|
||||
Thud hud;
|
||||
Tmap map;
|
||||
Tmenu menu;
|
||||
Tplayer player;
|
||||
Tprogram prog;
|
||||
Uint32 delta_time;
|
||||
|
||||
@@ -171,9 +144,9 @@ void ApplyGravity();
|
||||
void CheckPlayerCollisionWithActors();
|
||||
void CheckPlayerCollisionWithActors();
|
||||
void CheckPlayerCollisionWithMap();
|
||||
void CloseMusic(Mix_Music *music);
|
||||
void CloseMusic(JA_Music *music);
|
||||
void ClosePicture(LTexture *picture);
|
||||
void CloseSound(Mix_Chunk *sound);
|
||||
void CloseSound(JA_Sound *sound);
|
||||
void CreateActor(Tactor &a, Uint8 kind, Uint8 id, Sint16 dstx, Sint16 dsty, Sint16 dstw, Sint16 dsth, Sint16 srcx, Sint16 srcy, Sint16 sx, Sint16 sy, Sint16 timer, Sint16 frame, Uint8 direction, Uint8 parent);
|
||||
void DrawHud();
|
||||
void DrawMap();
|
||||
@@ -205,5 +178,5 @@ void SetPlayerAnimation(Uint8 anim);
|
||||
void SetPlayerDirection(int direction);
|
||||
void SetProgSection(Uint8 section);
|
||||
void SetZone(int room);
|
||||
|
||||
*/
|
||||
#endif
|
||||
Reference in New Issue
Block a user