Prev: 40168 Up: Map Next: 40192
40173: Condition: Total The Mass Inside
Used by the routines at Action_AddTheObjectMass and Action_Give.
Returns in A the total mass of the objects inside object A, including what they hold, or 255 on overflow.
Condition_TotalTheMassInside 40173 PUSH BC Set B to zero to add masses.
40174 LD B,0
This entry point is used by the routine at Condition_TotalTheVolumeInside.
Condition_TotalTheMassInside_StartTheTotal 40176 PUSH IX Start the total at zero.
40178 PUSH IY
40180 LD C,0
40182 CALL Condition_AddUpTheObjectsInside Call Condition_AddUpTheObjectsInside to add up the objects inside.
40185 LD A,C Copy the total into A.
40186 POP IY Restore IY, IX and BC from the stack.
40188 POP IX
40190 POP BC
40191 RET Return.
View the equivalent code in;
Prev: 40168 Up: Map Next: 40192