int PrintMessages(int x, int y) { if (!g_NumMessages || g_MessageIdx == -1) return -1; char* currentMsg; for (int i=0, j = g_MessageIdx; i < g_NumMessages; i++, j = (j + (g_NumMessages-1)) % g_NumMessages) { // Avoid overlapping exit button if (y > s3eSurfaceGetInt(S3E_SURFACE_HEIGHT) - (s3eDebugGetInt(S3E_DEBUG_FONT_HEIGHT)*2)) break; if (j > g_MessageIdx && !g_LoopMessages) continue; currentMsg = g_Messages[j]; if (currentMsg[0]) { s3eDebugPrintf(x, y, 0, "%s", currentMsg); if (i != g_NumMessages -1) y += s3eDebugGetInt(S3E_DEBUG_FONT_HEIGHT)+2; } } return y; }
void ExampleRender() { const int textHeight = s3eDebugGetInt(S3E_DEBUG_FONT_SIZE_HEIGHT); int y = GetYBelowButtons() + 3 * textHeight; const int x = 10; if (s3eSoundGetInt(S3E_SOUND_STEREO_ENABLED)) { s3eDebugPrintf(x, y, 0, "`x666666Stereo sound output supported and enabled"); } else { s3eDebugPrintf(x, y, 0, "`x666666SStereo sound output disabled or unsupported"); } y += textHeight; y += textHeight; /*if (ogg_hlp->get_nChannels() == 2) s3eDebugPrintf(x, y, 0, "`x666666Input: Stereo"); else s3eDebugPrintf(x, y, 0, "`x666666Input: Mono");*/ /*if (ogg_hlp->get_outputStereoMode() == COggVorbisFileHelper::STEREO_MODE_MONO) { if (!(ogg_hlp->get_nChannels() == 2)) s3eDebugPrintf(x, y, 0, "`x666666Output: Mono"); else s3eDebugPrintf(x, y, 0, "`x666666Output: Mono (left channel of stereo input)"); } else { const char* modeLRString; switch (ogg_hlp->get_outputStereoMode()) { case COggVorbisFileHelper::STEREO_MODE_LEFT: modeLRString = "left only"; break; case COggVorbisFileHelper::STEREO_MODE_RIGHT: modeLRString = "right only"; break; default: modeLRString = "left and right"; break; } s3eDebugPrintf(x, y, 0, "`x666666Output: Stereo (%s)", modeLRString); } y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Input freq: %ld", ogg_hlp->get_rate()); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Output freq: %d", ogg_hlp->get_outputrate()); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666g_OutputIsStereo: %d", ogg_hlp->get_outputIsStereo()); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Buffer: %.2f",ogg_hlp->get_decbuf()*100); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Total Samples: %ld", (long)ogg_hlp->get_nsamples()); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Total time: %.0f", ogg_hlp->get_time_length()); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Current time: %.0f (%0.f%%)", ogg_hlp->get_current_time(),ogg_hlp->get_current_time()/ogg_hlp->get_time_length()*100); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Resample: %d - Quality: %d)", g_EnableResample,g_ResampleQuality); y += textHeight; s3eDebugPrintf(x, y, 0, "`x666666Status: %s", ogg_hlp->get_statusstr().c_str()); y += textHeight; y += textHeight; y += textHeight; */ s3eDebugPrintf(x, y, 0, "`x666666channels playing: %i", GetNumOggChannels()); }