Zeige Ergebnis 8.401 bis 8.430 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; Nope, no such luck unfortunatly. -Aura...
-
04-09-2008, 03:24 PM #8401I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Nope, no such luck unfortunatly.
-Aura
-
04-09-2008, 04:08 PM #8402words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Judas - Are you aware of hte relationship between pointers and arrays...
TMNT - In my Kitten Cannon game, you'll notice there's more then one blood splatter on screen (i think i specified 22 max on screen in the constants..) but anyways in your case, i recommend making a bullet structure or class. But to put it simply, something like this (i won't give you exact working code, learn from this then apply it to your situation ;))
This is untested and I wrote it up real quick, however it should work. You should notice some drastic changes that greatly improve readability and gameplay, one of which completely removes your whole fire delay thing for rapid fire - OSlib has a built in autokey repeat delay. Please look at the documentation else you'll keep hurting yourself ;)Code:const int NUM_BULLETS_ON_SCREEN = ?; const int BULLET_SPEED = ?; typedef struct { int iX, iY, iDamage, iSpeed; bool bVisible; } Bullet; OSL_IMAGE *imgBullet = NULL; Bullet sBullet[NUM_BULLETS_ON_SCREEN]; int iCurrentBullet = 0; int iNumActiveBullets = 0; void LoadBullet() { if (imgBullet) oslDeleteImage(imgBullet); imgBullet = oslLoadImageFilePNG("bullet.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888); oslAssert(imgBullet); // 0 - initial delay until repeat // 30 - were running at 60 FPS, so 30 waits 1/2 a second per shot oslSetKeyAutorepeat(OSL_KEYMASK_CROSS, 0, 30); } void UnloadBullet() { if (imgBullet) oslDeleteImage(imgBullet); imgBullet = NULL; } void InitBullets() { for (int i = 0; i < NUM_BULLETS_ON_SCREEN; i++) { sBullet[i].iX = 0; sBullet[i].iY = 0; sBullet[i].iDamage = 0; sBullet[i].iSpeed = 0; sBullet[i].bVisible = false; } iCurrentBullet = 0; iNumActiveBullets = 0; } void CreateBullet(int posx, int posy) { sBullet[iCurrentBullet].iX = posx; sBullet[iCurrentBullet].iY = posy; sBullet[iCurrentBullet].iDamage = ?; sBullet[iCurrentBullet].iSpeed = BULLET_SPEED; sBullet[iCurrentBullet].bVisible = true; iCurrentBullet++; } void Input() { oslReadKeys(); if (osl_keys->pressed.cross) { CreateBullet(player.x,player.y); } move player blah... } void UpdateBullets() { iNumActiveBullets = 0; for (int i = 0; i < NUM_BULLETS_ON_SCREEN; i++) { if (sBullet[i].bVisible) { sBullet[i].iX += sBullet[i].iSpeed; if (sBullet[i].iX > SCREEN_WIDTH) { sBullet[i].bVisible = false; } else if(BulletPlayerCollision(sBullet[i]) { bullet player collision is occuring... player.health -= (sBullet[i].iDamage); } else { iNumActiveBullets++; } } } } void DrawBullets() { for (int i = 0; i < NUM_BULLETS_ON_SCREEN; i++) { if (sBullet[i].bVisible) { imgBullet->x = sBullet[i].iX; imgBullet->y = sBullet[i].iY; oslDrawImageSimple(imgBullet); } } }
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-09-2008, 04:16 PM #8403QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Awesome dude! The thing is, everytime i ask someone about rapidfire, they just give me code. Could you explain the logic behind that? And what is "bool"?
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-09-2008, 04:27 PM #8404words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
The logic behind the rapid fire code there is all in the built in autorepeat feature in OSlib. you'll notice that when loading the bullet image (LoadBullet) im setting a key repeat for the CROSS button so that it is automatically 'pressed' again every 1/2 seconds if you are holding it down.
As for the bool thing, it's a data type - google is your friend ;)
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-09-2008, 05:05 PM #8405QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Oh, thanks. But how do you let your image (weapon) blit, and then blit again (on the screen at the same time), each with independent x and y coordinates?
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-09-2008, 07:20 PM #8406words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Have you looked at my draw function? It does exactly what you just asked...
It loops through all the bullets, if a bullet is visible, it draws the bullet image at the bullet's position. Efficient and works great, what's the problem?
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-10-2008, 08:11 AM #8407
Check your PM box ;)
Zitat von Auraomega
-
04-11-2008, 01:49 PM #8408QJ Gamer Blue
- Registriert seit
- Jul 2006
- Beiträge
- 132
- Points
- 4.296
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Zitat von cruisx
anyone? please help, i have been busy all week and i wont be able to sit down and look at the code again untill later tonight so i havent had time to figure this problem out =\.
-
04-12-2008, 10:25 PM #8409
Fading
Im working on a little project and I was wondering how would one fade in and fade out an image using OSlib(2.10)?
-
04-13-2008, 12:24 AM #8410words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
bnc - Check your documentation ;)
Use:
oslSetAlpha(OSL_FX_ALPHA, transparency value of anything drawn)
Example: use this as an intro screen if you want - it'll fade the image you pass to it in and out depending on the speed you pass it, i prefer 0.8f as the speed ;)
EDITCode:void FadeInOut(OSL_IMAGE *image, float speed) { float i = 0.0f; int fadingIn = 1; while (!osl_quit) { // start drawing oslStartDrawing(); // clear screen black oslClearScreen(RGB(0,0,0)); // set the alpha of anything drawn now oslSetAlpha(OSL_FX_ALPHA, i); // draw our image oslDrawImage(image); // end drawing oslEndDrawing(); // end frame (flip draw/display buffers) sync's audio too oslEndFrame(); // sync frames oslSyncFrame(); // if were fading out AKA transparency 255 -> 0 if (fadingIn) { // add speed to transprency since the alpha is being set i += speed; // if i has reached 255 AKA the image is completely transparent now if (i > 255.0f) { // were not fading out anymore fadingIn = 0; } } else // if were fading in { // subtract from the transparency i -= speed; // if the transprency is 0 again AKA completely visible if (i < 0) { // break the loop and continue the program break; } } } }
Gah sorry for the formatting - it got messed up when copy&pasting.since my tabs are 2 spaces, on here they're 4 :S
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-13-2008, 03:32 PM #8411QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
k guys been a way a little while learning more about opengl and stuff anyways i'm here because i have a couple of questions that i can't make sense of
anyways here's the question:
i'm building something to load in .x txt files and i have no idea how to make sense of the frametransformationmatrix
now than i've determined, which wasn't hard:Code:FrameTransformMatrix { 0.500000, -0.853553, -0.146447, 0.000000, 0.707107, 0.500000, -0.500000, 0.000000, 0.500000, 0.146447, 0.853553, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000;; }
0.500000, -0.853553, -0.146447, 0.000000,
0.707107, 0.500000, -0.500000, 0.000000,
0.500000, 0.146447, 0.853553, 0.000000,
is part of the rotation however this is where i get beyond confused:
in my model making program, i set all 3 axis's to 45 degrees and it gives me back what i posted above, can any help me get it so i can understand how to translate those numbers back into their respective 45 degree's which they were set to before being exported
also note:
when rotated by 45 degrees on only the z axis these are the numbers i get backCode:FrameTransformMatrix { 0.707107, -0.000000, -0.707107, 0.000000, 0.000000, 1.000000, -0.000000, 0.000000, 0.707107, -0.000000, 0.707107, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000;; }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
-
04-13-2008, 03:58 PM #8412Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Read up on matrices: http://en.wikipedia.org/wiki/Transformation_matrix
Also give careful attention to what transformations effect which parts of the matrix.
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
-
04-13-2008, 04:01 PM #8413QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
yes iwn i've already read up on that however i can't seem to follow it trust me i'm not stopping here without having already done some research however it all seems to be over my head i mostly need to see an example of how it is used in a tad bit simpler principle
woot i got it=-)
after a few more hours of research i finally understand matrix rotations better all be it not the best but enough to get me by for now=-)....well at least if i can use it for animation=-).....i hope=-(
arg god dam quaternions=-(Geändert von slicer4ever (04-13-2008 um 08:44 PM Uhr)
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
-
04-15-2008, 10:01 AM #8414I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I'm having some issues with stubs, I've been talking to another developer but we are both at a loss as to the cause.
My errors when I try compiling:
My stub is:moduleMgrForKernel.s: Assembler messages:
moduleMgrForKernel.s:5: Error: unrecognized opcode `stub_start "ModuleMgrForKernel",0x40 090000,0x00030005'
moduleMgrForKernel.s:6: Error: unrecognized opcode `stub_func 0x6723BBFF,sceKernelLoadM oduleForLoadExecVSHMs1'
moduleMgrForKernel.s:7: Error: unrecognized opcode `stub_func 0x49C5B9E1,sceKernelLoadM oduleForLoadExecVSHMs2'
moduleMgrForKernel.s:8: Error: unrecognized opcode `stub_func 0xF07E1A2F,sceKernelLoadM oduleForLoadExecVSHMs4'
moduleMgrForKernel.s:9: Error: unrecognized opcode `stub_end '
All other stubs I use work fine, but they were created from export files, this was manually made. Any help would be greatly aprechiated.Code:.set noreorder #include "pspstub.s" STUB_START "ModuleMgrForKernel",0x40090000,0x00030005 STUB_FUNC 0x6723BBFF,sceKernelLoadModuleForLoadExecVSHMs1 STUB_FUNC 0x49C5B9E1,sceKernelLoadModuleForLoadExecVSHMs2 STUB_FUNC 0xF07E1A2F,sceKernelLoadModuleForLoadExecVSHMs4 STUB_END
-Aura
-
04-15-2008, 05:53 PM #8415OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Try renaming "moduleMgrForKernel.s " to "moduleMgrForKernel.S"
:)
-
04-16-2008, 02:24 AM #8416I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Grr it worked, that was all the problem was... Does having a capital extention affect any other file types, for future reference?
-Aura
-
04-16-2008, 04:35 PM #8417QJ Gamer Blue
- Registriert seit
- Jun 2007
- Ort
- Texas
- Beiträge
- 455
- Points
- 4.688
- Level
- 43
- Downloads
- 0
- Uploads
- 0
I'm trying to make just a small thing (just for learning purposes, and maybe a laugh or two from friends) I finally got it to compile but when it did it wouldn't display the image.
I am new to C, and I'm also trying to do this in the 3.XX kernel.
Main.c
MakefileCode:#include <pspdisplay.h> #include <pspctrl.h> #include <pspkernel.h> #include <pspdebug.h> #include <pspgu.h> #include <png.h> #include <stdio.h> #include "graphics.h" #define printf pspDebugScreenPrintf #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) PSP_MODULE_INFO("Image Display Program", 0, 1, 0); PSP_HEAP_SIZE_KB(20480); /* Exit callback */ int exit_callback(int arg1, int arg2, void *common) { sceKernelExitGame(); return 0; } /* Callback thread */ int CallbackThread(SceSize args, void *argp) { int cbid; cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL); sceKernelRegisterExitCallback(cbid); sceKernelSleepThreadCB(); return 0; } /* Sets up the callback thread and returns its thread id */ int SetupCallbacks(void) { int thid = 0; thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0); if(thid >= 0) { sceKernelStartThread(thid, 0, 0); } return thid; } int main(){ char buffer[200]; Image* bsod; pspDebugScreenInit(); SetupCallbacks(); initGraphics(); sprintf(buffer, "bsod.png"); bsod = loadImage(buffer); if (!bsod) { //Load Failed printf("Messed up the code, go fix it\n"); } else { int x = 0; int y = 0; sceDisplayWaitVblankStart(); while (x < 480) { while (y < 272) { blitAlphaImageToScreen(0 ,0 ,480 ,272, bsod, x, y); y += 32; x += 32; y = 0; } flipScreen(); } sceKernelSleepThread(); return 0; } }
Thanks in advanced for your helpCode:TARGET = hello OBJS = main.o graphics.o framebuffer.o CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBDIR = LIBS = -lpspgu -lpng -lz -lm LDFLAGS = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = Windows Vista BUILD_PRX = 1 PSP_FW_VERSION = 390 PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
-
04-16-2008, 04:50 PM #8418words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Gah I really do hate yeldarb's tutorial on that lol - too much logic for them at that level ;)
But anyways - you just want to forever display that image right?
So what you want to do is load hte image, draw the image, flip draw/display buffers then sleep thread so make main() look something like:
Code:int main() { // init the debug screen pspDebugScreenInit(); // setup callbacks SetupCallbacks(); // init the graphics initGraphics(); // declare our image variable, assign to null initially Image* bsod = NULL; // load the imshr bsod = loadImage("bsod.png"); // if it failed to load if (!bsod) { printf("Failed to load 'bsod.png'"); } else { // blit image blitAlphaImageToScreen(0, 0, 480, 272, bsod, 0, 0); // wait for vsync sceDisplayWaitVblankStart(); // flip the display/draw buffers flipScreen(); } // make this thread sleep forever, still home->quit is available sceKernelSleepThread(); return 0; }
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-16-2008, 04:57 PM #8419QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Wouldn't that be better (according to Yaustar)?Code:// if it failed to load if (bsod == NULL) { printf("Failed to load 'bsod.png'"); }Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-16-2008, 05:01 PM #8420words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Define 'better'. !bsod means it isn't pointing to an address meaning it's null (watch me be corrected by some awkward exception :P). For readability probably too but hey preferences.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-16-2008, 05:05 PM #8421QJ Gamer Blue
- Registriert seit
- Jun 2007
- Ort
- Texas
- Beiträge
- 455
- Points
- 4.688
- Level
- 43
- Downloads
- 0
- Uploads
- 0
Thank you very much, worked perfectly.
Zitat von SG57
-
04-17-2008, 02:15 AM #8422QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
There is one obscure case in C where NULL isn't always 0. In C++ IIRC, the standard is NULL is ALWAYS 0. So in C if NULL is not zero:
Zitat von SG57
Code:int * pInt = NULL; if( !pInt ) { // This code will execute because pInt is non-zero }[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]
-
04-17-2008, 02:30 AM #8423words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Well for me I'm in the clear if you recall correctly ;)

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-17-2008, 08:41 PM #8424
I'm an math idiot. If I have an object needs to travel from point A to point B. The path look something like this(along a spline). How to calculate and code?
Thx.
-
04-18-2008, 03:28 PM #8425OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
How come no matter what I do, I can't seem to get the psp slim tv-out working?
I've included the stub "pspDveManager.S" and have created a 'dummy' function within my main.cpp "int pspDveMgrSetVideoOut(int, int, int, int, int, int, int);", just like the sample did.
It compiles the code fine, but once it hits the finalization of the compiling I get, 'Undefined Reference to pspDveMgrSetVideoOut(int, int, int, int, int, int, int)' @ line 330 which is the line where I declared that function.
What else do I do? I don't understand how the sample works but my code doesn't?
(The sample is at http://dl.qj.net/Fullscreen-TV-out-f...4864/catid/151)
-
04-18-2008, 08:20 PM #8426QJ Gamer Blue
- Registriert seit
- Jun 2007
- Ort
- Texas
- Beiträge
- 455
- Points
- 4.688
- Level
- 43
- Downloads
- 0
- Uploads
- 0
So After getting the Image to work and buttons and a few other things I decided to try out the Message dialogs (like the official ones). I finally got it to compile but whenever i go to run it it just flashes the text and then the screen stays blank.
Here's my code (sorry if it's horribly formatted)
Spoiler for Code:
I'm positive i have all of the libraries and callbacks.
Also if it matter's I'm trying to do this on my slim so 3.xx kernel.
The problem is probably some stupid mistake, or just something real small that i missed but I've been looking all day and i couldn't find anything.
Thank you to anyone who can i help.
-
04-18-2008, 08:33 PM #8427words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Put it in a loop, else it'll only check all of that once - the sleep thread call in there is what's stopping it from exiting right now, so leave the return and i guess the sleep thread call outside the loop (although it's not really necessary :S)

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-18-2008, 08:36 PM #8428QJ Gamer Blue
- Registriert seit
- Jun 2007
- Ort
- Texas
- Beiträge
- 455
- Points
- 4.688
- Level
- 43
- Downloads
- 0
- Uploads
- 0
ok thank you very much.
Zitat von SG57
-
04-19-2008, 08:03 AM #8429QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
k hey everone back with another question about .x files
now than i've moved from my transformation problems and have been able to load a model, animate it(note this method is without bones), texture, give it normals, basically i have the model good and loaded
now than here's the problem: skinweights
i understand the following:
that's all fine and dandy no problem understanding that after some research into it(yea power to google!!) now than i also understand that this requires manipulating the vertex themselfs....this is where the problem lies:Code:SkinWeights { //name of bone and bone's animation in relation "Bone-3"; //number of vertices affected by this bone 112; //the vertex's that are affected 69, 16, 72, etc //how much the vertex is affected by the bone 0.466086, 0.466086, 0.435675, etc
so as u can see rotating a vertex is my problem...i understand rotating an whole object, which i use glRotatef(angle, amountx, amounty, amountz), however writing the function myself is the problem am i to translate to the center of the object than calculate the rotation than reposition the vertex?!?!Code:Animation Animation3 { //object's name which is located(this occurence it's a bone) {Bone-3} AnimationKey { //2 = movement 2; //7 keyframes 7; //movement...no problem here i can move an vertex all day long 0; 3; -0.000000, 0.999994, 0.002683;;, 5; 3; -0.000000, 0.827936, -0.409556;;, 10; 3; 0.000000, 0.412317, -0.573280;;, 15; 3; -0.000000, 0.833326, -0.404204;;, 20; 3; -0.000000, 0.999721, 0.017872;;, 25; 3; -0.000000, 0.840180, 0.397187;;, 30; 3; -0.000000, 0.467647, 0.571981;;; } AnimationKey { //0 = rotation 0; //7 keyframes 7; //rotation...here's the problem(more explanation below)..note that the animations are quaterions(misspelled i know) 0; 4; 0.999997, -0.002339, -0.000000, 0.000000;;, 5; 4; 0.921942, 0.387329, 0.000000, 0.000000;;, 10; 4; 0.698280, 0.715824, 0.000000, 0.000000;;, 15; 4; 0.924487, 0.381214, 0.000000, -0.000000;;, 20; 4; 0.999879, -0.015585, -0.000000, 0.000000;;, 25; 4; 0.927713, -0.373294, -0.000000, 0.000000;;, 30; 4; 0.732010, -0.681294, -0.000000, 0.000000;;; } AnimationOptions { 0; 0; } }
anyhelp or pointers on how to to achieve this would be AWSOME!!
and thx's every1=-)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
-
04-19-2008, 09:29 AM #8430Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
You don't need to do it in software.
Look at the morphskin sample that comes with the SDK.
Particularly the sceGuMorphWeight() function and others.
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


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