Zeige Ergebnis 8.941 bis 8.970 von 10174
C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; stop using graphics.c...
-
08-20-2008, 06:38 AM #8941QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
stop using graphics.c
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-20-2008, 06:57 AM #8942QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
dont know i downloaded OSlib but didnt get it work its all new and i just wanted to make a simple game. no rotating or 3d or something.
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
08-20-2008, 07:35 AM #8943QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
yea i understand, but i suggust trying to get oslib up and running over graphics.c
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-20-2008, 08:11 AM #8944Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
You're still passing 583.... change it.
Or if you've changed the code, post the updated code.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-20-2008, 09:00 AM #8945
Well, the keyboard's code uses snprintf, and decides it wants to overload if you change it to make it use sprintf. The rest of it works great, it's just the input. I might be able to find something on google.
EDIT: Got a portable snprintf and modified it a little bit to make it work, and, it works...great.Geändert von NoEffex (08-20-2008 um 09:20 AM Uhr)
-
08-20-2008, 09:01 AM #8946QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
changed to OSlib got this:
Code:#include <oslib/oslib.h> PSP_MODULE_INFO("sample", 0, 1, 0); PSP_HEAP_SIZE_MAX(); #define printf pspDebugScreenPrintf #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) int ufoX = 0; int ufoY = 0; int main() { oslInit(0); oslInitGfx(OSL_PF_8888, 1); OSL_IMAGE *ufo = oslLoadImageFile("ufo.png", OSL_IN_RAM, OSL_PF_8888); oslStartDrawing(); ufo->x = 50; ufo->y = 50; oslDrawImage(ufo); oslEndDrawing(); oslSyncFrame(); oslWaitKey(); oslEndGfx(); oslQuit(); return 0; }But it just crash after starting it?Code:TARGET = sample OBJS = main.o CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) BUILD_PRX = 1 PSP_FW_VERSION = 371 LIBDIR = LIBS = -losl -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm LDFLAGS = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = sample PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
Geändert von basfreak (08-20-2008 um 10:00 AM Uhr)
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
08-20-2008, 09:29 AM #8947QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
how big is the image?
also why do u have these two lines:
#define printf pspDebugScreenPrintf
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
also defineing printf when it's already used in another library is a very VERY bad idea, i'd suggest just removing them from your program1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-20-2008, 09:59 AM #8948QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
-
08-20-2008, 10:18 AM #8949QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
If it is crashing, then ufo is probably NULL. Check that it can find the image.
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-20-2008, 10:21 AM #8950
Sorry to distract from your oslib problem, but, I have a working debug keyboard in kernel mode, in case anyone else has my problem.
http://tshiso.com/downloads/DebugKBFix/debugkbfix.zip
Works like a charm.
-
08-21-2008, 04:28 PM #8951QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 26
- Points
- 2.426
- Level
- 29
- Downloads
- 0
- Uploads
- 0
c++ question
I'm usingas a global variable and is at the heading of my main.cPPCode:unsigned int color = GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f );
inside my main loop I try to change it with
and it will not change. I bet odds are this is an extreme noob question, but I did a quick search of guide and couldn't find anythingCode:color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f );
-
08-21-2008, 04:33 PM #8952QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Global variables are evil.
Post the whole file so we can see more.
-
08-21-2008, 04:53 PM #8953QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
wat _dysfunctional said, their can be a million reason's why it won't, currently i'm thinking it's because you don't change the vertices's color
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-21-2008, 05:04 PM #8954QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 26
- Points
- 2.426
- Level
- 29
- Downloads
- 0
- Uploads
- 0
-=Double Post Merge =-Code://************************************************************************** // PSPGU Tutorial: 'Lesson6' - main.cpp //************************************************************************** #include "main.h" PSP_MODULE_INFO("Lesson6", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER); int fps = 0; // for calculating the frames per second char *fpsDisplay; void *dList; // display List, used by sceGUStart void *fbp0; // frame buffer u32 tickResolution; u64 fpsTickNow; u64 fpsTickLast; bool exiting = false; bool light = false; // Lighting ON/OFF (NEW) bool texFilter = false; // Texture Filter, NEAREST / LINEAR (NEW) bool texon = true; float xrot = 0.0f; // X Rotation (NEW) float yrot = 0.0f; // Y Rotation (NEW) float xspeed = 0.0f; // X Speed (NEW) float yspeed = 0.0f; // Y Speed (NEW) float z = -3.0f; // Z Position (NEW) float dt; // For time based animation unsigned int color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); CTGATexture texture; Vertex __attribute__((aligned(16))) quad[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad1[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad2[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad3[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; int main(int argc, char **argv) { fbp0 = 0; dList = malloc( 262144 ); fpsDisplay = "FPS: calculating"; sceRtcGetCurrentTick( &fpsTickLast ); tickResolution = sceRtcGetTickResolution(); CTimer timer; SceCtrlData pad, lastPad; // Controller structure sceCtrlReadBufferPositive(&lastPad, 1); SetupCallbacks(); pspDebugScreenInit(); sceKernelDcacheWritebackAll(); if( !texture.LoadTGA( "Data/Crate.tga" ) ) { sceKernelExitGame(); } texture.Swizzle(); InitGU(); SetupProjection(); while( !exiting ) { sceCtrlPeekBufferPositive(&pad, 1); if( pad.Buttons != lastPad.Buttons ) { lastPad = pad; if( pad.Buttons & PSP_CTRL_CROSS ) { light = !light; } if( pad.Buttons & PSP_CTRL_SQUARE ) { texFilter = !texFilter; } if( pad.Buttons & PSP_CTRL_CIRCLE ) { texon = !texon; } } if( pad.Buttons & PSP_CTRL_LTRIGGER ) { z -= (1.0f * dt); } if( pad.Buttons & PSP_CTRL_RTRIGGER ) { z += (1.0f * dt); } if( pad.Buttons & PSP_CTRL_UP ) { xspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_DOWN ) { xspeed += 0.01f; } if( pad.Buttons & PSP_CTRL_LEFT ) { yspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_RIGHT ) { yspeed += 0.01f; } dt = timer.GetDeltaTime( ); DrawScene(); FPS(); //sceDisplayWaitVblankStart(); fbp0 = sceGuSwapBuffers(); } sceGuTerm(); // Terminating the Graphics System // Free Memory free( dList ); free( fpsDisplay ); sceKernelExitGame(); // Quits Application return 0; } void FPS( void ) { fps++; sceRtcGetCurrentTick( &fpsTickNow ); if( ((fpsTickNow - fpsTickLast)/((float)tickResolution)) >= 1.0f ) { fpsTickLast = fpsTickNow; sprintf( fpsDisplay, "FPS: %i", (int)fps ); fps = 0; } pspDebugScreenSetOffset( (int)fbp0 ); pspDebugScreenSetXY( 0, 0 ); pspDebugScreenPrintf( fpsDisplay ); } void InitGU( void ) { // Init GU sceGuInit(); sceGuStart( GU_DIRECT, dList ); // Set Buffers sceGuDrawBuffer( GU_PSM_8888, fbp0, BUF_WIDTH ); sceGuDispBuffer( SCR_WIDTH, SCR_HEIGHT, (void*)0x88000, BUF_WIDTH); sceGuDepthBuffer( (void*)0x110000, BUF_WIDTH); sceGuOffset( 2048 - (SCR_WIDTH/2), 2048 - (SCR_HEIGHT/2)); sceGuViewport( 2048, 2048, SCR_WIDTH, SCR_HEIGHT); sceGuDepthRange( 65535, 0); // Set Render States sceGuScissor( 0, 0, SCR_WIDTH, SCR_HEIGHT); sceGuEnable( GU_SCISSOR_TEST ); sceGuDepthFunc( GU_GEQUAL ); sceGuEnable( GU_DEPTH_TEST ); sceGuFrontFace( GU_CW ); sceGuEnable( GU_CULL_FACE ); sceGuShadeModel( GU_SMOOTH ); sceGuEnable( GU_CLIP_PLANES ); sceGuEnable( GU_TEXTURE_2D ); sceGuEnable( GU_LIGHT0 ); // Enable Light 1 (NEW) // setup texture // 32-bit image, if we swizzled the texture will return true, otherwise false (NEW) sceGuTexMode( GU_PSM_8888, 0, 0, texture.Swizzled() ); sceGuTexFunc( GU_TFX_MODULATE, GU_TCC_RGB ); // Modulate the color of the image sceGuTexScale( 1.0f, 1.0f ); // No scaling sceGuTexOffset( 0.0f, 0.0f ); ScePspFVector3 lightPosition = { 0.0f, 0.0f, 4.0f }; sceGuLight( 0, GU_SPOTLIGHT, GU_AMBIENT_AND_DIFFUSE, &lightPosition ); //GU_POINTLIGHT sceGuLightColor( 0, GU_AMBIENT, GU_COLOR( 0.2f, 0.2f, 0.2f, 1.0f )); sceGuLightColor( 0, GU_DIFFUSE, GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ) ); sceGuFinish(); sceGuSync(0,0); sceDisplayWaitVblankStart(); sceGuDisplay(GU_TRUE); // finish } void SetupProjection( void ) { // setup matrices for the triangle sceGumMatrixMode(GU_PROJECTION); sceGumLoadIdentity(); sceGumPerspective( 75.0f, 16.0f/9.0f, 0.5f, 1000.0f); sceGumMatrixMode(GU_VIEW); sceGumLoadIdentity(); sceGuClearColor( GU_COLOR( 0.0f, 0.0f, 0.0f, 1.0f ) ); // 0xff554433 == cool bg color sceGuClearDepth(0); } void DrawScene( void ) { sceGuStart( GU_DIRECT, dList ); // Starts the display list // clear screen sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT); // Clears the Color and Depth Buffer sceGumMatrixMode(GU_MODEL); // Selects the Model Matrix sceGumLoadIdentity(); // And Reset it if( light ) { sceGuEnable( GU_LIGHTING ); // Enable Lighting (NEW) } else { sceGuDisable( GU_LIGHTING ); // Disable Lighting (NEW) } if( texFilter ) { sceGuTexFilter( GU_LINEAR, GU_LINEAR ); // Linear filtering (Good Quality) } else { sceGuTexFilter( GU_NEAREST, GU_NEAREST ); // Nearest filtering (Bad Quality) (NEW) } if( texon ) { sceGuEnable( GU_TEXTURE_2D ); color = GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); } else { sceGuDisable( GU_TEXTURE_2D ); color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); } { ScePspFVector3 move = { -6.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); // Draw Quad sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad ); // Draw the Cube (NEW) sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { -3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad1 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 0.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad2 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad3 ); xrot+= ( xspeed * dt); yrot+= ( yspeed * dt); sceGuFinish(); sceGuSync(0,0); } //END OF FILE
I'm just working off of a tutorial.
-=Double Post Merge =-
I think I know why, I need to reload the model.
How would I do that though?Geändert von MoAShaun (08-21-2008 um 05:19 PM Uhr) Grund: Automerged Doublepost
-
08-21-2008, 05:21 PM #8955QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
yep just like i thought, your not actually changing the color of the vertex, simple telling the color variable....it's a new color that's it, you need to loop though your object and change it's vertex color
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-21-2008, 05:23 PM #8956QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Yeah, you are setting the color in those vertices to the value of color, but when you change the value of color, you need to update the vertices.
For example, look at this code sample:
The fix would to setup the vertices' colors after you change the color.Code:int someVariable = 12; int otherVaraible = someVariable; someVariable = 14; std::cout << "someVariable is " << someVariable << ".\n"; // 14 std::cout << "otherVariable is " << otherVariable << ".\n"; // 12 otherVariable = someVariable; std::cout << "Now otherVariable is " << otherVariable << ".\n"; // 14
-
08-21-2008, 06:06 PM #8957QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 26
- Points
- 2.426
- Level
- 29
- Downloads
- 0
- Uploads
- 0
Thanks guys.
-=Double Post Merge =-
Nope, not working D:
I'm getting:
unused variable quad_t (wtf is the "_t" about?)
unused variable quad1
unused variable quad2
unused variable quad3
Code://************************************************************************** // PSPGU Tutorial: 'Lesson6' - main.cpp //************************************************************************** #include "main.h" PSP_MODULE_INFO("Lesson6", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER); int fps = 0; // for calculating the frames per second char *fpsDisplay; void *dList; // display List, used by sceGUStart void *fbp0; // frame buffer u32 tickResolution; u64 fpsTickNow; u64 fpsTickLast; bool exiting = false; bool light = false; // Lighting ON/OFF (NEW) bool texFilter = false; // Texture Filter, NEAREST / LINEAR (NEW) bool texon = true; float xrot = 0.0f; // X Rotation (NEW) float yrot = 0.0f; // Y Rotation (NEW) float xspeed = 0.0f; // X Speed (NEW) float yspeed = 0.0f; // Y Speed (NEW) float z = -3.0f; // Z Position (NEW) float dt; // For time based animation unsigned int color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); CTGATexture texture; void reloadmodel () { Vertex __attribute__((aligned(16))) quad[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad1[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad2[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad3[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; } int main(int argc, char **argv) { reloadmodel (); fbp0 = 0; dList = malloc( 262144 ); fpsDisplay = "FPS: calculating"; sceRtcGetCurrentTick( &fpsTickLast ); tickResolution = sceRtcGetTickResolution(); CTimer timer; SceCtrlData pad, lastPad; // Controller structure sceCtrlReadBufferPositive(&lastPad, 1); SetupCallbacks(); pspDebugScreenInit(); sceKernelDcacheWritebackAll(); if( !texture.LoadTGA( "Data/Crate.tga" ) ) { sceKernelExitGame(); } texture.Swizzle(); InitGU(); SetupProjection(); while( !exiting ) { sceCtrlPeekBufferPositive(&pad, 1); if( pad.Buttons != lastPad.Buttons ) { // Thanks to Insomniac for the hint! lastPad = pad; if( pad.Buttons & PSP_CTRL_CROSS ) { light = !light; } if( pad.Buttons & PSP_CTRL_SQUARE ) { texFilter = !texFilter; } if( pad.Buttons & PSP_CTRL_CIRCLE ) { texon = !texon; } } if( pad.Buttons & PSP_CTRL_LTRIGGER ) { z -= (1.0f * dt); } if( pad.Buttons & PSP_CTRL_RTRIGGER ) { z += (1.0f * dt); } if( pad.Buttons & PSP_CTRL_UP ) { xspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_DOWN ) { xspeed += 0.01f; } if( pad.Buttons & PSP_CTRL_LEFT ) { yspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_RIGHT ) { yspeed += 0.01f; } dt = timer.GetDeltaTime( ); DrawScene(); FPS(); //sceDisplayWaitVblankStart(); fbp0 = sceGuSwapBuffers(); } sceGuTerm(); // Terminating the Graphics System // Free Memory free( dList ); free( fpsDisplay ); sceKernelExitGame(); // Quits Application return 0; } void FPS( void ) { fps++; sceRtcGetCurrentTick( &fpsTickNow ); if( ((fpsTickNow - fpsTickLast)/((float)tickResolution)) >= 1.0f ) { fpsTickLast = fpsTickNow; sprintf( fpsDisplay, "FPS: %i", (int)fps ); fps = 0; } pspDebugScreenSetOffset( (int)fbp0 ); pspDebugScreenSetXY( 0, 0 ); pspDebugScreenPrintf( fpsDisplay ); } void InitGU( void ) { // Init GU sceGuInit(); sceGuStart( GU_DIRECT, dList ); // Set Buffers sceGuDrawBuffer( GU_PSM_8888, fbp0, BUF_WIDTH ); sceGuDispBuffer( SCR_WIDTH, SCR_HEIGHT, (void*)0x88000, BUF_WIDTH); sceGuDepthBuffer( (void*)0x110000, BUF_WIDTH); sceGuOffset( 2048 - (SCR_WIDTH/2), 2048 - (SCR_HEIGHT/2)); sceGuViewport( 2048, 2048, SCR_WIDTH, SCR_HEIGHT); sceGuDepthRange( 65535, 0); // Set Render States sceGuScissor( 0, 0, SCR_WIDTH, SCR_HEIGHT); sceGuEnable( GU_SCISSOR_TEST ); sceGuDepthFunc( GU_GEQUAL ); sceGuEnable( GU_DEPTH_TEST ); sceGuFrontFace( GU_CW ); sceGuEnable( GU_CULL_FACE ); sceGuShadeModel( GU_SMOOTH ); sceGuEnable( GU_CLIP_PLANES ); sceGuEnable( GU_TEXTURE_2D ); sceGuEnable( GU_LIGHT0 ); // Enable Light 1 (NEW) // setup texture // 32-bit image, if we swizzled the texture will return true, otherwise false (NEW) sceGuTexMode( GU_PSM_8888, 0, 0, texture.Swizzled() ); sceGuTexFunc( GU_TFX_MODULATE, GU_TCC_RGB ); // Modulate the color of the image sceGuTexScale( 1.0f, 1.0f ); // No scaling sceGuTexOffset( 0.0f, 0.0f ); ScePspFVector3 lightPosition = { 0.0f, 0.0f, 4.0f }; sceGuLight( 0, GU_SPOTLIGHT, GU_AMBIENT_AND_DIFFUSE, &lightPosition ); //GU_POINTLIGHT sceGuLightColor( 0, GU_AMBIENT, GU_COLOR( 0.2f, 0.2f, 0.2f, 1.0f )); sceGuLightColor( 0, GU_DIFFUSE, GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ) ); sceGuFinish(); sceGuSync(0,0); sceDisplayWaitVblankStart(); sceGuDisplay(GU_TRUE); // finish } void SetupProjection( void ) { // setup matrices for the triangle sceGumMatrixMode(GU_PROJECTION); sceGumLoadIdentity(); sceGumPerspective( 75.0f, 16.0f/9.0f, 0.5f, 1000.0f); sceGumMatrixMode(GU_VIEW); sceGumLoadIdentity(); sceGuClearColor( GU_COLOR( 0.0f, 0.0f, 0.0f, 1.0f ) ); // 0xff554433 == cool bg color sceGuClearDepth(0); } void DrawScene( void ) { sceGuStart( GU_DIRECT, dList ); // Starts the display list // clear screen sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT); // Clears the Color and Depth Buffer sceGumMatrixMode(GU_MODEL); // Selects the Model Matrix sceGumLoadIdentity(); // And Reset it if( light ) { sceGuEnable( GU_LIGHTING ); // Enable Lighting (NEW) } else { sceGuDisable( GU_LIGHTING ); // Disable Lighting (NEW) } if( texFilter ) { sceGuTexFilter( GU_LINEAR, GU_LINEAR ); // Linear filtering (Good Quality) } else { sceGuTexFilter( GU_NEAREST, GU_NEAREST ); // Nearest filtering (Bad Quality) (NEW) } if( texon ) { sceGuEnable( GU_TEXTURE_2D ); color = GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); reloadmodel(); } else { sceGuDisable( GU_TEXTURE_2D ); color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); reloadmodel(); } { ScePspFVector3 move = { -6.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); // Draw Quad sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad ); // Draw the Cube (NEW) sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { -3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad1 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 0.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad2 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad3 ); xrot+= ( xspeed * dt); yrot+= ( yspeed * dt); sceGuFinish(); sceGuSync(0,0); } //END OF FILEGeändert von MoAShaun (08-21-2008 um 07:27 PM Uhr) Grund: Automerged Doublepost
-
08-21-2008, 10:03 PM #8958Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
im assuming youre also getting some redefinition errors. Thing is, when you do this the 1st time:
Vertex __attribute__((aligned(16 ))) quad[3*12]
you have declared your quad. You cannot re-declare it, which you are doing each time you call reloadModel(). That would be like doing this:
int number;
int number;
that would give you an error, since you cant have 2 variables of the same type and name, its a logical error.
My recommendation:
Also, change your "Vertex" from something like this:Code://************************************************************************** // PSPGU Tutorial: 'Lesson6' - main.cpp //************************************************************************** #include "main.h" PSP_MODULE_INFO("Lesson6", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER); int fps = 0; // for calculating the frames per second char *fpsDisplay; void *dList; // display List, used by sceGUStart void *fbp0; // frame buffer u32 tickResolution; u64 fpsTickNow; u64 fpsTickLast; bool exiting = false; bool light = false; // Lighting ON/OFF (NEW) bool texFilter = false; // Texture Filter, NEAREST / LINEAR (NEW) bool texon = true; float xrot = 0.0f; // X Rotation (NEW) float yrot = 0.0f; // Y Rotation (NEW) float xspeed = 0.0f; // X Speed (NEW) float yspeed = 0.0f; // Y Speed (NEW) float z = -3.0f; // Z Position (NEW) float dt; // For time based animation unsigned int color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); CTGATexture texture; Vertex __attribute__((aligned(16))) quad[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad1[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad2[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; Vertex __attribute__((aligned(16))) quad3[3*12] = { { 0, 1, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Top { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 1.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 1, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f }, { 0, 1, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f, 1.0f }, // Bottom { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f,-1.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 0, color, 0.0f,-1.0f, 0.0f, 1.0f,-1.0f,-1.0f }, { 0, 1, color, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f, 1.0f }, // Front { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 0, 0, color, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f, 1.0f }, { 1, 1, color, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f }, { 1, 0, color, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f, 1.0f }, { 0, 1, color, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f,-1.0f }, // Back { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 0, 0, color, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f,-1.0f }, { 1, 1, color, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f,-1.0f }, { 1, 0, color, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f,-1.0f }, { 0, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f,-1.0f }, // Left { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 0, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f,-1.0f }, { 1, 1, color,-1.0f, 0.0f, 0.0f,-1.0f, 1.0f, 1.0f }, { 1, 0, color,-1.0f, 0.0f, 0.0f,-1.0f,-1.0f, 1.0f }, { 0, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, // Right { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 0, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f, 1.0f }, { 1, 1, color, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,-1.0f }, { 1, 0, color, 1.0f, 0.0f, 0.0f, 1.0f,-1.0f,-1.0f } }; int main(int argc, char **argv) { reloadmodel (); fbp0 = 0; dList = malloc( 262144 ); fpsDisplay = "FPS: calculating"; sceRtcGetCurrentTick( &fpsTickLast ); tickResolution = sceRtcGetTickResolution(); CTimer timer; SceCtrlData pad, lastPad; // Controller structure sceCtrlReadBufferPositive(&lastPad, 1); SetupCallbacks(); pspDebugScreenInit(); sceKernelDcacheWritebackAll(); if( !texture.LoadTGA( "Data/Crate.tga" ) ) { sceKernelExitGame(); } texture.Swizzle(); InitGU(); SetupProjection(); while( !exiting ) { sceCtrlPeekBufferPositive(&pad, 1); if( pad.Buttons != lastPad.Buttons ) { // Thanks to Insomniac for the hint! lastPad = pad; if( pad.Buttons & PSP_CTRL_CROSS ) { light = !light; } if( pad.Buttons & PSP_CTRL_SQUARE ) { texFilter = !texFilter; } if( pad.Buttons & PSP_CTRL_CIRCLE ) { texon = !texon; } } if( pad.Buttons & PSP_CTRL_LTRIGGER ) { z -= (1.0f * dt); } if( pad.Buttons & PSP_CTRL_RTRIGGER ) { z += (1.0f * dt); } if( pad.Buttons & PSP_CTRL_UP ) { xspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_DOWN ) { xspeed += 0.01f; } if( pad.Buttons & PSP_CTRL_LEFT ) { yspeed -= 0.01f; } if( pad.Buttons & PSP_CTRL_RIGHT ) { yspeed += 0.01f; } dt = timer.GetDeltaTime( ); DrawScene(); FPS(); //sceDisplayWaitVblankStart(); fbp0 = sceGuSwapBuffers(); } sceGuTerm(); // Terminating the Graphics System // Free Memory free( dList ); free( fpsDisplay ); sceKernelExitGame(); // Quits Application return 0; } void FPS( void ) { fps++; sceRtcGetCurrentTick( &fpsTickNow ); if( ((fpsTickNow - fpsTickLast)/((float)tickResolution)) >= 1.0f ) { fpsTickLast = fpsTickNow; sprintf( fpsDisplay, "FPS: %i", (int)fps ); fps = 0; } pspDebugScreenSetOffset( (int)fbp0 ); pspDebugScreenSetXY( 0, 0 ); pspDebugScreenPrintf( fpsDisplay ); } void InitGU( void ) { // Init GU sceGuInit(); sceGuStart( GU_DIRECT, dList ); // Set Buffers sceGuDrawBuffer( GU_PSM_8888, fbp0, BUF_WIDTH ); sceGuDispBuffer( SCR_WIDTH, SCR_HEIGHT, (void*)0x88000, BUF_WIDTH); sceGuDepthBuffer( (void*)0x110000, BUF_WIDTH); sceGuOffset( 2048 - (SCR_WIDTH/2), 2048 - (SCR_HEIGHT/2)); sceGuViewport( 2048, 2048, SCR_WIDTH, SCR_HEIGHT); sceGuDepthRange( 65535, 0); // Set Render States sceGuScissor( 0, 0, SCR_WIDTH, SCR_HEIGHT); sceGuEnable( GU_SCISSOR_TEST ); sceGuDepthFunc( GU_GEQUAL ); sceGuEnable( GU_DEPTH_TEST ); sceGuFrontFace( GU_CW ); sceGuEnable( GU_CULL_FACE ); sceGuShadeModel( GU_SMOOTH ); sceGuEnable( GU_CLIP_PLANES ); sceGuEnable( GU_TEXTURE_2D ); sceGuEnable( GU_LIGHT0 ); // Enable Light 1 (NEW) // setup texture // 32-bit image, if we swizzled the texture will return true, otherwise false (NEW) sceGuTexMode( GU_PSM_8888, 0, 0, texture.Swizzled() ); sceGuTexFunc( GU_TFX_MODULATE, GU_TCC_RGB ); // Modulate the color of the image sceGuTexScale( 1.0f, 1.0f ); // No scaling sceGuTexOffset( 0.0f, 0.0f ); ScePspFVector3 lightPosition = { 0.0f, 0.0f, 4.0f }; sceGuLight( 0, GU_SPOTLIGHT, GU_AMBIENT_AND_DIFFUSE, &lightPosition ); //GU_POINTLIGHT sceGuLightColor( 0, GU_AMBIENT, GU_COLOR( 0.2f, 0.2f, 0.2f, 1.0f )); sceGuLightColor( 0, GU_DIFFUSE, GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ) ); sceGuFinish(); sceGuSync(0,0); sceDisplayWaitVblankStart(); sceGuDisplay(GU_TRUE); // finish } void SetupProjection( void ) { // setup matrices for the triangle sceGumMatrixMode(GU_PROJECTION); sceGumLoadIdentity(); sceGumPerspective( 75.0f, 16.0f/9.0f, 0.5f, 1000.0f); sceGumMatrixMode(GU_VIEW); sceGumLoadIdentity(); sceGuClearColor( GU_COLOR( 0.0f, 0.0f, 0.0f, 1.0f ) ); // 0xff554433 == cool bg color sceGuClearDepth(0); } void DrawScene( void ) { sceGuStart( GU_DIRECT, dList ); // Starts the display list // clear screen sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT); // Clears the Color and Depth Buffer sceGumMatrixMode(GU_MODEL); // Selects the Model Matrix sceGumLoadIdentity(); // And Reset it if( light ) { sceGuEnable( GU_LIGHTING ); // Enable Lighting (NEW) } else { sceGuDisable( GU_LIGHTING ); // Disable Lighting (NEW) } if( texFilter ) { sceGuTexFilter( GU_LINEAR, GU_LINEAR ); // Linear filtering (Good Quality) } else { sceGuTexFilter( GU_NEAREST, GU_NEAREST ); // Nearest filtering (Bad Quality) (NEW) } if( texon ) { color = GU_COLOR( 1.0f, 1.0f, 1.0f, 1.0f ); } else { color = GU_COLOR( 0.0f, 0.0f, 1.0f, 1.0f ); } { ScePspFVector3 move = { -6.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } sceGuEnable(GU_TEXTURE_2D); sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGuColor(color); // Draw Quad sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad ); // Draw the Cube (NEW) sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { -3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad1 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 0.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad2 ); sceGumLoadIdentity(); // And Reset it { ScePspFVector3 move = { 3.0f, 0.0f, z }; // Define position structure ScePspFVector3 rot = { xrot, yrot, 0.0f }; // Define rotation structure sceGumTranslate( &move ); // Move the Object sceGumRotateXYZ( &rot ); // Rotate the Object } //sceGuTexImage( 0, texture.Width(), texture.Height(), texture.Width(), texture.Image() ); sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3*12, 0, quad3 ); xrot+= ( xspeed * dt); yrot+= ( yspeed * dt); sceGuFinish(); sceGuSync(0,0); } //END OF FILE
struct Vertex
{
float u, v;
unsigned int color;
float nx, ny, nz;
float x, y, z;
};
to:
struct Vertex
{
float u, v;
float nx, ny, nz;
float x, y, z;
};
i have NOT tested this, but it should work. might have gotten some spellings/syntax wrong though :/
would someone else please explain to him what i did? i really need my beauty sleep...--------------------------------------------------------------------------------------
-
08-21-2008, 10:21 PM #8959
I feel kinda bad for populating the last few pages, but I know mips well enough this would be vedy vedy helpful.
To sum it up, that does jack squat. After..idk how many google searches..I pretty much stopped looking. It's been a while, but if anyone can enlighten me as to how I would use the inline asm i/o type thing, I would be very greatful.Code:int cvtValue(unsigned int cvtFloat, const char cvtMode) { int cvtVerted; asm( "mtc1 %0, $f0;" "cvt.w.s $f1, $f0;" "mfc1 $5, $f1;" : "=r" (cvtFloat) : "r" (cvtVerted) : "$5" ); return cvtVerted; }
-
08-22-2008, 04:09 AM #8960QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
All that does... or better yet, tries to do, is convert a float to an int (with truncation). That's stupid to pack into an extra function, as you can just do type conversion and it will behave like that.
Or wait, are you really having the float as binary inside an int?Code:float somevalue = 3.64f; int somvalueint = (int)somevalue; // 3
Try this:
Code:int cvtValue(unsigned int cvtFloat, const char cvtMode) { int cvtVerted; asm( "mtc1 %1, $f0;" "cvt.w.s $f0, $f0;" "mfc1 %0, $f0;" : "=r" (cvtVerted) : "r" (cvtFloat) : "$f0" ); return cvtVerted; }Geändert von Raphael (08-22-2008 um 04:22 AM Uhr)
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
08-22-2008, 06:37 AM #8961
It's for memory editing and 2 cheat devices, one I'm working on myself, and one I'm helping with. I shall try that, thanks.
-
08-22-2008, 08:46 AM #8962QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
ok im trying to make a simple program and i know im doing something stupid in my code.
Its been a long day and am tired so don't make me look stupid.
Could someone fix it?Code:#include <pspkernel.h> #include <pspdebug.h> #include <pspctrl.h> #include <stdio.h> #include <stdlib.h> #define printf pspDebugScreenPrintf PSP_MODULE_INFO("Hello World",0,1,0); void fcopy(char * source, char * destination) { printf("Preparing Variables... "); FILE * src, * dst; char * buffer; long size; src = fopen(source,"r"); fseek(src,0,SEEK_END); size = ftell(src); rewind(src); buffer = malloc(size); printf("Done. \n"); printf("Reading %s... ",source); fread(buffer,1,size,src); printf("Done. \n"); printf("Writing to %s... ",destination); fclose(src); dst = fopen(destination,"w"); fwrite(buffer,1,size,dst); fclose(dst); free(buffer); printf("Done. \n"); int copy_files () { pspDebugScreenInit(); pspDebugScreenClear(); fcopy("flash0:/vsh/km/umd9660.prx","ms0:/umd9660.prx"); fcopy("flash0:/vsh/resource/topmenu_plugin.rco","ms0:/topmenu_plugin.rco"); fcopy("flash0:/font/ltn0.pgf","ms0:/ltn0.pgf"); printf("\n\n"); printf("Done.\tPress X to go back to the Main Menu."); while (1) { SceCtrlData pad; sceCtrlReadBufferPositive(&pad, 1); if (pad.Buttons & PSP_CTRL_CROSS) menu(); } } int menu () { pspDebugScreenInit(); pspDebugScreenClear(); printf("Press X to Copy the files from the flash.\n"); printf("Press O to exit the program.\n"); while (1) { SceCtrlData pad; sceCtrlReadBufferPositive(&pad, 1); if (pad.Buttons & PSP_CTRL_CROSS) { printf("Please wait."); sceKernalDelayThread(3*300*300); copy_files(); } if (pad.Buttons & PSP_CTRL_CIRCLE) break; } } int main () { pspDebugScreenInit(); pspDebugScreenClear(); printf("Press X to Copy the files from the flash.\n"); printf("Press O to exit the program.\n"); while (1) { SceCtrlData pad; sceCtrlReadBufferPositive(&pad, 1); if (pad.Buttons & PSP_CTRL_CROSS) { printf("Please wait."); sceKernalDelayThread(3*300*300); copy_files(); } if (pad.Buttons & PSP_CTRL_CIRCLE) break; } } return 0; }
Or tell me what im doing wrong?
Thanks.
Note.. THE SPACES ARE LIKE THAT BECAUSE I COPIED IT FROM UBUNTU.Geändert von MiKeY188 (08-22-2008 um 11:15 AM Uhr)
-
08-22-2008, 09:36 AM #8963QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
So, what is actually wrong with it? Compile error? Crashes?
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-22-2008, 09:45 AM #8964QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
the ones in red are causing me problems.
Is that the right function to load the other functions?
i got a compile error.
-
08-22-2008, 10:21 AM #8965QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You use the function menu() before you declared it in the source file. Forward declare the function at the top of the file.
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-22-2008, 10:25 AM #8966QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Stop. Stop right now. Go throw away your PSP and stop trying to do things that you have NO IDEA how to do. Copy and pasting code is not a good thing to do. Seriously, you are an arrogant prick thinking we are going to just fix it for you.
Go learn Python, and stay away from your PSP, for Pete's sake.
In the mean time, read these articles.
http://scientificninja.com/advice/dont-read-source-code
and
http://scientificninja.com/advice/dont-write-tutorials
Additionally, it isn't Ubuntu's fault for the paste. Don't blame Ubuntu for your own mistakes.
-
08-22-2008, 10:58 AM #8967
Above: Cool it, there's no need for that kind of input here. There's nothing wrong with using someone's source code for practice as long as you don't try to pass it off as your own. If you don't have anything helpful to say, don't say anything at all.
Please read our Piracy Policy before posting. Thank you.
http://m7thcc.googlepages.com/Signature.PNG
-
08-22-2008, 11:01 AM #8968QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
well it appeared with the lines spaced in the text editor with ubuntu.
i didn't ask for your crap so please keep to your self it does use some source of a tutorial.
oh and "arrogant prick" Please read over your post ;)
What he said it isn't going to me used for a program lol
Its just practice making silly programs for fun because im bored :)
What i basically want to know is how once i click the button do i load for ex "copy_files();"
i know i have did something wrong could someone help thanks.
Spoiler for The Code.:Geändert von MiKeY188 (08-22-2008 um 11:15 AM Uhr)
-
08-22-2008, 11:11 AM #8969QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 26
- Points
- 2.426
- Level
- 29
- Downloads
- 0
- Uploads
- 0
This breaks the point of what I want do though.
I wanted to have it so you can have multible color brick and set the color value when the vertex set is made.
For this test though, all it was suppost to do is have a textured shape (color white), then when I hit circle, the texture goes away and the color is now blue.
-=Double Post Merge =-
This is the lua verson of the game.
I'm recoding it in c++ due to limitations.Geändert von MoAShaun (08-22-2008 um 11:20 AM Uhr) Grund: Automerged Doublepost
-
08-22-2008, 11:51 AM #8970QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Oh, you guys make me laugh so much.


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum