Author Topic: [FIXED][Sug][Player] show different cursor when in directional select mode?  (Read 397 times)

0 Members and 1 Guest are viewing this topic.

Offline ccexplore

  • Administrator
  • Posts: 4878
    • View Profile
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.
« Last Edit: May 17, 2019, 10:01:49 am by Nepster »

Offline Nepster

  • Moderator
  • Posts: 1830
    • View Profile
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?

Online namida

  • Administrator
  • Posts: 8826
    • View Profile
    • NeoLemmix Website
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.
My released level packs:
Lemmings Plus Series | Doomsday Lemmings

Offline Nepster

  • Moderator
  • Posts: 1830
    • View Profile
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.

Online namida

  • Administrator
  • Posts: 8826
    • View Profile
    • NeoLemmix Website
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.
My released level packs:
Lemmings Plus Series | Doomsday Lemmings

Online namida

  • Administrator
  • Posts: 8826
    • View Profile
    • NeoLemmix Website
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.
« Last Edit: April 22, 2019, 08:08:01 pm by namida »
My released level packs:
Lemmings Plus Series | Doomsday Lemmings