public Portal(byte portalColour, byte[] portalShape, int x, int y) { X = x; Y = y; Shape = portalShape; Attr = new ZXAttribute(portalColour); }
private void DrawMinerWilly(MinerWilly m, RoomData data) { int attr = data.Attributes[m.Y * 32 + m.X]; attr &= 0xF8; // XXXXX--- - bit pattern attr |= 7; // Miner Willy is always white on whatever background we have ZXAttribute attribute = new ZXAttribute((byte)attr); screen.FillAttribute(m.X, m.Y, 2, 2, attribute); screen.DrawSprite(m.X, m.Y, 2, 2, m.Frames[m.Frame]); }
public void Draw() { int attr = _data.Attributes[_player.Y * 32 + _player.X]; attr &= 0xF8; // XXXXX--- - bit pattern attr |= 7; // Miner Willy is always white on whatever background we have ZXAttribute attribute = new ZXAttribute((byte)attr); _screen.FillAttribute(_player.X, _player.Y, 2, 2, attribute); _screen.RowOrderSprite(); _screen.DrawSprite(_player.X, _player.Y, 2, 2, _player.Frames[_player.Frame]); }
public void Draw() { foreach (var key in _roomData.RoomKeys) { if (key.Attr == 255) { continue; } int attr = _roomData.Attributes[key.Position.Y * 32 + key.Position.X]; attr &= 0xF8; // XXXXX--- - bit pattern attr |= key.Attr; ZXAttribute attribute = new ZXAttribute((byte)attr); _screen.SetAttribute(key.Position.X, key.Position.Y, attribute); _screen.DrawSprite(key.Position.X, key.Position.Y, 1, 1, _roomData.KeyShape); } }