agi-game:leisuresuitlarry:reference-timer

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
agi-game:leisuresuitlarry:reference-timer [2021/05/02 21:23] frateragi-game:leisuresuitlarry:reference-timer [2021/05/02 21:40] – [v72 & v71] frater
Ligne 8: Ligne 8:
 #define varClearStatusSeconds         v68 #define varClearStatusSeconds         v68
 #define varTimerSpraySeconds          v71 #define varTimerSpraySeconds          v71
 +#define varTimerSprayMinutes          v72
 #define varTimerBreathSpraySeconds    v80 #define varTimerBreathSpraySeconds    v80
 #define varSecondsSinceKeystroke      v91 #define varSecondsSinceKeystroke      v91
 +#define varGameTimeSecond             v115
 +#define varGameTimeMinute             v116
 +#define varGameTimeHour               v119
 </code> </code>
  
Ligne 33: Ligne 37:
  
 ==== varTimingDelay [v67] ==== ==== varTimingDelay [v67] ====
-This timer only raise (Set) the boolTimingDelayOut [f75] when reach 1 second left (not 0, to avoid loop to 255 (-1) value). 
  
-The logic change the variable to what value they want to wait, and pool the boolTimingDelayOut  [f75] flag for raise.+<code c> 
 +#define varTimingDelay                v67 
 +</code>
  
-The timing Handler decrease the value until it's reach 1.+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).
  
-==== v68 ====+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.
  
-This timer clear part of the line #24 when reach 1 second left.+The timing Handler decrease the value until it's reach 1. 
 + 
 +==== varClearStatusSeconds [v68] ==== 
 + 
 +This timer is used to clear part of the line #24 when reach 1 second left.
  
 It's used to clear bottom line. It's used to clear bottom line.
  
-==== v72 & v71 ====+<code c> 
 +  if (varClearStatusSeconds == 1)                    lear lower part of the screen half line (line 24) 
 +    { 
 +    clear.text.rect(24, 0, 24, 15, BLACK); 
 +    } 
 +</code>     
 +==== varTimerSprayMinutes [v72varTimerSpraySeconds [v71====
  
-The timing Handler decrease the v71 value until it's reach 0 (it can'nt be negative).+The timing Handler decrease the //varTimerSpraySeconds// [v71value until it's reach 0 (it can'nt be negative).
  
-If the v72 is > 0; the handler decrease v72, and reset v71 to 60.+If the //varTimerSprayMinutes// [v72is > 0; the handler decrease //varTimerSprayMinutes// [v72], and reset //varTimerSpraySeconds// [v71to 60.
  
-It's somehow related to alcool usage (0:04) and breath spray (10:00)...+It's somehow related to breath spray (10:00)..
 + 
 +when v71 == 1 and v72 == 0 (timer is over), then handler raise flag //boolMouthSmellBad// [f107] and reset //boolMouthOK// [f66].
  
-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.
  
 +<code c>
 +    if (varTimerSprayMinutes > 0 && 
 +        varTimerSpraySeconds <= 0)
 +      {
 +      --varTimerSprayMinutes;
 +      varTimerSpraySeconds = 60;  
 +      }
 +        
 +      
 +    if (varTimerSpraySeconds == 1 && 
 +        varTimerSprayMinutes <= 0)
 +      {
 +      reset(boolMouthOK);
 +      set(boolMouthSmellBad);
 +      print.v(varMouthMessage);
 +      ++varMouthMessage;
 +      if (varMouthMessage > 160)
 +        {
 +        varMouthMessage = 157;
 +        }
 +      }
 +</code>
 ==== v80 ==== ==== v80 ====
 The timing Handler decrease the value until it's reach 1. The timing Handler decrease the value until it's reach 1.
  • agi-game/leisuresuitlarry/reference-timer.txt
  • Dernière modification : 2022/06/09 20:37
  • de frater