MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / HeliIntro_TickParallaxAndText

Method HeliIntro_TickParallaxAndText

Source/Graphics.cpp:55–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55void cGraphics::HeliIntro_TickParallaxAndText() {
56 const float scale = mFodder->mBriefingHelicopter_TimeScale;
57
58 if (Heli_TextPosBottom != 0x0C) {
59 Heli_TextPosBottom -= static_cast<int32_t>(4 * scale);
60
61 if (Heli_TextPosBottom <= 0x0C)
62 Heli_TextPosBottom = 0x0C;
63 }
64 Heli_TextPos = 344 - Heli_TextPosBottom;
65
66 int32_t baseSpeed = static_cast<int32_t>(0x8000 * scale);
67 int32_t d0 = baseSpeed;
68
69 Heli_VeryBack -= d0;
70 if (Heli_VeryBack < 0)
71 Heli_VeryBack += 320 << 16;
72
73 d0 <<= 1;
74 Heli_Back -= d0;
75 if (Heli_Back < 0)
76 Heli_Back += 320 << 16;
77
78 d0 <<= 1;
79 Heli_middle -= d0;
80 if (Heli_middle < 0)
81 Heli_middle += 320 << 16;
82
83 d0 <<= 1;
84 Heli_Front -= d0;
85 if (Heli_Front < 0)
86 Heli_Front += 320 << 16;
87}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected