Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: ccexplore on December 27, 2018, 12:33:01 PM

Title: [FIXED][Sug][Player] show different cursor when in directional select mode?
Post by: ccexplore on December 27, 2018, 12:33:01 PM
I haven't really played NeoLemmix until the recent level solving contest, and multiple times I thought I hit some weird bug where the mouse stops detecting lemmings.  Eventually (as in sometime today), it finally dawned on me that I might have had directional select on, and forgot about it after multiple rewinds and trying different things etc.  The mouse cursor looked like it's not detecting the lemming and it seemed like assignments to the lemming didn't work, when in fact it was just that the lemming was in the wrong direction from the forgotten directional mode.

Now that I know what to look for I won't be confused again, but before that when I didn't know what was happening, I wound up restarting the game, which is a little annoying.  If the mouse cursor looks a little different during directional mode (eg. have an arrow at the left/right over the usual crosshair), this confusion would not have occurred.
Title: Re: [Suggestion][Player] show different cursor when in directional select mode?
Post by: Nepster on December 27, 2018, 03:50:38 PM
Before I am able to fix this, I need some help from namida: How can I compile the various Cursor-Bitmaps into the LemmixResources.res file?
Title: Re: [Suggestion][Player] show different cursor when in directional select mode?
Post by: namida on December 27, 2018, 06:39:25 PM
I couldn't help you there, those have remained unchanged since vanilla Lemmix (partly because I never figured out how it worked - not that I put too much effort into doing so). You might need to ask EricLang on that one.
Title: Re: [Suggestion][Player] show different cursor when in directional select mode?
Post by: Nepster on December 29, 2018, 03:02:01 PM
Thanks. The internet describes a lot of ways to produce these .res files via .rc files (which are just text files with a fancy name), but you have to give each image an internal name. I have not yet decided whether I will try to reconstruct these internal names from the code, or rewrite the whole cursor code to use external graphics.
Title: Re: [Suggestion][Player] show different cursor when in directional select mode?
Post by: namida on December 31, 2018, 07:45:55 PM
From what I can tell, LemmixResources.res's contents are bitmap images - one graphic and one transparency mask per cursor. I'd imagine these could almost as easily be loaded from external BMP files, or even better, generated at runtime from a single external PNG file (either a single one containing all cursors, or one per cursor).

If I remember correctly, the code that loads these images and turns them into cursors is in GameWindow.pas.

Also, if NL code no longer has the source RC file, Lemmix's source code should.
Title: Re: [Suggestion][Player] show different cursor when in directional select mode?
Post by: namida on April 22, 2019, 10:19:10 AM
Commit 3c869d1 moves the cursor graphics to external PNG files (with the following commit removing the old source BMP files). It also implements directional select graphics.

The current code could theoretically be exapnded to include a special icon for "select walkers", other combinations, etc. It could also be used to add a customized menu cursor, if we decide we want mouse support there (which might not be a bad idea). However, it has its limits when adding various special cursors - currently, while it can assemble a cursor graphic from multiple images, it has to pre-generate every possible combination (including with every possible zoom level), which could quickly end up being too slow or using too much memory. I can probably modify this so it at least generates the different zoomed versions on the fly - this might be fast enough to achieve what we want.