diff --git a/collision.py b/collision.py index 1b36807..127330d 100644 --- a/collision.py +++ b/collision.py @@ -63,13 +63,13 @@ class CollisionViewer(QtWidgets.QOpenGLWidget): } else if (type == """ + str(int(PlaneType.ROOF)) + """) { vVertexColor = vec4(1, 0, 0, 1); } else if (type == """ + str(int(PlaneType.WALLZ)) + """) { - vVertexColor = vec4(0, 1, 0, 1); + vBorderColor = vVertexColor = vec4(0, 1.0, 0, 0.2); // TODO } else if (type == """ + str(int(PlaneType.WALLX)) + """) { - vVertexColor = vec4(0, 0.5, 0, 1); + vBorderColor = vVertexColor = vec4(0, 0.5, 0, 0.2); // TODO } else if (type == """ + str(int(PlaneType.CUBE)) + """) { vBorderColor = vVertexColor = vec4(1, 0.5, 0, 0.5); } else if (type == """ + str(int(PlaneType.HITBOX)) + """) { - vBorderColor = vVertexColor = vec4(1, 0.5, 1, 0.7); + vBorderColor = vVertexColor = vec4(1, 0.5, 1, 0.5); } else { vVertexColor = vec4(0.5, 0.5, 0.5, 1); } @@ -177,6 +177,8 @@ class CollisionViewer(QtWidgets.QOpenGLWidget): def paintGL(self) -> None: try: # prevent crashing on level transition self._paintGL() + except KeyboardInterrupt: + sys.exit(0) except: traceback.print_exc() @@ -245,7 +247,10 @@ class CollisionViewer(QtWidgets.QOpenGLWidget): # Mario's hitbox ptrMario = self.dolphin.read_uint32(self.gpMarioOriginal) x, y, z = (self.dolphin.read_float(ptrMario+i) for i in (0x10, 0x14, 0x18)) - bufAlpha += self.makeCylinder(x, y, z, 160, 50, 12) + bufAlpha += self.makeCylinder(x, y, z, 160, 5, 12) # TODO radius=50 + + # Honey skip TODO + bufAlpha += self.makeCylinder(-8250, -930, -7200, 5130, 3042, 60, PlaneType.CUBE) for f in floors: isWater = self.dolphin.read_uint16(f) in [0x100, 0x101, 0x102, 0x103, 0x104, 0x105, 0x4104] @@ -265,7 +270,7 @@ class CollisionViewer(QtWidgets.QOpenGLWidget): for w in walls: ptype = PlaneType.WALLX if self.dolphin.read_uint16(w + 0x4) & 0x8 else PlaneType.WALLZ - bufOpaque += [ + bufAlpha += [ # TODO [self.dolphin.read_float(w + 0x10), self.dolphin.read_float(w + 0x14), self.dolphin.read_float(w + 0x18), ptype], [self.dolphin.read_float(w + 0x1C), self.dolphin.read_float(w + 0x20), self.dolphin.read_float(w + 0x24), ptype], [self.dolphin.read_float(w + 0x28), self.dolphin.read_float(w + 0x2C), self.dolphin.read_float(w + 0x30), ptype]