Skip to content
  • Dino Bollinger's avatar
    Duke3D: improve how labels are loaded into memory and introduce MAXLABELS limit · 382e9fb5
    Dino Bollinger authored and Richard Gobeille's avatar Richard Gobeille committed
    Previous to this commit, the game would hijack the sprite, wall and sector
    arrays to store the label data temporarily, which would get copied into
    freshly allocated arrays once the scripts were fully parsed.
    
    This lead to the maximum number of labels depending on MAXSPRITES.
    This coupling is now removed, and an independent limit MAXLABELS
    has been introduced, which is currently set to 16384.
    
    Additionally, the limit is now checked before character data is loaded
    into memory, rather than afterwards, preventing out of bounds accesses.
    382e9fb5