Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
agi-game:leisuresuitlarry:reference-timer [2021/05/02 21:27] – [v68] frater | agi-game:leisuresuitlarry:reference-timer [2021/05/02 21:42] – [varTimerBreathSpraySeconds [v80]] frater | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
#define varClearStatusSeconds | #define varClearStatusSeconds | ||
#define varTimerSpraySeconds | #define varTimerSpraySeconds | ||
+ | #define varTimerSprayMinutes | ||
#define varTimerBreathSpraySeconds | #define varTimerBreathSpraySeconds | ||
#define varSecondsSinceKeystroke | #define varSecondsSinceKeystroke | ||
+ | #define varGameTimeSecond | ||
+ | #define varGameTimeMinute | ||
+ | #define varGameTimeHour | ||
</ | </ | ||
Ligne 33: | Ligne 37: | ||
==== varTimingDelay [v67] ==== | ==== varTimingDelay [v67] ==== | ||
+ | |||
+ | <code c> | ||
+ | #define varTimingDelay | ||
+ | </ | ||
+ | |||
This timer is used by any room logic to set a timer (example, if larry won't move, after few second the dog came in). | This timer is used by any room logic to set a timer (example, if larry won't move, after few second the dog came in). | ||
- | This timer only raise (Set) the boolTimingScriptDone [f75] when reach 1 second left (not 0, to avoid loop to 255 (-1) value). | + | This timer only raise (Set) the //boolTimingScriptDone// [f75] when reach 1 second left (not 0, to avoid loop to 255 (-1) value). |
- | Any room logic can change the variable to what value they want to wait, and pool the boolTimingScriptDone [f75] flag for raise. | + | Any room logic can change the variable to what value they want to wait, and pool the //boolTimingScriptDone// [f75] flag for raise. |
The timing Handler decrease the value until it's reach 1. | The timing Handler decrease the value until it's reach 1. | ||
Ligne 47: | Ligne 56: | ||
It's used to clear bottom line. | It's used to clear bottom line. | ||
- | ==== v72 & v71 ==== | + | <code c> |
+ | if (varClearStatusSeconds | ||
+ | { | ||
+ | clear.text.rect(24, | ||
+ | } | ||
+ | </ | ||
+ | ==== varTimerSprayMinutes [v72] & varTimerSpraySeconds [v71] ==== | ||
+ | |||
+ | The timing Handler decrease the // | ||
- | The timing Handler decrease | + | If the // |
- | If the v72 is > 0; the handler decrease v72, and reset v71 to 60. | + | It's somehow related |
- | It's somehow related to alcool usage (0:04) and breath spray (10:00)... | + | when v71 == 1 and v72 == 0 (timer is over), then handler raise flag // |
- | when v71 == 1 and v72 == 0 (timer is over), then handler raise flag f107 and reset f66. | ||
it display message 157 to 160, and preset the next message in the list, loop to 157 if message > 160. | it display message 157 to 160, and preset the next message in the list, loop to 157 if message > 160. | ||
- | ==== v80 ==== | + | <code c> |
+ | if (varTimerSprayMinutes > 0 && | ||
+ | varTimerSpraySeconds <= 0) | ||
+ | { | ||
+ | --varTimerSprayMinutes; | ||
+ | varTimerSpraySeconds | ||
+ | } | ||
+ | |||
+ | |||
+ | if (varTimerSpraySeconds | ||
+ | varTimerSprayMinutes <= 0) | ||
+ | { | ||
+ | reset(boolMouthOK); | ||
+ | set(boolMouthSmellBad); | ||
+ | print.v(varMouthMessage); | ||
+ | ++varMouthMessage; | ||
+ | if (varMouthMessage > 160) | ||
+ | { | ||
+ | varMouthMessage = 157; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | ==== varTimerBreathSpraySeconds [v80] ==== | ||
The timing Handler decrease the value until it's reach 1. | The timing Handler decrease the value until it's reach 1. | ||
- | It's started when Larry use his breath spray when boolDisabledRoomJump (f48) is set or in the currentRoom 0. | + | It's started when Larry use his breath spray when //boolDisabledRoomJump// (f48) is set or in the currentRoom 0. |
When this timer hit 1 second left, the player re-gain the larry' | When this timer hit 1 second left, the player re-gain the larry' | ||
- | it's also reset f34 flag. | + | it's also reset // |
+ | |||
+ | <code c> | ||
+ | if (varTimerBreathSpraySeconds == 1) | ||
+ | { | ||
+ | reset(boolDisabledRoomJump); | ||
+ | reset(boolKeepCycling); | ||
+ | set.view(ego, | ||
+ | start.motion(ego); | ||
+ | reset(boolDisablePlayer); | ||
+ | accept.input(); | ||
+ | print(" | ||
+ | } | ||
+ | </ |