[Ohrrpgce] SVN: teeemcee/12903 A new scheme for script handles: slice handles are no longer (quickly) r

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Sun Apr 17 21:22:23 PDT 2022


teeemcee
2022-04-17 21:22:20 -0700 (Sun, 17 Apr 2022)
847
A new scheme for script handles: slice handles are no longer (quickly) reused

Script handles are int32s tagged with their type in the top 5 bits
so that different types of handles have distinct types.

Slice handles no longer count up from 1. They contain an 8-bit check ('ctr')
value so that even when a plotslices() slot is used a different slice handle
will be generated.

The number of slice handles (so by extension the number of slices) is now limited
to 2^21 = 2,097,152. The engine lags fairly badly if you have that many because
there's no way yet to disable AdvanceSlice. Now that we have slice extra data
arrays there's no need to create that many slices.

This means "slice is valid" no longer returns false positives if you pass it
an invalid handle or a previously freed handle, until at least 256*4000=1,024,000
slices are deleted.
---
U   wip/docs/plotdict.xml
U   wip/docs/plotdictionary.html
U   wip/game.bas
U   wip/gglobals.bi
U   wip/moresubs.rbas
U   wip/ohrhelp/sliceedit_scripthandle.txt
U   wip/scriptcommands.bas
U   wip/scriptcommands.bi
U   wip/scriptedit.bas
U   wip/sliceedit.bas
U   wip/slices.bas
U   wip/slices.bi
U   wip/testgame/autotest.hss
U   wip/testgame/autotest.rpgdir/general.reld
U   wip/testgame/autotest.rpgdir/ohrrpgce.gen
U   wip/testgame/autotest.rpgdir/ohrrpgce.hsp
U   wip/testgame/autotest.rpgdir/plotscr.lst
U   wip/whatsnew.txt



More information about the Ohrrpgce mailing list