Viva La Samba
Moderator: PC Supremacists
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
- spideyspiderman2000
- Chaos Rift Demigod
- Posts: 1177
- Joined: Fri Sep 17, 2004 9:28 pm
- Location: Stupid Kansas
- Contact:
No, that's okay. I'd rather wait until I get a DC.
I HATE Jack Thompson!South Park wrote:Mr Garrison: Okay class. Can anybody tell me what "Sexual Harrassment" is?
Cartman: Isn't that when you're having intercourse with a special lady friend, and some other guy comes up behind you and tickles your balls?
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Get the latest!
http://www.dcemulation.com/phpBB/viewtopic.php?t=72350
http://www.dcemulation.com/phpBB/viewtopic.php?t=72350
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
- spideyspiderman2000
- Chaos Rift Demigod
- Posts: 1177
- Joined: Fri Sep 17, 2004 9:28 pm
- Location: Stupid Kansas
- Contact:
Hmmmmmm. Arce, or xB forlife? I wonder...Jackass wrote:spidey u ass you just dont wanna test the demo yopu are making excuses nt tp!
Anyway, I'm buying a DC since my dumbass computer has too much crap on it.
I HATE Jack Thompson!South Park wrote:Mr Garrison: Okay class. Can anybody tell me what "Sexual Harrassment" is?
Cartman: Isn't that when you're having intercourse with a special lady friend, and some other guy comes up behind you and tickles your balls?
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
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. ( ) 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!
That code reads from this file:
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.
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. ( ) 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);
}
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
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.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
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.
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.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
- JS Lemming
- Game Developer
- Posts: 2383
- Joined: Fri May 21, 2004 4:09 pm
- Location: C:\CON\CON
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
- spideyspiderman2000
- Chaos Rift Demigod
- Posts: 1177
- Joined: Fri Sep 17, 2004 9:28 pm
- Location: Stupid Kansas
- Contact:
- JS Lemming
- Game Developer
- Posts: 2383
- Joined: Fri May 21, 2004 4:09 pm
- Location: C:\CON\CON