Page 3 of 4

Posted: Mon Aug 15, 2005 6:07 pm
by Falco Girgis
You could use Chankast. It's a DC Emulator that is fairly nice, actually. The only problem is that it requires a DC bios dump...

Anyway, I'm sure any project of mine would work with Chankast perfectly, since I do all drawing with the PVR...

Posted: Mon Aug 15, 2005 7:23 pm
by spideyspiderman2000
No, that's okay. I'd rather wait until I get a DC.

Posted: Sat Aug 20, 2005 3:59 pm
by Guest
spidey u ass you just dont wanna test the demo yopu are making excuses nt tp!

Posted: Sat Aug 20, 2005 5:06 pm
by Falco Girgis
Hi, Arce.

Posted: Tue Oct 11, 2005 1:47 pm
by Falco Girgis

Posted: Tue Oct 11, 2005 7:34 pm
by Falco Girgis
I just rewrote the graphics on Viva La Samba to use Direct Rendering with the PVR rather than traditional PVR rendering.

According to Tvspelsfreak, that's a 3-4x speedup. It looks great too so... yeah. More craziness onscreen at 60 FPS.

OMG WHERE R MY VIDEO RAM!?

Posted: Thu Oct 13, 2005 6:36 am
by spideyspiderman2000
Jackass wrote:spidey u ass you just dont wanna test the demo yopu are making excuses nt tp!
Hmmmmmm. Arce, or xB forlife? I wonder...

Anyway, I'm buying a DC since my dumbass computer has too much crap on it.

Posted: Wed Oct 19, 2005 9:23 pm
by Falco Girgis
Okay, Viva is officially fully modable at this point. It's pretty late so I'm not going to sit here and make some theme to show off, but it is. Don't think I haven't been working either.

You've seen the Zelda theme, I think I'll show off some more Sega-style themes. The main engine isn't really done or anything, but I can now do my own custom skins and all that crap.

Oh, and I completely pwnt the whole romdisk deal. I just took it out of my project. The BBA obsoletes that and load times. ( :twisted: ) not to mention it's alot better to be able to load these things off your PC in the first place.

Don't believe me?

OMFG WTF LOOKIE HERE TEH SORCE COEDS!

Code: Select all

void LoadSong(char song_file[]) {
	int i, j, k;
	FILE *file;
	fs_chdir("/pc/usr/local/dc/kos1.3/kos/Viva/data");
    file = fopen("sonic.txt", "r");

    //Background Music
	fscanf(file, "%s", Song.music);

	//Background
	fscanf(file, "%s", Song.Background.file);
	fscanf(file, "%d%d", &Song.Background.w, &Song.Background.h);

	Song.Background.img = pvr_mem_malloc(Song.Background.w*Song.Background.h*2);
	png_to_texture(Song.Background.file, Song.Background.img, PNG_MASK_ALPHA);

	fscanf(file, "%d", &Song.Background.move);
	fscanf(file, "%d", &Song.Background.scale);
	
	//Objects
	fscanf(file, "%d", &Song.object_amnt);

	Song.Object = (struct object *)malloc(sizeof(struct object) * Song.object_amnt);

	for(i = 0; i < Song.object_amnt; i++) {
		fscanf(file, "%s", Song.Object[i].file);
		fscanf(file, "%d%d", &Song.Object[i].w, &Song.Object[i].h);
		
		Song.Object[i].img = pvr_mem_malloc(Song.Object[i].w*Song.Object[i].h*2);
		png_to_texture(Song.Object[i].file, Song.Object[i].img, PNG_FULL_ALPHA);
		
		fscanf(file, "%d", &Song.Object[i].type);
		fscanf(file, "%d", &Song.Object[i].rot);
		fscanf(file, "%d", &Song.Object[i].scale);
		fscanf(file, "%d", &Song.Object[i].sx_size);
		fscanf(file, "%d", &Song.Object[i].sy_size);
		fscanf(file, "%d", &Song.Object[i].a);
	}

	//Sprites
	fscanf(file, "%d", &Song.sprite_amnt);
	printf("Sprite Amnt - %d", Song.sprite_amnt);

	Song.Sprite = (struct sprite *)malloc(sizeof(struct sprite) * Song.sprite_amnt);

	for(i = 0; i < Song.sprite_amnt; i++) {
        fscanf(file, "%d", &Song.Sprite[i].anim_amnt);
		fscanf(file, "%d%d", &Song.Sprite[i].w, &Song.Sprite[i].h);

		Song.Sprite[i].File = (struct file_t **)malloc(sizeof(struct file_t *) * 4);
		Song.Sprite[i].img = (pvr_ptr_t **)malloc(sizeof(pvr_ptr_t *) * 4);
		
		for(j = 0; j < 4; j++) { //four directions
			Song.Sprite[i].File[j] = (struct file_t *)malloc(sizeof(struct file_t) * Song.Sprite[i].anim_amnt);
			Song.Sprite[i].img[j] = (pvr_ptr_t *)malloc(sizeof(pvr_ptr_t) * Song.Sprite[i].anim_amnt);
			
			for(k = 0; k < Song.Sprite[i].anim_amnt; k++) {
				fscanf(file, "%s", Song.Sprite[i].File[j][k].name);
		
				Song.Sprite[i].img[j][k] = pvr_mem_malloc(Song.Sprite[i].w*Song.Sprite[i].h*2);
				png_to_texture(Song.Sprite[i].File[j][k].name, Song.Sprite[i].img[j][k], PNG_MASK_ALPHA);
			}
		}
	}

	fclose(file);
}
That code reads from this file:

Code: Select all

dothat.ogg
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/bg.png
1024
1024
1
1
11
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/bracelet.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/heart.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/potion.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/sword.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/wand.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/raft.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/shield.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/key.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/compass.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/clock.png
16
16
1
1
1
100
100
1
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/rupee.png
16
16
1
1
1
100
100
1
4
2
16
16
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/link2.png
2
16
16
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/red2.png
2
16
16
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/blue2.png
2
16
16
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton2.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton1.png
/pc/usr/local/dc/kos1.3/kos/Viva/data/song/skeleton2.png
and gets all of the required info. The user won't have to type this stuff in when I'm done (I do for now). I'm going to have some sort of theme editor...

Anyway, I had some issues with the dynamic memory allocation, tried some stuff with C-style dynamic 3D arrays and nearly barfed and yeah. Got quite a few Memory Assertion and PVR out of Memory errors for the simple fact that I had a %d$d in a scanf instead of %d%d.

Anyway, forget that garbage. It's good. Just nod your head now.

Posted: Wed Oct 19, 2005 10:57 pm
by MarauderIIC
Hum, you capitalize class instances? "Proper" last I heard was capital class name humpBack/under_score class instance like all other variables.

Posted: Thu Oct 20, 2005 4:13 pm
by Falco Girgis
Yeah, I have my own style. I personally underscore variables, lowercase classes, and capitalize objects.

My personal reasoning is English. A class isn't a specific noun. An object of a class is a specific instance or "proper noun" thus I should capitalize.

That's just my personal coding practice. I prefer that way so that I can tell what an object is.

Posted: Thu Oct 20, 2005 7:36 pm
by MarauderIIC
Unfortunately, Isaac Newton also had his own "personal style" for calculus. Nobody understood it, since a standard had been adopted before his works were published.

Posted: Thu Oct 20, 2005 7:57 pm
by JS Lemming
I'm pretty good at mentally converting "S" to "s" buy hey, that's just me.

Posted: Sun Nov 27, 2005 7:19 pm
by Falco Girgis
Wow, I got so much done. Now if only I could be this productive every day, Viva wouldn't take more than a few weeks (of course I can't be that productive).

I need to get like a screenshot or something...

Posted: Mon Nov 28, 2005 6:20 am
by spideyspiderman2000
sounds koo'

What happened to Null?

Posted: Mon Nov 28, 2005 7:28 am
by JS Lemming
Heh. I'm in a state of anti-productive.