ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Aug 11, 2020 7:20 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Jul 01, 2020 1:16 pm 

Joined: Wed Jul 01, 2020 9:00 am
Posts: 2
In this topic, a script to make the .tga files in Chicken Invaders Universe readable in editing software was created, and it's really useful, but would it be possible to have a script that does the exact opposite? (That makes the readable .tga files unreadable so that new tga files can be added to the game)

How it should work=

This is an example header of one of the game's TGA files after it's made readable=
Code:
00 00 02 00 00 00 00 00 00 00 00 00 00 01 00 01 20 00


And this is the result after making it unreadable and fitting into the game.
Code:
00 01 00 00 00 01 00 00 20 00 00 00


To convert it making it unreadable, you need to remove the first 12 bytes of the header
Code:
'00 00 02 00 00 00 00 00 00 00 00 00' 00 01 00 01 20 00


That will leave you with 6 bytes=
Code:
00 01 00 01 20 00


Now, you need to add after the second byte, the fourth byte, and the sixth byte (in this case) the 00 byte=
Code:
00 01 '00 00' 00 01 '00 00' 20 00 '00 00'


To get a tga file to try the script on, click here.

Basically, the script I need should do the exact opposite of the one created on this topic. so, if you're struggling in making this, just check that script and make its opposite.

I'd like to leave a side note and thank @EmeraldPlay for designing the .tga script and @Acewell for actually making it.


Top
   
PostPosted: Thu Jul 02, 2020 5:52 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11405
Code:
# Chicken Invaders Universe TGA encoder

getdstring DUMMY 12
get WIDTH short
get HEIGHT short
get TYPE byte
get DUMMY byte
savepos OFFSET
get SIZE asize
math SIZE - OFFSET
get NAME basename
string NAME + "_new.tga"

log MEMORY_FILE 0 0
put WIDTH long MEMORY_FILE
put HEIGHT long MEMORY_FILE
put TYPE long MEMORY_FILE
log NAME 0 12 MEMORY_FILE
append
log NAME OFFSET SIZE
append


Top
   
PostPosted: Thu Jul 02, 2020 5:55 am 

Joined: Wed Jul 01, 2020 9:00 am
Posts: 2
Thank you.


Top
   
PostPosted: Thu Aug 06, 2020 3:55 pm 

Joined: Thu Aug 06, 2020 6:11 am
Posts: 3
How do I use that codes?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited