diff options
-rw-r--r-- | PE/pe-hack.lua | 59 | ||||
-rw-r--r-- | lib/cdreader.cpp | 7 | ||||
-rw-r--r-- | lib/cdutils.cpp | 10 |
3 files changed, 56 insertions, 20 deletions
diff --git a/PE/pe-hack.lua b/PE/pe-hack.lua index 3148cb9..de19586 100644 --- a/PE/pe-hack.lua +++ b/PE/pe-hack.lua @@ -1,8 +1,8 @@ -- Parasite Eve's french patch --- $Id: pe-hack.lua,v 1.6 2003-12-25 15:35:09 pixel Exp $ +-- $Id: pe-hack.lua,v 1.7 2003-12-26 19:05:30 pixel Exp $ function mainpatch() - local dirent, pvd, root, is_cd1, is_cd2, slusname, fmvdir, systemcnfstring, inslus, slus, peimg, pesect, tim, startsect, fmvdirtree, xadirtree, falsesect, i + local dirent, pvd, root, is_cd1, is_cd2, slusname, fmvdir, systemcnfstring, inslus, slus, peimg, pesect, tim, startsect, fmvdirtree, xadirtree, falsesect, i, picts, pict dirent = cdutil:findpath "/SLUS_006.62;1" or cdutil:findpath "/SLUS_006.68;1" or error "Not a Parasite Eve CD" @@ -38,8 +38,8 @@ STACK=801fff00 iso:createfile(root, "SYSTEM.CNF", systemcnf, dirent) print "Reading CD's slus file" --- inslus = cdfile(cdutil, dirent) - inslus = Input("PE-SLUS00662-patched-debug-room.exe") + inslus = cdfile(cdutil, dirent) +-- inslus = Input("PE-SLUS00662-patched-debug-room.exe") slus = Buffer(true) slus:copyfrom(inslus) apply_hacks(slus_hacks, slus) @@ -77,8 +77,19 @@ STACK=801fff00 print "Finalizing CD" iso:createfile(root, "README.TXT", Input("readme.txt")):setbasicsxa() + iso:createfile(root, "DIVERS.HTM", Input("divers.htm")):setbasicsxa() + picts = iso:createdir(root, "PICTS") + picts:setbasicsxa() + for i, pict in ipairs(picts_files) do + iso:createfile(picts, string.upper(pict), Input("picts/" .. pict)):setbasicsxa() + end falsesect = {} + + for i = 1, 13500, 1 do + iso:createsector(falsesect, MODE2_FORM1) + end + for i = 1, 150, 1 do iso:createsector(falsesect, MODE2) end @@ -169,7 +180,7 @@ function do_img_file(slus, startsect, pesect) if (file3) then if (groups[i] ~= nil) then str = string.format("%02i", groups[i]) - file3 = patch_room(file3, Input("scripts/c/" .. str .. ".out"), i) + file3 = patch_room(file3, Input("scripts/" .. str .. ".bin"), i) end iso:putfile(file3) end @@ -359,10 +370,8 @@ function buffer_pad(buffer) end files = { --- [1] = "various.bin", --- [2] = "menus.bin", - [1] = "scripts/c/various.out" - [2] = "scripts/c/menus.bin" + [1] = "various.bin", + [2] = "menus.bin", [10] = "font.tim", [70] = "mainmenu.bin", [72] = patch_map, @@ -446,6 +455,9 @@ slus_hacks = { -- PE.BIN filename extension [0x01b4c] = { 0x54, 0x49, 0x4d }, +-- savefile filename + [0x016e5] = { 0x38 }, + -- Debug room -- [0x2f888] = { }, } @@ -534,4 +546,33 @@ groups = { [435] = 19, [436] = 19, [437] = 19, } +picts_files = { + "foe.jpg", + "tune-up1.jpg", + "tune-up2.jpg", + "tuto1.jpg", + "tuto10.jpg", + "tuto11.jpg", + "tuto12.jpg", + "tuto13.jpg", + "tuto14.jpg", + "tuto15.jpg", + "tuto16.jpg", + "tuto17.jpg", + "tuto18.jpg", + "tuto19.jpg", + "tuto2.jpg", + "tuto20.jpg", + "tuto21.jpg", + "tuto22.jpg", + "tuto23.jpg", + "tuto3.jpg", + "tuto4.jpg", + "tuto5.jpg", + "tuto6.jpg", + "tuto7.jpg", + "tuto8.jpg", + "tuto9.jpg", +} + mainpatch() diff --git a/lib/cdreader.cpp b/lib/cdreader.cpp index 3de92c0..83bd1b3 100644 --- a/lib/cdreader.cpp +++ b/lib/cdreader.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdreader.cpp,v 1.18 2003-12-14 21:14:08 pixel Exp $ */ +/* $Id: cdreader.cpp,v 1.19 2003-12-26 19:05:31 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -128,20 +128,19 @@ cdreader::~cdreader() { } void cdreader::removetail() { - void * t = (void *) tail; if (!tail) return; sectors[tail->n] = 0; if (head == tail) { - free(t); + free(tail); head = tail = 0; nsectors = 0; } else { cachedsector * p; (p = tail->prev)->next = 0; - free(t); + free(tail); tail = p; nsectors--; } diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 9e81c89..4e25aed 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdutils.cpp,v 1.20 2003-12-12 12:45:20 pixel Exp $ */ +/* $Id: cdutils.cpp,v 1.21 2003-12-26 19:05:31 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -36,9 +36,7 @@ cdutils::cdutils(Handle * r, Handle * w) : rootDir(0), f_iso_r(r), f_iso_w(w), p cdutils::~cdutils() { if (ppf_file) delete ppf_file; - void * t = rootDir; - free(t); - rootDir = 0; + free(rootDir); } unsigned char cdutils::from_BCD(unsigned char x) { @@ -827,9 +825,7 @@ cdfile::cdfile(cdutils * _cd, int _sector, ssize_t _size, int _mode) : Handle(-1 } cdfile::~cdfile() { - void * t = dir; - free(t); - dir = 0; + free(dir); } ssize_t cdfile::read(void *buf, size_t count) throw (GeneralException) { |