example
sfx_powerup = snd_sfx_load("/rd/audio/powerup.wav");
replace to
sfx_powerup = snd_sfx_load("/cd/audio/powerup.wav");
in root directory your CD create folder audio and put powerup.wav
all simple
small trick
main.c
Code: Select all
#include <kos/thread.h>
maple_device_t *jump_pack = NULL;
static const char vmu_icon[] =
{
"++++++++++++++++++++++++++++++++++++++++++++++++"
"++++++++++++++++++++++++++++++++++++++++++++++++"
"++++++++++++++++++++++++++++++++++++++++++++++++"
"+++++++++++++++++++++++.......++++++++++++++++++"
"++++++++++++++++++++++...+......++++++++++++++++"
"+++++++++++++++++++++............+++++++++++++++"
"+++++++++++...++++++.............+++++++++++++++"
"+++++++++++....++++...............++++++++++++++"
"+++++++++.......+++...............++++++++++++++"
"+++++++++++.............++.........+++++++++++++"
"++++++++++++++.........++++....+++.+++++++++++++"
"+++++++++++++++++.+...+++++++.++++++++++++++++++"
"+++++++++++++++++++..+++++++++++++++++++++++++++"
"+++++++++++++++++++...++....+....+++++++++++++++"
"++++++++++++..........+++++.....++++++++++++++++"
"+++++++++++......+++...++++......+++++++++++++++"
"++++++++++..++...++++.............++++++++++++++"
"++++++++++++++.++++++..........++.....++++++++++"
"+++++++++++++++++++++........++++......+++++++++"
"+++++++++++++++++++........+++++++.++...++++++++"
"++++++++++++++++++....+...++++++++++++++++++++++"
"+++++++++++++++++.....++..++++++++++++++++++++++"
"+++++++++++++++++....++....+++++++++++++++++++++"
"+++++++++++++++++...+++....+++++++++++++++++++++"
"+++++++++++++++++...+++....+++++++++++++++++++++"
"+++++++++++++++++....++....+++++++++++++++++++++"
"+++++++++++++++++.........++++++++++++++++++++++"
"++++++++++++++++++.......+++++++++++++++++++++++"
"+++++++++++++++++++.....++++++++++++++++++++++++"
"++++++++++++++++++++++++++++++++++++++++++++++++"
"++++++++++++++++++++++++++++++++++++++++++++++++"
"++++++++++++++++++++++++++++++++++++++++++++++++"
};
/* font data */
extern char wfont[];
main.c
Code: Select all
int main(void) {
// dbgio_dev_select("fb");
// dbgio_enable();
jump_pack = maple_enum_type(0, MAPLE_FUNC_PURUPURU);
vmu_set_icon(vmu_icon);
pvr_init_defaults();
mc.c
Code: Select all
extern void start(void);
extern maple_device_t *jump_pack;
void mc_dead(void) {
if (mc_fadedTimer > 0) {
return;
}
sfx_playSound(SFX_HIT);
if (jump_pack)
{
static purupuru_effect_t effect;
effect.duration = 0XFF;
effect.effect2 = PURUPURU_EFFECT2_UINTENSITY(1);
effect.effect1 = PURUPURU_EFFECT1_INTENSITY(7);
effect.special = PURUPURU_SPECIAL_MOTOR1;
purupuru_rumble(jump_pack, &effect);
thd_sleep(20);
purupuru_rumble(jump_pack, &effect);
thd_sleep(20);
purupuru_rumble(jump_pack, &effect);
}
if (mc_health > 0) {
now game support VMU LCD and PURUPURU (vibropack)
