Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

LEGO Star Wars: The Video Game - PS2

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Mon Nov 09, 2015 9:25 pm (9493)


I've been trying to write a script for the main archive of this game for over an hour now and I give up. I just cannot figure out how to code the folder structure into my script. The implementation in Watto GameExtractor is wrong as it doesn't consider base folders.
First of all, here's the last 1mb of the archive: http://www90.zippyshare.com/v/YuPHEr6C/file.html
Now, here's part of my script:
Code:
goto 0x24ad957c
get FILES long
for i = 0 < FILES
   get OFFSET long
   get SIZE long
   get ZSIZE long
   get CIDENT long # compression identifier
   putArray 0 i OFFSET
   putArray 1 i SIZE
   putArray 2 i ZSIZE
next i
get ENTRIES long
get UNK long
savepos NAMEBIAS
xmath NAMEBIAS "ENTRIES * 8 NAMEBIAS"
set k -1
set FOLDER "."
for i = 0 < ENTRIES
   get NAMEPOS long
   get UNK byte
   get LAST byte
   get IDENT short
   savepos MYOFF
   math NAMEPOS = NAMEBIAS
   goto NAMEPOS
   get NAME string
   # here comes the name creation
next i

The confusion starts with the fields IDENT and LAST that determine when a name is a folder or a sub-folder. What I understand so far is:
- IDENT == 0 -> NAME = folder name
- IDENT != 0 -> NAME = file name
- LAST == 1 -> NAME is last file in current folder, go one folder level up ("cd ..")
- LAST == 0, IDENT != 0 -> NAME is last file in folder, next NAME is a sub-folder
- LAST == 0, IDENT == 0 -> NAME is folder, next NAME is another sub-folder
- LAST == 1, IDENT == 0 -> ???
I'm not entirely sure if that is how the identifiers work because I'm not even able to program these instructions into a script. Can somebody help me out here? I'd be very thankful!
  • Author
  • Localization

aluigi, posted Tue Nov 10, 2015 12:51 pm (9543)


Can you provide also the beginning of the archive?
  • Author
  • Localization

AlphaTwentyThree, posted Tue Nov 10, 2015 1:54 pm (9560)


Ha! The Crash Bandicoot script works! :) Thanks for linking! :D
  • Author
  • Localization

aluigi, posted Tue Nov 10, 2015 2:05 pm (9561)


Really? Cool! :D
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.