Jump to content

Photo

Unreadable BMP files


  • Please log in to reply
26 replies to this topic

#21
origamiguy

Third, these graphics are indeed bitmaps, but they are very very very weird ones at that. Instead of being like a normal bitmap they start their image from the end of the file, so the top right pixel corresponds to the last byte in the bitmap file.


Actually, "real" bitmaps use this raster order too.
Rather than use "standard" raster order (that being left-to-right, top-to-bottom, like words on a page), they use vertically inverted raster order. It still goes left-to-right, but the y component is flipped.
 

FuBkIke.gif



#22
shinyquagsire23

shinyquagsire23

    Newbie

  • Members
  • Pip
  • 5 posts
 

Please keep posting. You're awesome.

 

Thanks, This is my first time reversing an x86 executable so this is kinda exciting for me.

 

 

 

Third, these graphics are indeed bitmaps, but they are very very very weird ones at that. Instead of being like a normal bitmap they start their image from the end of the file, so the top right pixel corresponds to the last byte in the bitmap file.


Actually, "real" bitmaps use this raster order too.
Rather than use "standard" raster order (that being left-to-right, top-to-bottom, like words on a page), they use vertically inverted raster order. It still goes left-to-right, but the y component is flipped.
 

FuBkIke.gif

 

Didn't know that. In the GameBoy Advance (which is what I usually mess around with) it does it from top to bottom, but in 8x8 squares. Interesting to know that this isn't anything new.

 

 

 

OK, so apparently this in-built bitmap format is a lot more complicated than I thought. Turns out it is slightly compressed, but not using a compression algorithm. Instead they have a system to minimize the number of bytes used which makes things a bit more difficult. Basically, each byte can be as little as 2 pixels to as many as 4, which complicates things since that means that somehow it's selecting other colors from the 256 color palette shown in the normal images, which also means that I have to decipher a crapton of other stuff in there.

 

Aside from that, I did figure out a way to dump images without directly decoding it. In the .dat files there is a property called total_number_of_frames that can be adjusted. So if you take a multi-framed object and set it to 1 frame it will turn up like this when you place the object down, exposing the entire image:

Please Login or Register to see this Hidden Content

So I managed to dump some of the images, but unfortunately they don't exactly insert back in very well (hence the really crappy looking factory above), so we still have work do to. But they do load and animate correctly, it's just that they don't load the proper palette. So if we can figure out the proper palette we could most likely fix the issue. Not to mention that the building .but's will also have to be modified or the executable hacked to view them from a normal BMP instead of a .but. I'd personally rather do the latter because the bitmap format caused me much pain trying to figure out and I got absolutely nowhere outside of what I learned in the last post.

 

Just to give you guys an idea of what we're working with here, I'll throw up some of the ripped animations I got:

factory1_zps0c8062ea.png

telephone_zps5ab4e97a.png

resturnt_zps8f470968.png

Also, this can work to our advantage in terms of other things since we can rearrange the images to rip other items that aren't buildings. So if we can figure out a way to get the palette to work correctly and to load other buildings we could have a potential modding scene here. I personally plan on using the resources to make a sort of "Open LEGO LOCO" which can recreate the game with proper networking support as well as improved modding ability and maybe a more Sim City like engine which could give purpose to the factories and restraunts while also implementing currencies and other things.


  • jamesster, McJobless, origamiguy and 6 others thanked this

#23
jamesster

I want to make love to your posts here.
 

I personally plan on using the resources to make a sort of "Open LEGO LOCO" which can recreate the game with proper networking support as well as improved modding ability and maybe a more Sim City like engine which could give purpose to the factories and restraunts while also implementing currencies and other things.

Oh my goodness yes. Also, one of the things I've always wanted to be able to do in Loco is to directly control a minifigure to explore cities, both my own and others on the network. Just sayin'. :3


  • JimbobJeffers and LimeKiller thanked this

#24
shinyquagsire23

shinyquagsire23

    Newbie

  • Members
  • Pip
  • 5 posts

So I finished ripping all the textures in the buildings folder, and I came across an unused building. I think it's rather interesting:

MbHPoDX.png

So apparently the house that could merge into a double house also was meant to merge into a quadruple house. And since a lot of the .dat files have the easter egg implementations I might be able to make a mod that could restore this since the texture is fully intact, although when it's placed via attaching a .but with the same name part of the texture is cut off, although I'm sure that's fixable. Once I get to ripping the paths folder I might actually find the one beta path that can go over train tracks that everyone seems to be talking about.


  • jamesster, McJobless, le717 and 1 other thanked this

#25
JimbobJeffers

I doubt I can express gratitude as well as jamesster, but this is truly epic. Keep at it.

 

Anyone for a Rock Raiders version of LEGO LOCO?



#26
jamesster

Any way to maybe fix the IG tower robot easter egg? Its arms get clipped off.



#27
Tauka Usanake

Tauka Usanake

    Advanced Member

  • Donators
  • PipPipPipPip
  • 291 posts

Any way to maybe fix the IG tower robot easter egg? Its arms get clipped off.

 That would require extending its area as the arms would make the building a 5x3 building from a 3x3, unless you can get overlapping to work and not break things and not break or destroy anything that's taking up those sides including the radar station.

 

Also I need to get on RRU more often as I LOVE THIS.