diff --git a/games/peasant/graphics_peasantry/ned.png b/games/peasant/graphics_peasantry/ned.png index c2e579a8..15f86c14 100644 Binary files a/games/peasant/graphics_peasantry/ned.png and b/games/peasant/graphics_peasantry/ned.png differ diff --git a/games/peasant/graphics_peasantry/ned_tree.png b/games/peasant/graphics_peasantry/ned_tree.png new file mode 100644 index 00000000..c2e579a8 Binary files /dev/null and b/games/peasant/graphics_peasantry/ned_tree.png differ diff --git a/games/peasant/peasant4.s b/games/peasant/peasant4.s index ae51210a..a38b422b 100644 --- a/games/peasant/peasant4.s +++ b/games/peasant/peasant4.s @@ -197,6 +197,12 @@ not_kerrek: jsr check_haystack_exit + ;====================== + ; init ned + ; FIXME: make random + + lda #64 + sta NED_STATUS ;=============================== @@ -224,6 +230,18 @@ game_loop: inc FRAME + ;==================== + ; update ned + + lda NED_STATUS + beq leave_ned_alone + cmp #129 + bcs leave_ned_alone + + inc NED_STATUS + +leave_ned_alone: + ;===================== ; check keyboard @@ -237,10 +255,37 @@ game_loop: jsr kerrek_move_and_check_collision + ;========================== - ; check if lighting on fire + ; draw ned if necessary ;========================== + lda MAP_LOCATION + cmp #LOCATION_WAVY_TREE + bne not_at_wavy_tree + + lda NED_STATUS + bpl ned_not_out + + lda #25 + sta CURSOR_X + lda #88 + sta CURSOR_Y + + lda #ned3_sprite + sta INH + + jsr hgr_draw_sprite + +ned_not_out: +not_at_wavy_tree: + + ;========================================== + ; check if lighting on fire at crooked tree + ;========================================== + lda MAP_LOCATION cmp #LOCATION_BURN_TREES bne not_burn_trees @@ -348,9 +393,9 @@ oops_new_location: jmp new_location - ;************************ + ;======================== ; exit level - ;************************ + ;======================== level_over: ; note: check for load from savegame if change state diff --git a/games/peasant/sprites/Makefile b/games/peasant/sprites/Makefile index a9b81124..e3714a11 100644 --- a/games/peasant/sprites/Makefile +++ b/games/peasant/sprites/Makefile @@ -61,6 +61,10 @@ boat_sprites_fish.inc: boat_sprites.png ned_sprites.inc: ned_sprites.png $(HGR_SPRITE) -s -l rock_moved_sprite ned_sprites.png 7 1 27 12 > ned_sprites.inc + $(HGR_SPRITE) -s -l ned1_sprite ned_sprites.png 28 110 41 121 >> ned_sprites.inc + $(HGR_SPRITE) -s -l ned2_sprite ned_sprites.png 28 128 41 154 >> ned_sprites.inc + $(HGR_SPRITE) -s -l ned3_sprite ned_sprites.png 7 157 41 184 >> ned_sprites.inc + gary_sprites.inc: gary_sprites.png $(HGR_SPRITE) -s -l gary_base_sprite gary_sprites.png 21 98 55 124 > gary_sprites.inc diff --git a/games/peasant/sprites/ned_sprites.png b/games/peasant/sprites/ned_sprites.png index 5c6fd9c3..030d66e5 100644 Binary files a/games/peasant/sprites/ned_sprites.png and b/games/peasant/sprites/ned_sprites.png differ diff --git a/games/peasant/zp.inc b/games/peasant/zp.inc index 5eec55e2..b41f1541 100644 --- a/games/peasant/zp.inc +++ b/games/peasant/zp.inc @@ -165,7 +165,9 @@ GAME_STATE_2 = $99 NED_STATUS = $9A ; 0 = hiding ; 1..127 = countdown to appearing - ; negative = out + ; 128 = hands on tree + ; 129 = half out + ; 130+/negative = out BUSH_STATUS = $9B ; status of bush search BUSH_1_SEARCHED = $01