Chaosforge Forum

  • November 08, 2024, 17:48
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Mouse in console mode  (Read 7837 times)

Trasnemi

  • Private
  • *
  • Offline Offline
  • Posts: 2
  • Lost Soul
    • View Profile
Mouse in console mode
« on: June 25, 2016, 07:08 »

Enable mouse usage in console mode in the same way as in graphical mode.

Why? It allows:

- precise aiming at enemies behind your LOS
- blind shooting and items and corpse explore in a much more convenient and faster way
- fast travel

EDIT: I am used to console mode and I really like it more then awesome graphical mode. :)
But I am so missing these little mouse features.
« Last Edit: June 27, 2016, 04:47 by Trasnemi »
Logged

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Mouse in console mode
« Reply #1 on: June 28, 2016, 08:37 »

Console mouse is... weird to say the least.  I don't know if the current terminal emulators on Windows can even see the mouse device.  Old school MS-DOS used mouse.com to provide the driver, but I'm not sure if that exists.
Logged
I computed, therefore I was.

MaiZure

  • Marketing/PR Ops Lead
  • Greater Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 827
  • Retired 1-Star General (.993)
    • View Profile
    • Project repository
Re: Mouse in console mode
« Reply #2 on: June 29, 2016, 03:33 »

I agree, this feature would be nice.

This is more to provide background for thelaptop's point:

I don't know if the current terminal emulators on Windows can even see the mouse device.

By default, Windows will callback to the console input buffer with the character cell clicked in whatever character height/width assigned. It is up to the application to properly handle the mouse event.

Old school MS-DOS used mouse.com to provide the driver, but I'm not sure if that exists.

Of course we all know that Windows will laugh at any direct attempt to invoke 'int 33' like mouse.com (.sys) will do. But apps like DOSBOX provide the magic translation between command.com and kernel32. For obvious reasons, this is not a solution: emulating an emulator is a science project.


EDIT: Best case is that mouse is handled in console already (SDL_Console?) and there's an easy translation between console grid points and graphics mode SDL mouse handling. Worst case: Total rebuild -  I wouldn't be surprised if SDL doesn't interface with native consoles and we're left with directly dealing with OS callbacks. Bottom line is that this feature involves work. I recall KK said years ago that console mode is deprecated, so good luck getting it worked on. Full disclosure: I don't really know how DoomRL works: just that it includes SDL.dll.
« Last Edit: June 29, 2016, 04:08 by MaiZure »
Logged
Hell Knight 1st Lt. (.997)
[22/13/9/2/0]

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: Mouse in console mode
« Reply #3 on: June 29, 2016, 15:17 »

DoomRL uses the native windows console. Freepascal however supplies a nice "mouse" unit for mouse in console usage. I might look into it.
Logged
at your service,
Kornel Kisielewicz
Pages: [1]