eglaysher / rlvm

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

In Clannad English Edition, waku buttons are misdrawn #69

Closed eglaysher closed 8 years ago

eglaysher commented 8 years ago

We currently draw the text waku buttons on the main window in the wrong place.

eglaysher commented 8 years ago

So, when dumping the GRP table for the surface that represents the buttons (smw00c), all the relevant images start off at the origin:

[0: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 1: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 2: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 3: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 4: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 5: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 6: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 7: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 8: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 9: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 10: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 11: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 12: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 13: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 14: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 15: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 16: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 17: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 18: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 19: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 20: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 21: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 22: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 23: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 24: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 25: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 26: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 27: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 28: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 29: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 30: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 31: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 32: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 33: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 34: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 35: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 36: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 37: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 38: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 39: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 40: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 41: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 42: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 43: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 44: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 45: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 46: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 47: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 48: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 49: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 50: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 51: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 52: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 53: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 54: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 55: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 56: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 57: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 58: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 59: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 60: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 61: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 62: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 63: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 64: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 65: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 66: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 67: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 68: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 69: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 70: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 71: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 72: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 73: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 74: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 75: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 76: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 77: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 78: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 79: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 80: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 81: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 82: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 83: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 84: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 85: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 86: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 87: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 88: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 89: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 90: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 91: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 92: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 93: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 94: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 95: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 96: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 97: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 98: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 99: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 100: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 101: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 102: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 103: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 104: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 105: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 106: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 107: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 108: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 109: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 110: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 111: {x=0, y=0, w=1, h=1, oX=0, oY=0}, 112: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 113: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 114: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 115: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 116: {x=0, y=0, w=85, h=165, oX=0, oY=0}, 117: {x=0, y=0, w=1, h=1, oX=0, oY=0}]

But viewing the underlying image directly, all images are 85x165 and are arranged in a grid; those origins are just incorrect!

(This is actually reminding me of GH-39 / 28e4a60f2af6b4f316cb6a98f89046c2972dd2fd. Look into that angle further.)

eglaysher commented 8 years ago

Like before, I still can't find any explicit signal in the file about when to do this, but theoretically, the images that do this all have just one region copy/pasted throughout the g00 file. I could change the detection code to detect that instead, maybe...