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

Method intro_Play

Source/Fodder.cpp:16620–16700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16618}
16619
16620int16 cFodder::intro_Play() {
16621
16622 mGraphics->Load_Sprite_Font();
16623 mGraphics->SetActiveSpriteSheet(eGFX_Types::eGFX_FONT);
16624
16625 for (word_3B2CF = 1; mVersionCurrent->getIntroData()->at(word_3B2CF).mImageNumber != 0; ++word_3B2CF) {
16626
16627 mIntro_PlayTextDuration = 0x12C;
16628
16629 mSurface->palette_SetToBlack();
16630
16631 if (mVersionCurrent->getIntroData()->at(word_3B2CF).mImageNumber == 0 && mVersionCurrent->getIntroData()->at(word_3B2CF).mText == 0)
16632 break;
16633
16634 if (mVersionCurrent->getIntroData()->at(word_3B2CF).mImageNumber != 0xFF) {
16635
16636 std::stringstream ImageName;
16637 ImageName << (char)mVersionCurrent->getIntroData()->at(word_3B2CF).mImageNumber;
16638
16639 mGraphics->Load_And_Draw_Image(ImageName.str(), 0xD0);
16640 }
16641 else {
16642 mIntro_PlayTextDuration = 0x96;
16643 mSurface->clearBuffer();
16644 }
16645
16646 mGraphics->PaletteSet();
16647 const sIntroString* IntroString = mVersionCurrent->getIntroData()->at(word_3B2CF).mText;
16648 if (IntroString) {
16649 while (IntroString->mPosition) {
16650
16651 Intro_Print_String(IntroString);
16652 ++IntroString;
16653 }
16654 }
16655 //loc_16710
16656
16657 int16 Duration = mIntro_PlayTextDuration;
16658 bool DoBreak = false;
16659
16660 mSurface->Save();
16661
16662 while (mSurface->isPaletteAdjusting() || DoBreak == false) {
16663
16664 if (mSurface->isPaletteAdjusting()) {
16665 mSurface->palette_FadeTowardNew();
16666 if (!DoBreak) {
16667 Video_Sleep();
16668 Video_Sleep();
16669 Video_Sleep();
16670 continue;
16671 }
16672 }
16673
16674 if (Duration) {
16675 --Duration;
16676 if (mMouseButtonStatus) {
16677

Callers

nothing calls this directly

Calls 12

getIntroDataMethod · 0.80
palette_SetToBlackMethod · 0.80
clearBufferMethod · 0.80
SaveMethod · 0.80
isPaletteAdjustingMethod · 0.80
palette_FadeTowardNewMethod · 0.80
paletteNew_SetToBlackMethod · 0.80
Load_Sprite_FontMethod · 0.45
SetActiveSpriteSheetMethod · 0.45
Load_And_Draw_ImageMethod · 0.45
PaletteSetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected