[Scummvm-tracker] [ScummVM :: Bugs] #15303: SCI: LSL5: Timed message skipped during LSL5 coffee scene (symptom of a bigger problem?)

ScummVM :: Bugs trac at scummvm.org
Sun Aug 18 07:06:41 UTC 2024


#15303: SCI: LSL5: Timed message skipped during LSL5 coffee scene (symptom of a
bigger problem?)
-------------------------+-----------------------------------
Reporter:  eriktorbjorn  |       Owner:  (none)
    Type:  defect        |      Status:  new
Priority:  normal        |   Component:  Engine: SCI
 Version:                |  Resolution:
Keywords:                |        Game:  Leisure Suit Larry 5
-------------------------+-----------------------------------
Comment (by eriktorbjorn):

 Experimenting in C (because I lack the tools and expertise to do it in
 SCI), it seems that the method in the non-English versions will work.

 I used this as my test program:

 {{{
 include <stdio.h>
 #include <stdint.h>

 int main() {
         int16_t GameTime = 0;

         do {
                 int16_t ticks = GameTime + 5;
                 int16_t tmp = GameTime;
                 int i;

                 for (i = 0; i < 10; i++) {
                         GameTime++;

                         if (GameTime > ticks) {
                                 if (i < 5)
                                         printf("%d: Method 1 triggered
 prematurely\n", tmp);
                                 if (i > 5)
                                         printf("%d: Method 1 triggered too
 late\n", tmp);
                                 break;
                         }
                 }

                 if (i >= 10)
                         printf("%d: Method 1 never triggered\n", tmp);

                 GameTime = tmp;

                 for (i = 0; i < 10; i++) {
                         int16_t diff;

                         GameTime++;

                         diff = GameTime - ticks;
                         if (diff > 0) {
                                 if (i < 5)
                                         printf("%d: Method 2 terminated
 prematurely\n", tmp);
                                 if (i > 5)
                                         printf("%d: Method 2 terminated
 too late\n", tmp);
                                 break;
                         }
                 }

                 if (i >= 10)
                         printf("%d: Method 2 never triggered\n", tmp);

                 GameTime = tmp;
                 GameTime++;
         } while (GameTime != 0);

         return 0;
 }
 }}}

 Which produced the following output:

 {{{
 32762: Method 1 never triggered
 32763: Method 1 triggered prematurely
 32764: Method 1 triggered prematurely
 32765: Method 1 triggered prematurely
 32766: Method 1 triggered prematurely
 }}}
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15303#comment:28>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list