- SW: code/data pointer saving cleanup.

* a large number of code pointer records were removed because none of these functions ever gets assigned to a pointer
* instead of looking up entries by index, do it by name. This is far less fragile and will survive deeper refactoring. The old storage by table index will break as soon as a single entry gets removed.

Since the old savegames got broken due to this problem recently it was a good time to change the setup.
This commit is contained in:
Christoph Oelckers 2021-11-11 23:28:28 +01:00
parent f109f6c857
commit 8f19dc12d8
35 changed files with 50 additions and 413 deletions

View file

@ -7532,8 +7532,6 @@ void CheckFootPrints(PLAYERp pp)
static saveable_code saveable_player_code[] =
{
SAVE_CODE(DoPlayerSlide),
//SAVE_CODE(DoPlayerBeginSwim),
//SAVE_CODE(DoPlayerSwim),
SAVE_CODE(DoPlayerWade),
SAVE_CODE(DoPlayerBeginWade),
SAVE_CODE(DoPlayerBeginCrawl),
@ -7550,11 +7548,8 @@ static saveable_code saveable_player_code[] =
SAVE_CODE(DoPlayerBeginClimb),
SAVE_CODE(DoPlayerClimb),
SAVE_CODE(DoPlayerBeginDie),
//SAVE_CODE(DoPlayerDie),
//SAVE_CODE(DoPlayerBeginOperateBoat),
SAVE_CODE(DoPlayerBeginOperateVehicle),
SAVE_CODE(DoPlayerBeginOperate),
//SAVE_CODE(DoPlayerOperateBoat),
SAVE_CODE(DoPlayerOperateVehicle),
SAVE_CODE(DoPlayerOperateTurret),
SAVE_CODE(DoPlayerBeginDive),