Routines
Prev:
45194
Up:
Map
Next:
45225
45210: Add To Score
Used by the routines at
Process_EnterForestPath
,
Process_CongratulationsGameOver
,
Process_EnterLugsCavern
,
Process_EnterValeOfCuchulainn
,
Process_EnterInnerCourtyard
,
Process_EnterEnchantedHills
,
Process_EnterDeepPoolOfWater
,
Process_EnterBleakMoorland
,
Process_EnterCrystalCavern
,
Process_EnterValeOfRhia
,
Process_EnterCauseway
,
Process_GetUrn
,
Process_GetRope
,
Process_GetCloak
,
Process_ThrowMeatToWolves
,
Process_GiveSaltToGuard
,
Process_BuyMeatFromTraderWithIron
,
Process_GiveRomanToDruid
,
Process_ThrowUrnIntoFire
,
Process_CaptureRoman
,
Process_PlaceLadderAgainstPlatform
,
Process_PlaceSwordOnSlab
,
Process_KillBear
,
Process_KillOxWithSword
and
Action_Sleep
.
Input
A
Points to add
AddToScore
45210
PUSH HL
Stash
HL
on the stack.
45211
LD HL,(42948)
Load *
Score
into
HL
.
45214
ADD A,L
Add the points to the low byte.
45215
DAA
Decimal adjust for BCD (Binary Coded Decimal).
45216
LD L,A
Store the adjusted result.
45217
JR NC,
SaveScore
Jump to
SaveScore
if there was no carry from the addition.
If there was carry, increment the high byte.
45219
INC H
Increment the high byte by one.
SaveScore
45220
LD (42948),HL
Write the updated score back to *
Score
.
45223
POP HL
Restore
HL
from the stack.
45224
RET
Return.
Prev:
45194
Up:
Map
Next:
45225