# Setting
-Your commander sends you on an impossible mission.
-Infiltrate the lab and destroy weapon plans.
-The floors are fileld with guards, dogs and other terrible experiments.
-You cannot fail. Good luck.
+It has been 1000 years since the collapse of the ley lines.
+The Empire collapsed due to the loss of magic.
+The world fell into barbarism.
+A new evil is rising in the west.
+You are sent by the local wizard to investiage.
+Infiltrate their base and defeat their leader.
+You are equipped with your bow.
+Good luck.
+You must not fail.
dw act_guard_update_and_draw
dw act_nop
dw act_nop
- dw act_projectile_pistol_update_and_draw
+ dw act_projectile_arrow_update_and_draw
; called when an actor is spawned
; via a map object
dw act_guard_col_res
dw act_nop
dw act_nop
- dw act_projectile_pistol_col_res
+ dw act_projectile_arrow_col_res
; inits an actors
; inputs:
.de ACT_T_GUARD, 1
.de ACT_T_DOG, 1
.de ACT_T_HAZMAT, 1
-.de ACT_T_PISTOL_BULLET, 1
+.de ACT_T_ARROW_BULLET, 1
; actor struct
; act_def
; weapon type for player
.se 0
-.de WT_PISTOL, 1
+.de WT_ARROW, 1
.de WT_RIFLE, 1
; bc: guard
act_guard_col_res:
ld a, [de]
- cp a, ACT_T_PISTOL_BULLET
- jr z, @pistol_bullet REL
+ cp a, ACT_T_ARROW_BULLET
+ jr z, @arrow_bullet REL
ret
-@pistol_bullet:
+@arrow_bullet:
ld hl, act_hp
add hl, bc
#define PLAYER_SPEED 0xE0
-#define PISTOL_TILE 0x86
+#define ARROW_TILE 0x86
#define PLAYER_WALKING_TILE 0x8E
; sets up the player actor
@weapon:
; TODO: draw based on player weapon type
ld de, player
- ld b, PISTOL_TILE
+ ld b, ARROW_TILE
ld c, 0
- ld a, 0x48
+ ld a, 0x46
call actor_draw
ret
-#define PLAYER_SHOOT_DELAY 15
+#define PLAYER_SHOOT_DELAY 32
; shoots the player's current weapon
player_shoot:
ld a, [player_shoot_delay]
or a, l
ret z
- call act_spawn_projectile_pistol_player
+ call act_spawn_projectile_arrow_player
ld a, PLAYER_SHOOT_DELAY
ld [player_shoot_delay], a
-#define PISTOL_SPRITE 0x82
+#define ARROW_SPRITE 0x82
; projectile flags
.se 1
.de PROJECTILE_F_PLAYER, 1
- ; spawns a pistol projectile for player
+ ; spawns a arrow projectile for player
; inputs:
; hl: actor ptr
-act_spawn_projectile_pistol_player:
- ld a, ACT_T_PISTOL_BULLET
+act_spawn_projectile_arrow_player:
+ ld a, ACT_T_ARROW_BULLET
ld [hl], a ; write type
push hl
ret
- ; updates a simple pistol projectile
+ ; updates a simple arrow projectile
; inputs:
; de: actor ptr
-act_projectile_pistol_update:
+act_projectile_arrow_update:
; is this a player actor?
ld hl, act_p0
add hl, de
jp actor_despawn
- ; draws a pistol projectile
+ ; draws a arrow projectile
; inputs:
; de: actor
-act_projectile_pistol_draw:
+act_projectile_arrow_draw:
push de
ld a, 1
call oamalloc
pop de
- ld b, PISTOL_SPRITE
+ ld b, ARROW_SPRITE
ld c, 0
ld a, 0
jp actor_draw
; updates and draws projectile
; for pistosl
-act_projectile_pistol_update_and_draw:
+act_projectile_arrow_update_and_draw:
push de
- call act_projectile_pistol_update
+ call act_projectile_arrow_update
pop de
- jp act_projectile_pistol_draw
+ jp act_projectile_arrow_draw
- ; collision resolution for pistol projectile
+ ; collision resolution for arrow projectile
; inputs:
; de: event origin actor
; bc: projectile
-act_projectile_pistol_col_res:
+act_projectile_arrow_col_res:
ret
; tile 1
.chr 00000000
.chr 00010000
-.chr 00323000
+.chr 00121000
.chr 00030000
-.chr 00000000
-.chr 00000000
-.chr 00000000
+.chr 00030000
+.chr 00030000
+.chr 00303000
.chr 00000000
.chr 00000000
.chr 00000000
.chr 00000000
.chr 00000000
; tile 3
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00030000
-.chr 00033000
-.chr 00000000
-.chr 00000000
-.chr 00000000
+.chr 00003000
+.chr 00020300
+.chr 00020030
+.chr 00200030
+.chr 00200030
+.chr 00020030
+.chr 00020300
+.chr 00003000
.chr 00000000
.chr 00000000
.chr 00000000
; tile 4
.chr 00000000
.chr 00000033
-.chr 00000033
-.chr 00000022
+.chr 00000333
+.chr 00000322
.chr 00000022
.chr 00003111
.chr 00001111
-.chr 00001333
-.chr 00003233
+.chr 00001111
+.chr 00003211
.chr 00000111
.chr 00000333
.chr 00000330
; tile 5
.chr 00000000
.chr 30000000
-.chr 30000000
-.chr 20000000
+.chr 33000000
+.chr 23000000
.chr 20000000
.chr 11300000
.chr 11100000
-.chr 33333000
-.chr 33333300
+.chr 11100000
+.chr 11100000
.chr 11320000
.chr 33000000
.chr 33000000