Commit graph

1074 commits

Author SHA1 Message Date
zicodxx c960d5505a Added cv_fade_level to canvas structure to replace Gr_scanline_darkening_level; Added cv_blend_func to canvas structure to set blending; Introduced gr_settransblend to set cv_fade_level and cv_blend_func; Added function to set normal blending, additive alpha blending and additive color blending; Moved Special transparency effects from g3_draw_bitmap to render_object to set individual transparency and/or blending for each object outside of OpenGL-specific code; Added special blending for fuelcenter and force field effects as well; Removed unused LASER_HACK code; Renamed OglAlphaEffects variable of PalyerCfg to AlphaEffects as I plan to implement this kind of effects for Software renderer, too 2011-02-23 17:46:39 +01:00
Chris Taylor 635dcfee4f Fix a critical bug in string_array_add - when d_reallocing the buffer containing the string data, update all the pointers in '*list' as well as next_str, preventing ugly crashes 2011-02-21 14:37:03 +08:00
zicodxx 13b2de4326 Added another call for read_hamfile right after a level loads in case a third party mission brings it's own version of the main game HAM file 2011-02-19 01:20:58 +01:00
zicodxx ffee2235a9 Set zNear for gluPerspective to 0.1 to prevent ugly clipping while passing illusory walls; Set zFar to 5000.0 to prevent disappearing automap in large distance - all still sane enough for Intel chips so my eeePC is safe nyahahaha 2011-02-18 00:43:05 +01:00
zicodxx d020a3136e Draw laser effects with special blending instead of disabled DepthMask; Added special blending for transparency effects as well to let them kick more ass; Corrections while rendering outside part of endlevel sequence with disabled depth testing and dynamically changing Render_depth to make the mine exit visible again while not rendering the exit tunnel tru the planet terrain 2011-02-18 00:17:51 +01:00
zicodxx d57eed80b5 When recording cloaking or unclocking wall to demo, make sure the very first frame is recorded, too so wall will correctly transform back when rewinding the demo 2011-02-17 11:17:53 +01:00
zicodxx bddb2e97a2 Fixed PRShot feature which was accidentially broken while implementation of OpenGL ES support 2011-02-15 14:44:03 +01:00
zicodxx dd4a5ae0d8 For credits and briefings moved all code happened in EVENT_IDLE to EVENT_WINDOW_DRAW since a jitterish Joystick could slow down text rendering 2011-02-14 23:52:33 +01:00
zicodxx d6fbef4e43 Moved all these unsorted global cheat variables to a handy structure; Simplified reading of the cheats without trying to make it complicated so no one finds them (everyone can get the source); Removed one or two cheats which carry more garbage than they are worth; Added replacement for the bittersweet cheat; Made FPS Counter an option of Graphics menu 2011-02-14 22:27:07 +01:00
zicodxx 097dd32c5a New approach to handle a bunch of closing windows - removed window_do_close() again, reworked game_leave_menus by checking window_get_front() and closing this window until it's Game_wind, while event_process checking if window still exists after drawing and if not, take next window from previous which should be updated by then 2011-02-12 23:58:41 +01:00
zicodxx 1f5fde02c7 Controls.select_weapon_count needs to be incremented differently to get non-0 when we want to select the laser type weapon; Readded jumping from first to last item in newmenu and vice versa 2011-02-11 12:24:02 +01:00
zicodxx 43ebcd249b Added secondary weapon indicators to new reticle types; Fixed disks being drawn as circles - whoops 2011-02-10 20:53:23 +01:00
zicodxx a5c3bc430c Fixed compiler warning related to generation of game_id for Coop Savegames 2011-02-10 18:56:33 +01:00
zicodxx 031420cf74 Simplified ogl version of gr.c in terms of SDL video flags and fullscreen toggle; Added command-line/INI option to remove borders from windowed program 2011-02-10 15:30:08 +01:00
zicodxx 5bac68c5c8 Fixed broken FlightSim indicator on Automap; Fixed Assert for using mouse buttons in kconfig (which can react to UP and DOWN states); Added scrolling support for menus flagged tiny_mode and all_text 2011-02-10 14:09:10 +01:00
zicodxx 7b5102a0f9 Fixed memory leak produced by drawing circles and disks 2011-02-09 17:18:35 +01:00
zicodxx 0c0a55e65b Fixed little memory issue while playing movies introduced by overhaul of window closing 2011-02-09 16:52:13 +01:00
zicodxx 753178a30f Reintroduced Savegames for Coop games using the original Descent2 implementation but correctly handling player slots in their pre-loading state preventing accidential player shifting which never really worked in the original game and we do not want with UDP anyways - was all tested but still might need a fix or two; Added some missing initializations for saving players and AI stuff; Completely ripped out remnants of saving between levels code 2011-02-09 12:58:32 +01:00
zicodxx 488c44f9cf Increased key repeat values to react a little more like the MS-DOS version of the game but a little slower so I can still stop at the correct item; In automap reorganized control_info swapping as well as wiggle state handling to properly work in connection with the new input handling and Multiplayer where game is not paused 2011-02-06 14:25:37 +01:00
zicodxx c7a65c9313 Included new window structure flag w_closing_state and let window_close() set this flag - after drawing all windows, check them again and call window_do_close() which then actually closes the window(s) marked to. Solving all sorts of problems when windows close while being drawn (network error messageboxes, game_leave_menus(), etc.) 2011-02-03 11:48:27 +01:00
zicodxx 9a64614a04 fix to rev 1048 - not completely there today... 2011-02-03 01:19:33 +01:00
zicodxx 7f49e118da Corrected values for gr_ubox while drawing a window_view to not mess up at some widescreen resolutions 2011-02-03 01:10:30 +01:00
zicodxx fbf27484f1 Little fixes for recent kconfig/event overhaul: Automap inputs read by kconfig should be processed by input rather than idle and automap frame calculations should be done while drawing; Fixed drop_bomb_count which could roll over to 255 dropping bombs without end 2011-02-03 01:05:06 +01:00
zicodxx 3c9c7af995 Little more smoothness for Multiplayer: Before dropping Powerups in random segment, make sure it's accessible by the player who drops it; Got rid of goto in InitPlayerPositions() and made code more D2-ish; Allow host to send 50 object/extra packets per second which does not overload network stack, yet but speeds up joining 2011-02-02 23:51:34 +01:00
zicodxx 21836c5c6b After rendering Reboot reticle, reset glLineWidth to default value again 2011-02-02 02:12:05 +01:00
zicodxx 800dcc3b48 Small correction for last commit - key handler of automap was reacting to non-key events as well 2011-02-02 02:08:29 +01:00
zicodxx 96782e092a Added event types for all input actions; Rewrote kconfig code to work with events; static defined inputs will not trigger kconfig-mapped inputs anymore; Simplified keyboard, mouse and joystick code a lot due to event-based handling; Added function to toggle SDL key repeats on and off; Put timer_update() to event_process; Removed return when event_poll() is idle to get cursor hiding to work again; Added a small delay between cursoe hiding and re-enabling to cursor will not accidentially enable by SDL event centering cursor while hiding 2011-02-02 01:36:49 +01:00
zicodxx 518e01fbe8 In event_process() check for wind->next before sending EVENT_WINDOW_DRAW in case drawing will free wind 2011-01-26 11:55:47 +01:00
zicodxx fd740500c1 Some improvements and cleanups for Persistent Debris: Let them bounce, added drag and let them explode on hazardous walls 2011-01-24 21:51:08 +01:00
zicodxx 2844337521 Added some new conditions to the bumping code: Only bump objects which can slide (alive robots and players) and added a count making sure this function can never get stuck in an infinite loop 2011-01-24 20:46:01 +01:00
zicodxx 3a91bdb89d Added some new conditions to the bumping code: Only bump objects which can slide (alive robots and players) and added a count making sure this function can never get stuck in an infinite loop 2011-01-24 20:37:47 +01:00
zicodxx 4f160df96e Revamped what previously was the BUMP_HACK by checking if an object is actually intersecting a segment and move it out towards segment center just after the initial object movement composed by fvi and before velocity is made - should make inaccurate wall collisions a bit smoother and prevent objects from goind inside or through walls, too 2011-01-24 15:26:08 +01:00
zicodxx ee56fead58 For new player, set ReticleSize to 0 which is the smallest size 2011-01-23 18:21:13 +01:00
zicodxx 0fac02ecee Increasing the collision count for objects so there can be 8 for all objects; also do not increase count when colliding with a powerup as it should not change our movement 2011-01-23 11:59:48 +01:00
zicodxx 169df35455 Taking out one Int3 in init_boss_segments() stopping the program if there is more than one boss in level - taking out because it's not fatal or unsafe to do that; Also removed one conditional size_check which was meant for one mprintf we removed long ago 2011-01-23 09:57:52 +01:00
zicodxx 4e3eeee326 Removed fvi_a.h and added the asm code from it as comment to fvi.c in case we need it again some day 2011-01-22 21:43:21 +01:00
zicodxx 37f59aa896 in show_framerate do not use gr_get_string_size at all but rather use hardcoded coordinates - less CPU-intense 2011-01-22 18:46:08 +01:00
zicodxx da43cc7d37 Added swapping for 64Bit sized integers in case we want to store/read them some day (i.e. new Savegame version storing object instead of object_rw) 2011-01-22 18:14:16 +01:00
zicodxx 78569ea1bc Fixed small issue parsing killreactor command in Multiplayer 2011-01-22 17:56:25 +01:00
zicodxx 5eb05548c3 Added timer_update() to stop/start/reset_time() functions so resumed last_timer_value will be precise; Added new FPS counter which actually does count the frames rendered per second and is less irritating; Added timer_dleay2 call to console to not stress CPU too much; Imporoved placement for show_time(), multi messages, marker messages and orb counts 2011-01-22 13:30:20 +01:00
zicodxx 3046fcf7dd Protection for negative array index in find_seg_side was accidentially checking for vv1 != -1 - fixed that 2011-01-21 17:45:29 +01:00
zicodxx 33d3b1c6a8 Added a simple random function for the Jukebox; Removed one small printf I once added for debugging 2011-01-20 12:17:30 +01:00
zicodxx e60a7e1bca Additional commit for last revision - didn't selected all files properly 2011-01-19 21:52:01 +01:00
zicodxx 9f6cbc8c6c Retired most of the Assembler code except the generic i386 scanline renderer; Removed all leftovers of Direct3D implementation; On the way make a some code more similar between D1X-Rebirth and D2X-Rebirth 2011-01-19 21:35:14 +01:00
zicodxx fd53a1264b On NETGAMES list Bounty mode was not shown since MODE_NAMES define was not adjusted - so in the end introduced GMNames and GMNamesShrt Arrays in multi.c for globally displaying full or short Multiplayer game mode names 2011-01-19 19:55:38 +01:00
zicodxx 16f2b23fe2 Fix for showing bounty target in kill list - was not actually checking if player_num == Bounty_target; When Bounty_target player leaves game host must select a new target so the game can proceed 2011-01-19 12:22:01 +01:00
zicodxx a1f7da133e Introducing new BOUNTY Multiplayer game mode by Matt -1360- Vandermeulen <matt1360@gmail.com> 2011-01-19 02:19:17 +01:00
zicodxx 931d134357 Instead of calling object/extras sending every frame, use a delay of 100ms between packet send to not overload the network stack 2011-01-19 00:07:10 +01:00
zicodxx 3266e8c141 Correction for rev1009: Do not need to delete object Dead_player_camera since it's a new level with new objects to begin with 2011-01-18 20:02:04 +01:00
zicodxx 9cace92b4e In net_udp_send_objects() player_num byte was not considered for mode 1 resulting on incorrect object count for this mode 2011-01-18 19:43:07 +01:00