PDA

View Full Version : Obj Images and Layers


DivineDominion
08-01-2002, 11:15 PM
Hi there!

I'm from germany, so I've got german versions of my games, including MI2. Now I want to view the images of the characters like Guybrush, the Soldier of Phatt, Largo [...] to get a clue of how they look like (using SCUMMRevisited). Now as i noticed, it doesn't work. Only thing that seems to show anything to me are the paths through the 'maps' and the background images themself. all the other things except the palettes are doing nothing right now. As i also noticed on a Screen at the SCUMMRev-HP there are the Titles of the Rooms written next do the LFLF-Thing. In my files, they aren't. I hope it's not just because I got the german version...

Then I want to know how they handled the layers. As I mentioned before, I cannot view the object images or char sets etc, so I have no clue of how the Objects are overdrawing Guybrush, so he walks behind them. If he comes closer to the Player, he can walk before those Objects. How have they handled it?

Cheers,
DivineDominion

checkmate
08-02-2002, 05:21 AM
Can't you just play the game?

Okay, you can't. But if you want to see costumes (that's what they're called), there's a neat program called CostRip you can get from LucasHacks! (http://scumm.mixnmojo.com) .

Anym
08-02-2002, 08:28 AM
And to get the titles for the rooms, download the Annotations from http://scummrev.mixnmojo.com/annot.shtml to you Annot directory.

MadMoose
08-02-2002, 06:57 PM
The annotations on the scummrev site are for the English language versions and won't (as far as I know) work for the German version. But all the rooms should be in the same order so it shouldn't be to difficult to get them working. Just find the offsets of the rooms in your files and put them in the annotation files.

About the layers: In the same block as the background image (in monkey 1 floppy at least) are one or more z-layers. (basically a black and white image of the same dimensions as the room.) When drawing an actor, the engine looks at the actors current walkbox where a mask number is defined and doesn't draw pixels that are behind any of the layers with a lower z-value. The scripts can also set the mask number.

Movable objects and actors are probably just sorted by their y-value (the mask value is probably also used here.)

For further details you can always spend a couple of hours digging through the scummvm sourcecode --- that's what I did :D

MadMoose

checkmate
08-03-2002, 05:25 AM
If you want to see costumes from The Dig or Full Throttle or CMI, check out my AkosView program!

I have no way of knowing whether people are actually downloading that thing, so I just thought I'd recommend it here.

FoboldFKY
08-12-2002, 04:10 AM
I tried searching google, but couldn't find any refrences to your program. I've been dying to get the Murray sprites out of CMI; can you post a link to your program's site/dl please?

Thanks in advance...

Anym
08-13-2002, 01:59 PM
-> http://www.lucasforums.com/showthread.php?threadid=51181 -> http://www.gorman.btinternet.co.uk/Akosview.zip

checkmate
08-13-2002, 09:39 PM
If you really want to rip the images, you'll have to wait a bit. I'm making plans for an internal GIF compressor, but I don't know much about GIF. You could take screenshots with the Print Screen key, but the colors are all wrong.

john_doe
08-14-2002, 03:54 AM
Originally posted by checkmate
If you really want to rip the images, you'll have to wait a bit. I'm making plans for an internal GIF compressor, but I don't know much about GIF. You could take screenshots with the Print Screen key, but the colors are all wrong.

GIF is a bad idea as parts of it (the compression algorithm) is patented and required licensing (i.e. programs that save GIF have to buy a license from Unisys, decompression apparently is free(?)).
I'd just save it as Bmp, easy to implement and no trouble with licenses. I don't know which compiler you made your tool with, but you can usually save a canvas to BMP using internal Win routines (check Win32 help for more info on this).

checkmate
08-14-2002, 05:34 AM
Ack, you're right. I'll follow your advice and do BMP, it's easier anyway. I don't know much about GDI, but I'd be happy to learn more of it. AkosView uses DirectDraw, and is written using Visual C++ 6.

moebius
08-14-2002, 08:45 PM
You can get a reference to an internal GDI graphics context (GC) and then treat your DirectDraw surface with GDI functions, so it's not a problem to save a BMP from your program using GDI. If you don't want to use BMP, you can always use any other free, open image format, like PNG (that supports transparency and lossless compression). You could use the GPL'd "libpng" to treat this great file format ;)

checkmate
08-14-2002, 10:31 PM
That sounds good. AkosView does the GDI device context thing to display things like "Failed to draw cel". Trouble is, if a part of that text is overlapping the cel, it may end up in your screenshot. Of course, I can just blank out the screen and rerender the image. Is there a way to treat a section of a device context like a bitmap?

checkmate
08-15-2002, 01:22 AM
I wrote some code to save the image as a BMP file...upside down! I'll upload the new AkosView when I figure out how to flip it right side up.

john_doe
08-15-2002, 10:42 AM
Originally posted by checkmate
I wrote some code to save the image as a BMP file...upside down! I'll upload the new AkosView when I figure out how to flip it right side up.

IIRC you just have to set a negative height, i.e. -HEIGHT :)
I think this will work (not sure, though).

checkmate
08-15-2002, 04:55 PM
I've flipped the bitmap upside-down (or right-side-up), so that's cool. Sometimes (but very rarely), the saved bitmap is all screwed up. I think AkosView is in for a rewrite, but in the meantime, 0.5 has been released, with the ability to save as a BMP file. Get it here (http://www.gorman.btinternet.co.uk/AkosView0.5.zip) .

I took a screenshot of one of the images I found you probably never see in the game.
http://www.gorman.btinternet.co.uk/akos.gif

You may think it's the CMI interface, but look closely at that hand icon. Weird.

checkmate
08-15-2002, 08:32 PM
You, I, and everyone must always remember some things about the BMP file format!

- The palette is stored in BGR, rather than RGB
- The rows are stored upside-down
- While the image width may not be a multiple of 4, the stored rows in the bitmap are, so you write some trash at the end of each stored row
- To compute the amount of trash you need:
trashCount = (((imgWidth + 3) & ~3) - imgWidth)

That trash thing I didn't implement in 0.5, so 0.6 will fix the screwed-up bitmap problem.