makepathname() is only ever called with one of two constant string
arguments, in one case (DOS) such that it only does a strncpy(...),
and the other case (non-DOS) expanding "~" to the current user's home
directory. Additional code duplicates realpath() functionality but is
never used.
Use the Lisp type DLword where referring to data stored by Lisp
Access the extern EmCursorBitMap68K directly where appropriate.
Use GETBYTE() macro to correct for endian-ness of host system
when accessing the cursor bitmaps.
Cached cursors can use an ordering strategy that only promotes the
found item if it is third or later in the list since in normal
operation Medley is highly likely to flip back-and-forth between
two cursors.
sdl_bitblt_to_texture2 is an experiment, parallel to sdl_bitblt_to_texture
that only moves as many bits as are required, rather than rounding down(up) to the
nearest (16-bit) word boundary for the start(end) of the line.
Introduces some name changes to make things a little clearer.
Instead of checking "do_invert" at each pixel assignment, assign the
foreground and background colors appropriately when responding to the
(VIDEOCOLOR x) call.
Modify sdl_bitblt_to_texture() so that it does less arithmetic in the inner loop,
including using a table of masks rather than computing 1<<n on each pixel.
Modify sdl_bitblt_to_texture() so that it accesses the Lisp display region
16-bits at a time with the correct ordering for whether we are on a byte-swapped
system or not.
Adds an sdl_blt_to_window_surface() that goes directly from the Lisp bitmap
to the window surface avoiding the intermediate copy. This is only coded for a
scale factor of 1. Uses the intermediate buffer if the scale is not 1.
Corrects an error where the damage rectangle was not properly reset.
Using SDL_LockTexture/SDL_UnlockTexture we can gain more direct access to the pixels of the
texture and update them directly from the Lisp screen bitmap.
At the same time, for both the rendering case and the display surface case,
update the pixel format used to be either the first (presumably preferred?)
format for a texture, or the surface format of the window.
Use the SDL routines to pick out the pixel value for Black and White based on the
destination it will be placed in.
If the preprocessor symbol SDLRENDERING is defined the code operates as
it previously did. In the absence of that, we process the Lisp bitmap
into an intermediate form (as before) but then use SDL bitblt to
redraw the intermediate form on the window's surface.
On startup, bitblt calls may be made for the original screen size
and if the new screen size is smaller than that, we must ensure
that damage notifications are contained within the new screen.
Move definition of min() so we can use it in sdl_notify_damage()