Commit graph

1487 commits

Author SHA1 Message Date
Bradley Clemetson
cf8f0d4787 Added OpenGL3 define to begin the transformation to modern GL!! 2015-08-08 18:10:10 -07:00
Bradley Clemetson
40cc2ee359 *Fixed building for MAC OS X 2015-08-08 18:10:10 -07:00
Bradley Clemetson
69667d9311 Added SDL2 search config 2015-08-08 18:10:10 -07:00
Bradley Clemetson
58bca4158c Added basic CMakeLists.txt configuration 2015-08-08 18:10:10 -07:00
Bradley Clemetson
bf2a0a3275 Stubbed blank cmake file 2015-08-08 18:10:10 -07:00
Yamagi Burmeister
22a321d462 Fix animated textures on transparent surfaces
As Jack Whitham noticed [0], animated textures freeze at their first
frame if they're on a transparent surface. This can be seen in base3
(Com Centre), for example. At least for the OpenGL renderer this is
caused by the fact that the animation chain is never forwarded if the
texture is bound to a transparent surface. The fix is to do exactly
that...

I can only speculate why the animations on transparent surfaces were
never used / implemented. Maybe performance issues or it was just
forgotten.

0: http://blog.jwhitham.org/2015/04/more-fun-with-floating-point-numbers.html
2015-06-22 21:10:25 +02:00
Yamagi Burmeister
7ddbedc9c5 Enable hudscaling by default
The default value is now -1 aka "auto". If someone wants to disable it
hew can do so in the menu.
2015-06-06 20:56:39 +02:00
Yamagi Burmeister
50ad12ce13 Add a video menu entry to set the HUD scaling factor 2015-06-06 20:45:05 +02:00
Daniel Gibson
b5d810e5d8 Merge pull request #74 from yquake2/fix-max_ospath
Set MAX_OSPATH to 4096 for !Windows + Fixes for that
2015-05-31 18:28:57 +02:00
Daniel Gibson
27bdaa7650 Merge pull request #73 from yquake2/console-history
Yamagi said it's ok
2015-05-31 18:28:18 +02:00
Daniel Gibson
d19cace026 Set MAX_OSPATH to 4096 for !Windows + fixes for that
sounds easy, right?
Except some genius decided to save CVAR_LATCH cvars in buffers of
MAX_OSPATH length into savegames.. so just changing MAX_OSPATH
breaks savegame compatibility.
Fortunately, this assumption only matters in SV_WriteServerFile() and
SV_ReadServerFile() so I worked around it by introducing a
platform-specific LATCH_CVAR_SAVELENGTH (because MAX_OSPATH was 256 on
Windows but 128 on other systems..)
2015-05-23 02:02:27 +02:00
Daniel Gibson
e62776fa08 global console-history instead of per-mod history 2015-05-22 23:42:23 +02:00
Daniel Gibson
c79257b5d8 Don't save consecutive duplicate commands to console history
.. I don't want to scroll through 20x /quit in the history..
2015-05-22 23:36:56 +02:00
Daniel Gibson
1ce9bdba51 Implemented a persistent, per game/mod console history
it's saved in $HOME/.yq2/$mod/history.txt

While I was at it, I made the max number of lines in the history
configurable at compiletime by introducing a NUM_KEY_LINES #define
2015-05-20 14:59:32 +02:00
Daniel Gibson
41ea8879e7 Fix bug with high velocities in vents in 32bit builds, fix #71
See https://github.com/yquake2/yquake2/issues/71
and https://github.com/yquake2/xatrix/issues/4

In ClientThink(), the float value ent->velocity[i]*8 is saved into
a short and if the value is too big for a short, in 32bit gcc builds
the short is set to SHRT_MIN, resulting in the player being pressed
down instead of up.
Now we put the result in a 32bit int first (which should be big enough)
and assign the int to the short. This still overflows, but with -fwrapv
at least in a defined way (most probably the same way the original
binaries did).

And while I was at it, when the game lib is loaded, it prints the date
it was built, this is especially interesting for our Win32 binaries.
2015-05-17 18:52:18 +02:00
Daniel Gibson
4e547feb2c *Really* support K_CAPSLOCK, K_COMMAND, K_POWER, K_PAUSE
we had constants for them in keyboard.h, but no mappings to name strings in
keynames[] in cl_keyboard.c, so they couldn't be bound.
2015-05-10 02:32:27 +02:00
Daniel Gibson
1a9c8704c7 README: It's called m_filter, not in_filter
should fix #69
2015-05-09 00:37:19 +02:00
Daniel Gibson
0b9ac6cb99 Fix "mark keys up when focus is lost" code, fixes #68
It didn't build on SDL1.2 (I though we tested that?!) and didn't work
with SDL2 either.

Now it builds and actually works with both SDL1.2 and 2.0
2015-04-14 00:51:38 +02:00
Daniel Gibson
9265dc8cbe Update README
* remove link to our debian packages, we don't do that anymore
  -> mention debian/ubuntu packages instead
* remove references to libjpeg, we don't use that anymore
* Link to retex pack was broken, replace with our mirror, mention that
  the ones in models.zip suck
* Fix some typos
2015-04-12 17:56:18 +02:00
Daniel Gibson
e6646fb1e4 Bumped version to 5.30 2015-04-11 21:16:47 +02:00
Daniel Gibson
3cd9c76052 Fix fucking misleading comment in FS_AddGameDirectory()
that's not for *numbered* pak's, but all paks starting with "pak"!
2015-04-11 21:04:37 +02:00
Daniel Gibson
544a464eea Implement gamedata loading from binary path
even if $PWD is not the same path as the executable is in, the game
will look for game data in directories next to the executable.
2015-04-11 20:11:42 +02:00
Yamagi Burmeister
d2f7d27ad0 In case of focus loss, mark all keys up
Daniel is more or less sure that a stuck Alt key can occure if the user
switches through several windows by Alt-Tab. That sounds resonable,
because the keyup event for Alt may happen when the focus is not on
Quake II. In that case SDL2 misses it and for Quake II the key stays
down. Solve this by capturing the focus loss event and mark all keys
as up.
2015-03-31 21:23:04 +02:00
Yamagi Burmeister
aff37eda16 Make sure that no key is being marked down
It's apparently not enough to clear key repeats, we'll need to clear
the down states too. Without this Alt stays pressed after toggeling
fullscreen trhough Alt-Enter.
2015-03-30 21:22:55 +02:00
Yamagi Burmeister
02156e03ec Fix fullscreen switch on Alt-Enter
Switching to fullscreen through a SDL2 call is nice, but the renderer
needs to be reinitialized. Without it some things will break, for
example the gamma setting.
2015-03-30 20:57:32 +02:00
Yamagi
06834d1fb5 Merge pull request #65 from Jarvik7/OSX
OSX
2015-03-29 19:14:56 +02:00
jarvik7
2255c15bd9 Fixed app template zip
Removed resource fork
2015-03-29 13:24:16 +09:00
jarvik7
89a7d9d163 Revert OS X removal from README and update 2015-03-29 13:15:43 +09:00
jarvik7
bac4a6a930 Remove more old OS X build cruft
Deleted frameworks from inside the .app template.
Install them with home-brew before compiling:
libogg
libvorbis
libjpeg
openal-soft
sdl2

Note, current compilation is dynamic linking, so the end user will also
need these dependencies installed. Will change to static linking or
copying the libs into the .app through makefile in a future commit.

Unfortunately we can’t generate the whole .app in the makefile as we
are relying on a third party app for the game selector GUI. This could
be replaced in yquake2 code, but I don’t know ObjectiveC :O Maybe it’s
a good opportunity to learn.
2015-03-29 12:34:12 +09:00
jarvik7
150fb8b132 Remove old OS X cruft
This isn’t actually being used.
2015-03-29 12:22:40 +09:00
jarvik7
5eeef2edcc Autodetect architecture in makefile
Can now build a 32bit version.
Note that all your dependencies will also need to support 32-bit.
Install SDL2, libel, libvorbis, openal-soft in Homebrew using
‘--universal’ flag
2015-03-29 12:19:16 +09:00
Daniel Gibson
a96218eb0a Simplify the mouse grabbing/relative mouse mode magic
basically, tell SDL each frame if you want stuff grabbed or not
+ make sure to ungrab when destroying window (e.g. on vid_restart)
2015-03-27 18:56:16 +01:00
Yamagi Burmeister
3f1ced97de Update CHANGELOG again 2015-03-23 12:54:30 +01:00
Yamagi
fe62cd9639 Merge pull request #62 from Jarvik7/master
Re-add OS X support, fix underwater audio filter.
2015-03-23 12:30:14 +01:00
jarvik7
e85b6999a7 Re-add OS X support
No changes to source were needed, just to makefile.
The build process is now also different.
Frameworks are no longer needed, but you will need to get some packages
from Homebrew to compile.

Install homebrew, then get the following packages before compiling.

openal-soft
libogg
libvorbis
sdl2
2015-03-21 16:39:55 +09:00
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