The sprites

← Dunjunz

The sprites

The game draws everything but the walls of the views and the status panel through plot_sprite, by sprite number: 120 sprites, named in the listings by number (spr_ constants where the code names one). Each sprite's data address, width in bytes and height in rows are in four tables of 120 bytes, sprite_addr_lo (&1AE0), sprite_addr_hi (&1B58), sprite_widths (&1BD0) and sprite_heights (&1C48). The data is stored row by row, each byte two MODE 2 pixels (the left pixel's colour in bits 7, 5, 3 and 1, the right's in bits 6, 4, 2 and 0), and is stored over the screen rather than masked, so black is drawn as black.

This is the official disc's Model B set as the game starts; the tables and the sprite data are the same in Ole's crack and the sideways RAM hack. The tables change while the game runs: a hero going down the exit shrinks their own sprites, and the victory sequence changes some entries and data. The wall sprite, &00, is replaced by each level's own (bytes &280-&2AF of the level file; see level-format.md); the one shown is level 1's. Several numbers share data: the twelve drainer sprites are one picture, and &15, &1A and &77 are the blank sprite.

The pictures use the default MODE 2 palette, which the game never changes, with each pixel twice as wide as it is tall, as on the screen. A sprite marked flashing uses one of colours 8-15, which alternate between two colours; it is drawn in the first.

No. Sprite Name Size (pixels) Data
&00 sprite &00 wall 8×12 wall_sprite (&2D00)
&01 sprite &01 ranger_up_0 8×12 sprite_ranger_up_0 (&2D30)
&02 sprite &02 ranger_up_1 8×12 sprite_ranger_up_1 (&2D60)
&03 sprite &03 ranger_right_0 8×12 sprite_ranger_right_0 (&2D90)
&04 sprite &04 ranger_right_1 8×12 sprite_ranger_right_1 (&2DC0)
&05 sprite &05 ranger_down_0 8×12 sprite_ranger_down_0 (&2DF0)
&06 sprite &06 ranger_down_1 8×12 sprite_ranger_down_1 (&2E20)
&07 sprite &07 ranger_left_0 8×12 sprite_ranger_left_0 (&2E50)
&08 sprite &08 ranger_left_1 8×12 sprite_ranger_left_1 (&19C0)
&09 sprite &09 monster_up_0 8×12; flashing 11 (yellow/blue) sprite_monster_up_0 (&2E80)
&0A sprite &0A monster_up_1 8×12; flashing 11 (yellow/blue) sprite_monster_up_1 (&2EB0)
&0B sprite &0B monster_right_0 8×12; flashing 11 (yellow/blue) sprite_monster_right_0 (&2EE0)
&0C sprite &0C monster_right_1 8×12; flashing 11 (yellow/blue) sprite_monster_right_1 (&2F10)
&0D sprite &0D monster_down_0 8×12; flashing 11 (yellow/blue) sprite_monster_down_0 (&2F40)
&0E sprite &0E monster_down_1 8×12; flashing 11 (yellow/blue) sprite_monster_down_1 (&2F70)
&0F sprite &0F monster_left_0 8×12; flashing 11 (yellow/blue) sprite_monster_left_0 (&2FA0)
&10 sprite &10 monster_left_1 8×12; flashing 11 (yellow/blue) sprite_monster_left_1 (&2FD0)
&11 sprite &11 arrow_up 8×12 sprite_arrow_up (&2C00)
&12 sprite &12 arrow_right 8×12 sprite_arrow_right (&2C30)
&13 sprite &13 arrow_down 8×12 sprite_arrow_down (&2C60)
&14 sprite &14 arrow_left 8×12 sprite_arrow_left (&2C90)
&15 sprite &15 blank 8×12 sprite_blank (&04CF)
&16 sprite &16 sparkle_0 8×12 sprite_sparkle_0 (&2B00)
&17 sprite &17 sparkle_1 8×12 sprite_sparkle_1 (&2B30)
&18 sprite &18 sparkle_2 8×12 sprite_sparkle_2 (&2B60)
&19 sprite &19 sparkle_3 8×12 sprite_sparkle_3 (&2B90)
&1A sprite &1A blank_key_icon 4×3 sprite_blank (&04CF)
&1B sprite &1B key 8×12 sprite_key (&2900)
&1C sprite &1C door_vertical 8×12 sprite_door_vertical (&2CC0)
&1D sprite &1D door_horizontal 8×12 sprite_door_horizontal (&2AC8)
&1E sprite &1E digit_0 4×10 sprite_digit_0 (&2A00)
&1F sprite &1F digit_1 4×10 sprite_digit_1 (&2A14)
&20 sprite &20 digit_2 4×10 sprite_digit_2 (&2A28)
&21 sprite &21 digit_3 4×10 sprite_digit_3 (&2A3C)
&22 sprite &22 digit_4 4×10 sprite_digit_4 (&2A50)
&23 sprite &23 digit_5 4×10 sprite_digit_5 (&2A64)
&24 sprite &24 digit_6 4×10 sprite_digit_6 (&2A78)
&25 sprite &25 digit_7 4×10 sprite_digit_7 (&2A8C)
&26 sprite &26 digit_8 4×10 sprite_digit_8 (&2AA0)
&27 sprite &27 digit_9 4×10 sprite_digit_9 (&2AB4)
&28 sprite &28 treasure 8×12; flashing 11 (yellow/blue), 12 (blue/yellow) sprite_treasure (&2930)
&29 sprite &29 food 8×12 sprite_food (&2960)
&2A sprite &2A cross 8×12 sprite_cross (&0AF0)
&2B sprite &2B teleporter 8×12 sprite_teleporter (&29C0)
&2C sprite &2C trapdoor 8×12 sprite_trapdoor (&2BC0)
&2D sprite &2D magic_user_up_0 8×12 sprite_magic_user_up_0 (&2300)
&2E sprite &2E magic_user_up_1 8×12 sprite_magic_user_up_1 (&2330)
&2F sprite &2F magic_user_right_0 8×12 sprite_magic_user_right_0 (&2360)
&30 sprite &30 magic_user_right_1 8×12 sprite_magic_user_right_1 (&2390)
&31 sprite &31 magic_user_down_0 8×12 sprite_magic_user_down_0 (&23C0)
&32 sprite &32 magic_user_down_1 8×12 sprite_magic_user_down_1 (&23F0)
&33 sprite &33 magic_user_left_0 8×12 sprite_magic_user_left_0 (&2420)
&34 sprite &34 magic_user_left_1 8×12 sprite_magic_user_left_1 (&2450)
&35 sprite &35 barbarian_up_0 8×12 sprite_barbarian_up_0 (&2480)
&36 sprite &36 barbarian_up_1 8×12 sprite_barbarian_up_1 (&24B0)
&37 sprite &37 barbarian_right_0 8×12 sprite_barbarian_right_0 (&24E0)
&38 sprite &38 barbarian_right_1 8×12 sprite_barbarian_right_1 (&2510)
&39 sprite &39 barbarian_down_0 8×12 sprite_barbarian_down_0 (&2540)
&3A sprite &3A barbarian_down_1 8×12 sprite_barbarian_down_1 (&2570)
&3B sprite &3B barbarian_left_0 8×12 sprite_barbarian_left_0 (&25A0)
&3C sprite &3C barbarian_left_1 8×12 sprite_barbarian_left_1 (&25D0)
&3D sprite &3D fighter_up_0 8×12 sprite_fighter_up_0 (&2600)
&3E sprite &3E fighter_up_1 8×12 sprite_fighter_up_1 (&2630)
&3F sprite &3F fighter_right_0 8×12 sprite_fighter_right_0 (&2660)
&40 sprite &40 fighter_right_1 8×12 sprite_fighter_right_1 (&2690)
&41 sprite &41 fighter_down_0 8×12 sprite_fighter_down_0 (&26C0)
&42 sprite &42 fighter_down_1 8×12 sprite_fighter_down_1 (&26F0)
&43 sprite &43 fighter_left_0 8×12 sprite_fighter_left_0 (&2720)
&44 sprite &44 fighter_left_1 8×12 sprite_fighter_left_1 (&2750)
&45 sprite &45 fireball_up 8×12 sprite_fireball_up (&2780)
&46 sprite &46 fireball_right 8×12 sprite_fireball_right (&27B0)
&47 sprite &47 fireball_down 8×12 sprite_fireball_down (&27E0)
&48 sprite &48 fireball_left 8×12 sprite_fireball_left (&2810)
&49 sprite &49 sword_up 8×12 sprite_sword_up (&1700)
&4A sprite &4A sword_right 8×12 sprite_sword_right (&1730)
&4B sprite &4B sword_down 8×12 sprite_sword_down (&1760)
&4C sprite &4C sword_left 8×12 sprite_sword_left (&1790)
&4D sprite &4D axe_up 8×12 sprite_axe_up (&2840)
&4E sprite &4E axe_right 8×12 sprite_axe_right (&2870)
&4F sprite &4F axe_down 8×12 sprite_axe_down (&28A0)
&50 sprite &50 axe_left 8×12 sprite_axe_left (&28D0)
&51 sprite &51 exit 8×12 sprite_exit (&22A0)
&52 sprite &52 key_icon 4×3 sprite_key_icon (&22D0)
&53 sprite &53 drainer_0 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&54 sprite &54 drainer_1 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&55 sprite &55 drainer_2 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&56 sprite &56 drainer_3 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&57 sprite &57 drainer_4 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&58 sprite &58 drainer_5 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&59 sprite &59 drainer_6 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5A sprite &5A drainer_7 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5B sprite &5B drainer_8 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5C sprite &5C drainer_9 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5D sprite &5D drainer_10 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5E sprite &5E drainer_11 8×12; flashing 8 (black/white), 15 (white/black) sprite_drainer (&21D0)
&5F sprite &5F boots 8×12 sprite_boots (&0A00)
&60 sprite &60 helmet 8×12 sprite_helmet (&0A30)
&61 sprite &61 potion 8×12 sprite_potion (&0A60)
&62 sprite &62 weapons 8×12 sprite_weapons (&0AC0)
&63 sprite &63 magic_sword 8×12; flashing 14 (cyan/red) sprite_magic_sword (&0A90)
&64 sprite &64 skull_0 8×12 sprite_skull_0 (&19F0)
&65 sprite &65 skull_1 8×12 sprite_skull_1 (&1A20)
&66 sprite &66 skull_2 8×12 sprite_skull_2 (&1A50)
&67 sprite &67 skull_3 8×12 sprite_skull_3 (&1A80)
&68 sprite &68 skull_4 8×12 sprite_skull_4 (&1AB0)
&69 sprite &69 shield 6×12 sprite_shield (&1800)
&6A sprite &6A small_digit_1 2×5 sprite_small_digit_1 (&1824)
&6B sprite &6B small_digit_2 2×5 sprite_small_digit_2 (&1829)
&6C sprite &6C small_digit_3 2×5 sprite_small_digit_3 (&182E)
&6D sprite &6D small_digit_4 2×5 sprite_small_digit_4 (&1833)
&6E sprite &6E small_digit_5 2×5 sprite_small_digit_5 (&1838)
&6F sprite &6F small_digit_6 2×5 sprite_small_digit_6 (&183D)
&70 sprite &70 small_digit_7 2×5 sprite_small_digit_7 (&1842)
&71 sprite &71 small_digit_8 2×5 sprite_small_digit_8 (&1847)
&72 sprite &72 small_digit_9 2×5 sprite_small_digit_9 (&184C)
&73 sprite &73 chalice 16×24; flashing 11 (yellow/blue), 12 (blue/yellow) sprite_chalice (&1210)
&74 sprite &74 missile_icon 8×3 sprite_missile_icon (&1860)
&75 sprite &75 boots_icon 4×6 sprite_boots_icon (&186C)
&76 sprite &76 level_word 24×8 sprite_level_word (&1878)
&77 sprite &77 blank_boots_icon 4×6 sprite_blank (&04CF)