Commit graph

1452 commits

Author SHA1 Message Date
Yamagi Burmeister
c1f5f62382 Remove the SDL.h even in !DEDICTED_SERVER builds
It was used for SDL on APPLE only. I just missread the code. :(
2015-03-20 17:45:57 +01:00
Yamagi Burmeister
531ee80ab4 We need to apply the lightmap.
This fixes #61. The issue was found and patched by ppsspp-gamer.
2015-03-20 17:41:52 +01:00
Yamagi Burmeister
533fbb7016 Update doku after OS X removal 2015-03-20 17:33:46 +01:00
Yamagi Burmeister
177b424ba1 Remove Mac OS X support
No, this is not a rage quit but the result of a long discussion. There
are several reasons for us to drop OS X support:

- OS X support was always more or less hacky. For example is was never
  really integrated into the build system and some features like the
  OpenAL sound backend never worked well.
- The OS X support never grew into the new world based upon SDL2.
- It was broken since at least Lion which was released 4 years ago.
- None of the developers has a Mac or plans to buy one. Supporting
  a software for a platform not used by the developers is more or
  less impossible.
- And despite several appeals no one from the OS X community ever
  stept up and send patches.

Removed are:
- Makefile support
- The OpenAL quirks
- The Cocoa bindings
- The framworks

Not removed is:
- Savegame support
- Memory management support
- Platform detection
- OpenGL and SDL includes

So, if someone steps up and does a modern, fully integrated port based
upon SDL2 we're happy to merge it back. The requirements are:
- It must be a clean port, without any hacks
- Full build system integration must be provided
- The port must be maintained even after it was merged. At every release
  binaries must be build, API / ABI changes with new OS X versions must
  be tracked.
2015-03-20 17:33:46 +01:00
Daniel Gibson
47cde06e27 Use stb_image for retexturing support, also support png, no more libjpeg
Retexturing support is now always on (you can still switch it off with
the gl_retexturing  CVAR), as we don't have the additional libjpeg
dependency anymore.

stb_image is used for tga, jpg and the newly supported png, so the
old tga and jpeg loading code has been removed.

I furthermore cleaned up the somehow messy and possibly slightly broken
retexturing selection code in R_FindImage()
2015-03-20 17:33:37 +01:00
Yamagi Burmeister
046ae5c7eb Bump version number to 5.24 2015-03-13 17:59:14 +01:00
Yamagi Burmeister
0cee89bd08 Update the CHANGELOG 2015-03-13 17:38:48 +01:00
Daniel Gibson
6983d5dc3c R_Screenshot(): Write "yq2" image ID
because we can.
This should hopefully work around problems in old versions of gdk-pixbuf
that mistook TGAs without image ID as microsoft .ICO
2015-02-28 21:26:13 +01:00
Christoph Oelckers
d60dfa63bc - only #define GL constant if not already present (most likely only a problem on Windows.) 2015-02-28 20:31:07 +01:00
Christoph Oelckers
0d9a96bcc8 We have 2015 now so restricting textures to 256x256 seems a bit silly on modern hardware.
Check and use GL_ARB_texture_non_power_of_two and use it if present to allow using all textures unscaled. This makes a huge visual improvement since most skins are not power-of-two textures.

Conflicts:
	src/client/refresh/header/local.h
2015-02-28 20:31:07 +01:00
Yamagi Burmeister
104fd04e55 Boot the whole bloody anykeydown mess back in place.
Okay, I tried to solve this issue the gentle way. But apparently it's
not enough to track if a key is down. We must consider if the key is
just down or if it's already repeating... Therefor raise the white flag
and just put the original logic back in place. This may fix issue #57.
2015-01-31 11:23:32 +01:00
Yamagi Burmeister
3eca8d4e32 Use the same Sys_Microseconds() output for all CMDs
When we're building command we must make sure, that all command for
one keystroke will have the timestamp in microseconds. If that's not
the case the command may end up in differend server frames, breaking
things subtile. This may be part of bug #57, but I'm not sure.
2015-01-31 11:18:41 +01:00
Yamagi Burmeister
75280b4be8 Increase anykeydown
If we don't do this the special button state BUTTON_ANY is never
generated and the player can't leave the intermission. This fixes
bug #57.
2015-01-30 17:54:27 +01:00
Yamagi Burmeister
9bda84299c Mark all keys as "up" when the refresher is restarted
This is a less intrusive variant of the old Key_ClearState() function.
When the refresher is restarted or the menu is left, this function is
called to mark all keys as "up". That works around some corner cases
where a key is still marked "down" and thus the first stroke is detected
as a repetition.
2015-01-28 20:55:28 +01:00
Yamagi Burmeister
08f78ec3b5 Set SDL_EnableUNICODE() right after the window is created
This works around a bug in SDL 1.2 were the SDL_EnableUNICODE() state is
reset to false after the window is reacreated. Setting it in the render
backend ensures that no keystrokes are lost. This fixes #56.
2015-01-28 20:42:42 +01:00
Yamagi Burmeister
403d26d520 Process only keys between ASCII 32 and 126 as char events
This fixes bug #55 which ensued from special keys processed as char
and key events if SDL 1.2 was used.
2015-01-21 17:38:21 +01:00
Yamagi Burmeister
59ac327aba Solve some layer violations
- Handling of key combinations like Alt + Return or Shift + Escape
  clearly belong into the frontend. Now that the client won't clear
  the keystates any more it's save to handle them there.

- The 'force_centerview' command belongs into the client move stuff.
  I guess it was part of the backend sinces it messes with mouse
  handling. Since the renderer is now part of the client that's not
  necessary anymore.

- One can argue that +mlook and -mlook belong into client move stuff,
  too. But since we need there calculations in the backend anyway,
  leave things like they are.
2015-01-18 09:31:37 +01:00
Yamagi Burmeister
30fa1c5407 Use character events for some input subsystems
Until now Quake 2 used keysyms aka key events for everything, including
the console and the chat window. Since key events don't reflect if the
shift key is pressed, Quake 2 needed to convert the lower case chars to
upper case char through a hardcoded table. That lead to the problem that
the keyboard layout was utilised for lower case characters only.

Solve this long standing problem by refactoring both the input backend
and the frontends Key_Event() funktion to use character events for most
input subsystem. Character events are generated by SDL and send the
real character.

An example:
- On german keyboards shift and . is : but Quake 2 generated <.
- Now a character event with : is generated and used.

There are at least 3 disadvantes by this approach:
- The backend needs to tell the frontend if a normal character (ASCII
  32 to 126) or a special character is send. Only normal characters can
  be treated as character events.
- There may be some differences between the binding of a key seen
  through the console and seen by the game. If you have a german
  keyboard and bind :, the game may not react to :. This can be worked
  around by editing the config file.
- Users may need to rebind some keys.

Please note that Quake 2 can handle ASCII characters only!
2015-01-18 09:30:53 +01:00
Yamagi Burmeister
db10e0db87 Untangle the input system from the refresher
In the old times the refresher was a stand alone DLL. For performance
reasons and to avoid laggy input parts of the input system were
implemented in this DLL. Now that the renfresher is part of the main
binary and initialized at client startup we can remove most of the
abstractions between input system, refresher and client. Also the
input system can be treated as a normal subsystem.

Changes:
- Untangle the VID_* stuff and the IN_* stuff. The functions
  called by function pointers in in_state are now called directly
  and 'struct in_state' was removed.

- Remove input.h and rename the appropriate backend functions.
  There's no longer a need for an abstraction layer between the
  input backend and the input frontend.

- Move input initialization and shutdown into CL_Init(), like it's
  already done for all other subsystems.

- Remove Key_ClearStates(). I'm pretty sure that's a left over from
  the old Win 9x backends and unnecessary.

- General cleanup.
2015-01-16 18:23:39 +01:00
Yamagi Burmeister
08c0b8e56a Mention gl_modulate 2015-01-03 11:21:32 +01:00
Daniel Gibson
5e33152f6a One entity shooting another should work even if friendly fire is off
In rogue's RHANGAR1 the turret didn't blow up the ceiling when friendly fire
was off, because in ClientTeam() both entities were set to "" (no team),
but OnSameTeam() just did a strcmp() instead of checking this special
case (no team).
We check this now and thus it works. Hooray.
I also refactored ClientTeam() to take the buffer instead of using a
static one and to be static (it's only called by OnSameTeam() anyway).

The savegame table entry for this function was invalid, but it doesn't
need to be saved anyway, so I just deleted it from the table.
2014-11-30 17:58:18 +01:00
Yamagi Burmeister
47634e64e8 Rename the 'ogg volume' functions to 'ogg enable'
These functions never set the OGG volume, the just enables or disabled
OGG playback. Rename them to match their purpose.
2014-10-25 09:40:13 +02:00
Yamagi Burmeister
4d5cb5686d Rename the "cdvolume" functions to "cdenable"
Historicaly this functions were used to adjust the cd music volume. In
YQ2 they were converted to enable or disable the cd music. Change their
name to match their current purpose.
2014-10-25 09:31:44 +02:00
Yamagi Burmeister
b546fda341 Add OS X maintainance to the list of open tasks 2014-10-25 09:19:06 +02:00
Yamagi Burmeister
7742cd4893 Fix indention 2014-08-24 10:26:50 +02:00
Yamagi Burmeister
bffed68b2c Simplify preprocessor magic and fix dedicated server build 2014-08-24 10:24:05 +02:00
Yamagi
637aae9021 Merge pull request #50 from bibendovsky/lpf
Fix underwater sfx in demos
2014-08-23 16:42:07 +02:00
bibendovsky
120bb86458 Simplify PM_CalculateWaterLevelForDemo 2014-08-18 19:21:45 +03:00
bibendovsky
74c8c60e38 Turn off underwater sfx on disconnect 2014-08-17 18:58:26 +03:00
bibendovsky
1a514560da Fix underwater sfx in demos 2014-08-03 19:32:56 +03:00
Yamagi Burmeister
0ac4fdccfc A comparision "array != NULL" is always true 2014-08-03 11:10:22 +02:00
Yamagi Burmeister
f6a48b44bf Use the correct abs() flavor 2014-08-03 10:49:33 +02:00
Yamagi Burmeister
c0b27a8bb4 Revert "OpenGL-ES converstion"
This reverts commit 70eef55ab5.

It was premature to merge this commit into HEAD. Maybe we'll try again
one day, but only if a complete and fully working patch with build
system integartion is provided.
2014-08-03 09:34:32 +02:00
Yamagi
cd42264857 Merge pull request #49 from rohitnirmal/typos
Fix some typos.
2014-08-02 09:06:09 +02:00
Rohit Nirmal
77492cd2f1 Fix some typos. 2014-07-30 20:58:09 -05:00
Yamagi Burmeister
924cad6bdf Typos 2014-07-30 21:49:35 +02:00
Yamagi Burmeister
72dfb27ef7 Mention openal32.dll. 2014-07-26 11:49:07 +02:00
Yamagi Burmeister
5a7950683d Rewrite COM_FileExtention()
COM_FileExtension() was parsing strings from beginning to end, bailing
out as soon as '.' was found and treating everything thereafter as the
file extension. That behavior caused problem with relatives pathes like
models/monsters/tank/../ctank/skin.pcx. The new implementation uses
strrchr() to determine the last '.'.

This fixes issue #48. The bug was introduced in e07294b which replaced
hand rolled code with COM_FileExtention().
2014-07-24 21:03:00 +02:00
Yamagi Burmeister
87ba687f14 Update the CHANGELOG 2014-06-25 16:11:41 +02:00
Yamagi Burmeister
c7d557a7a9 Document the 2D artwork scaling 2014-06-25 16:05:15 +02:00
Yamagi Burmeister
3fc549ca42 Implement scaling of several non-menu elements
- The loading plaque
- The pause plaque
- The "Quit Screen"
2014-06-24 19:39:18 +02:00
Yamagi Burmeister
af70f276a9 Implement scaling of the menu
This commit has some drawbacks:
- It's rather hacky. The Quake II menu is crap and was never intended
  to be scaled. My approach was to add scaling to most of the generic
  functions and handle all the special cases in the non generic parts
  of the menu. A better solution would require to rewrite at least
  parts of the menu. And like it's said in qmenu.c: I won't do that.
- Some menu elements are aligned to the right, others to the left. In
  many places magic numbers are used to align elements by hand. This
  makes it very hard to impossible to implement a scaling logic which
  works in all situations. With this approach most menus look good up
  to at least a scaling factor of 3. Especially the "Player Setup"
  menu is very problematic at small disalignements are unavoidable.

Please note, that only the menu system itself is scaled. Some elements
like the the "Quit Screen" or the loading plaque are still missing. They
will be done in a later commit.
2014-06-24 19:39:10 +02:00
Yamagi Burmeister
2795088e86 Initialize the screen handling code before the renderer
This change is needed to break a otherwise fatal cycle:
- The renderer calls VID_MenuInit()
- VID_MenuInit() calls SCR_GetMenuScale()
- SCR_GetMenuScale() relies on gl_menuscale which is still
  uninitialized at this time.
2014-06-24 19:11:53 +02:00
Yamagi Burmeister
97139029b0 Implement gl_menuscale 2014-06-24 19:11:46 +02:00
Yamagi Burmeister
61667bd03d Decouple gl_hudscale and gl_consolescale 2014-06-23 08:09:01 +02:00
Yamagi Burmeister
869ce24922 Hide console scaling behin gl_consolescale
With this change it's possible to scale the HUD but not the console.
And vice versa.
2014-06-21 18:54:57 +02:00
Yamagi Burmeister
074891a8a2 Implement gl_hudscale for the console
After this change the HUD scaling is applied to the console and notify
messages. This was requested by many users.
2014-06-21 18:17:12 +02:00
Yamagi
25e29eed3f Merge pull request #45 from bibendovsky/lpf
Add underwater sfx for SDL backend
2014-06-21 17:16:48 +02:00
bibendovsky
c1a3526a67 Add underwater sfx for SDL backend 2014-06-16 08:45:39 +03:00
Yamagi
4d4c578071 Merge pull request #43 from bibendovsky/master
Fixies for OpenAL, Visual C++ compiling, retexturing, mouse input
2014-06-14 17:53:52 +02:00