eglaysher / rlvm

RealLive clone for Linux and OSX
http://rlvm.net
GNU General Public License v3.0
152 stars 26 forks source link

Graphics in the LB ending aren't read correctly #39

Closed eglaysher closed 11 years ago

eglaysher commented 11 years ago

Some g00 Type 2 bitmaps have a weird structure where each of the regions in the file are as large as the main width/height and then write over the data from other regions. The majority of graphical glitches in the LB Refrain ending appear to be caused by this.

(Neither Haeleth's vaconv nor Jagarl's xclannad code load these g00 files correctly; if you use vaconv on these files, you'll find that they draw exactly like rlvm is drawing them.)

After looking at the xclannad source code, the only place I can think of there being additional information I'm not reading is 29 shorts which I'll print out in dumps of various files.

Little Busters' NYED_CT04_01 is representative of a lot of these files. It's a three region g00 file of Masato lying on top of the van, alternating the three regions to animate his clothes.

Width: 296, Height: 78
Region deal: 3
Region deal 2: 3
  Region: 0
    <<x1: 0, y1: 0, x2: 295, y2: 77, OriginX: 147, OriginY: 38 >>
    (1, 8, 8, 288, 64, 147, 38, 296, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 1
    <<x1: 0, y1: 0, x2: 295, y2: 77, OriginX: 147, OriginY: 38 >>
    (1, 0, 8, 296, 70, 147, 38, 296, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 2
    <<x1: 0, y1: 0, x2: 295, y2: 77, OriginX: 147, OriginY: 38 >>
    (1, 0, 8, 296, 70, 147, 38, 296, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

All three regions are equivalent and are the size of the canvas.

In contrast, let's look at CLANNAD_FV's MN_AT_SB03, which is a component of the preferences pane(?).

Width: 111, Height: 72
Region deal: 5
Region deal 2: 5
  Region: 0
    <<x1: 0, y1: 0, x2: 110, y2: 17, OriginX: 0, OriginY: 0 >>
    (1, 0, 0, 111, 18, 0, 0, 111, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 1
    <<x1: 0, y1: 18, x2: 110, y2: 35, OriginX: 0, OriginY: 0 >>
    (1, 0, 0, 111, 18, 0, 0, 111, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 2
    <<x1: 0, y1: 36, x2: 110, y2: 53, OriginX: 0, OriginY: 0 >>
    (1, 0, 0, 111, 18, 0, 0, 111, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 3
    <<x1: 0, y1: 54, x2: 110, y2: 71, OriginX: 0, OriginY: 0 >>
    (1, 0, 0, 111, 18, 0, 0, 111, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  Region: 4
    <<x1: 0, y1: 0, x2: 110, y2: 17, OriginX: 0, OriginY: 0 >>
    (1, 0, 0, 111, 18, 0, 0, 111, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

All the regions in the region table are different and fit within the canvas.