Skip to content

Commit

Permalink
Display Revitalize splash screen on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
skogaby committed Sep 10, 2015
1 parent 49516bf commit a05a3c7
Show file tree
Hide file tree
Showing 4 changed files with 28,715 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TARGET = Snes9xVITA

PSP_APP_NAME=Snes9xVITA
PSP_APP_VER=0.1.0
PSP_APP_VER=1.0.0

LIBRETRO=libretro
CORE=src
Expand Down
22 changes: 22 additions & 0 deletions vita/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ int main()

pl_psp_init("cache0:/Snes9xVITA/");

show_splash();

// get the game ready
if (InitMenu())
{
Expand All @@ -33,6 +35,26 @@ int main()
return 0;
}

/***
* Displays the Revitalize Competition splash screen for 5 seconds
*/
void show_splash()
{
vita2d_start_drawing();
vita2d_clear_screen();

vita2d_texture *splash = vita2d_create_empty_texture(SCREEN_W, SCREEN_H);
splash = vita2d_load_PNG_buffer(revitalize);

vita2d_draw_texture(splash, 0, 0);

vita2d_end_drawing();
vita2d_swap_buffers();

sceKernelDelayThread(5000000); // Delay 5 seconds
vita2d_free_texture(splash);
}

/***
* Sets up all of our appropriate callback functions with libretro.
*/
Expand Down
2 changes: 2 additions & 0 deletions vita/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <psp2/moduleinfo.h>
#include <psp2/types.h>

#include "revitalize.h"
#include "utils.h"
#include "vita_input.h"
#include "vita_audio.h"
Expand All @@ -34,6 +35,7 @@ const char* S9xGetDirectory(uint32_t dirtype);
void load_rom();
void vita_cleanup();
void setup_callbacks();
void show_splash();

// our collection of callbacks to plug in to libretro
int retro_environment_callback(unsigned cmd, void *data);
Expand Down
Loading

0 comments on commit a05a3c7

Please sign in to comment.