OpenArena / engine

OpenArena modifications to the ioquake3 engine
http://openarena.ws
GNU General Public License v2.0
212 stars 50 forks source link

Upstream sync #20

Closed sago007 closed 8 years ago

sago007 commented 8 years ago

This is a complete merge of ioqauke3 as it looks now.

I have tested it on my machine and it works great. I have tested a bit of single player, multi player on an old server and ensured that colour 8 still works.

The reason I want to sync this is that I plan to create a builder that regularly builds the Windows and Linux binaries and I wanted an updated Makefile before starting as the old Windows cross compile was semi broken.

However I cannot test the effect this has on @leilei- 's latest changes. So if @leilei- could test this before the pull request is accepted then it would be great.

leilei- commented 8 years ago

Disregard my previous comment, I was accidentally testing -master instead of sync-2016-06-01

Looks like i'm getting compiler errors

DED_CC code/sys/sys_win32.c
DED_CC code/sys/con_win32.c
LD build/release-mingw32-x86/oa_ded.x86.exe
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2f8): undefined referen
ce to `getservbyport@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x37d): undefined referen
ce to `gethostbyaddr@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3f1): undefined referen
ce to `inet_ntoa@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x403): undefined referen
ce to `ntohs@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x437): undefined referen
ce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x501): undefined referen
ce to `WSASetLastError@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x9c0): undefined referen
ce to `htons@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x9f1): undefined referen
ce to `getservbyname@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xa23): undefined referen
ce to `htonl@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xc7f): undefined referen
ce to `gethostbyname@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xddb): undefined referen
ce to `inet_addr@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xe08): undefined referen
ce to `getservbyname@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xe24): undefined referen
ce to `inet_ntoa@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0xe82): undefined referen
ce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x1017): undefined refere
nce to `inet_addr@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x10e4): undefined refere
nce to `gethostbyname@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x11e1): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x1312): undefined refere
nce to `gethostbyname@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x1473): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x1604): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x1d9a): undefined refere
nce to `WSASetLastError@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2040): undefined refere
nce to `ntohs@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x20dc): undefined refere
nce to `ntohs@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x226a): undefined refere
nce to `__WSAFDIsSet@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x228a): undefined refere
nce to `__WSAFDIsSet@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x22b2): undefined refere
nce to `__WSAFDIsSet@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x230a): undefined refere
nce to `recvfrom@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2392): undefined refere
nce to `recvfrom@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x24aa): undefined refere
nce to `recvfrom@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x25d1): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2608): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2641): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2771): undefined refere
nce to `WSASetLastError@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2b0c): undefined refere
nce to `sendto@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2b1b): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2bbc): undefined refere
nce to `sendto@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2c6d): undefined refere
nce to `sendto@24'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2eec): undefined refere
nce to `WSASetLastError@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2f9c): undefined refere
nce to `gethostname@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x2ffc): undefined refere
nce to `WSASetLastError@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x373d): undefined refere
nce to `socket@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3763): undefined refere
nce to `ioctlsocket@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3795): undefined refere
nce to `setsockopt@20'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x37d7): undefined refere
nce to `htons@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x37f1): undefined refere
nce to `bind@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3826): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3833): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3843): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x395e): undefined refere
nce to `socket@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3984): undefined refere
nce to `ioctlsocket@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x39a0): undefined refere
nce to `in6addr_any'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x39b0): undefined refere
nce to `in6addr_any'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x39b9): undefined refere
nce to `in6addr_any'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x39c2): undefined refere
nce to `in6addr_any'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x39ec): undefined refere
nce to `bind@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3a31): undefined refere
nce to `htons@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3a41): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3a7d): undefined refere
nce to `WSAGetLastError@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3a8b): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3c47): undefined refere
nce to `setsockopt@20'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3c7f): undefined refere
nce to `setsockopt@20'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3ca1): undefined refere
nce to `ntohs@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3d14): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3d69): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3da4): undefined refere
nce to `setsockopt@20'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3de5): undefined refere
nce to `socket@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3e00): undefined refere
nce to `gethostbyname@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3e68): undefined refere
nce to `htons@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3e8b): undefined refere
nce to `connect@12'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3ee8): undefined refere
nce to `send@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3f13): undefined refere
nce to `recv@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3f9b): undefined refere
nce to `htons@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3fc2): undefined refere
nce to `send@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x3fed): undefined refere
nce to `recv@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4131): undefined refere
nce to `send@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x415c): undefined refere
nce to `recv@16'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4a42): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4a69): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4a86): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4aa3): undefined refere
nce to `closesocket@4'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4b63): undefined refere
nce to `WSAStartup@8'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4be0): undefined refere
nce to `WSACleanup@0'
build/release-mingw32-x86/ded/net_ip.o:net_ip.c:(.text+0x4dd6): undefined refere
nce to `select@20'
build/release-mingw32-x86/ded/sys_win32.o:sys_win32.c:(.text+0x24e): undefined r
eference to `timeGetTime@0'
build/release-mingw32-x86/ded/sys_win32.o:sys_win32.c:(.text+0x262): undefined r
eference to `timeGetTime@0'

Adding LIBS=-lws2_32 -lwinmm above the #ifeq ($(USE_CONSOLE_WINDOW),0) in the makefile fixes these.

leilei- commented 8 years ago

Quick testing, shows there's more bugs, likely related to the SDL2 changes:

.....I'd want to go back to SDL 1.2 for the windows platform somehow :(

other things I noticed:

What DOES work:

Unless SDL2 can be separated (for *nix/OSX players) while also having support for SDL 1.2 not getting replaced (for all Windows players), this is too immature for the master branch. :/

leilei- commented 8 years ago

Maybe this could be merged over the SDL2 branch instead until something's figured out with windows SDL12 support on that branch (that doesn't break upstream updates and Windows 95 that is). like maybe reverse the commit responsible for SDL2 and ifdef'ing the SDL2 invasions on the files

I had just fixed 95 support not even a day ago, and i'm feeling very bummed out that it's going to break again, as it's my full intention to have OA working where Q3 is also working, without unrealistically anal modern OS dependencies for a few trivial functions like EnumProcesses :/

sago007 commented 8 years ago

I feared this. I looked at it about a month ago to see what it would take to fix the Windows cross compile build (getting libcurl to work again). It was at that time I noticed that the difference in the Makefile was significant and I really wanted to sync it before doing anything. Having two branches living separately for a significantly amount of time is bad. However I did not follow through at the time.

I when read that you had restored Win 95 support and I got scared. It seemed like something that would make a sync significantly harder. I therefore started the sync. I hoped that getting it done sooner than later would allow you to work your magic before forgetting what it took to get it working.

I don't think there is any point ifdefing the SDL2. While none of the cool features of SDL2 is used at the moment, I believe that at some point SDL2's gamecontroller support will be introduced... and it is a vastly improvement over the old joypad support because it can be made to work "out-of-the-box".

I fear that the overhead of sticking to an old version of 1.2 or doing it manually will only get significantly harder as time progresses and hold the project back. I also fear that at one point we cannot get new architectures to work and I fear that some of the really cool features you added will be unportable at that time.

But it is your decision and if you say that we stick to SDL 1.2 I'll just go ahead and fix cross-compiling in the current master.

ghost commented 8 years ago

@sago007: your ioquake merge will push OA forward a lot! Great job! Can/will you create a seperate OA fork? OA2? OA+? Or will you merge your changes into your existing repository OAX? To me there are also too much 'blockers' that will hold back OA development (e.g.: Win95, SDL 1.2 etc.). I'm highly interested in your ioquake merge :thumbsup:

leilei- commented 8 years ago

Win95 and SDL 1.2 aren't holding back any development. Most of the actual development going on have been my art (which isn't platform specific and the project strongly relies on now), gamecode (also not platform specific), and my random randerer changes which has less to do with whatever platform it was for. There is no cause for alarm for forking.

Also, the benefits of merging from upstream are rather exaggerated. The most important things to merge from upstream are buffer overflow fixes. Most of the other changes are renderergl1/gl2 related which don't need to apply here since they're both missing many features. I'm not interested in gl2 anyway since it's less of a pure implementation and the gratuitous shader effects on lowend-targeting assets never look good. The rgl1/rgl2 directories are only there just to keep the tree more complete for avoiding merge issues.

I'm not against including SDL2 if it doesn't mean that Windows has to have it. It's against "if it ain't broke, don't fix it" on that platform and gives me more problems than benefits IMHO. I'm all for preserving all working Windows-specific code. If I really had my way, i'd drop SDL for Windows completely. It worked for Darkplaces :)

If you want to know the biggest blocker to development- it's time; and distractions like having to write this post to address some FUD going on over OS politics and libraries that take away this time...and maybe the fact it's a game of a relatively dead genre that's been on a steady decline since Counter-Strike launched in 2000.. .i'm also well aware of not riding the MOBA-FPS train that's going on right now.

(i'd do the sdl2 reversal+ifdef stuff myself, but my git-fu is insufficient at this time to know how)

sago007 commented 8 years ago

I have created a merge into the SDL2 branch instead. Closing this.