Commit graph

69 commits

Author SHA1 Message Date
Daniel Gibson
06ff49c6b6 Restore C++98 compatibility (NULL instead of nullptr)
and print a message when libcurl has been found
2021-07-17 18:24:46 +02:00
Daniel Gibson
21f1ba3161 Script Debugger: Scale script text according to DPI scaling
and scale the breakpoint dots accordingly - now they don't looked all
squashed anymore.

I think ResizeImageList() is more correct now, at least this helped with
the breakpoint dots.
2021-07-16 02:19:27 +02:00
Daniel Gibson
c3d77abd2b Script Debugger: Support line numbers up to 9999
but it's still a bit wonky with DPI-scaling

I also made the rect calculations a bit more intuitive
and removed a misleading comment in my breakpoint list code
2021-07-15 02:31:40 +02:00
HarrievG
764d23a394 - fixed lnr range after zoom/resize 2021-07-14 23:37:28 +02:00
HarrievG
5c3d95efee - Added line nrs to script richedit 2021-07-14 23:32:28 +02:00
HarrievG
b9833e7e6e - Fixed Once Breakpoints
- Send scriptlist on connect.
- upped version info
2021-07-13 20:36:53 +02:00
Daniel Gibson
6211d6e724 Debugger: Implement List of Breakpoints
Double-clicking an entry opens the script at the correct line.
Single-clicking the breakpoint symbol in the list removes the breakpoint,
and so does selecting the breakpoint in the list and pressing the Del key.
2021-07-13 06:12:44 +02:00
Daniel Gibson
fbd188853c Debugger: Make "Filename" colums wider
and "Line" column narrower.

The "Filename" columns weren't wide enough for many script filenames
2021-07-13 06:12:29 +02:00
Daniel Gibson
4172b006cc Debugger: Support OnceOnly-Breakpoints ("Run To Cursor") 2021-07-13 06:11:45 +02:00
HarrievG
d7eff865af - automatically scroll the console output to last line on print 2021-07-05 10:37:29 +02:00
HarrievG
fe162e626f - removed unused onceOnly flag for debugger breakpoints. 2021-07-03 21:46:16 +02:00
HarrievG
784f1d567c - Moved debugger intialistion after GameDll load
- DebuggerServer will not intialize when the additional function FT_UpdateDebugger is not set
2021-07-03 01:14:49 +02:00
HarrievG
ebf53cdc21 rev feedback v1. 2021-07-01 01:09:15 +02:00
HarrievG
d4db77b9ed - Unbreaking Game and GameEdit API / ABI for game debugger use 2021-06-28 23:38:38 +02:00
HarrievG
7e367a0e62 - Added Console input / command exec to debugger 2021-06-21 14:59:28 +02:00
Daniel Gibson
40fa8a7dfa Fix script debugging when server is running on Linux
the script paths were wrong, on Linux they were like
"pak000.pk4/script/doom_util.script" while on Windows it's only
"script/doom_util.script".
Fixed idFileSystemLocal::OSPathToRelativePath() to skip ...pk4/

also fixed GCC compile error in Common.cpp
2021-06-19 21:30:26 +02:00
Daniel Gibson
07da116640 Fix debugger resume 2021-06-19 21:30:26 +02:00
HarrievG
d455ac5223 - set com_editors appropiately when debugger forces connection. 2021-06-19 21:30:26 +02:00
HarrievG
5260de58c4 - fixed command line arguments for game when debugger client launches it. 2021-06-19 21:30:26 +02:00
HarrievG
d7be3964d4 - always accept debugger messages from loopback 2021-06-19 21:30:26 +02:00
HarrievG
02dcd00788 - Hide game window when launching script debugger 2021-06-19 21:30:26 +02:00
HarrievG
8a455c3c7a - Debugger server can be toggled with : com_enableDebuggerServer [1 / 0]
- Added com_dbgClientAdr for debugger server to connect to
- Added com_dbgServerAdr for the debugger client to connect to
2021-06-19 21:30:26 +02:00
Daniel Gibson
2cff2ae137 DebuggerServer: should now also work with SDL1.2 2021-06-19 21:30:26 +02:00
Daniel Gibson
6b6b28a401 Make DebuggerServer portable (use SDL instead of WinAPI) 2021-06-19 21:30:26 +02:00
HarrievG
3ce93c7749 - Debuggersever now always builds, but is disabled by default in runtime.
- use com_enableDebuggerServer=1 to enable debugger server.
2021-06-17 05:44:23 +02:00
HarrievG
5ebda5eab5 - removed clientside use of mBreakprogram ptr 2021-06-17 05:44:23 +02:00
HarrievG
a8709206d8 - Whitespace fix 2021-06-17 05:44:23 +02:00
HarrievG
46157857b5 - Always write 64b program pointer 2021-06-17 05:44:23 +02:00
HarrievG
5e27330233 - 64bit debugger fixes 2021-06-17 05:44:23 +02:00
HarrievG
7a2ccee330 debugger 2021-06-17 05:44:23 +02:00
Daniel Gibson
b054261a0e Make MFC Tools work with MSAA enabled
The problem was that the editors called ChoosePixelFormat() instead of
wglChoosePixelFormatARB() - and the normal ChoosePixelFormat() has no
attribute for MSAA, so if MSAA is enabled (by SDL2 which calls the wgl
variant), ChoosePixelFormat() will return an incomaptible format and
the editors don't get a working OpenGL context.
So I wrote a wrapper around ChoosePixelFormat() that calls the wgl variant
if available, and all the necessary plumbing around that.

While at it, removed the unused qwgl*PixelFormat function pointers and
supressed the "inconsistent dll linkage" warnings for the gl stubs
2021-05-11 00:39:00 +02:00
Daniel Gibson
c3d480afe4 Rename GetWindowScalingFactor() to Win_GetW.., support older Win versions
Minimum required Windows version is XP again (instead of Win10).
Win_GetWindowScalingFactor() tries to use two dynamically loaded functions
from newer windows versions (8.1+, Win10 1607+) and has a fallback for
older versions that also seems to work (at least if all displays have
the same DPI).

Moved the function to win_main.cpp so the dynamically loaded functions
can be loaded at startup; so edit_gui_common.cpp could be removed again.
2021-05-10 03:18:24 +02:00
HarrievG
e67b77ba5d - Wrapped GetDpiForWindow in GetWindowScalingFactor
- Use GetDeviceCaps for dpi on anything else than win10.
2021-05-10 01:09:47 +02:00
HarrievG
86866b73d5 - 4K / DPI aware Tool fixes
- Nullptr guard/Crashfix in material editor : meMainFrame can be null
  when starting immedeatly from commandline.
2021-05-10 01:09:47 +02:00
Daniel Gibson
5f137955ac Make rvGEWindowWrapper (for GUI editor) 64bit clean
it wants to store a pointer to itself in an idWinVar - on 32bit idWinInt
was suitable for that, on 64bit it's not, so instead convert the pointer
to a hex-string and stuff it in a idWinStr

also fix a crash when adding a choiceDef in the gui editor
2021-05-08 07:03:55 +02:00
Daniel Gibson
5dc9b69374 Fix most (according to warnings) remaining 64bit issues in tool code
rvGEWindowWrapper is still TODO - it's not as straightforward, because
it insists on storing a pointer in an idWinVar (using idWinInt), but there
is no idWinVar type for pointers
2021-05-08 05:43:52 +02:00
raynorpat
bd37c3f91a Some additional LONG to LONG_PTR fixes for the tools as well as some warning fixes 2021-05-07 16:06:06 -04:00
raynorpat
d4c3d4a9df Resolve Win32-isms trying to build tools with x64 MSVC 2021-05-06 03:31:56 +02:00
Daniel Gibson
b0e0883f6e Replace libjpeg with stb_image.h
libjpeg is a pain in the ass, especially due to Ubuntu shipping
libjpeg-turbo in jpeg8 mode as their default libjpeg, while every other
distro I checked (including debian!) ships libjpeg-turbo in jpeg6.2 mode

Thankfully stb_image.h exists - just a single header and it even
has a (much!) friendlier API.

It's not like Doom3 (or any of the mods I checked) actually use JPEGs,
but I'm sure if I'd drop support completely, someone would complain
(perhaps rightfully so).
2021-04-27 20:08:59 +02:00
Daniel Gibson
d1b0073582 Try to enforce selected fullscreen resolution
SDL has a bug (at least on Windows) where SDL_CreateWindow() with
SDL_WINDOW_FULLSCREEN doesn't use the configured resolution (if it's
higher than the current desktop resolution).
Try to work around that - based on Yamagi Quake II code.

Also, if GLimp_Init() fails, the "safe mode" fallback is now in
windowed mode instead of fullscreen mode.
2021-01-15 18:24:48 +01:00
Daniel Gibson
31e26856e0 (Hopefully) fix Editors messing up game viewport for good, fix #300
I worked around the issue for the particle editor, but now it turned out
it can also somehow happen when switching from the Radiant to the Engine
(with F2), so I implemented the "proper" fix of restoring
glConfig.vidWidth/Height, that are overwritten in
RenderSystemLocal::BeginFrame(), in RenderSystemLocal::EndFrame().
2020-07-20 05:01:51 +02:00
Daniel Gibson
5c1e1d7708 Fix ParticleEditor's Materialpicker screwing up ViewPort
In short, it uses a idGLDrawableMaterial widget that calls
renderSystem->BeginFrame(w, h); (with w and h being small for the texture
preview window) and BeginFrame() sets glConfig.vidWidth and vidHeight to
w/h and that never got reset to the original value (window width/height).
This breaks everything because for some reason
renderSystem->GetSCreenWidth()/Height() return glConfig.vidWidth/Height
so it will just continue to render everything at that resolution (in a
small rectangle on the lower left corner of the window).
This bug has already existed in Doom3 1.3.1 (but was less noticable because
apparently  when switching away from Doom3 and back to the window it reset
vidWidth/Height to the window resolution)
I only implemented a workaround (restore glConfig.vid* after rendering the
texture preview), it's possible that the same issue exists in other
(probably editor-) code - but a "proper fix" might also break code (and I'm
not super-familiar with the editor code or even just using them)
2019-03-10 05:23:06 +01:00
Daniel Gibson
9a95a2a1cf Building with editor support (on Win w/ VS2017) works \o/
Editor also seems to start, didn't test much further.

Only tested 32bit Windows, I fear the editor code isn't 64bit clean..

I hope I haven't broken anything elsewhere..
2019-01-13 22:52:28 +01:00
Daniel Gibson
c60f630eea GUI Editor code/integration from SteelStorm2, doesn't build yet 2019-01-13 22:12:36 +01:00
Tobias Frost
dbb90b7565 Some spelling error fixes found during Debian build
- s/allready/already
- s/Uknown/Unknown
- s/thier/their
2018-06-30 00:08:45 -01:00
leffmann
c86e394da5 more fixes for Visual Studio 14 2015-10-11 23:27:42 +02:00
Daniel Gibson
51f3acd21a Fix Windows Build with SDL2
for some reason neo/tools/compilers/dmap/optimize.cpp included windows.h
and GL/gl.h before including dmap.h, which indirectly includes qgl.h.

This made things in qgl.h explode - seems like APIENTRYP in the
QGLPROC() macro expanded to bullshit because of some APIENTRYP or
APIENTRY definition in windows.h or GL/gl.h

Those includes are totally unnecessary, dmap.h -> qgl.h already includes
GL/gl.h, indirectly via SDL_opengl.h and in that setup things somehow
are fine.
2015-09-28 04:02:33 +02:00
dhewg
30d5cb16d0 Disable editor related rendering
These use OpenGL calls, which are useless on all platforms without
editor support.
2012-07-20 00:13:05 +02:00
dhewg
9034da11d0 s/ReadLong/ReadInt/ to match the return type 2012-06-28 13:52:24 +02:00
dhewg
94df46637a s/WriteLong/WriteInt/ to match the argument type 2012-06-28 13:52:23 +02:00