ROM Hack Help with poketext source

upbumpo190

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
168
Trophies
0
Location
The 5th dimension
Website
ethericwarriors.eu
XP
101
Country
France
Well, I've been playing around with poketext.cpp and managed to get it right, almost...

When I compile I get one error,

1>e:\documents and settings\christian\desktop\poketextsrc\poketext.cpp(145) : fatal error C1075: end of file found before the left brace '{' at 'e:\documents and settings\christian\desktop\poketextsrc\poketext.cpp(69)' was matched

I'm using Visual C++ Express Edition.


Here is the code, if anyone could tell me what I did wrong... any help is appreciated.

CODE
// PokeText PokemonDP text decrypter
// Â 2006-2006 loadingNOW
// table and unicode help ZhenLin
// this is released under GPLv2

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;

#include
#include
#include "japhtml.h"

typedef struct stringdata{
u32 Ptr;
u32 chars;
}SD;

void DecyptPtrs(u32 count, u16 key, SD *sdptr)
{
key = key * 0x2FD;

for(int i=1; iPtr, (sdptr+i)->chars);
DecyptTxt((sdptr+i)->chars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout);
fprintf(fpout, "");

}
fprintf(fpout, "");

fclose(fpout);

sprintf(filename, "unenc\\%03d.bin", j);
fpout = fopen(filename, "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout);

free(data16);
//free(data32);

fp=fopen("dec.dat", "rb");
fread(data16, 1, sze, fpout); // read decrypted binary file
fclose(fp);

for(int i=0; ichars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout); // encrypte Txt
DecyptPtrs(*data16, *(data16+1), sdptr); // and ptrs

fpout = fopen("enc.dat", "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout);

}


Thanks
 

DarkRey

still transfoooorming.... with sum lags!
Member
Joined
Mar 9, 2007
Messages
981
Trophies
0
Age
33
Location
Rotating around Toni
Website
Visit site
XP
267
Country
Croatia
is this websta's( forgot his name) pokedex? didn't know he released his source.
do u have every file in the right folders like graphics and other files.

if you want help i would suggest to go to palib website and asked them
or ask websta.
 

ds22

Well-Known Member
Member
Joined
Sep 27, 2008
Messages
269
Trophies
0
Age
30
Location
Rotterdam NL
Website
www.youtube.com
XP
266
Country
Netherlands
upbumpo190 said:
Well, I've been playing around with poketext.cpp and managed to get it right, almost...

When I compile I get one error,

1>e:\documents and settings\christian\desktop\poketextsrc\poketext.cpp(145) : fatal error C1075: end of file found before the left brace '{' at 'e:\documents and settings\christian\desktop\poketextsrc\poketext.cpp(69)' was matched

I'm using Visual C++ Express Edition.


Here is the code, if anyone could tell me what I did wrong... any help is appreciated.

CODE
// PokeText PokemonDP text decrypter
// © 2006-2006 loadingNOW
// table and unicode help ZhenLin
// this is released under GPLv2

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;

#include
#include
#include "japhtml.h"

typedef struct stringdata{
u32 Ptr;
u32 chars;
}SD;

void DecyptPtrs(u32 count, u16 key, SD *sdptr)
{
key = key * 0x2FD;

for(int i=1; iPtr, (sdptr+i)->chars);
DecyptTxt((sdptr+i)->chars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout);
fprintf(fpout, "");

}
fprintf(fpout, "");

fclose(fpout);

sprintf(filename, "unenc\\%03d.bin", j);
fpout = fopen(filename, "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout);

free(data16);
//free(data32);
}

fp=fopen("dec.dat", "rb");
fread(data16, 1, sze, fpout); // read decrypted binary file
fclose(fp);

for(int i=0; ichars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout); // encrypte Txt
DecyptPtrs(*data16, *(data16+1), sdptr); // and ptrs

fpout = fopen("enc.dat", "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout);

}


Thanks

see bold sign at //free(data32) i added
it worked for me
smile.gif

EDIT:but the program stopt at 623.bin
frown.gif
 

ds22

Well-Known Member
Member
Joined
Sep 27, 2008
Messages
269
Trophies
0
Age
30
Location
Rotterdam NL
Website
www.youtube.com
XP
266
Country
Netherlands
huh.gif
on mine computer it worked just fine
i can check it for you if you still want
smile.gif

EDIT:the source code i used.

CODE// PokeText PokemonDP text decrypter
// Â 2006-2006 loadingNOW
// table and unicode help ZhenLin
// this is released under GPLv2

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;

#include
#include
#include "japhtml.h"

typedef struct stringdata{
u32 Ptr;
u32 chars;
}SD;

void DecyptPtrs(u32 count, u16 key, SD *sdptr)
{
key = key * 0x2FD;

for(int i=1; iPtr, (sdptr+i)->chars);
DecyptTxt((sdptr+i)->chars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout);
fprintf(fpout, "");

}
fprintf(fpout, "");

fclose(fpout);

sprintf(filename, "unenc\\%03d.bin", j);
fpout = fopen(filename, "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout);

free(data16);
//free(data32);
}


/*

Scramle File again this code would work
fp=fopen("dec.dat", "rb");
fread(data16, 1, sze, fpout); reed decrypted binary file
fclose(fp);

for(int i=0; ichars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout); encrypte Txt
DecyptPtrs(*data16, *(data16+1), sdptr); and ptrs

fpout = fopen("enc.dat", "wb");
fwrite(data16, 1, sze, fpout);
fclose(fpout); */

}
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion