Opened 14 months ago
Closed 14 months ago
#14644 closed defect (invalid)
SCUMM: The Dig startup calls Scumm::ScummEngine::remapPaletteColor too often
Reported by: | mikrosk | Owned by: | AndywinXp |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | performance | |
Cc: | Game: | The Dig |
Description
This is just another possible performance optimisation. During the initial intro this function is called 10s of million times. Seeing how the intro uses a stable palette most of the time this is very suspicious.
Change History (3)
comment:1 by , 14 months ago
comment:2 by , 14 months ago
Thanks for looking into this!
I have rechecked the runtime / profiler and I was a "bit" off -- the remapPaletteColor() is called 1024 times per room (the first room being the intro's first ~30s). When I let the game run from the beginning for about 3.5 minutes, 8 rooms were switched, resulting in 8192 calls of this function.
I can't say whether it's expected or not, if you think it's OK, feel free to close this issue. I was just afraid whether there isn't some unnecessary mapping done over and over again.
comment:3 by , 14 months ago
Owner: | set to |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Better safe than sorry :D Thanks for the ticket, I have confirmed that all of these calls are made by the SCUMM scripts in order to setup the shadow palette for the current room. I think we can close this, thanks again!
Hiya! I just checked; unless I'm missing something, the calls are made every time a room is changed (which includes the moment before the intro is played). These calls are triggered from script commands so they look pretty much intentional. That is of course, unless I misunderstood the ticket. Let me know!