Outils pour utilisateurs

Outils du site


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édentesRévision précédente
Prochaine révision
Révision précédente
agi-game:leisuresuitlarry:reference-timer [2021/05/02 21:23] frateragi-game:leisuresuitlarry:reference-timer [2022/06/09 20:37] (Version actuelle) – [In game Time] frater
Ligne 1: Ligne 1:
-====== Timing and Timers ======+====== Leisure Suit Larry - Timing and Timers ======
  
-Larry is using a lot of timing and timer, their are all handled by logic0.+Larry utilise beaucoup de "timing" et de "timer"ils sont tous gérer à partir de la logic_0
  
 <code c> <code c>
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>
  
-Due to the "unsigned byte" architecture of the AGI virtual machineto avoid loop in timer (when timer goes below 0 their new value is set to '255'not -1); this is due to the fact that AGI doesn't handle negative variables very well.+A cause de l'architecture "unsigned byte" de la Machine Virtuel AGI, un Timer ne peut jamais etre négatif (sa valeur bouclera automatiquement à 255). 
 +Pour éviter les Bugsle programmeur a décider de déclencher ses actions quand le timer atteint seconde restante (au lieu de 0).
  
 ===== In game Time ===== ===== In game Time =====
  
-The timing Handler increase seconds until seconds reach 60(To avoid the "loop" effect).+Les Timing sont incrémentauxet quand ils atteignent 60 (ou plus), l'unité suppérieur (minute, heure) est incrémenté de 1, alors que la seconde est remise à 0. 
 <code c> <code c>
 #define varGameTimeSecond             v115 #define varGameTimeSecond             v115
Ligne 22: Ligne 28:
 #define varGameTimeHour               v119 #define varGameTimeHour               v119
 </code> </code>
-The Time is also handled by variables v119 [H], v116 [M] and v115 [S] those variables are set to start the ingame clock at 10pm and has a special even if reach 4am (larry's kill himself, that the BAD ending of the game). 
  
-To reach this bad ending the player should wait +6h in real time, some screens/logics doesn't affect change in-game time (titleBadEnding and Questionnairesbut the seconds counter is always incremented byte the timeloop.+L'//Heure// dans le jeu est gérer par 3 variables, et débutent à 10pm (10 00 00). 
 +Il y a un test pour définir si l'heure est suppérieur à 4h du matin; dans ce cas, le jeu lance la cinématique de BAD ending (Larry se suicidetoujours Vierge...).
  
-According to the source codeit can be an issue if you're in that room (seconds could be over 60but those 3 screens aren't really play screen.+Pour atteindre cet fin, le joueur doit laisser passer (en temps réel) plus de 6h de jeu; (il peut se déplacer dans la ville, mais les temps de chargement (non calculévont augmenter encore ce temps. 
 + 
 +Il est intéressant de voir que ce //Temps// n'augmente pas pour certaines Room (title, BadEnding and Questionnaires).
  
 ===== Timers ===== ===== Timers =====
    
-Leisure suit larry is using at least 4 differents timers+Leisure suit larry utilise grands "Timers" differents:
  
 ==== 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.+Ce Timer est un timer générique, qui est décrementé à chaque seconde et que la Room Logic peut mettre en place pour déclencher des évènements après un certains temps) e.g. Le chien qui apparait si Larry ne bouge pas en étant en rue...
  
-==== v68 ====+Quand le temps est écoulé (qu'il ne reste qu'une seconde), le Timer Set le flag //boolTimingScriptDone// [f75].
  
 +Toutes les Room Logic peuvent changer ce timer, il est même conseiller de le spécifier dans la section //NewRoom// du script, et d'ensuite attendre que le flag //boolTimingScriptDone// [f75] passe a vrai.
  
-This timer clear part of the line #24 when reach 1 second left.+==== varClearStatusSeconds [v68] ====
  
-It's used to clear bottom line.+Quand ce Timer est écoulé, il efface une partie de la ligne #24 de l'écran.
  
-==== v72 & v71 ====+<code c> 
 +  if (varClearStatusSeconds == 1)                 //  clear lower part of the screen half line (line 24) 
 +    { 
 +    clear.text.rect(24, 0, 24, 15, BLACK); 
 +    } 
 +</code>    
  
-The timing Handler decrease the v71 value until it's reach 0 (it can'nt be negative).+==== varTimerSprayMinutes [v72] & varTimerSpraySeconds [v71] ====
  
-If the v72 is > 0; the handler decrease v72, and reset v71 to 60.+Ce Timer est initialisé à 10 minutes (10:00).
  
-It's somehow related to alcool usage (0:04) and breath spray (10:00)...+Haa le //Breath Spray// tout un programme; quand ce timer est épuisé, il affiche un message pris dans la liste des messages de 157 à 160.
  
-when v71 == 1 and v72 == (timer is over)then handler raise flag f107 and reset f66. +Si la valeur de //varTimerSprayMinutes// [v72] est > 0; le Gestionnaire décrémente //varTimerSprayMinutes// [v72]et mets la //varTimerSpraySeconds// [v71] = 60.
-it display message 157 to 160, and preset the next message in the list, loop to 157 if message > 160.+
  
-==== v80 ==== +Quand //varTimerSpraySeconds// [v71] == 1 et //varTimerSprayMinutes// [v72] == 0, le gestionnaire :
-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.+  * Set le flag //boolMouthSmellBad// [f107]  
 +  * Reset le flag //boolMouthOK// [f66].
  
-When this timer hit 1 second left, the player re-gain the larry's control.+<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>
  
-it's also reset f34 flag.+==== varTimerBreathSpraySeconds [v80] ==== 
 + 
 +Le gestionnaire décrémente ce timer jusqu'à 1. 
 + 
 +Sa valeur est définie quand Larry utilise son spray; quand le flag //boolDisabledRoomJump// (f48) est activ our que //currentRoom// == 0. 
 + 
 +Quand ce timer est expiré (valeur == 1),  
 +  * Le joueur récupère le controle de Larry. 
 +  * Le flag //boolKeepCycling// [f34] est mis a off. 
 + 
 +<code c> 
 +    if (varTimerBreathSpraySeconds == 1) 
 +      { 
 +      reset(boolDisabledRoomJump); 
 +      reset(boolKeepCycling); 
 +      set.view(ego, Larry_StandAndWalk); 
 +      start.motion(ego); 
 +      reset(boolDisablePlayer); 
 +      accept.input(); 
 +      print("Ahhh."); 
 +      } 
 +</code>      
agi-game/leisuresuitlarry/reference-timer.1619983400.txt.gz · Dernière modification : 2021/05/02 21:23 de frater