Commit graph

297 commits

Author SHA1 Message Date
Randy Heit
9d4ba3c7fd - Unraveled the want_native bit in I_CheckNativeMouse somewhat to ensure that it ends up false
when menuactive == MENU_WaitKey, even if you're not in a level.

SVN r3618 (trunk)
2012-05-04 02:16:19 +00:00
Randy Heit
0d302269bb - Fix GCC errors in fb_d3d9.cpp.
SVN r3492 (trunk)
2012-03-30 04:03:46 +00:00
Randy Heit
510838c3c1 - Undo accidental commit of win32video.cpp with test resolution in place.
SVN r3483 (trunk)
2012-03-25 03:08:13 +00:00
Randy Heit
23e88c88c9 - Add 17:10 aspect ratio, for 1024x600 screens.
SVN r3482 (trunk)
2012-03-25 02:57:28 +00:00
Randy Heit
162ad601ba - Fixed bug introduced in r3412: The SetStyle() call needs to come after the scissoring check,
because the latter can flush the quads, including the one SetStyle() just set a style for.

SVN r3429 (trunk)
2012-03-12 01:22:19 +00:00
Randy Heit
76b5e7ef60 - Fixed: D3DFB::DrawTextureV() did not disable the scissor test if it was needed but SetStyle()
decided there was nothing to draw. In practical terms, this means that if your weapon is
  completely invisible, the game would not draw anything outside of the main play area because
  the scissor test would be left on for the entire frame and not just the weapon's quad.

  Making the call to SetStyle() before the scissor check is enough to fix this.

SVN r3412 (trunk)
2012-03-09 00:12:04 +00:00
Randy Heit
d54f9c3616 - Added startup screen customization, courtesy of Gez.
SVN r3375 (trunk)
2012-02-21 19:52:40 +00:00
Christoph Oelckers
5bfcaab25c - separation of software renderer from the rest of the code complete. All external access to the renderer is routed through the FRenderer interface class now, with two exceptions (2D texture drawing to a canvas and polymost testing code) that are handled by #defines.
SVN r3263 (trunk)
2011-07-07 15:37:47 +00:00
Christoph Oelckers
463c276014 - removed more r_ header dependencies from the rest of the code.
SVN r3260 (trunk)
2011-07-06 15:31:05 +00:00
Christoph Oelckers
fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00
Christoph Oelckers
5c6fd66ed5 - rename src/resources to src/r_data.
SVN r3254 (trunk)
2011-07-06 07:35:36 +00:00
Christoph Oelckers
17ed7aaabd - moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.
SVN r3248 (trunk)
2011-07-05 10:02:38 +00:00
Christoph Oelckers
4626492f50 - separated all colormap related code from v_palette.cpp and r_data.cpp into its own file.
SVN r3245 (trunk)
2011-07-03 10:47:35 +00:00
Randy Heit
4b78b07aca - Fixed: D3DFB::Draw3DPart() treated the screen's pitch as if it always equaled the width.
Considering this hasn't been guaranteed since before the D3DFB class was even written, this
  should have never made it in as-is.

SVN r3241 (trunk)
2011-06-18 05:18:28 +00:00
Randy Heit
59b6c5ef5c - Removed a couple warnings about implicit vector truncation reported by fxc. (Apparently, it
also decided to compile some other shaders slightly differently, too.)
- Fixed: The InGameColormap had been designed without taking alpha into consideration.
  As the least likely parameter to be used, desaturation has been moved into a constant
  register to make room for the alpha parameter to live in the vertex's color value.

SVN r3208 (trunk)
2011-05-15 22:30:20 +00:00
Randy Heit
11c24334c5 - Fixed: DDrawFB::Lock() should only act on NeedResRecreate when going from LockCount 0 -> 1.
- Fixed: When DDrawFB::Lock() has to recreate resources, it left the LockCount at 0. This causes
  problems if something else locks it before it is unlocked, because the second locker will
  think it is the first. This happens in R_RenderViewToCanvas(). See DDrawFB::PaletteChanged()
  for the most common reason why Lock() would need to recreate resources.
- Fixed: DDrawFB::CreateSurfacesComplex() had debugging cruft left in that skipped all but the
  last attempts.
- Fixed logging of video debug info to a file to not multiply define dbg.


SVN r3195 (trunk)
2011-05-08 04:35:00 +00:00
Randy Heit
619634c1f8 - Move the call to DrawLetterbox() into D3DFB::Flip() so that it is the last thing that happens
before the scene is presented. Now it properly obscures 2D graphics.

SVN r3183 (trunk)
2011-04-17 04:04:34 +00:00
Randy Heit
d3b44a4172 - Fix errors/warnings from MinGW 4.5.0 (tdm-1).
- Disable the missing field initializers warnings that -Wextra produces from GCC.

SVN r3173 (trunk)
2011-03-29 05:20:33 +00:00
Randy Heit
c52d9ec1b9 - Relax the restriction that display resolutions must be a multiple of 8 so that they only need be even. The software wiping code requires multiples of two, so odd resolutions cannot be supported without requiring hardware-acceleration (which can be toggled off at any time with immediate effects). The code that required multiples of 8 no longer seems to be present, so now people with cheapo 1366x768 laptop panels can run fullscreen properly.
SVN r3166 (trunk)
2011-03-13 04:45:35 +00:00
Christoph Oelckers
231e7a1c6d - added a new render style 'Shadow'. Essentially it's just a black translucent stencil with an alpha of 0.3. The purpose of this style is to be used as a software renderer approximation of GZDoom's spectre effect.
- allow setting 'Shadow' as default fuzz effect
- changed CVAR conversion that strings 'false' and 'true' get evaluated as integers 0 and 1 respectively so that changing boolean CVARs to int does not destroy their values.


SVN r3076 (trunk)
2010-12-25 23:27:26 +00:00
Christoph Oelckers
7e503d2f70 - fixed: D3DFB::Clear used the palette index even when a valid color was passed to it.
SVN r3045 (trunk)
2010-12-16 00:21:13 +00:00
Christoph Oelckers
e7eb43a343 - added Gez's automap patch to mark trigger lines.
SVN r3040 (trunk)
2010-12-15 00:14:42 +00:00
Randy Heit
f7fa3c8dbb - Add a SetCursor() call to I_SetCursor() when the pointer is within the window's client area to
make the pointer change instant instead of waiting until the next mouse event.

SVN r3010 (trunk)
2010-11-19 04:20:33 +00:00
Christoph Oelckers
eded2ef345 - Each IWAD can now define its own config section. Hacx, Harmony and Action Doom2 now do that.
- moved IWAD identification data into a lump in zdoom.pk3.
- rewrote IWAD checking code 

SVN r2943 (trunk)
2010-10-15 15:13:53 +00:00
Christoph Oelckers
9abaaa1785 - added a default cursor for Chex Quest.
- set 'cursor' as default for Action Doom 2. Doom's bunny is probably not the best thing here...
- made cursor user-settable in the menu.



SVN r2855 (trunk)
2010-09-26 07:46:34 +00:00
Christoph Oelckers
3f420c97bd - allow setting the startup screen's title through GAMEINFO lump.
SVN r2850 (trunk)
2010-09-24 14:27:52 +00:00
Christoph Oelckers
3424548bec - skip all mouse move events that come right after switching to native mouse.
Windows sends some when the mouseis ungrabbed even when it does not move.
  This caused the currently selected menu item to get unselected.



SVN r2803 (trunk)
2010-09-16 22:45:12 +00:00
Christoph Oelckers
c948fd08f2 - fixed: GUI mouse events did not take letterboxing into account.
SVN r2788 (trunk)
2010-09-15 21:53:12 +00:00
Christoph Oelckers
5fcac9b5f1 - fixed: The default GetPixelDoubling function in DFrameBuffer returned 1 instead of 0.
- copied a NULL pointer check for screen from GZDoom.


SVN r2776 (trunk)
2010-09-14 20:53:12 +00:00
Christoph Oelckers
579502ab74 - merged menu branch back into trunk.
SVN r2768 (trunk)
2010-09-14 17:28:18 +00:00
Christoph Oelckers
ec0b07b5e2 - added Entryway's AM_Rotate optimization.
SVN r2739 (trunk)
2010-09-10 13:49:08 +00:00
Randy Heit
7bf0cd13a6 - Fixed: The mouse pointer stayed hidden on startup because the CursorState variable was not
set until the mouse was grabbed.

SVN r2662 (trunk)
2010-09-01 04:24:56 +00:00
Randy Heit
c25f206fbb - Disable framebuffer debug spew. All those OutputDebugString messages from DCanvas::DrawLine()'s
Lock and Unlock calls were slowing things down extremely when looking at a software-drawn
  automap.

SVN r2661 (trunk)
2010-09-01 04:13:36 +00:00
Randy Heit
a2573e4bb3 - Fixes to compile with GCC 4.5.0.
SVN r2660 (trunk)
2010-09-01 03:30:18 +00:00
Randy Heit
4b817cfd8b - Fix an ICE when compiling with GCC 4.5.0.
SVN r2659 (trunk)
2010-09-01 03:22:43 +00:00
Christoph Oelckers
9a4abe0915 - merged automap branch into trunk.
SVN r2609 (trunk)
2010-08-27 15:20:05 +00:00
Christoph Oelckers
096edb0817 - move vid_listadapters CCMD into common code.
SVN r2509 (trunk)
2010-08-11 06:31:47 +00:00
Randy Heit
ed5a8e597c - Version bump to 2.5.0.
SVN r2507 (trunk)
2010-08-11 04:01:26 +00:00
Randy Heit
3416a7fc47 - Fix compilation with MinGW + w32api and clean up warnings.
SVN r2505 (trunk)
2010-08-11 03:56:31 +00:00
Randy Heit
6234e7445b - Added m_hidepointer cvar to control whether or not the mouse pointer is hidden when it's
grabbed. At least if the pointer is visible when the debugger break happens, I don't worry
  about it getting stuck hidden. (Note that that seems to be related to Alt+Tabbing out of the
  game and coming back. I wish I knew what's going on.)

SVN r2497 (trunk)
2010-08-08 02:04:47 +00:00
Randy Heit
6000217889 - Hide the cursor by overriding WM_SETCURSOR, as seen in the IDirect3DDEvice9::ShowCursor()
example. Do not modify the window class pointer. I still had an instance where I was left with
  an invisible pointer no matter where I moved it, so hopefully this takes care of that. (edit:
  it doesn't.)

SVN r2496 (trunk)
2010-08-08 01:53:41 +00:00
Randy Heit
d32d8b4f9f - Removed TheInvisibleCursor, since passing NULL to SetCursor() has exactly the same effect.
- Two tweaks to raw mouse input to make it better behaved when the window suddenly has focus
  removed (e.g. because of a debugger break):
  * Keep the pointer centered in the window, as for Win32Mouse. Even though it's not generating
    any traditional input events, it's still moving all over the screen. e.g. If we have focus
    yanked away and you're pressing the right mouse button as it happens, you can suddenly find
    yourself with a popup menu open.
  * Use SetCursorState() like the other mouse modes instead of ShowCursor() to hide the
    pointer. This way, we don't need to worry about being stuck with trying to use the system
    with an invisible pointer, because only the game window will be pointer-less.

SVN r2495 (trunk)
2010-08-08 01:28:20 +00:00
Randy Heit
8d5ca6501a - Add a NULL FrontCopySurface check to D3DFB::GetCurrentScreen, because this can apparently
be NULL when starting with -timedemo or -playdemo. (But it never happened for me in the
  debugger.)

SVN r2474 (trunk)
2010-07-30 03:21:13 +00:00
Christoph Oelckers
545a892faa - added Firebrand's patch to rename 'swap' due to naming conflicts in newer MSVC compilers.
SVN r2449 (trunk)
2010-07-23 21:19:59 +00:00
Randy Heit
e379658143 - Added multimonitor support, as per Tom Seddon's code. vid_adapter controls which one to use,
and vid_listadapters prints them.

SVN r2417 (trunk)
2010-07-08 23:59:45 +00:00
Randy Heit
2090c03d88 - Fixed: D3DFB::GetScreenshotBuffer() must not offset the buffer pointer for letterboxed modes,
since the screenwipe speedup fixes also mean that this function no longer operates directly
  with the front buffer, but rather with a copy that is not letterboxed.

SVN r2355 (trunk)
2010-06-06 04:53:19 +00:00
Randy Heit
e9bbe4f1ff - Added more logging for D3DFB CreateDevice() attempts.
SVN r2329 (trunk)
2010-05-14 04:13:59 +00:00
Randy Heit
24f23718b7 - Added GetHR support to D3DFB for querying the error code when device creation fails.
- Should still check for a NULL device when CreateDevice() returns D3DERR_DEVICELOST.

SVN r2328 (trunk)
2010-05-14 04:06:30 +00:00
Randy Heit
30ec646ba5 - Removed spurious log warnings when retrying in CreateFrameBuffer().
SVN r2327 (trunk)
2010-05-14 03:58:23 +00:00
Randy Heit
b2a4ffc718 - Fixed: IDirect3D9::CreateDevice() can return D3DERR_DEVICELOST if you want exclusive mode and
some other application already has it. While technically this is a failure, the device is
  still created, so we can continue using it anyway.

SVN r2326 (trunk)
2010-05-14 03:54:35 +00:00