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

Method Playground

Source/Fodder.cpp:18658–18742  ·  view source on GitHub ↗

This function is for viewing/iterating sprites

Source from the content-addressed store, hash-verified

18656
18657// This function is for viewing/iterating sprites
18658void cFodder::Playground() {
18659 //return;
18660 mGame_Data.Phase_Start();
18661 Map_Load();
18662
18663 mGraphics->PaletteSet();
18664
18665 Recruit_Truck_Anim_Prepare();
18666 mGraphics->SetActiveSpriteSheet(eGFX_RECRUIT);
18667 //mGraphics->Recruit_Draw_Hill();
18668
18669 Recruit_Copy_Sprites();
18670
18671 if (mVersionCurrent->mPlatform == ePlatform::Amiga) {
18672
18673 GetGraphics<cGraphics_Amiga>()->Hill_Prepare_Overlays();
18674 }
18675
18676 // Load Icon
18677 mSurface->clearBuffer();
18678 mSurface->palette_FadeTowardNew();
18679 mSurface->Save();
18680 mString_GapCharID = 0x25;
18681 mGUI_Print_String_To_Sidebar = false;
18682
18683 int32 SpriteID = 0x62;
18684 int32 Frame = 0;
18685
18686
18687 for (;; ) {
18688 mKeyCode = 0;
18689 {
18690 mGraphics->SetActiveSpriteSheet(eGFX_BRIEFING);
18691 std::stringstream SPRITE_STRING;
18692 SPRITE_STRING << "SPRITE: 0x" << std::hex << SpriteID;
18693 SPRITE_STRING << " FRAME: 0x" << std::hex << Frame;
18694
18695 String_Print_Large(SPRITE_STRING.str(), false, 0);
18696
18697 }
18698
18699 {
18700 mGraphics->SetActiveSpriteSheet(eGFX_IN_GAME);
18701 GUI_Draw_Frame_8(SpriteID, Frame, 65, 65);
18702 }
18703
18704 if (mSurface->isPaletteAdjusting())
18705 mSurface->palette_FadeTowardNew();
18706
18707 //Mouse_Inputs_Get();
18708 //Mouse_DrawCursor();
18709
18710 Video_Sleep();
18711
18712 // Q
18713 if (mKeyCode == 0x14) {
18714 --SpriteID;
18715 }

Callers

nothing calls this directly

Calls 8

Phase_StartMethod · 0.80
Hill_Prepare_OverlaysMethod · 0.80
clearBufferMethod · 0.80
palette_FadeTowardNewMethod · 0.80
SaveMethod · 0.80
isPaletteAdjustingMethod · 0.80
PaletteSetMethod · 0.45
SetActiveSpriteSheetMethod · 0.45

Tested by

no test coverage detected