Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HUD
- if (GameState != 21)
- {
- if (GetCharacterObject(0))
- {
- //HudDisplayRingsSTH06(Rings, 3, &hud_sprite);
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_score, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_timer, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_rings, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_lives, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- if (GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_gauge, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_sonic_life, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (GetCharacterID(0) == Characters_Tails) njDrawSprite2D_Queue(&HUD_SPRITE, HUD_tails_life, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- else if (GetCharacterID(0) == Characters_Knuckles) njDrawSprite2D_Queue(&HUD_SPRITE, HUD_knuckles_life, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- else if (GetCharacterID(0) == Characters_Amy) njDrawSprite2D_Queue(&HUD_SPRITE, HUD_amy_life, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- else if (GetCharacterID(0) == Characters_Gamma) njDrawSprite2D_Queue(&HUD_SPRITE, HUD_gamma_life, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- HUD_SPRITE_NUMBERS_RINGS.p.x = 0;
- HUD_SPRITE_NUMBERS_RINGS.p.y = 0;
- HUD_SPRITE_NUMBERS_RINGS_0_RED.p.x = HUD_SPRITE_NUMBERS_RINGS.p.x;
- HUD_SPRITE_NUMBERS_RINGS_0_RED.p.y = HUD_SPRITE_NUMBERS_RINGS.p.y;
- HUD_SPRITE_NUMBERS_TIMER_MINUTES.p.x = -34;
- HUD_SPRITE_NUMBERS_TIMER_MINUTES.p.y = -65;
- HUD_SPRITE_NUMBERS_TIMER_SECONDS.p.x = HUD_SPRITE_NUMBERS_TIMER_MINUTES.p.x + 69;
- HUD_SPRITE_NUMBERS_TIMER_SECONDS.p.y = HUD_SPRITE_NUMBERS_TIMER_MINUTES.p.y;
- HUD_SPRITE_NUMBERS_TIMER_FRAMES.p.x = HUD_SPRITE_NUMBERS_TIMER_SECONDS.p.x + 71;
- HUD_SPRITE_NUMBERS_TIMER_FRAMES.p.y = HUD_SPRITE_NUMBERS_TIMER_MINUTES.p.y;
- HUD_SPRITE_NUMBERS_LIVES.p.y = 65;
- HUD_SPRITE_NUMBERS_SCORE.p.y = -133;
- //Ring Counter
- if (Rings == 0)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RINGS_0_RED, 0, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RINGS_0_RED, 1, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (Rings > 0 && Rings < 1000)
- {
- HudDisplayRingsSTH06(Rings, 3, &HUD_SPRITE_NUMBERS_RINGS);
- }
- else if (Rings >= 1000)
- {
- HudDisplayRingsSTH06(Rings, 4, &HUD_SPRITE_NUMBERS_RINGS);
- }
- //Ring image animation
- //if (GameState == 4)
- //{
- // OldRingsHUD = Rings;
- // can_animate = 0;
- //}
- //if (GameState == 15 || GameState == 16)
- //{
- if (GetCharacterObject(0))
- {
- if (Rings - OldRingsHUD > 0)
- {
- can_animate_loss = 0;
- ++can_animate_gain;
- if (can_animate_gain == 1)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 1, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 2)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 2, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 3)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 3, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 4)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 4, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 5)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 5, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 6)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 6, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_gain == 7)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 7, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- OldRingsHUD = Rings;
- can_animate_gain = 0;
- }
- }
- else if (Rings - OldRingsHUD < 0)
- {
- can_animate_gain = 0;
- ++can_animate_loss;
- if (can_animate_loss == 1)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 7, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 2)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 6, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 3)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 5, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 4)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 4, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 5)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 3, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 6)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 2, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- else if (can_animate_loss == 7)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 1, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- OldRingsHUD = Rings;
- can_animate_loss = 0;
- }
- }
- else if (OldRingsHUD == Rings)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_NUMBERS_RING_ANIM, 0, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- }
- //}
- //Lives Counter
- if (Lives < 10)
- {
- HUD_SPRITE_NUMBERS_LIVES.p.x = 48.8;
- HudDisplayLivesSTH06(Lives, 1, &HUD_SPRITE_NUMBERS_LIVES);
- }
- else if (Lives >= 10)
- {
- HUD_SPRITE_NUMBERS_LIVES.p.x = 25.4;
- HudDisplayLivesSTH06(Lives, 2, &HUD_SPRITE_NUMBERS_LIVES);
- }
- //Timer Minutes
- HudDisplayMinutesSTH06(TimeMinutes, 2, &HUD_SPRITE_NUMBERS_TIMER_MINUTES);
- //Timer Minutes
- HudDisplaySecondsSTH06(TimeSeconds, 2, &HUD_SPRITE_NUMBERS_TIMER_SECONDS);
- //Score Counter
- HudDisplayFramesSTH06(TimeFrames, 3, &HUD_SPRITE_NUMBERS_TIMER_FRAMES);
- if (EnemyBonus < 10)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 153;
- HudDisplayScoreSTH06(EnemyBonus, 1, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 10 && EnemyBonus < 100)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 129.6;
- HudDisplayScoreSTH06(EnemyBonus, 2, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 100 && EnemyBonus < 1000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 106.2;
- HudDisplayScoreSTH06(EnemyBonus, 3, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 1000 && EnemyBonus < 10000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 82.8;
- HudDisplayScoreSTH06(EnemyBonus, 4, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 10000 && EnemyBonus < 100000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 59.4;
- HudDisplayScoreSTH06(EnemyBonus, 5, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 100000 && EnemyBonus < 1000000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 36;
- HudDisplayScoreSTH06(EnemyBonus, 6, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 1000000 && EnemyBonus < 10000000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = 12.6;
- HudDisplayScoreSTH06(EnemyBonus, 7, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else if (EnemyBonus >= 10000000 && EnemyBonus < 100000000)
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = -10.8;
- HudDisplayScoreSTH06(EnemyBonus, 8, &HUD_SPRITE_NUMBERS_SCORE);
- }
- else
- {
- HUD_SPRITE_NUMBERS_SCORE.p.x = -34.2;
- HudDisplayScoreSTH06(EnemyBonus, 9, &HUD_SPRITE_NUMBERS_SCORE);
- }
- }
- }
- //Character Select HUD
- if (GameState == 21)
- {
- if (GetCharacterObject(0))
- {
- LoadPVM("HUD", &HUD_TEXLIST);// do better loading (not have it repeat)
- //njDrawSprite2D_Queue(&HUD_SPRITE2, char_sel_sonic, -1, NJD_SPRITE_ALPHA, (QueuedModelFlagsB)0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement