diff --git a/function.mbt b/function.mbt index 16f24a5..2ceab63 100644 --- a/function.mbt +++ b/function.mbt @@ -55,7 +55,7 @@ pub fn blit( height : Int, flags : BlitFlag, ) -> Unit { - blit_ffi(get_addr(self.inner()), x, y, width, height, flags.to_int()) + blit_ffi(get_addr(self.0), x, y, width, height, flags.to_int()) ignore(self) } @@ -77,7 +77,7 @@ pub fn blit_sub( flags : BlitFlag, ) -> Unit { blit_sub_ffi( - get_addr(self.inner()), + get_addr(self.0), x, y, width, diff --git a/memory.mbt b/memory.mbt index 8750b1e..0c8eebe 100644 --- a/memory.mbt +++ b/memory.mbt @@ -17,7 +17,7 @@ struct Color(UInt) ///| pub fn rgb(color : UInt) -> Color { - color + Color(color) } ///| Sets the color of the palette at the given index. @@ -26,12 +26,11 @@ pub fn rgb(color : UInt) -> Color { /// @param color the color to set pub fn set_palette(index : UInt, color : Color) -> Unit { if index == 0 || index > 4 { - trace("Palette index out of range") panic() } store_i32( address_PALETTE + (index.reinterpret_as_int() - 1) * 4, - color.inner().reinterpret_as_int(), + color.0.reinterpret_as_int(), ) }