I'll give that a try but unsure if it will work because of post I said before
06-05-2007, 07:56 AM
PSPJunkie_
I know that the PSP can handle different levels of alpha. I've tested this function myself and I know it works. The only worry is making sure the logic of the fading is correct.
06-05-2007, 08:15 AM
SG57
You really should make the fadeScreenOut and fadeScreenIn functions void, make the parameter constant and possibly inlined... Just saying... :(
I saw Raphael post a function defined like that at psp-programming.com a while ago (i think it was Raphael) and I was about to go hunt for it, good find, finally lay this damn question to rest...
06-05-2007, 08:21 AM
PSPJunkie_
Good find? I wrote that... it was part of my DSX mini-library.
06-05-2007, 08:35 AM
pspballer07
it didn;t work pspjunkie :(
06-05-2007, 08:36 AM
PSPJunkie_
What happened? "It didn't work" doesn't help very much.
06-05-2007, 08:40 AM
pspballer07
Nothing happened on the screen. It just stayed normal with the pic displayed
All I can think of is to do something like that.
-= Double Post =-
By the way, you are better off using my 'drawRectangle' function over the graphics.c one. It is much faster. :)
06-05-2007, 10:40 AM
pspballer07
Holy Crap!!! it worked!!! Thanks a lot man!!! I have searched everywhere and you figured it out! Thanks!!
06-05-2007, 10:41 AM
PSPJunkie_
No problem. That's what I'm here for. ;)
-= Double Post =-
To be honest, sorry it took so long. I haven't touched graphics.c in a long time.
06-05-2007, 10:48 AM
pspballer07
After it fades out tho, it displays the full unfaded pic one last time so it flashes the real pic after. I think thats an easy fix tho
-= Double Post =-
Yup easy fix, fixed it
06-05-2007, 10:52 AM
PSPJunkie_
Good, glad to see you got it working. Good luck on what you're making. :)
06-05-2007, 10:58 AM
pspballer07
thanks, its going to be used on a game I'm entering in a contest
06-05-2007, 11:07 AM
hallo007
Spoiler for code:
/*
* Origenal Made by vodkkaa
* Other authors:
* hallo007
* Name :Usbon.prx
* You are allowed to upgade the source , but not to delete the credits
*/
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspctrl.h>
#include <pspusb.h>
#include <pspusbstor.h>
#include <stdio.h>
#include <stdlib.h>
Sg58 told me there where some mistakes , but i think he forgotten it:P
anyway , this compilles but dont work (no text , no usb)
the blit.c is from devhook sdk
thnx in advance ;)
06-05-2007, 03:59 PM
MaTiAz
Zitat:
Zitat von hallo007
(code)
Ugh, at least indent it :(
06-05-2007, 05:00 PM
SG57
hallo - Ive corrected that code but I haven't compiled it. Ill make it work with the correct graphics lib for a PRX in XMB (the one used in VSHPong and my VSHInform)
Whether or not it works I haven't tried as I don't have a PSP wth working LCD
06-05-2007, 05:51 PM
pspballer07
Zitat:
Zitat von hallo007
Spoiler for code:
/*
* Origenal Made by vodkkaa
* Other authors:
* hallo007
* Name :Usbon.prx
* You are allowed to upgade the source , but not to delete the credits
*/
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspctrl.h>
#include <pspusb.h>
#include <pspusbstor.h>
#include <stdio.h>
#include <stdlib.h>
It's part of the DevHook SDK, but, to be honest, it's no good. If you give me a few days to finalize the rest DSX, I will post a link to the source for you to use.
06-05-2007, 06:26 PM
pspballer07
ok kool
06-05-2007, 06:46 PM
slicer4ever
yet again i post this question as it still won't work:
Spoiler for question:
ok i'm extremly unsure what is wrong with the following code:
Spoiler for code:
Code:
object loadxfile(char file_name[100]){
FILE *pfile;
char string[100];
int next=0;
int string_length;
char word_string[500];
char last_word[500];
int number_of_brackets=0;
int time=0;
int full=0;
int mesh_found=0;
int num_of_vertexs[500];
float actual_vertexs[500][3];
float vertexs[500][100];
float frame_transform_matrix[100][16];
int num_of_polygons[500];
int polygons[500][500];
int current_number = 0;
int current_mesh = 0;
int in_decimals=0;
int full_num_of_vertices=0;
int current_decimal=10;
int colons_in_row=0;
int negative_number=0;
int frame_transform=0;
num_of_vertexs[current_mesh]=0;
pfile = fopen(file_name,"r");
while(!feof(pfile)){
if(!feof(pfile)){
sprintf(string," ");
fgets(string,2,pfile);
string_length = strlen(string);
this code runs fine if compiled on the comp however if u noticed the commented out section if i add them in the psp's version of this won't work
although it should be noted it is not the any of the commented out section's individual fault it's just that lets see if i can explain it so it's understandable:
now none is commented however now this won't work i can't even do:
}else if(strcmp(string,"i")==0 || strcmp(string,"I")==0){
sprintf(word_string,"%si" ,word_string);
}else if(strcmp(string,"j")==0 || strcmp(string,"J")==0){
sprintf(word_string,"%sj" ,word_string);
/*
}else if(strcmp(string,"k")==0 || strcmp(string,"K")==0){
sprintf(word_string,"%sk" ,word_string);
*/
and just have the k out but i can do:
i can switch them seperatly but can't have them all nor can i have 2
so i believe for some reason it's on a fixed number
i hope i explained my prob correctly and some1 can help me
06-05-2007, 08:10 PM
PSPJunkie_
I should have DSX done by this weekend. So far I have a default font, a few vector drawing functions, and initializers. You should be able to make a prx like so.
/* Of course, this example is not final. It will change according to how I finish DSX. */
I will do the images tomorrow.
I also want to make a little addition with functions like "dsxUtils*" with useful things you may need. Any suggestions on those would be helpful.
By the way, this will not be public. I will put a link up with sources and an example here, but I don't want anyone posting it in other places. You are free to use it however you like. Most likely, it will be GPL'd.
06-05-2007, 08:26 PM
pspballer07
You could make a Data lib like this:
Code:
typedef struct _DATA
{
int len;
void *data;
}DATA;
int MakeData()
{
DATA *dat;
char *str;
str = (char*)malloc(20*sizeof(char));
strcpy(str,"This is the data!!");
dat->len = strlen(str);
dat->data = (void*)str;
SaveData("file.dat",dat);
memset(&dat,0,sizeof(dat));
LoadData("file.dat",dat);
printf("dat holds: %s",(char*)dat->data);
return 0;
}
06-05-2007, 08:28 PM
PSPJunkie_
What use would that be over VSH?
06-05-2007, 08:32 PM
pspballer07
idk lol. You wanted suggestions lol
06-05-2007, 09:05 PM
hallo007
Zitat:
Zitat von PSPJunkie_
First of all, get rid of all of that bull****.
Try this.
Code:
code
thnx , i can look in a few houres
another question , how do you copy a code to this forum , without the lost of all spaces :-S
06-05-2007, 09:34 PM
SG57
Use a character-size fixed font (as in, the width of the 'i' character is the same width of the 'w' character when rendered on screen) (theres a specific name for i, can't remember right now, a few fonts with this are system and console fonts)
Also, i had to go to my bro's graduation today, so I couldn't convert the PRX to use VSH blitting (found in VSHPong and VSHInform and a few others). I might be able to tonight...