summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PE/reinsert.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/PE/reinsert.cpp b/PE/reinsert.cpp
index 47b2627..b8db512 100644
--- a/PE/reinsert.cpp
+++ b/PE/reinsert.cpp
@@ -43,7 +43,7 @@ virtual int startup() throw (GeneralException) {
int patch_img(cdutils * cd) {
struct cdutils::DirEntry d_slus, d_pe1;
unsigned char * slus;
- int i, c, fontei;
+ int i, c;
String s;
int groupes[100][20];
int counts[20];
@@ -61,7 +61,7 @@ int patch_img(cdutils * cd) {
cd->read_datas(slus, GUESS, d_slus.Sector, d_slus.Size);
- fontei = *((short *)(slus + index + 18));
+ int fontei = *((short *)(slus + index + 9 * 2));
Handle * fonte = new Input("fonte.tim");
printm(M_INFO, "Ecriture de la fonte...\n");
cd->write_file(fonte, GUESS, fontei + d_pe1.Sector);
@@ -72,14 +72,22 @@ int patch_img(cdutils * cd) {
cd->write_file(pslus, GUESS, d_slus.Sector);
delete pslus;
+ int menui = *((short *)(slus + index + 69 * 2));
Handle * menu = new Input("69/0069.out");
printm(M_INFO, "Ecriture du menu...\n");
- cd->write_file(menu, GUESS, d_pe1.Sector + 978);
+ cd->write_file(menu, GUESS, menui + d_pe1.Sector);
delete menu;
+ int mapi = *((short *)(slus + index + 71 * 2));
+ Handle * map = new Input("71/0071.out");
+ printm(M_INFO, "Ecriture de la carte...\n");
+ cd->write_file(map, GUESS, mapi + d_pe1.Sector);
+ delete map;
+
+ int jour1i = *((short *)(slus + index + 75 * 2));
Handle * Jour1 = new Input("75/0075.out");
printm(M_INFO, "Ecriture de la fin du jour 1...\n");
- cd->write_file(Jour1, GUESS, d_pe1.Sector + 1975);
+ cd->write_file(Jour1, GUESS, jour1i + d_pe1.Sector);
delete Jour1;
for (i = 1; i <= 20; i++) {