Skip to content
Snippets Groups Projects

Flipfuncpointers (take two)

Merged toaster requested to merge flipfuncpointers-master into master

Minor optimisations surrounding R_DrawFlippedMaskedColumn.

  • Replace the texheight parameter provided directly to it with a previously existing (now renamed) global used for the same purpose, so that it can be used as an interchangeable function pointer with R_DrawMaskedColumn.
  • Using the above, optimise R_DrawVisSprite to call a function pointer in a tighter loop rather than check SC_VFLIP each time around.
  • SHORT macro can involve repeated operations; calculate once and put in memory for both RANGECHECK and papersprite.
  • Remove irrelevant range check (already covered by existing range check immediately above) from R_DrawFlippedMaskedColumn and R_DrawMaskedColumn.
  • "Warning: avoiding a crash in %s %d" is a terrible error message, and it chips away at the tightness of the loop just for something most people will never see printed. Replace with a PARANOIA I_Error in case someone actively wants to go hunting for its cause.

srb2win_flipfuncpointers.exe

Take two because I originally wrote this as !673 (closed) months ago, but accidentially did a bad merge while working on it which polluted its diff forever. This cherry pick is much cleaner, and can go directly into master.

Merge request reports

Checking pipeline status.

Approval is optional

Merged by avatar (May 3, 2025 2:05pm UTC)

Merge details

  • Changes merged into master with e79d8c78.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading