Commit Graph

53 Commits

Author SHA1 Message Date
RoosterDragon
b5f24c3fa6 Add some missing Dispose calls, fix some Dispose implementations. 2016-01-01 04:51:54 +00:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00
Paul Chote
e819ff832b Record the SheetType in each Sheet. 2015-10-17 22:28:19 +01:00
Matthias Mailänder
a3c8d4691a add a missing dispose of the base class 2015-05-31 15:31:22 +02:00
RoosterDragon
7e28acadd8 DrawPanelPartial now specifies each sprite as an individual parameter.
This allows some array allocations to be avoided, and makes the code more obvious since each sprite is referred to by name rather than an array index.
2015-02-02 21:16:14 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Paul Chote
ec7a32184e Move the mod-level initialisation code back into the load screen. 2014-12-23 09:20:19 +13:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
Matthias Mailänder
2f55768c1b restart the game instead of unmounting on the fly
avoid more redundancy between the load screens
2014-07-06 14:04:26 +02:00
Matthias Mailänder
351c759793 separate content install from loadscreen 2014-07-06 14:04:25 +02:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
RoosterDragon
a2ed4fd5f9 Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
2014-06-10 17:06:25 +01:00
Pavlos Touboulidis
c28faffa45 Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality)
and replace it with the familiar System.Diagnostics.Stopwatch.
2014-04-26 23:58:18 +03:00
Pavlos Touboulidis
035834978d Make Stopwatch.ElapsedTime() a property and TimeSpan 2014-04-23 00:56:07 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Matthias Mailänder
b8740a3a47 test for a list of files when loading mods
don't cache test file string arrays
2014-01-21 08:30:03 +01:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
Paul Chote
b7123cda7d Route screen size queries via Game.Renderer. 2013-10-05 21:01:21 +13:00
Matthias Mailänder
d278bc84d1 StyleCop clean Cnc DLL 2013-08-07 15:42:34 +02:00
Paul Chote
659e56f0fa Remove Bitrotted JoinExternalGame. Fixes #3406. Closes #2153. 2013-06-16 04:19:06 +12:00
Matthias Mailänder
7bd253d56b Don't crash when the fonts are not yet loaded
closes #3157
2013-04-27 09:52:53 +02:00
Chris Forbes
bf5be88c75 rename Ui.RootWidget to just Ui.Root 2011-12-13 23:46:58 +13:00
Chris Forbes
ed429a3b30 split Widget static bits into Ui static class 2011-12-13 23:38:59 +13:00
Christer Ulfsparre
dec8c8ba4b Added ability to join a server on startup, for gamelist apps. 2011-10-22 12:33:46 +13:00
Chris Forbes
c18dcca1bc fix spelling error in ProductionAirdrop 2011-10-06 23:23:47 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
ef71020835 style issue on CncLoadScreen 2011-09-26 08:40:38 +13:00
Chris Forbes
e7900d069d move ActiveModVersion,ActiveModTitle out of cnc-specific code 2011-09-26 08:40:38 +13:00
Paul Chote
4138c5aeb7 Display version in the load screen 2011-07-27 13:36:46 +12:00
Paul Chote
fc783ddf80 Support custom zoom levels 2011-07-25 22:23:17 +12:00
Paul Chote
ad3f378545 Add a hook for widgets being removed, and ensure widgets are removed consistently. 2011-06-01 18:50:59 +12:00
Chris Forbes
4b12a19af0 remove Renderer.Resolution duplication everywhere -- it's not free. 2011-05-22 21:38:54 +12:00
Chris Forbes
5ad2c43761 remove duplicated crap from CncLoadScreen 2011-05-22 21:34:59 +12:00
Paul Chote
cb53bcd17d Loadscreen tweaks 2011-05-22 18:41:30 +12:00
Paul Chote
bafd12b88e Loadscreen progress bar 2011-05-22 18:41:30 +12:00
Paul Chote
f2f59e3f93 Eva logo. Disable scanlines 2011-05-22 18:41:30 +12:00
Paul Chote
aef6223c6c Add logos to the loadscreen 2011-05-22 18:41:29 +12:00
Paul Chote
9822afcdb8 New loadscreen 2011-05-21 17:26:20 +12:00
Chris Forbes
310ecc34ce clean up usings everywhere 2011-05-21 17:26:18 +12:00
Paul Chote
e1c8658fdc Fonts are now defined in mod.yaml 2011-05-21 17:26:18 +12:00
Paul Chote
1526b6ff37 Make Game.LoadWidget / Widget.LoadWidget consistent. 2011-05-21 17:26:16 +12:00
Paul Chote
f4ea4c5daa Add a WidgetArgs type to work around gmcs not understanding lambda -> Action -> object. 2011-05-21 17:26:16 +12:00
Paul Chote
37577afc36 Polish 2011-05-21 17:26:13 +12:00
Paul Chote
6a1f3cfc18 Installing from CD reimplemented 2011-05-21 17:26:13 +12:00
Paul Chote
372d2f5426 Saner load code for cnc. Installing not yet implemented. 2011-05-21 17:26:10 +12:00
Paul Chote
3d347848f3 Remove another hardcoded widget reference and prepare for saner init code. 2011-05-21 17:25:45 +12:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
f798639125 New loadscreen artwork for cnc; needs texturing. 2010-11-27 18:54:28 +13:00