Translate this to English
As best I can, this time with pictures and links and stuff:
First, the
VMK database as compiled by ElectricLime.
You go in here, and look up a furniture item. Aladdin's Flying Carpet Chair Color Purple is item 2. So you dig through your browser cache, and find item_2.cct. This is the file that VMK tells Shockwave to call any time it wants to draw item 2. Look further down, and item 188 is also a Flying Carpet Chair. But when you try to find item_188.cct, you can't; it doesn't exist. But you know for a fact that the game has blue Flying Carpet Chairs, so what's going on?
You pull up Macromedia Director, and do a little manipulation to open up item_2.cct*. You are greeted with a handful of image files, including these:
View attachment 2024
View attachment 2026
These two files are labeled 5, and face to the front and to the left. To build view 3 (front and to the right), you mirror the image.
You echo rapper 50 Cent, and ask, "Why isn't this purple?" Take a look at the furnimap file you have in your cache, and see this:
Code:
...
<ITEM CASTS="hof_furni/item_2" CODE="2">
...
<DIR NUM="5">
<BLK HGT="15" SIT="1" WLK="1">
<SPR GFX="item_2_0_0_5_1_0" BGC="BF3DFF" INK="41"/>
<SPR GFX="item_2_0_0_5_2_0"/>
</BLK>
</DIR>
...
</ITEM>
...
So, to give some background, the furniture maps file is an XML file that VMK calls on to build furniture items from the Director files. So when you go to a room with a Purple Flying Carpet facing to the front-left, here's how VMK draws that item:
The game knows it needs item 2 in the database, so it searches the furnimap file for CODE="2". It finds out that the Director file (CAST) it needs is item_2.cct. Then, some lines are skipped until it gets to view (DIR NUM) 5. There is some information about height, sitting, and walking (I think?), and then the game is told what images it needs. These are the two images I posted above. The first is the gray one. For item 2, the game is told that this image has a BGC of BF3DFF, which is computer-speak for a specific shade of purple. To handle this color, the game applies color multiplication to the image. Basically, light gray times purple equals light purple; dark gray times purple equals dark purple; white times purple equals white (because white = 000000); and black times purple equals black (because black = FFFFFF, and colors above that number don't exist). (And no, I have no idea what INK means.) Once the first image is done, it places it on top of the second image, which adds in the fringes and shadow, which are the same color no matter what color the carpet is.
So about that blue chair, item 188? The same procedure applies. The ITEM in the furnimaps file with CODE="188" is exactly the same as the one I just showed you, except with a blue color in place of a purple one. VMK just uses that same Director file, and multiplies the first image by blue.
* = CCT files are protected; you can't read their code, but it's possible to see any media in them using a certain command.