Merge branch 'SQC-15_animation' into SQC-15_paquets

This commit is contained in:
MarcEricMartel 2023-11-24 12:46:04 -05:00
commit 2e30995f1b
51 changed files with 70 additions and 16 deletions

View File

@ -41,8 +41,11 @@ typedef uint8_t BlockType;
enum BLOCK_TYPE { BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS, BTYPE_METAL, BTYPE_ICE, BTYPE_GREENGRASS, BTYPE_LAST }; enum BLOCK_TYPE { BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS, BTYPE_METAL, BTYPE_ICE, BTYPE_GREENGRASS, BTYPE_LAST };
typedef uint8_t BoostType; typedef uint8_t BoostType;
enum BOOST_TYPE { BTYPE_SPEED, BTYPE_HEAL, BTYPE_DAMAGE, BTYPE_INVINCIBLE, BTYPE_BOOST_LAST }; enum BOOST_TYPE { BTYPE_SPEED, BTYPE_HEAL, BTYPE_DAMAGE, BTYPE_INVINCIBLE, BTYPE_BOOST_LAST };
//anim
enum ANIM_TYPE { STILL = 0, SHOOTING = 8, JUMPING = 16, JUMPINGSHOOTING = 24, DEAD = 32, TYPE_LAST = 40}; enum ANIM_TYPE { STILL = 0, SHOOTING = 8, JUMPING = 16, JUMPINGSHOOTING = 24, DEAD = 32, TYPE_LAST = 40};
enum ANIM_POS {FRONT, QUARTER_FRONT_LEFT, QUATER_FRONT_RIGHT, PROFIL_LEFT, PROFIL_RIGHT, QUARTER_BACK_LEFT, QUARTER_BACK_RIGHT, BACK , POS_LAST}; enum ANIM_POS {FRONT, QUARTER_FRONT_LEFT, QUATER_FRONT_RIGHT, PROFIL_LEFT, PROFIL_RIGHT, QUARTER_BACK_LEFT, QUARTER_BACK_RIGHT, BACK , POS_LAST};
typedef uint64_t Timestamp; typedef uint64_t Timestamp;
#ifdef _WIN32 #ifdef _WIN32

View File

@ -28,8 +28,17 @@
#define BASE_WIDTH 640 #define BASE_WIDTH 640
#define BASE_HEIGHT 480 #define BASE_HEIGHT 480
#define ANIME_PATH_JUMP "./media/textures/AssetOtherPlayer/FinalPNGJumping/" #define ANIME_PATH_JUMP "./media/textures/AssetOtherPlayer/FinalPNGJumping/"
#define ANIME_PATH_STILL "./media/textures/AssetOtherPlayer/FinalPNGStanding/" #define ANIME_PATH_STILL "./media/textures/AssetOtherPlayer/FinalPNGStanding/"
//1 = jump shoot sans anim, 2 = jump shoot avec anim
#define ANIM_PATH_JSHOOT1 "./media/textures/AssetOtherPlayer/FinalPNGJumpingShooting/"
#define ANIM_PATH_JSHOOT2 "./media/textures/AssetOtherPlayer/FinalPNGJumpingShooting/ShootingJump/"
//1 = shoot sans anim, 2 = shoot avec anim
#define ANIM_PATH_SSHOOT1 "./media/textures/AssetOtherPlayer/FinalPNGShooting/"
#define ANIM_PATH_SSHOOT2 "./media/textures/AssetOtherPlayer/FinalPNGShooting/Shooting/"
#define TEXTURE_PATH "./media/textures/" #define TEXTURE_PATH "./media/textures/"
#define SHADER_PATH "./media/shaders/" #define SHADER_PATH "./media/shaders/"
#define AUDIO_PATH "./media/audio/" #define AUDIO_PATH "./media/audio/"

View File

@ -459,29 +459,71 @@ void Engine::LoadResource() {
//AJOUTER LES TEXTURES DANS L'ORDRE DE L'ÉNUM //AJOUTER LES TEXTURES DANS L'ORDRE DE L'ÉNUM
//STILL//STANDING
TextureAtlas::TextureIndex StillFront = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueFrontRight.png");
//TextureAtlas::TextureIndex StillQuarterFrontLeft = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueLeft.png");
//TextureAtlas::TextureIndex StillQuarterFrontRight = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueRight.png");
//TextureAtlas::TextureIndex StillProfiltLeft = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueProfilLeft.png");
//TextureAtlas::TextureIndex StillProfiltRight = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueProfilRight.png");
//TextureAtlas::TextureIndex StillQuarterBackLeft = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueLeftBack.png");
//TextureAtlas::TextureIndex StillQuarterBackRight = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueRightBack.png");
//TextureAtlas::TextureIndex StillBack = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueBackRight.png");
//SHOOTINGSTILL SANS TIRER
//TextureAtlas::TextureIndex StillFrontShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueFrontRightShootingRight.png");
//TextureAtlas::TextureIndex StillQuarterFrontLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueFrontRightShootingRight.png");
//TextureAtlas::TextureIndex StillQuarterFrontRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueRightShootingRight.png");
//TextureAtlas::TextureIndex StillProfiltLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueProfilShootingLeft.png");
//TextureAtlas::TextureIndex StillProfiltRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueProfilShootingRight.png");
//TextureAtlas::TextureIndex StillQuarterBackLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueBackLeftShootingLeft.png");
//TextureAtlas::TextureIndex StillQuarterBackRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueBackRightShootingRight.png");
//TextureAtlas::TextureIndex StillBackShoot = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT1 "BlueShootingBackRight.png");
//SHOOTINGSTILL TIRER
//TextureAtlas::TextureIndex StillFrontShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueFrontRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex StillQuarterFrontLeftFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueLeftShootingLeftShoot1.png");
//TextureAtlas::TextureIndex StillQuarterFrontRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex StillProfiltLeftShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueProfilShootingLeftShoot1.png");
//TextureAtlas::TextureIndex StillProfiltRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueProfilShootingRightShoot1.png");
//TextureAtlas::TextureIndex StillQuarterBackLeftShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueBackLeftShootingLeftShoot1.png");
//TextureAtlas::TextureIndex StillQuarterBackRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueBackRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex StillBackShootFire = m_animeAtlas.AddTexture(ANIM_PATH_SSHOOT2 "BlueShootingBackRightShoot1.png");
//JUMP //JUMP
//TextureAtlas::TextureIndex JumpBack = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueBackJumpRight.png");
//TextureAtlas::TextureIndex JumpFront = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueFrontJumpRight.png"); //TextureAtlas::TextureIndex JumpFront = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueFrontJumpRight.png");
//TextureAtlas::TextureIndex JumpQuarterBackLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeftBackJumpLeft.png");
//TextureAtlas::TextureIndex JumpQuarterBackRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRightBackJumpRight.png");
//TextureAtlas::TextureIndex JumpProfiltLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilJumpLeft.png");
//TextureAtlas::TextureIndex JumpProfiltRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilJumpRight.png");
//TextureAtlas::TextureIndex JumpQuarterFrontLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeftFrontJumpLeft.png"); //TextureAtlas::TextureIndex JumpQuarterFrontLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeftFrontJumpLeft.png");
//TextureAtlas::TextureIndex JumpQuarterFrontRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRightFrontJumpRight.png"); //TextureAtlas::TextureIndex JumpQuarterFrontRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRightFrontJumpRight.png");
//TextureAtlas::TextureIndex JumpProfiltLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilJumpLeft.png");
//TextureAtlas::TextureIndex JumpProfiltRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilJumpRight.png");
//TextureAtlas::TextureIndex JumpQuarterBackLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeftBackJumpLeft.png");
//TextureAtlas::TextureIndex JumpQuarterBackRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRightBackJumpRight.png");
//TextureAtlas::TextureIndex JumpBack = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueBackJumpRight.png");
//STILL
//TextureAtlas::TextureIndex StillBack = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueBackRight.png");
TextureAtlas::TextureIndex StillFront = m_animeAtlas.AddTexture(ANIME_PATH_STILL "BlueFrontRight.png");
//TextureAtlas::TextureIndex StillQuarterBackLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeftBack.png");
//TextureAtlas::TextureIndex StillQuarterBackRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRightBack.png");
//TextureAtlas::TextureIndex StillProfiltLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilLeft.png");
//TextureAtlas::TextureIndex StillProfiltRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueProfilRight.png");
//TextureAtlas::TextureIndex StillQuarterFrontLeft = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueLeft.png");
//TextureAtlas::TextureIndex StillQuarterFrontRight = m_animeAtlas.AddTexture(ANIME_PATH_JUMP "BlueRight.png");
//SHOOTINGSTILL //SHOOTINGJUMP SANS TIRER
//SHOOTINGJUMP //TextureAtlas::TextureIndex JumpFrontShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueFrontJumpRightShootingRight.png");
//TextureAtlas::TextureIndex JumpQuarterFrontLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueFrontLeftJumpLeftShootingLeft.png");
//TextureAtlas::TextureIndex JumpQuarterFrontRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueFrontRightJumpRightShootingRight.png");
//TextureAtlas::TextureIndex JumpProfiltLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueProfilLeftJumpLeftShootingLeft.png");
//TextureAtlas::TextureIndex JumpProfiltRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BluerProfilRightJumprightShootingRight.png");
//TextureAtlas::TextureIndex JumpQuarterBackLeftShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueBackLeftJumpLeftShootingLeft.png");
//TextureAtlas::TextureIndex JumpQuarterBackRightShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueBackRightJumpRightShootingRight.png");
//TextureAtlas::TextureIndex JumpBackShoot = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT1 "BlueBackJumpRightShootingRight.png");
//SHOOTINGJUMP TIRER
//TextureAtlas::TextureIndex JumpFrontShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueFrontJumpRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex JumpQuarterFrontLeftShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueFrontLeftJumpLeftShootingLeftShoot1.png");
//TextureAtlas::TextureIndex JumpQuarterFrontRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueFrontRightJumpRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex JumpProfiltLeftShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueProfilLeftJumpLeftShootingLeftShoot1.png");
//TextureAtlas::TextureIndex JumpProfiltRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BluerProfilRightJumprightShootingRightShoot1.png");
//TextureAtlas::TextureIndex JumpQuarterBackLeftShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueBackLeftJumpLeftShootingLeftShoot1.png");
//TextureAtlas::TextureIndex JumpQuarterBackRightShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueBackRightJumpRightShootingRightShoot1.png");
//TextureAtlas::TextureIndex JumpBackShootFire = m_animeAtlas.AddTexture(ANIM_PATH_JSHOOT2 "BlueBackJumpRightShootingRightShoot1.png");
if (!m_animeAtlas.Generate(TEXTURE_SIZE, false)) { if (!m_animeAtlas.Generate(TEXTURE_SIZE, false)) {
std::cout << " Unable to generate texture atlas ..." << std::endl; std::cout << " Unable to generate texture atlas ..." << std::endl;
abort(); abort();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB