wiistream/wii/source/main.cpp

38 lines
600 B
C++
Raw Normal View History

2021-07-12 21:42:52 +01:00
#include <cstdint>
#include <cstdlib>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include "screen.h"
int main(int argc, char **argv)
{
auto screen = Screen{};
WPAD_Init();
Paddle my_paddle{ screen.height(), 15, 5 };
auto exit = false;
while (!exit)
{
// Call WPAD_ScanPads each loop, this reads the latest controller states
WPAD_ScanPads();
const auto pressed = WPAD_ButtonsDown(0);
if (pressed & WPAD_BUTTON_HOME)
exit = true;
// Clear the frame buffer.
screen.clear();
// drawing goes here
// Wait for the next frame
screen.wait_for_vsync();
}
return 0;
}