The forum has been updated to SMF (2.1.3)! Please be patient as we work to polish up the place and update features as we can.
Started by Daddy Poi's Oily Gorillas, 20, February, 2015, 05:29:34 PM
0 Members and 1 Guest are viewing this topic.
Quote from: Fox on 20, February, 2015, 05:29:34 PMIcon decompressor = This is a simple format that uses the FEDCBA9876543210 list like Format 2 does. When you get a number from this list, that number is moved to slot 0, and the rest of the numbers are pushed over.Bytes can only be decompressed to 00-0F with this format.
QuoteBinary code on left, The bits are varied in length from 1-10 depending on slot number, so that the more currently accessed used numbers which are put in the first slots take fewer bits to reference.
QuoteSo this is used for things like equipment and psynergy icons?
QuoteI assume you mean frequently?
QuoteSo each slot holds a palette index number from 0-F of the global palette?
QuoteHow is the slot order determined when there's an equal amount of pixels of different colors?
QuoteWhen is the end "bit" (%11.1111.1111) used? Is it at the end of each tile? Or the end of a full table of graphics data?
Quote from: Fox on 20, February, 2015, 10:25:18 PMQuoteHow is the slot order determined when there's an equal amount of pixels of different colors?I'm a little confused at what you mean?At the start of the stream, it should always start with this order: FEDCBA9876543210 regardless of the data itself. For every entry that gets decompressed, the value moves to the head (slot 0) and pushes the rest down..... (That way, if you need the same color/palette index again, it just takes one more bit to get it... ("0"))
Quote--.----.---0 = 08038B5C = 0--.----.-001 = 08038d74 = 1--.----.0101 = 08038d4c = 2--.----.1101 = 08038d60 = 3--.----.0011 = 08038d18 = 4--.----.1011 = 08038d04 = 5--.----.0111 = 08038bb4 = 6--.--00.1111 = 08038be8 = 7--.--10.1111 = 08038bf4 = 8--.--01.1111 = 08038c10 = 9--.0011.1111 = 08038c44 = A--.1011.1111 = 08038c58 = B--.0111.1111 = 08038c7c = C00.1111.1111 = 08038cb0 = D10.1111.1111 = 08038cc4 = E01.1111.1111 = 08038ce8 = F11.1111.1111 = End
QuoteAdditionally, it looks like any %0s that come after the last %1 will push everything else to the right by a pixel per %0 (defaults to transparency if no colour is assigned), but I may be wrong on that part. So for example...
Quotex3 = %11, meaning that it will be yellow (fifth colour when including transparency)x5 = %101, meaning that it will be red (second colour)xC = %1100, meaning that it will be yellow, and everything is moved/shifted to the right by two pixels, which basically extends the length of the previous colour (I think?)x1F = %11111, meaning pinkx20 = %100000, meaning black, and everything is shifted by five pixels
QuoteIt looks like you're saying that one can reserve colours for later so they don't have to be recalled every time they are needed, but I'm not really sure I understand how that is done from your explanation.
QuoteAaah, okay. So the colours get rearranged as you use them?
QuoteFEDCBA9876543210For example, if you were getting from slot 8, since the number 8 is found at slot 8, you take that number and move it to the beginning like so:FEDCBA9765432108If you need the number 1, you will now need to get from slot 2... which will move the number to the head of the list, again, as so:FEDCBA9765432081And so forth.
QuoteSlot number at end.
QuoteAh, okay! Yeah, I just wasn't sure because the only time you actually used either the word "color" or "palette" was in the battle background portion, and you just referred to them as slots before then. It wasn't really clear whether you were talking about that or something else, though the x00-x0F reference and Misery asking about the global palette did clear that up for me. Unfortunately, that quote just made things a tad more confusing because it didn't really specify how the colours are referenced, just how they are rearranged. It was also a bit confusing with the use of "frequently/currently," since neither of those really imply that they are arranged as you reference them. All that said, I feel rather confident that I understand it better now.
Quote8-bit: Oh, so that's how I read it? Sweet, thanks!
Quoteso that the more freqently accessed used numbers which are put in the first slots take fewer bits to reference.
Quoterearranging the colours in a way that makes them easier to reference later in the code.
QuoteWhile I understand that doing this manually could be a painful experience, I am definitely willing to put the effort in; besides, I generally do assembly without assemblers or anything like that.
Page created in 0.170 seconds with 24 queries.