static int MT32_Report(void *userData, MT32Emu::ReportType type, const void *reportData) { switch(type) { case MT32Emu::ReportType_lcdMessage: g_system->displayMessageOnOSD((const char *)reportData); break; case MT32Emu::ReportType_errorControlROM: error("Failed to load MT32_CONTROL.ROM"); break; case MT32Emu::ReportType_errorPCMROM: error("Failed to load MT32_PCM.ROM"); break; case MT32Emu::ReportType_progressInit: if (((MidiDriver_MT32 *)userData)->_initialising) { drawProgress(*((const float *)reportData)); return eatSystemEvents(); } break; case MT32Emu::ReportType_availableSSE: debug(1, "MT32emu: SSE is available"); break; case MT32Emu::ReportType_usingSSE: debug(1, "MT32emu: using SSE"); break; case MT32Emu::ReportType_available3DNow: debug(1, "MT32emu: 3DNow! is available"); break; case MT32Emu::ReportType_using3DNow: debug(1, "MT32emu: using 3DNow!"); break; default: break; } return 0; }
void RegionViewer::draw(Surface *dst, int room, Direction direction) { if (finishedPainting()) { Surface *roomSurface = m_roomSurfaces[direction][room]; drawRoom(dst, roomSurface, 0, 0); } else drawProgress(dst); }
void updateData(esp_ssd1306 *display) { drawProgress(display, 10, "Updating time..."); timeClient.updateTime(); drawProgress(display, 30, "Updating conditions..."); wunderground.updateConditions(WUNDERGRROUND_API_KEY, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); drawProgress(display, 50, "Updating forecasts..."); wunderground.updateForecast(WUNDERGRROUND_API_KEY, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); drawProgress(display, 80, "Updating thingspeak..."); thingspeak.getLastChannelItem(THINGSPEAK_CHANNEL_ID, THINGSPEAK_API_READ_KEY); lastUpdate = timeClient.getFormattedTime(); readyForWeatherUpdate = false; drawProgress(display, 90, "Updating local temperature and humidity"); humiIndoor = dht.readHumidity(); // Read temperature as Fahrenheit (isFahrenheit = true) tempIndoor = dht.readTemperature(); drawProgress(display, 100, "Done..."); delay(1000); }