home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1997-05-08 | 1.8 KB | 70 lines |
- Screen Open 0,640,256,2,$8000
- Curs Off
- 'Wload "dh1:games/originale/lemmings2/hdlemmings2",9
- Extension_8_0456 "Ram:joesmain",9
- ST=Start(9)
- ID= Extension_8_0998("IMP!")
- CRM2= Extension_8_0998("CrM2")
- CATN= Extension_8_0998("ATN!")
- RNC= Extension_8_0998("RNC"+Chr$(1))
- PP20= Extension_8_0998("PP20")
- For A=0 To Length(9)-1 Step 2
- If Leek(ST+A)=PP20
- Print "Probably found a PP20 file. Trying to get length from table."
- For AA=$2C00 To $41FF Step 32
- If Leek(ST+AA)=A
- Print "Found!" : LL=Leek(ST+AA+4) : Exit
- End If
- Next
- If AA=$4200
- Print "nothing :-("
- AA=Hunt(ST+A+4 To ST+Length(9),"PP20")
- If AA
- Print "Saving by good luck..."
- Bsave "ram:file"+ Extension_8_0EB8(N,2),ST+A To AA
- Inc N
- End If
- Else
- Bsave "ram:file"+ Extension_8_0EB8(N,2),ST+A To ST+A+LL
- Inc N
- End If
- End If
- If Leek(ST+A)=CATN
- Bsave "ram:file"+ Extension_8_0EB8(N,2),ST+A To ST+A+Leek(ST+A+8)+50
- Inc N
- End If
- If Leek(ST+A)=CRM2
- LE=Leek(ST+A+10)
- If LE>512 and LE<500000
- Bsave "ram:file"+ Extension_8_0EB8(N,2),ST+A To ST+A+LE+32
- Inc N
- End If
- End If
- If Leek(ST+A)=RNC
- LE=Leek(ST+A+8)
- If LE>512 and LE<500000
- Bsave "ram:file"+ Extension_8_0EB8(N,2),ST+A To ST+A+LE+80
- Inc N
- End If
- End If
- If Leek(ST+A)=ID
- OL=Leek(ST+A+4)
- PL=Leek(ST+A+8)
- If((OL or PL) and $FF000000)=0
- Print N;
- Print "Offset:";Hex$(A,6);At(20,);"Packed:";Hex$(PL,8);At(40,);"Unpacked:";Hex$(OL,8)
- Print "Save? ";
- Repeat
- I$=Inkey$
- Multi Wait
- Until I$="y" or I$="n"
- Print I$
- If I$="y"
- Extension_8_0E8A ST+A To 10
- ' Bank Copy ST+A,ST+A+PL+80 To 10
- Extension_8_0472 "ram:File"+ Extension_8_0EB8(N,2),10
- Inc N
- End If
- End If
- End If
- Next