Commit graph

32 commits

Author SHA1 Message Date
Kp b4556d13fa Move UDP_netgame_info_lite into D1||D2
UDP_netgame_info_lite has a member that is only defined if D1||D2.
Guard the whole structure since it cannot be used in common code.
2015-10-13 02:43:24 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Matt Vandermeulen a59daa64c6 ಠ_ಠ 2015-03-20 17:31:22 -04:00
Kp 1580a274f2 Use array<> for net_udp buffers 2015-02-28 19:36:01 +00:00
zico eef3dc03a7 Due to flexible size of game/lite info packets only check for maximum size of these packets 2015-02-21 18:21:34 +01:00
Kp 7f2974ea69 Make default ports uint16_t
Fixes a clang warning formatting %hu with the result of
(condition ? short : int).
2015-02-08 17:43:29 +00:00
Kp d5d416c62c Use ntstring for Netgame.mission_name 2015-01-03 23:44:32 +00:00
Kp 03370ed3e5 Use ntstring for Netgame.mission_name 2014-12-22 04:35:48 +00:00
Kp e166846dd1 Use ntstring for Netgame.game_name 2014-12-22 04:35:48 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 62dc7a874f Pass sockaddr by const &, not value 2014-10-18 23:37:34 +00:00
Kp 486707a9ef Fix argument to net_udp_send_mdata_direct
Use argument, not global
2014-10-17 02:23:40 +00:00
Kp 7c76c68255 Make unused_newmenu_userdata_t const 2014-10-16 02:13:09 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp e259857fea List initialize UDP mdata pkt_num array 2014-07-04 04:12:45 +00:00
Kp 39a56ae244 Unpack UDP_mdata_store 2014-06-27 03:11:39 +00:00
Kp 6091496b28 Unpack UDP_mdata_info 2014-06-26 03:17:23 +00:00
Kp c7b161cf2d Unpack UDP_frame_info 2014-06-26 03:17:23 +00:00
Kp 291d11d17e Unpack UDP_sequence_packet 2014-06-26 03:17:23 +00:00
zico f6a18e05a6 Reworked packet loss prevention system to send and receive protected packets in correct order 2014-06-24 14:49:18 +02:00
Kp f6631ce742 Unpack various structures
Prohibit conversion to void* to avoid accidental use with memcpy
2014-06-21 23:56:27 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 92e8cb7a31 Add type checking to newmenu subfunction userdata 2013-12-15 21:54:38 +00:00
zico 2e407fa5a8 Removed short packets and added segment number to quaternion structure 2013-12-09 14:00:23 +01:00
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp e663767201 Move similar/main/menu.c -> similar/main/menu.cpp 2013-10-20 22:49:12 +00:00
Kp 9d2d8bb552 Scrub netgame flags on load/save/send/recv 2013-09-01 21:09:01 +00:00
Kp a842e15d94 Merge branch d2x-rebirth into unification/master
Conflicts:
	SConstruct
	common/include/editor/ehostage.h
	common/main/cntrlcen.h
	common/main/laser.h
	common/main/mission.h
	common/main/net_udp.h
	common/main/object.h
	main/vers_id.h
	similar/editor/kfuncs.c
	similar/main/inferno.c
	similar/main/lighting.c
	similar/main/multibot.c
	similar/main/newmenu.c
	similar/main/physics.c
2013-04-21 04:52:22 +00:00
Kp 616a3a6b70 Merge branch d1x-rebirth into unification/master
Conflicts:
	SConstruct
	common/main/cntrlcen.h
	common/main/fuelcen.h
	common/main/fvi.h
	common/main/gameseq.h
	common/main/gauges.h
	common/main/multibot.h
	common/main/net_udp.h
	common/main/object.h
	common/main/player.h
	common/main/vers_id.h
	d1x-rebirth/main/hostage.c
	d1x-rebirth/main/multi.c
	main/controls.c
	main/hostage.h
	main/laser.h
	main/screens.h
	similar/arch/ogl/gr.c
	similar/editor/centers.c
	similar/main/inferno.c
	similar/main/lighting.c
	similar/main/multibot.c
	similar/main/paging.c
	similar/main/physics.c
	similar/main/player.c
	similar/main/robot.c
	similar/main/wall.c
2013-04-21 04:51:35 +00:00
Kp 6cc3560fbd Move */main/net_udp.h -> common/main/net_udp.h 2013-03-03 01:03:33 +00:00
Renamed from d1x-rebirth/main/net_udp.h (Browse further)