#ifndef _EIKEN_H
#define _EIKEN_H
#include "python2.4/Python.h"
///extracteurs RVBA :
#define RED(pix) (pix)&255
#define GREEN(pix) ((pix)>>8)&255
#define BLUE(pix) ((pix)>>16)&255
#define ALPHA(pix) ((pix)>>24)&255
typedef struct Masques { Uint16 taille_unitaire; Uint8 taille_x, taille_y; Uint8 n_variations; Uint8* pixels; } Masques;
typedef struct FicheAnimationTexture {
Uint16 n_images; // Le nombre d'images de l'animation
Uint32 position_depart;
} FicheAnimationTexture;
typedef struct AnimationsTextures {
Uint32 taille_image_materiau; //65536
Uint32 taille_sub_image; //256
Uint8 t_sub_x, t_sub_y; //16*16
Uint16 n_sub_images; //256
Uint16 n_sub_x, n_sub_y; //16*16
Uint16 taille_index; // ?
Uint32* index;
Uint32* pixels;
} AnimationsTextures;
///Engin
typedef struct Engin {
Uint32 pos_vue_x; //
Uint32 pos_vue_y; //
Uint32 dest_vue_x; //
Uint32 dest_vue_y; //
Masques *masques; //
AnimationsTextures *materiaux; //
/*il faut rajouter des tonnes de trucs :
-de quoi gerer les entrées clavier/souris
-peut-être de quoi gérer les objets.
*/
//--méthodes à implémenter après :
/*
Engin.maj () : prend en compte les
entrées pour modifier les variables
de l'engin, fait avancer la vue vers
sa destination,
*/
} Engin;
Masques *CreerMasques(char *fichier);
FicheAnimationTexture *CreerFicheAnimationTexture(char *fichier);
AnimationsTexture *CreerAnimationTexture(char *fichier);
#endif