corrected sample build

This commit is contained in:
GeeckoDev 2012-07-02 11:43:57 +02:00
parent 5103de6450
commit 759d06128f
7 changed files with 15 additions and 120 deletions

View File

@ -3,26 +3,11 @@
#include <pspkernel.h>
#include <psprtc.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
pspTime time;
void drawBorder() // A circle.
@ -93,7 +78,7 @@ void drawClockHands()
int main()
{
SetupCallbacks();
callbacks_setup();
while (1)
{

View File

@ -3,29 +3,14 @@
#include <pspkernel.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
int rot = 0;
while (1)

View File

@ -2,29 +2,14 @@
#include <pspkernel.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
int rot = 0;
while (1)

View File

@ -4,29 +4,14 @@
#include <pspkernel.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
while (1)
{

View File

@ -3,32 +3,17 @@
#include <pspkernel.h>
#include <pspctrl.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
SceCtrlData pad;
g2dImage* tex = g2dTexLoad("tex.png",G2D_SWIZZLE);
g2dTexture* tex = g2dTexLoad("tex.png",G2D_SWIZZLE);
int alpha = 255,
x = G2D_SCR_W/2,
y = G2D_SCR_H/2,

View File

@ -2,29 +2,14 @@
#include <pspkernel.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
int size = 42, x=0, y=0, dx=2, dy=2;

View File

@ -4,29 +4,14 @@
#include <pspkernel.h>
#include "../../glib2d.h"
#include "../callbacks.h"
PSP_MODULE_INFO("App",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Callbacks */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0; }
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0; }
int SetupCallbacks() {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) sceKernelStartThread(thid, 0, 0);
return thid; }
int main()
{
SetupCallbacks();
callbacks_setup();
int rot = 0, i, branches = 4;
while (1)