Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
C macros for programming various VGA hardware registers are moved out of graphics.c into a new file vgalib.h, where they can be used to create functionality not already built into graphics.c functions.
Also allows vga_drawscanline() to be compiled with OpenWatcom, and included in build. Working on C86.
Removes most __far pointers in vga_drawscanline for tighter code and C86 compatibility.
Rewrites drawhline for OpenWatcom by replacing far pointer VGA access with macros for speed.
@Vutshi, the C macros in vgalib.h can now be used to experiment with XOR drawing using any of the existing graphics functions, without having to burden each function with a specific XOR capability. This means you can turn on VGA hardware XOR drawing mode, execute a graphics function, and then turn it back off - for drawing a pixel with drawpixel, or a horizontal line with drawhline, etc. It will be up to you to turn back off XOR drawing before returning into the main loop.
To add this functionality to some function in render.c, try something like:
I played around a bit like above, here's a screenshot of R_DrawDisk doing XOR drawing with a large brush (this XOR paint modification is not included in this PR):
