News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rhys

Pages: 1 2 3 4 5 6 [7] 8
awesome! that's two of the best DBZ games on the SNES translated now :D

Programming / Re: (C++) Vector corruption?
« on: June 10, 2011, 07:59:49 am »
The only reason I used pointers is for some reason in my early tests if I didn't create it via New, when making another struct in the loop it'd be like it was pointing to the previous struct, as all of its' values were there. I may of been confused or using bad testing data though.


From what Tauwasser's told me and from my own findings it seems my problem was a twofold thing.

Firstly, as I was using a struct the sizeof call would report invalid lengths due to the padding some compilers use to ensure all variables are aligned in memory, so I changed it to a class to get around this.

Secondly, I found out something I didn't know about before about functions - when you create variables inside a function call, that call has its' own stack which the variables are created on, which is destroyed when you return, so any variables created are destroyed at the end. I was storing the filename of the VFS into a new variable, and creating my Filesystem vector in my initializer, so this was causing the main bug, which I fixed by making the variables static.

I'm guessing the devkitppc compiler is stricter than the VC++ compiler, it's strange how bog standard gcc seems to be as liberal as VC++, yet devkitppc's modified gcc is anal about this kinda stuff.

Thanks for the help guys :thumbsup:

Programming / Re: (C++) Vector corruption?
« on: June 09, 2011, 06:09:10 am »
It's a struct:

Code: [Select]
struct FSHeader {
char *filename;
Uint32 length;
Uint8 unpackType;
Uint32 uncomplength;
Uint64 dataposition;

The code I use to create and push_back each one is the following:
Code: [Select]
FSHeader *currentFile = new FSHeader;

I'm just not sure why it's corrupting on the Wii and not on the PC, the only difference between the two platforms' code is I swap the bytes to correct the endianess for the structs' values like this:

Code: [Select]
//Read in File Length<char *>(&currentFile->length), sizeof(currentFile->length));
//Swap bytes

ByteSwap5 in turn does this:
Code: [Select]
#define ByteSwap5(x) ByteSwap((unsigned char *) &x,sizeof(x))

void ByteSwap(unsigned char * b, int n)
   register int i = 0;
   register int j = n-1;
   while (i<j)
      std::swap(b[i], b[j]);
      i++, j--;

Programming / (C++) Vector corruption?
« on: June 06, 2011, 11:16:52 am »
I've been working on a game engine for the past couple months, and have recently been working on porting it via devkitPPC to the Wii so the engine can have its' platform specifics abstracted away so it can be ported to any platform.

I've run into an issue with a vector inside a filesystem object I'm using to store my VFS's file indexes, all of the fields now fill fine (used to fail on this due to endianess issues which I fixed), but after leaving the function to load all the data, and closing the ifstream, when returning to the filesystem object to load a file, when it accesses the vector again, the file count's decreased from 5 to 2, and the filenames are corrupt and don't display via printf like they do before leaving that function call.

It's declared as:
Code: [Select]
vector<FSHeader *> Filesystem;
In the filesystem object's header, and I literally just push_back objects onto it. The code works 100% pefectly on Windows and Linux, but seems to fail when running inside Dolphin. Could this be some kind of emulation issue?

Personal Projects / Re: Final Fantasy VII NES Enemy Graphics
« on: April 11, 2011, 06:19:16 pm »
Maybe it's just because I'm tired but the palletes/graphics on the map tiles make things very difficult to pick out without looking quite hard, especially in the shot of inside the reactor, it just looks like a wall of crosshatching to me o.o I'm assuming it was like this in the original game too, if you're doing an improvement patch it might be something you may be interested in changing.

ROM Hacking Discussion / Re: Font Artist Needed
« on: April 11, 2011, 05:59:17 pm »
I always wondered what it was, thanks :D I think the Jackie one is closer to the Digimon games, but yeah I always kept seeing it pop up and it pissed me off that I was never able to find it :P

ROM Hacking Discussion / Re: Font Artist Needed
« on: April 11, 2011, 09:13:25 am »
does anyone know the actual name of this font? it's used for loads of the Digimon WS/WSC games and I've seen it used randomly on company logos but I can't seem to find it anywhere :(

Programming / Re: Best way to make a map editor in HTML?
« on: March 26, 2011, 02:59:43 pm »
You could go for JS + HTML Canvas, then you can just blit graphics directly

Script Help and Language Discussion / Re: Kanji ID Help?
« on: February 08, 2011, 03:19:07 am »
wow that's awesome, thanks guys  :D

Script Help and Language Discussion / Kanji ID Help?
« on: February 07, 2011, 05:02:44 pm »
Can someone please help me ID these Kanji?

looks epic xdaniel :thumbsup:

Newcomer's Board / Re: Where are notes for games posted?
« on: January 18, 2011, 05:42:00 am »
But all the cool OSes use PDF for their graphics layer.


Personal Projects / Re: legend of zelda a link to the past (remake)
« on: January 11, 2011, 09:21:59 am »
This should probably go in the Newbie section...

What kind of issues are you having?

News Submissions / Re: Translations: Transcorp: The Group That Flexes
« on: January 07, 2011, 04:13:24 pm »
I think it looks great, I'd reduce the width of the space though, it looks a bit broken up at the moment. :thumbsup:

News Submissions / Re: Site: RHDN 5th Anniversary and RHDN 2.3 Released!
« on: December 31, 2010, 02:47:25 pm »
Pure. Win.

ROM Hacking Discussion / Re: Phantasy Star Generation 2 tryout.
« on: December 30, 2010, 09:27:46 am »
They're probably not in the font, that's why they show as -'s

wow... you know a game's bad when you don't want to play it even -with- cheats :P

Personal Projects / Re: The Console Tool (by Low Lines)
« on: December 01, 2010, 09:03:31 pm »
What about Obj? As far as I know pretty much every 3D editor supports it, so it'd be ideal for exporting to, no idea if it supports bones though

Personal Projects / Re: The Console Tool (by Low Lines)
« on: November 30, 2010, 05:12:48 pm »
also he made it quite clear he doesn't want people decompiling his code, so don't be surprised if he refuses to help you

Personal Projects / Re: The Console Tool (by Low Lines)
« on: November 29, 2010, 07:26:37 pm »
You're like a programming god Low Lines XD how did you manage to figure out the formats for all of these files? I really struggle to work out what it all means when looking at it in a hex editor.

Pages: 1 2 3 4 5 6 [7] 8