rendered paste body// PSP Space Invaders
// by JumpR
#include <oslib/oslib.h>
PSP_MODULE_INFO("PSP Space Invaders", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
OSL_IMAGE *player;
int main()
{
oslInit(0);
oslInitGfx(OSL_PF_8888, 1);
player = oslLoadImageFile("player.png", OSL_IN_RAM, OSL_PF_5551);
if (!player){
oslDebug("Some files seem to be missing, can't continue.");
}
player->x = 6;
player->y = 250;
while (!osl_quit)
{
oslStartDrawing();
oslReadKeys();
if (osl_keys->held.left) player->x -= 2;
if (osl_keys->held.right) player->x += 2;
oslDrawImage(player);
oslEndDrawing();
oslSyncFrame();
}
oslEndGfx();
oslQuit();
return 0;
}