Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MyHudThing()
- {
- if (GameState == 4)
- {
- can_animate_gain = 0;
- can_animate_loss = 0;
- energy_glow = 0;
- glow_down = false;
- energy_lvl_glow = 0;
- lvl_glow_down = false;
- lv1_stretch = 0;
- lv2_stretch = 0;
- lv3_stretch = 0;
- LV1_obtained = false;
- LV2_obtained = false;
- LV3_obtained = false;
- LV1_active = false;
- LV2_active = false;
- LV3_active = false;
- sparkles.clear();
- sparkletimer = 0;
- sparklegemstimer = 0;
- sparklegems_tiny_timer = 0;
- LV1_usable = false;
- LV2_usable = false;
- LV3_usable = false;
- stop_active_lvl = 0;
- sonic_lv1_glow = 0;
- sonic_lv2_glow = 0;
- sonic_lv3_glow = 0;
- sonic_lv1_glow_down = false;
- sonic_lv2_glow_down = false;
- sonic_lv3_glow_down = false;
- star_glow = 0;
- circle_glow = 0;
- level3_glow = 0;
- Gauge = 10000;
- }
- if (GameState != 21)
- {
- if (GetCharacterObject(0))
- {
- njColorBlendingMode(NJD_SOURCE_COLOR, NJD_COLOR_BLENDING_SRCALPHA);
- njColorBlendingMode(NJD_DESTINATION_COLOR, NJD_COLOR_BLENDING_INVSRCALPHA);
- njTextureShadingMode(NJD_TEX_SHADING_MODE_DECALALPHA);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- HUD_SPRITE.p.x = -44 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 70 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- HUD_SPRITE.p.x = -44 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 120 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- HUD_SPRITE.p.x = -44 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 170 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- HUD_SPRITE.p.x = -44 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 220 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- HUD_SPRITE.p.x = 110 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 205 * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE, 10, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (ControllerPointers[0]->HeldButtons & Buttons_B) ++checkH;
- if (ControllerPointers[0]->HeldButtons & Buttons_X) --checkH;
- if (ControllerPointers[0]->HeldButtons & Buttons_A) ++checkV;
- if (ControllerPointers[0]->HeldButtons & Buttons_Y) --checkV;
- //////////////////////////////SetDebugFontSize(15);
- //////////////////////////////DisplayDebugStringFormatted((80 << 16) | 60, "%5i", checkH);
- //////////////////////////////SetDebugFontSize(12);
- //////////////////////////////SetDebugFontSize(15);
- //////////////////////////////DisplayDebugStringFormatted((81 << 16) | 61, "%5i", checkV);
- //////////////////////////////SetDebugFontSize(12);
- //Energy Gauge
- HUD_SPRITE_ENERGY.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGY.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0); //HUD_Gauge
- if (LV3_active)
- {
- ////////////////////************************************************************************************************************
- GEMSGauge_SPRITE.p.x = 1490 * HorizontalResolution / 1680.0f;
- GEMSGauge_SPRITE.p.y = 872 * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&GEMSGauge_SPRITE, draw, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- ////////////////////
- }
- if (Gauge == 0)
- {
- energy_glow = 0;
- }
- if (Gauge > 0 && Gauge < 10000)
- {
- energy_glow = 0;
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY, 1 + (Gauge/100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (Gauge >= 10000)
- {
- HUD_SPRITE_ENERGY.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGY.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY, 100, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (!is_boosting)
- {
- HUD_SPRITE_ENERGY_GLOW.p.x = 785 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGY_GLOW.p.y = 657 * 1.3f * VerticalResolution / 1050.0f;
- if (energy_glow <= 20)
- {
- if (!glow_down)
- {
- if (energy_glow < 20)
- {
- ++energy_glow;
- SetMaterialAndSpriteColor_Float((0 + energy_glow) / 20.0f, 1, 1, 1);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (energy_glow == 20)
- {
- energy_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- glow_down = true;
- }
- }
- else if (glow_down)
- {
- if (energy_glow < 20)
- {
- ++energy_glow;
- SetMaterialAndSpriteColor_Float((20 - energy_glow) / 20.0f, 1, 1, 1);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (energy_glow == 20)
- {
- energy_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGY_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- glow_down = false;
- }
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- //LVL Energy Gauge
- if (GameState != 16)
- {
- if (LV2_usable && !LV3_usable)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_B)
- {
- PlaySound(1250, 0, 0, 0);
- LV1_obtained = false;
- LV2_obtained = false;
- LV1_usable = false;
- LV2_usable = false;
- LV2_active = true;
- Gauge2 = 9999;
- sonic_lv1_glow = 0;
- sonic_lv2_glow = 0;
- sonic_lv3_glow = 0;
- lvl_glow_down = false;
- sonic_lv1_glow_down = false;
- sonic_lv2_glow_down = false;
- sonic_lv3_glow_down = false;
- star_glow = 0;
- circle_glow = 0;
- level3_glow = 0;
- }
- }
- }
- if (LV2_active) //has to be there to avoid the weird color blinking issue
- {
- if (GameState != 16)
- {
- ++stop_active_lvl;
- Gauge2 -= 8;
- if (stop_active_lvl == 1250)
- {
- stop_active_lvl = 0;
- LV2_active = false;
- PlaySound(1247, 0, 0, 0);
- }
- //3D HUD
- ParticleDepthOverride = 2000.0f;
- if (star_glow < 10)
- {
- ++star_glow;
- SetMaterialAndSpriteColor_Float((10 - star_glow) / 10.0f, 1, 1, 1);
- HUD3D_SPRITE_STAR.sx = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_STAR.sy = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- }
- else if (star_glow == 10)
- {
- star_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- HUD3D_SPRITE_STAR.sx = 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_STAR.sy = 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (circle_glow < 14)
- {
- ++circle_glow;
- SetMaterialAndSpriteColor_Float((14 - circle_glow) / 14.0f, 1, 1, 1);
- HUD3D_SPRITE_CIRCLE.sx = (circle_glow / 14.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_CIRCLE.sy = (circle_glow / 14.0f) * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_CIRCLE, 1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- }
- else if (circle_glow == 14)
- {
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- HUD3D_SPRITE_CIRCLE.sx = 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_CIRCLE.sy = 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_CIRCLE, 1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- ++circle_glow;
- }
- else if (circle_glow > 14)
- {
- if (++circle_glow == 20)
- {
- circle_glow = 0;
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- ParticleDepthOverride = 0.0f;
- }
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 10, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 13, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 16, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (sonic_lv2_glow <= 2)
- {
- if (!sonic_lv2_glow_down)
- {
- if (sonic_lv2_glow < 2)
- {
- ++sonic_lv2_glow;
- SetMaterialAndSpriteColor_Float((0 + sonic_lv2_glow) / 2.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv2_glow == 2)
- {
- sonic_lv2_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv2_glow_down = true;
- }
- }
- else if (sonic_lv2_glow_down)
- {
- if (sonic_lv2_glow < 2)
- {
- ++sonic_lv2_glow;
- SetMaterialAndSpriteColor_Float((2 - sonic_lv2_glow) / 2.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv2_glow == 2)
- {
- sonic_lv2_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv2_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) SetMaterialAndSpriteColor_Float(0.35, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(0.35, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(0.35, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, (Gauge2 / 100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- HUD_SPRITE_ENERGYLVL.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGYLVL.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (Gauge2 > 0 && Gauge2 < 10000)
- {
- energy_lvl_glow = 0;
- if (is_sonic) SetMaterialAndSpriteColor_Float(0.25, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(0.25, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(0.25, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, (Gauge2 / 100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- if (Gauge2 >= 10000 && Gauge2 < 20000)
- {
- if (is_sonic) SetMaterialAndSpriteColor_Float(0.25, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(0.25, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(0.25, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, 99, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- if (Gauge2 > 10000 && Gauge2 < 20000)
- {
- energy_lvl_glow = 0;
- if (is_sonic) SetMaterialAndSpriteColor_Float(0.35, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(0.35, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(0.35, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, ((Gauge2-10000) / 100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- if (Gauge2 >= 20000 && Gauge2 < 30000)
- {
- if (is_sonic) SetMaterialAndSpriteColor_Float(0.5, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(0.5, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(0.5, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, 99, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- if (Gauge2 > 20000 && Gauge2 < 30000)
- {
- energy_lvl_glow = 0;
- if (is_sonic) SetMaterialAndSpriteColor_Float(1, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(1, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(1, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, ((Gauge2 - 20000) / 100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- else if (Gauge2 >= 30000)
- {
- HUD_SPRITE_ENERGYLVL.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGYLVL.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) SetMaterialAndSpriteColor_Float(1, 0.10588, 0.48235, 0.94902);
- else if (is_shadow) SetMaterialAndSpriteColor_Float(1, 0.92157, 0.19608, 0.13725);
- else if (is_metal) SetMaterialAndSpriteColor_Float(1, 0, 0.11373, 0.54118);
- njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, 99, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- HUD_SPRITE_ENERGYLVL_GLOW.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_ENERGYLVL_GLOW.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (Gauge >= 10000)
- {
- energy_lvl_glow = energy_glow;
- if (!glow_down && lvl_glow_down) lvl_glow_down = false;
- }
- if (energy_lvl_glow <= 20)
- {
- if (!lvl_glow_down)
- {
- if (energy_lvl_glow < 20)
- {
- ++energy_lvl_glow;
- SetMaterialAndSpriteColor_Float((0 + energy_lvl_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (energy_lvl_glow == 20)
- {
- energy_lvl_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- lvl_glow_down = true;
- }
- }
- else if (lvl_glow_down)
- {
- if (energy_lvl_glow < 20)
- {
- ++energy_lvl_glow;
- SetMaterialAndSpriteColor_Float((20 - energy_lvl_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (energy_lvl_glow == 20)
- {
- energy_lvl_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL_GLOW, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- lvl_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- //LVL UPS
- if (Gauge2 >= 0 && Gauge2 < 10000)
- {
- LV1_obtained = false;
- LV2_obtained = false;
- LV3_obtained = false;
- LV1_usable = false;
- LV2_usable = false;
- LV3_usable = false;
- lv1_stretch = 0;
- lv2_stretch = 0;
- lv3_stretch = 0;
- }
- else if (Gauge2 >= 10000 && Gauge2 < 20000)
- {
- HUD_SPRITE_LVLUPS.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 9, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 12, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 15, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (Gauge >= 10000)
- {
- sonic_lv1_glow = energy_glow;
- if (!glow_down && sonic_lv1_glow_down) sonic_lv1_glow_down = false;
- }
- if (sonic_lv1_glow <= 20)
- {
- if (!sonic_lv1_glow_down)
- {
- if (sonic_lv1_glow < 20)
- {
- ++sonic_lv1_glow;
- SetMaterialAndSpriteColor_Float((0 + sonic_lv1_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv1_glow == 20)
- {
- sonic_lv1_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv1_glow_down = true;
- }
- }
- else if (sonic_lv1_glow_down)
- {
- if (sonic_lv1_glow < 20)
- {
- ++sonic_lv1_glow;
- SetMaterialAndSpriteColor_Float((20 - sonic_lv1_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv1_glow == 20)
- {
- sonic_lv1_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv1_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (!LV1_obtained)
- {
- HUD_SPRITE_LVLUPS_GLOW.p.x = 1104 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.p.y = 731 * 1.3f * VerticalResolution / 1050.0f;
- if (lv1_stretch < 60)
- {
- if (!LV1_active)
- {
- LV1_usable = true;
- }
- ++lv1_stretch;
- SetMaterialAndSpriteColor_Float((60 - lv1_stretch) / 60.0f, 1, 1, 1);
- HUD_SPRITE_LVLUPS_GLOW.sx = ((60 + (2.0f * lv1_stretch)) / 60.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.sy = ((60 + (2.0f * lv1_stretch)) / 60.0f) * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- else if (lv1_stretch == 60)
- {
- lv1_stretch = 0;
- LV1_obtained = true;
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- }
- else if (Gauge2 >= 20000 && Gauge2 < 30000)
- {
- lv1_stretch = 0;
- LV1_obtained = false;
- sonic_lv1_glow = 0;
- sonic_lv1_glow_down = false;
- HUD_SPRITE_LVLUPS.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 10, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 13, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 16, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (Gauge >= 10000)
- {
- sonic_lv2_glow = energy_glow;
- if (!glow_down && sonic_lv2_glow_down) sonic_lv2_glow_down = false;
- }
- if (sonic_lv2_glow <= 20)
- {
- if (!sonic_lv2_glow_down)
- {
- if (sonic_lv2_glow < 20)
- {
- ++sonic_lv2_glow;
- SetMaterialAndSpriteColor_Float((0 + sonic_lv2_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv2_glow == 20)
- {
- sonic_lv2_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv2_glow_down = true;
- }
- }
- else if (sonic_lv2_glow_down)
- {
- if (sonic_lv2_glow < 20)
- {
- ++sonic_lv2_glow;
- SetMaterialAndSpriteColor_Float((20 - sonic_lv2_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv2_glow == 20)
- {
- sonic_lv2_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 4, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv2_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (!LV2_obtained)
- {
- HUD_SPRITE_LVLUPS_GLOW.p.x = 1119 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.p.y = 731 * 1.3f * VerticalResolution / 1050.0f;
- if (lv2_stretch < 60)
- {
- if (!LV2_active)
- {
- LV2_usable = true;
- }
- ++lv2_stretch;
- SetMaterialAndSpriteColor_Float((60 - lv2_stretch) / 60.0f, 1, 1, 1);
- HUD_SPRITE_LVLUPS_GLOW.sx = ((60 + (2.0f * lv2_stretch)) / 60.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.sy = ((60 + (2.0f * lv2_stretch)) / 60.0f) * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- else if (lv2_stretch == 60)
- {
- lv2_stretch = 0;
- LV2_obtained = true;
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- }
- else if (Gauge2 >= 30000)
- {
- lv1_stretch = 0;
- lv2_stretch = 0;
- LV1_obtained = false;
- LV2_obtained = false;
- LV1_usable = false;
- LV2_usable = false;
- sonic_lv1_glow = 0;
- sonic_lv1_glow_down = false;
- sonic_lv2_glow = 0;
- sonic_lv2_glow_down = false;
- HUD_SPRITE_LVLUPS.p.x = 810 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS.p.y = 660 * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 11, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 14, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 17, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (Gauge >= 10000)
- {
- sonic_lv3_glow = energy_glow;
- if (!glow_down && sonic_lv3_glow_down) sonic_lv3_glow_down = false;
- }
- if (sonic_lv3_glow <= 20)
- {
- if (!sonic_lv3_glow_down)
- {
- if (sonic_lv3_glow < 20)
- {
- ++sonic_lv3_glow;
- SetMaterialAndSpriteColor_Float((0 + sonic_lv3_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv3_glow == 20)
- {
- sonic_lv3_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv3_glow_down = true;
- }
- }
- else if (sonic_lv3_glow_down)
- {
- if (sonic_lv3_glow < 20)
- {
- ++sonic_lv3_glow;
- SetMaterialAndSpriteColor_Float((20 - sonic_lv3_glow) / 20.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv3_glow == 20)
- {
- sonic_lv3_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv3_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (!LV3_obtained)
- {
- HUD_SPRITE_LVLUPS_GLOW.p.x = 1134 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.p.y = 731 * 1.3f * VerticalResolution / 1050.0f;
- if (lv3_stretch < 60)
- {
- if (!LV3_active)
- {
- LV3_usable = true;
- }
- ++lv3_stretch;
- SetMaterialAndSpriteColor_Float((60 - lv3_stretch) / 60.0f, 1, 1, 1);
- HUD_SPRITE_LVLUPS_GLOW.sx = ((60 + (2.0f * lv3_stretch)) / 60.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_LVLUPS_GLOW.sy = ((60 + (2.0f * lv3_stretch)) / 60.0f) * 1.3f * VerticalResolution / 1050.0f;
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS_GLOW, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- else if (lv3_stretch == 60)
- {
- lv3_stretch = 0;
- LV3_obtained = true;
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- }
- //LEVEL ACTIVATION
- if (GameState != 16)
- {
- if (LV1_usable && !LV2_usable && !LV3_usable)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_B)
- {
- PlaySound(1250, 0, 0, 0);
- LV1_obtained = false;
- LV1_usable = false;
- LV1_active = true;
- Gauge2 = 9999;
- sonic_lv1_glow = 0;
- sonic_lv2_glow = 0;
- sonic_lv3_glow = 0;
- lvl_glow_down = false;
- sonic_lv1_glow_down = false;
- sonic_lv2_glow_down = false;
- sonic_lv3_glow_down = false;
- star_glow = 0;
- circle_glow = 0;
- level3_glow = 0;
- }
- }
- }
- if (LV1_active)
- {
- if (GameState != 16)
- {
- ++stop_active_lvl;
- Gauge2 -= 8;
- if (stop_active_lvl == 1250)
- {
- stop_active_lvl = 0;
- LV1_active = false;
- PlaySound(1247, 0, 0, 0);
- }
- //3D HUD
- ParticleDepthOverride = 2000.0f;
- if (star_glow < 10)
- {
- ++star_glow;
- SetMaterialAndSpriteColor_Float((10 - star_glow) / 10.0f, 1, 1, 1);
- HUD3D_SPRITE_STAR.sx = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_STAR.sy = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- }
- else if (star_glow == 10)
- {
- star_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- HUD3D_SPRITE_STAR.sx = 1.3f * HorizontalResolution / 1680.0f;
- HUD3D_SPRITE_STAR.sy = 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- ParticleDepthOverride = 0.0f;
- }
- //2D HUD
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 9, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 12, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 15, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (sonic_lv1_glow <= 2)
- {
- if (!sonic_lv1_glow_down)
- {
- if (sonic_lv1_glow < 2)
- {
- ++sonic_lv1_glow;
- SetMaterialAndSpriteColor_Float((0 + sonic_lv1_glow) / 2.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv1_glow == 2)
- {
- sonic_lv1_glow = 0;
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv1_glow_down = true;
- }
- }
- else if (sonic_lv1_glow_down)
- {
- if (sonic_lv1_glow < 2)
- {
- ++sonic_lv1_glow;
- SetMaterialAndSpriteColor_Float((2 - sonic_lv1_glow) / 2.0f, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (sonic_lv1_glow == 2)
- {
- sonic_lv1_glow = 0;
- SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 3, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- sonic_lv1_glow_down = false;
- }
- }
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- if (GameState != 16)
- {
- if (LV3_usable)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_B)
- {
- PlaySound(1250, 0, 0, 0);
- LV1_obtained = false;
- LV2_obtained = false;
- LV3_obtained = false;
- LV1_usable = false;
- LV2_usable = false;
- LV3_usable = false;
- LV3_active = true;
- Gauge2 = 9999;
- sonic_lv1_glow = 0;
- sonic_lv2_glow = 0;
- sonic_lv3_glow = 0;
- lvl_glow_down = false;
- sonic_lv1_glow_down = false;
- sonic_lv2_glow_down = false;
- sonic_lv3_glow_down = false;
- star_glow = 0;
- circle_glow = 0;
- level3_glow = 0;
- }
- }
- }
- if (LV3_active)
- {
- if (GameState != 16)
- {
- //REPUT THAT START***************
- //++stop_active_lvl;
- //Gauge2 -= 8;
- //Gauge += 8;
- //if (stop_active_lvl == 1250)
- //{
- // stop_active_lvl = 0;
- // LV3_active = false;
- // sparkles.clear();
- // sparkletimer = 0;
- // PlaySound(1247, 0, 0, 0);
- //}
- ////3D HUD
- //ParticleDepthOverride = 2000.0f;
- //if (star_glow < 10)
- //{
- // ++star_glow;
- // SetMaterialAndSpriteColor_Float((10 - star_glow) / 10.0f, 1, 1, 1);
- // HUD3D_SPRITE_STAR.sx = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * HorizontalResolution / 1680.0f;
- // HUD3D_SPRITE_STAR.sy = ((3 + (star_glow / 2.0f)) / 10.0f) * 1.3f * VerticalResolution / 1050.0f;
- // njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- //}
- //else if (star_glow == 10)
- //{
- // star_glow = 0;
- // SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- // HUD3D_SPRITE_STAR.sx = 1.3f * HorizontalResolution / 1680.0f;
- // HUD3D_SPRITE_STAR.sy = 1.3f * VerticalResolution / 1050.0f;
- // njDrawSprite3D(&HUD3D_SPRITE_STAR, 0, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- //}
- //SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //if (circle_glow < 14)
- //{
- // ++circle_glow;
- // SetMaterialAndSpriteColor_Float((14 - circle_glow) / 14.0f, 1, 1, 1);
- // HUD3D_SPRITE_CIRCLE.sx = (circle_glow / 14.0f) * 1.3f * HorizontalResolution / 1680.0f;
- // HUD3D_SPRITE_CIRCLE.sy = (circle_glow / 14.0f) * 1.3f * VerticalResolution / 1050.0f;
- // njDrawSprite3D(&HUD3D_SPRITE_CIRCLE, 1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- //}
- //else if (circle_glow == 14)
- //{
- // SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- // HUD3D_SPRITE_CIRCLE.sx = 1.3f * HorizontalResolution / 1680.0f;
- // HUD3D_SPRITE_CIRCLE.sy = 1.3f * VerticalResolution / 1050.0f;
- // njDrawSprite3D(&HUD3D_SPRITE_CIRCLE, 1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR | NJD_SPRITE_SCALE);
- // ++circle_glow;
- //}
- //else if (circle_glow > 14)
- //{
- // if (++circle_glow == 20)
- // {
- // circle_glow = 0;
- // }
- //}
- //SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //REPUT THAT END***************
- //Level 3 sparkles*********************************************************************************************************
- //ParticleDepthOverride = 0.0f;
- //EntityData1 *co1 = EntityData1Ptrs[0];
- //for (auto it = sparkles.begin(); it != sparkles.end(); )
- //{
- // sparklesprite.p = it->pos;
- // njDrawSprite3D_Queue(&sparklesprite, 5 + (it->frame++ / 2), NJD_SPRITE_ALPHA | NJD_SPRITE_SCALE, (QueuedModelFlagsB)0);
- // if (it->frame >= 16)
- // it = sparkles.erase(it);
- // else
- // ++it;
- //}
- //if (++sparkletimer == 3)
- //{
- // sparkledata sp = {};
- // NJS_VECTOR pos = { 0, ((float)rand() / RAND_MAX) * 8.0, 0 };
- // njPushMatrix(nullptr);
- // njRotateX(nullptr, rand() & 0xFFFF);
- // njRotateY(nullptr, rand() & 0xFFFF);
- // njRotateZ(nullptr, rand() & 0xFFFF);
- // njCalcVector(nullptr, &pos, &sp.pos);
- // njPopMatrix(1);
- // sp.pos.x += co1->CollisionInfo->CollisionArray->origin.x;
- // sp.pos.y += co1->CollisionInfo->CollisionArray->origin.y;
- // sp.pos.z += co1->CollisionInfo->CollisionArray->origin.z;
- // sparkles.push_back(sp);
- // sparkletimer = 0;
- //}
- //SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //*************************************************************************************************************************
- if (ControllerPointers[0]->PressedButtons & Buttons_Left)
- {
- draw = 0;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Right)
- {
- draw = 1;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Down)
- {
- draw = 2;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Up)
- {
- draw = 3;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_C)
- {
- draw = 4;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Z)
- {
- draw = 5;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_D)
- {
- draw = 6;
- }
- //njColorBlendingMode(NJD_DESTINATION_COLOR, NJD_COLOR_BLENDING_INVSRCALPHA);
- //njColorBlendingMode(NJD_SOURCE_COLOR, NJD_COLOR_BLENDING_ONE);
- njColorBlendingMode(NJD_SOURCE_COLOR, NJD_COLOR_BLENDING_SRCCOLOR);
- njColorBlendingMode(NJD_DESTINATION_COLOR, NJD_COLOR_BLENDING_INVSRCALPHA);
- njTextureShadingMode(NJD_TEX_SHADING_MODE_DECALALPHA);
- //Metal Sonic Gems Sparkles
- //Big ones
- ParticleDepthOverride = 0.0f;
- EntityData1 *co1 = EntityData1Ptrs[0];
- for (auto it = sparklesgems.begin(); it != sparklesgems.end(); )
- {
- NJS_VECTOR pos = { 0, it->radius, 0 };
- njPushMatrix(nullptr);
- njRotateX(nullptr, it->rotation.x);
- njRotateY(nullptr, it->rotation.y);
- njRotateZ(nullptr, it->rotation.z);
- njCalcVector(nullptr, &pos, &sparklegemssprite.p);
- njPopMatrix(1);
- sparklegemssprite.p.x += it->pos.x;
- sparklegemssprite.p.y += it->pos.y;
- sparklegemssprite.p.z += it->pos.z;
- if (it->framegems < 11)
- {
- SetMaterialAndSpriteColor_Float((11 - it->framegems) / 11.0f, 1, 1, 1);
- sparklegemssprite.sx = ((22 - it->framegems) / 22.0f) * 0.4f * 1.3f * HorizontalResolution / 1680.0f;
- sparklegemssprite.sy = ((22 - it->framegems) / 22.0f) * 0.4f * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D_Queue(&sparklegemssprite, (2*draw), NJD_SPRITE_ALPHA | NJD_SPRITE_SCALE, (QueuedModelFlagsB)0);
- }
- it->framegems++;
- if (it->framegems >= 11)
- it = sparklesgems.erase(it);
- else
- {
- it->radius += 0.15f;
- ++it;
- }
- }
- if (++sparklegemstimer == 10)
- {
- sparklegemsdata sp = {};
- //sp.radius = ((float)rand() / RAND_MAX) * 8.0;//if I wanted them to spawn in the center
- sp.radius = (((float)rand() / RAND_MAX) * 3.0) + 4.0;//sp.radius = (((float)rand() / RAND_MAX) * max_radius) + min_radius; //if min_radius is 2, and max_radius is 3, then the sparkles will spawn between 2 and 5 (2+3) away
- sp.rotation.x = rand() & 0xFFFF;
- sp.rotation.y = rand() & 0xFFFF;
- sp.rotation.z = rand() & 0xFFFF;
- sp.pos = co1->CollisionInfo->CollisionArray->origin;
- sparklesgems.push_back(sp);
- sparklegemstimer = 0;
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //Small ones
- ParticleDepthOverride = 0.0f;
- for (auto it = sparklesgems_tiny.begin(); it != sparklesgems_tiny.end(); )
- {
- NJS_VECTOR pos = { 0, it->radius, 0 };
- njPushMatrix(nullptr);
- njRotateX(nullptr, it->rotation.x);
- njRotateY(nullptr, it->rotation.y);
- njRotateZ(nullptr, it->rotation.z);
- njCalcVector(nullptr, &pos, &sparklegemssprite.p);
- njPopMatrix(1);
- sparklegemssprite.p.x += it->pos.x;
- sparklegemssprite.p.y += it->pos.y;
- sparklegemssprite.p.z += it->pos.z;
- if (it->framegems_tiny < 11)
- {
- SetMaterialAndSpriteColor_Float((11 - it->framegems_tiny) / 11.0f, 1, 1, 1);
- sparklegemssprite.sx = ((22 - it->framegems_tiny) / 22.0f) * 0.025f * 1.3f * HorizontalResolution / 1680.0f;
- sparklegemssprite.sy = ((22 - it->framegems_tiny) / 22.0f) * 0.025f * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite3D_Queue(&sparklegemssprite, ((2*draw) + 1), NJD_SPRITE_ALPHA | NJD_SPRITE_SCALE, (QueuedModelFlagsB)0);
- }
- it->framegems_tiny++;
- if (it->framegems_tiny >= 15)
- it = sparklesgems_tiny.erase(it);
- else
- {
- it->radius += 0.075f;
- ++it;
- }
- }
- if (++sparklegems_tiny_timer == 3)
- {
- sparklegemsdata sp = {};
- sp.radius = (((float)rand() / RAND_MAX) * 2.0) + 2.5;
- sp.rotation.x = rand() & 0xFFFF;
- sp.rotation.y = rand() & 0xFFFF;
- sp.rotation.z = rand() & 0xFFFF;
- sp.pos = co1->CollisionInfo->CollisionArray->origin;
- sparklesgems_tiny.push_back(sp);
- sparklegems_tiny_timer = 0;
- }
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- njColorBlendingMode(NJD_SOURCE_COLOR, NJD_COLOR_BLENDING_SRCALPHA);
- njColorBlendingMode(NJD_DESTINATION_COLOR, NJD_COLOR_BLENDING_INVSRCALPHA);
- njTextureShadingMode(NJD_TEX_SHADING_MODE_DECALALPHA);
- //////////////////Hyper Sonic S3&K like Sparkles ??
- //////////////////ParticleDepthOverride = 0.0f;
- //////////////////EntityData1 *co1 = EntityData1Ptrs[0];
- //////////////////for (auto it = sparklesgems.begin(); it != sparklesgems.end(); )
- //////////////////{
- ////////////////// NJS_VECTOR pos = { 0, it->radius, 0 };
- ////////////////// njPushMatrix(nullptr);
- ////////////////// njRotateX(nullptr, it->rotation.x);
- ////////////////// njRotateY(nullptr, it->rotation.y);
- ////////////////// njRotateZ(nullptr, it->rotation.z);
- ////////////////// njCalcVector(nullptr, &pos, &sparklesprite.p);
- ////////////////// njPopMatrix(1);
- ////////////////// sparklesprite.p.x += co1->CollisionInfo->CollisionArray->origin.x;
- ////////////////// sparklesprite.p.y += co1->CollisionInfo->CollisionArray->origin.y;
- ////////////////// sparklesprite.p.z += co1->CollisionInfo->CollisionArray->origin.z;
- ////////////////// njDrawSprite3D_Queue(&sparklesprite, 5, NJD_SPRITE_ALPHA | NJD_SPRITE_SCALE, (QueuedModelFlagsB)0);
- ////////////////// it->frame++;
- ////////////////// if (it->frame >= 16)
- ////////////////// it = sparklesgems.erase(it);
- ////////////////// else
- ////////////////// {
- ////////////////// it->rotation.x = (it->rotation.x + it->speed.x) & 0xFFFF;
- ////////////////// it->rotation.y = (it->rotation.y + it->speed.y) & 0xFFFF;
- ////////////////// it->rotation.z = (it->rotation.z + it->speed.z) & 0xFFFF;
- ////////////////// ++it;
- ////////////////// }
- //////////////////}
- //////////////////if (++sparkletimer == 3)
- //////////////////{
- ////////////////// sparklegemsdata sp = {};
- ////////////////// sp.radius = ((float)rand() / RAND_MAX) * 8.0;
- ////////////////// sp.rotation.x = rand() & 0xFFFF;
- ////////////////// sp.rotation.y = rand() & 0xFFFF;
- ////////////////// sp.rotation.z = rand() & 0xFFFF;
- ////////////////// sp.speed.x = (rand() & 0xFFF) - 0x800;
- ////////////////// sp.speed.y = (rand() & 0xFFF) - 0x800;
- ////////////////// sp.speed.z = (rand() & 0xFFF) - 0x800;
- ////////////////// sparklesgems.push_back(sp);
- ////////////////// sparkletimer = 0;
- //////////////////}
- //////////////////SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- }
- //REPUT THAT START***************
- //if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 11, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- //else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 14, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- //else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 17, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- //if (sonic_lv3_glow <= 2)
- //{
- // if (!sonic_lv3_glow_down)
- // {
- // if (sonic_lv3_glow < 2)
- // {
- // ++sonic_lv3_glow;
- // SetMaterialAndSpriteColor_Float((0 + sonic_lv3_glow) / 2.0f, 1, 1, 1);
- // if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // }
- // else if (sonic_lv3_glow == 2)
- // {
- // sonic_lv3_glow = 0;
- // SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- // if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // sonic_lv3_glow_down = true;
- // }
- // }
- // else if (sonic_lv3_glow_down)
- // {
- // if (sonic_lv3_glow < 2)
- // {
- // ++sonic_lv3_glow;
- // SetMaterialAndSpriteColor_Float((2 - sonic_lv3_glow) / 2.0f, 1, 1, 1);
- // if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // }
- // else if (sonic_lv3_glow == 2)
- // {
- // sonic_lv3_glow = 0;
- // SetMaterialAndSpriteColor_Float(0, 1, 1, 1);
- // if (is_sonic) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 2, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_shadow) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // else if (is_metal) njDrawSprite2D_Queue(&HUD_SPRITE_LVLUPS, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- // sonic_lv3_glow_down = false;
- // }
- // }
- //}
- //SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //if (is_sonic) SetMaterialAndSpriteColor_Float(0.75, 0.10588, 0.48235, 0.94902);
- //else if (is_shadow) SetMaterialAndSpriteColor_Float(0.75, 0.92157, 0.19608, 0.13725);
- //else if (is_metal) SetMaterialAndSpriteColor_Float(0.75, 0, 0.11373, 0.54118);
- //njDrawSprite2D_Queue(&HUD_SPRITE_ENERGYLVL, (Gauge2 / 100), -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- //SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- //REPUT THAT END***************
- }
- }
- else if (GetCharacterID(0) == Characters_Tails)
- {
- HUD_SPRITE.p.x = 110 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 205 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 5, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (GetCharacterID(0) == Characters_Knuckles)
- {
- HUD_SPRITE.p.x = 110 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 205 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 6, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (GetCharacterID(0) == Characters_Amy)
- {
- HUD_SPRITE.p.x = 110 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 205 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 7, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- else if (GetCharacterID(0) == Characters_Gamma)
- {
- HUD_SPRITE.p.x = 110 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE.p.y = 205 * 1.3f * VerticalResolution / 1050.0f;
- njDrawSprite2D_Queue(&HUD_SPRITE, 8, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- //Ring Counter
- HUD_SPRITE_NUMBERS.p.x = 157 * 1.3f * HorizontalResolution / 1680.0f;
- HUD_SPRITE_NUMBERS.p.y = 174 * 1.3f * VerticalResolution / 1050.0f;
- HUD_SPRITE_RINGS_0_RED.p.x = (HUD_SPRITE_NUMBERS.p.x/1.3f) + (55 * HorizontalResolution / 1680.0f);
- HUD_SPRITE_RINGS_0_RED.p.y = (HUD_SPRITE_NUMBERS.p.y/1.3f) + (42 * VerticalResolution / 1050.0f);
- if (Rings == 0)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_RINGS_0_RED, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- ++zero_ring_alpha;
- SetMaterialAndSpriteColor_Float((9 - zero_ring_alpha) / 9.0f, 1, 1, 1);
- njDrawSprite2D_Queue(&HUD_SPRITE_RINGS_0_RED, 1, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- SetMaterialAndSpriteColor_Float(1, 1, 1, 1);
- if (zero_ring_alpha == 9)
- {
- zero_ring_alpha = 0;
- }
- }
- else if (Rings > 0 && Rings < 1000)
- {
- HudDisplayZerosSTH06(Rings, 3, &HUD_SPRITE_NUMBERS);
- zero_ring_alpha = 0;
- }
- else if (Rings >= 1000)
- {
- HudDisplayZerosSTH06(Rings, 4, &HUD_SPRITE_NUMBERS);
- zero_ring_alpha = 0;
- }
- HUD_SPRITE_RING_ANIM.p.x = 161 * HorizontalResolution / 1680.0f;
- HUD_SPRITE_RING_ANIM.p.y = 225 * VerticalResolution / 1050.0f;
- if (Rings - OldRingsHUD > 0)
- {
- can_animate_loss = 0;
- ++can_animate_gain;
- njDrawSprite2D_Queue(&HUD_SPRITE_RING_ANIM, can_animate_gain, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (can_animate_gain == 7)
- {
- OldRingsHUD = Rings;
- can_animate_gain = 0;
- }
- }
- else if (Rings - OldRingsHUD < 0)
- {
- can_animate_gain = 0;
- ++can_animate_loss;
- njDrawSprite2D_Queue(&HUD_SPRITE_RING_ANIM, 8 - can_animate_loss, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- if (can_animate_loss == 7)
- {
- OldRingsHUD = Rings;
- can_animate_loss = 0;
- }
- }
- else if (OldRingsHUD == Rings)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE_RING_ANIM, 0, -1, NJD_SPRITE_ALPHA | NJD_SPRITE_COLOR, (QueuedModelFlagsB)0);
- }
- //Timer Minutes
- HUD_SPRITE_NUMBERS.p.x = (130.846 * 1.3f * HorizontalResolution / 1680.0f);
- HUD_SPRITE_NUMBERS.p.y = (124 * 1.3f * VerticalResolution / 1050.0f);
- HudDisplayZerosSTH06(TimeMinutes, 2, &HUD_SPRITE_NUMBERS);
- //Timer Seconds
- HUD_SPRITE_NUMBERS.p.x = HUD_SPRITE_NUMBERS.p.x + (35 *1.3f * HorizontalResolution / ( 1680.0f));
- HUD_SPRITE_NUMBERS.p.y = HUD_SPRITE_NUMBERS.p.y;
- HudDisplayZerosSTH06(TimeSeconds, 2, &HUD_SPRITE_NUMBERS);
- //Timer Frames
- HUD_SPRITE_NUMBERS.p.x = HUD_SPRITE_NUMBERS.p.x + (37 *1.3f * HorizontalResolution / ( 1680.0f));
- HUD_SPRITE_NUMBERS.p.y = HUD_SPRITE_NUMBERS.p.y;
- HudDisplayFramesSTH06(TimeFrames, 3, &HUD_SPRITE_NUMBERS);
- //Lives Counter
- HUD_SPRITE_NUMBERS.p.y = 224 * 1.3f * VerticalResolution / 1050.0f;
- if (Lives < 10)
- {
- HUD_SPRITE_NUMBERS.p.x = 194.538 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(Lives, 1, &HUD_SPRITE_NUMBERS);
- }
- else if (Lives >= 10)
- {
- HUD_SPRITE_NUMBERS.p.x = 176.538 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(Lives, 2, &HUD_SPRITE_NUMBERS);
- }
- //Score Counter
- HUD_SPRITE_NUMBERS.p.y = 71.692 * 1.3f * VerticalResolution / 1050.0f;
- if (EnemyBonus < 10)
- {
- HUD_SPRITE_NUMBERS.p.x = 274.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 1, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 10 && EnemyBonus < 100)
- {
- HUD_SPRITE_NUMBERS.p.x = 256.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 2, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 100 && EnemyBonus < 1000)
- {
- HUD_SPRITE_NUMBERS.p.x = 238.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 3, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 1000 && EnemyBonus < 10000)
- {
- HUD_SPRITE_NUMBERS.p.x = 220.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 4, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 10000 && EnemyBonus < 100000)
- {
- HUD_SPRITE_NUMBERS.p.x = 202.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 5, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 100000 && EnemyBonus < 1000000)
- {
- HUD_SPRITE_NUMBERS.p.x = 184.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 6, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 1000000 && EnemyBonus < 10000000)
- {
- HUD_SPRITE_NUMBERS.p.x = 166.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 7, &HUD_SPRITE_NUMBERS);
- }
- else if (EnemyBonus >= 10000000 && EnemyBonus < 100000000)
- {
- HUD_SPRITE_NUMBERS.p.x = 148.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 8, &HUD_SPRITE_NUMBERS);
- }
- else
- {
- HUD_SPRITE_NUMBERS.p.x = 130.692 * 1.3f * HorizontalResolution / 1680.0f;
- HudDisplayNoZerosSTH06(EnemyBonus, 9, &HUD_SPRITE_NUMBERS);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement