use unsafe around creating new static sprites, no guarentee that it does it correctly though

This commit is contained in:
Corwin 2022-10-02 18:56:15 +01:00
parent b7448d714e
commit 7143621407

View file

@ -257,7 +257,8 @@ fn handle_collision(
static CHICKEN_PALETTE: Palette16 = static CHICKEN_PALETTE: Palette16 =
Palette16::new([0x7C1E, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); Palette16::new([0x7C1E, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
static CHICKEN_SPRITES: &[Sprite] = &[ static CHICKEN_SPRITES: &[Sprite] = unsafe {
&[
Sprite::new( Sprite::new(
&CHICKEN_PALETTE, &CHICKEN_PALETTE,
&[ &[
@ -312,7 +313,8 @@ static CHICKEN_SPRITES: &[Sprite] = &[
], ],
Size::S8x8, Size::S8x8,
), ),
]; ]
};
static MAP_TILES: [u8; 8 * 17 * 4] = [ static MAP_TILES: [u8; 8 * 17 * 4] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,