Commit graph

683 commits

Author SHA1 Message Date
zicodxx 2ba4206e15 Using timer_query() instead of clock() in InitPlayerPositions(); Also decreasing check value für closest_dist to D1-level to actually make it less likely to start at total random unchecked location where another player could be 2011-01-14 17:15:30 +01:00
zicodxx c8f4140bd6 In multi_leave_game check for Player_eggs_Dropped before actually dropping to prevent multiple drops in case player quits game after being killed; put console output level of multiplayer powerup cap messagers to CON_VERBOSE 2011-01-14 15:13:29 +01:00
zicodxx eeecf4016e Fixing code used for capping powerups in multiplayer - it was not correctly conting 4pack powerups; Cleaned up this code a bit and added more consistent naming convention for functions to maybe make it more understandable; Removed MULTI_PROTO_D2X_VER define as it's not needed 2011-01-14 14:29:08 +01:00
Chris Taylor 030aef43e3 For editor, replace use of ui_mega_process() with event_process(), with the editor's own default event handler; add EVENT_MOUSE_MOVED event with event_mouse_get_delta() accessor; add event_key_get() to replace ugly casting; rename mouse_get_button() with event_mouse_get_button() to keep with name convention; only send idle events when there are no input events so editor still works properly (or the same anyway); add and use event_send() function for input events (including idle) 2011-01-14 17:51:13 +08:00
zicodxx aca6890bd4 Fixed Menu setting for AllowedItems which was broken due to changed return value of newmenu_do1 2011-01-11 01:26:14 +01:00
zicodxx 02c5c1bda9 Reverted most of the last commit - didn't work well when timer was updated too frequently 2011-01-11 00:37:45 +01:00
zicodxx 4026c8a73a In timer_update() use i2f and fixdiv for SDL_GetTicks() to get more accurate values to F64_RunTime; Added rollover check for SDL_GetTicks() to timer_delay2() 2011-01-10 22:59:00 +01:00
zicodxx 4b008cece1 Let credits track fade out at the end of text sequence; Fixed usage for RBAPlayTracks - when playing only one track last must be equal first, not 0; In hmp_open changed data from long to int, preventing memory explosion depending on optimisation of the code 2011-01-10 20:40:55 +01:00
zicodxx 39e956e2bc Added different reticle types with RGBA and size settings; Apply RGBA and size to FlightSim Indicator and Guided Crosshair; Added Brightness Slider to Graphics options menu; Added OpenGL usage for gr_disk 2011-01-10 16:12:04 +01:00
zicodxx 09da4f9f51 Mousebutton assigned to CYCLE SECONADARY was actually calling CYCLE PRIMARY 2011-01-09 19:45:14 +01:00
zicodxx adad856f38 Improvement on the HMP track loop feature by TURRICAN; Added small template fix for descent.hmp which is supposed to be activated soon as we have some kind or Checksum function 2011-01-09 17:51:48 +01:00
zicodxx eac593a047 Fix for rev968: my_pnum must be defined static 2011-01-09 17:09:29 +01:00
zicodxx bea0daf3e8 Set max UDP packet size to 1024 again (seems some configuration DO have problems with larger packets after all) 2011-01-09 14:19:01 +01:00
zicodxx d14ae4ea2b Draw FlightSim Reticle on Automap display, too; Fixed small glitch showing Vulcan/Gauss ammo in alt hud mode on all cockpit modes instead of CM_FULL_SCREEN only 2011-01-06 14:56:26 +01:00
zicodxx 449a5dffb1 Added OpenGL ES support - contributed by Florian Feucht and Oliver Haag 2011-01-06 12:43:58 +01:00
zicodxx 0a08eacae6 Fixed but in object to object_rw conversion - if a bot is not dead, leave dying_start_time at 0 as anything else would kill it 2011-01-06 00:28:43 +01:00
zicodxx 307d92c644 Introduced FlightSim control scheme for mouse which adds delta values to absolute position to behave like a Joystick; Added Deadzone slider for FlightSim as well as an optional Reticle display to show the positional data on screen; Removed old Mouselook hack in favor of this new feature 2011-01-04 11:43:37 +01:00
zicodxx 8e23a0b452 More consistency in SConstruct command-line variables; Added automatic Endianess-checker; Set target to 'd2x-rebirth' no matter if OpenGL or not 2011-01-03 11:42:53 +01:00
zicodxx 281c9668bb Moved NoRedundancy, MultiMessages and NoRankings toggles from GameArg to PlayerCfg to be set via Misc Options 2011-01-03 02:01:26 +01:00
zicodxx 3adc5fe77a Saving weapon keys in PLX like in D1X-Rebirth; Added Cycle Primary/Secondary for Mouse which makes wheel axis cycling unnecessary and also let Weapon Keys be assigned to a Mouse button; If GameArg.NoStickyKeys do flush these keys so they can be used as normal game keys - otherwise ban them; Fixed crash when reassigning mouse button greater than 3; Joystick/Mouse function taking button as argument now check for sanity of this value so they can safely be used in kconfig code and deal with unassigned key values 2011-01-03 01:09:09 +01:00
zicodxx 8dcbb3bd81 Introduced function key_ismodlck to get the status of modifier keys or sticky keys; Let sticky keys survive flush so we can accurately use their real states; Added key repeating via SDL; Depending on status of KEY_NUMLOCK keypad will either be used as numerical or arrow input in menus; Fixed small typo for mouse.h include in credits.c 2011-01-02 18:07:44 +01:00
zicodxx 8a202f04ed Mouse wheel now can scroll through menu/listbox items; Right mouse button closes a menu (without the need of these ugly close boxes); Also added mouse-closing capabilities to credits, scores and kconfig menus; While being in UDP Netgames list, override keycode at PAGEUP/DOWN keypress to only flip pages without modifying citem also added messagebox showing TXT_INVALID_CHOICE when invalid netgame was chosen 2011-01-02 12:25:51 +01:00
zicodxx 8c8216c1f3 Fixed glitch in scroll arrow position; Added newmenu_scroll which can scroll through all kind is menu structures including automatically handling NM_TYPE_TEXT items as well as automatically updating scroll_offset; PageUp/Down now scrolls by 10 items, Home/end will select first/last/items of menu creating consistency to listbox behaviour; Fit text for GrabInput to be more understandable 2010-12-30 23:36:41 +01:00
zicodxx 6e81498a86 Added Sensitivity/Deadzone menu with sliders for each movement based action seperated for joystick and mouse to support all kinds of configuration - regardless the amount of joystick axes and whatnot; SDL_WM_GrabInput does not only capture mouse but also focus keyboard input - changed code to respect this fact and made grabbing a menu option which is enabled by default 2010-12-28 19:11:10 +01:00
Chris Taylor f755a5e030 Make the keypad info display into a window 2010-12-28 12:29:42 +08:00
Chris Taylor 2fa153489c Move main/editor to editor and move headers to include/editor, like d1x 2010-12-28 11:21:43 +08:00
zicodxx f429c8c1ea Disabling IPv6 support for OS X since in Snow Leopard it's buggy, making all Multiplayer pretty much impossible - re-activating soon as proper patches from Apple are in sight 2010-12-24 10:06:38 +01:00
Chris Taylor 5cbfece8c4 Copy some editor stuff from d1x-rebirth to d2x-rebirth, like use of the OS native cursor 2010-12-24 12:34:30 +08:00
zicodxx 535edf0691 Align timer_delay for credits so the song (midi or redbook) should at least be heard once 2010-12-23 23:38:33 +01:00
zicodxx a1c830a92b Reworked object sending/receiving to work without unnecessary type casting and a bit less error prone; Also increased UDP max packet size to 2048 so we can send 7 objects per frame; Fixded joinign games - GameID was sent for full game info, not lite info 2010-12-23 22:42:26 +01:00
Chris Taylor b82e1c9c61 Put event_process() in ui_mega_process(), getting editor to (mostly) work 2010-12-22 22:14:46 +08:00
zicodxx 5172e33d84 in IPv6 builds also send regular broadcast packets to get games found via LAN between IPv4 clients/systems and IPv6 clients/systems; rather than identifying (lite_info) games via IP use randomly generated GameID and game name to prevent duplicated coming from IPv6 builds 2010-12-22 14:55:26 +01:00
Chris Taylor 2b5fc26cff Fix warning for deliberate GameTime64 wrap; change GameTime to GameTime64 for editor 2010-12-22 17:48:00 +08:00
zicodxx ce0930184d added hitobj_list to struct laser_info to get a bit cleaner code 2010-12-22 10:41:25 +01:00
Chris Taylor 22102a3c23 Activate EDITOR for Mac OS X in Xcode, d2x target; fix some warnings and errors 2010-12-22 10:56:28 +08:00
zicodxx fe84fa3a9a Made GameTime to GameTime64 using fix64; Changed all structures saving GameTime64 for internal timer purposes to store fix64 and added converting functions to save such times in fix; For Savegames/Demos always reset GameTime64 to 0 while saving and putting all timer values to safe limits, Multiplayer objects are sent in similar fashion 2010-12-22 01:17:59 +01:00
zicodxx 70e43722e1 In window_close() prev window did not get EVENT_WINDOW_ACTIVATED but the recent closed window got it causing previous window not being activated anymore and a bunch of memory errors 2010-12-22 01:11:14 +01:00
Chris Taylor c00d35f0eb Activate EDITOR for Mac OS X in Xcode, d2x target; fix some warnings and errors 2010-12-21 11:35:50 +08:00
zicodxx 3bcb0ecdde Introduced new data type fix64 to be used for new timers which can last 4462756 years instead of 9 hours; Introduced new timer functions to update and query program time; Used new timer all over the program except GameTime (which comes next) 2010-12-11 00:18:17 +01:00
Chris Taylor 3ef5dff1a6 Add CON_DEBUG level con_printf's for basic events (not EVENT_IDLE or EVENT_DRAW though) 2010-12-05 21:51:34 +08:00
zicodxx 4927b1c680 Changed another WIN32 to _WIN32 to avoid accidentially compiling with WORDS_BIGENDIAN when using VisualC 2010-12-04 21:59:07 +01:00
zicodxx 4956e746a2 When calling do_game_pause do not allocate msg in Game mod GM_MULTI as it's not used nor freed 2010-12-04 16:52:00 +01:00
Chris Taylor 61586a8d26 Set a bogus sound when a sound is skipped in gamedata_read_tbl and don't let piggy_close free it 2010-12-04 13:45:43 +08:00
zicodxx 3ccde930c3 Made resent_delay for net_udp_noloss_process_queue() a bit longer depending on the player's ping 2010-12-03 01:09:46 +01:00
zicodxx cc8296b175 When Quitting is called in standard_handler disable Autodemo if active 2010-11-30 23:45:10 +01:00
Chris Taylor 47236b142f Add missing stuff to get it to build on Mac OS X; turn fullscreen off when showing a messagebox for Mac 2010-12-01 00:00:46 +08:00
zicodxx e883f01ec9 Add support for Windows native error/warning boxes; Only print to stdout on Linux/other *nix; Fixed redundant printing of Error and Warning via stdout 2010-11-30 13:46:23 +01:00
zicodxx 83a955976f Little fixes for rev950 - changed definition from WIN32 to _WIN32, added little hack for incorrectly set HMP loop in Descent2-version of descent.hmp 2010-11-30 12:20:09 +01:00
zicodxx acac225493 Large improvement for _WIN32 native MIDI code by TURRICAN0: supprt for HMP track loop, seamless song looping, GS reset, pausing/resuming midi, volume control for each MIDI channel; Set GameArg.SndDisableSdlMixer automatically if compiled without SDL_mixer support; On _WIN32 play HMP natively again 2010-11-28 16:49:40 +01:00
zicodxx 13c1093ca1 Added missing brackets gone missing in r936 2010-11-28 16:08:11 +01:00