omf2097 / openomf

One Must Fall 2097 Remake
http://www.openomf.org
MIT License
362 stars 35 forks source link

BA, BD, BC, BI, BG tags #317

Closed katajakasa closed 8 years ago

katajakasa commented 8 years ago

Palette transformations in CREDITS scene.

ba = switch of some sort (remapping ?) bi = start index bc = color count bd = pick current frame data as ptr. bg = changes the operation of bc, bi somehow.

for(n = bi, n < bi + bc; n++) {
    pal[n].r = clamp(pal[n].r + bd[n].r + ((bd[n].r - pal[n].r) / 255), 0, 255)
    pal[n].g = clamp(pal[n].g + bd[n].g + ((bd[n].g - pal[n].g) / 255), 0, 255)
    pal[n].b = clamp(pal[n].r + bd[n].b + ((bd[n].b - pal[n].b) / 255), 0, 255)
}

There are some sort of palette tricks when object moves towards the middle of the screen -- it needs to be implemented.

katajakasa commented 8 years ago

Trying to figure out the tags felt kind of pointless, since they are only used in CREDITS.BK and we can more easily just go around these with lighter to implement and run alpha tricks.