diff --git a/Animation.cs b/Animation.cs index 8e50a94..d675ab7 100644 --- a/Animation.cs +++ b/Animation.cs @@ -38,7 +38,7 @@ class CAnimation internal Tile32 tile; /*!< Top-left tile of Animation. */ } -class Animation +static class Animation { const byte ANIMATION_MAX = 112; diff --git a/Audio/Driver.cs b/Audio/Driver.cs index 15fb763..0103f78 100644 --- a/Audio/Driver.cs +++ b/Audio/Driver.cs @@ -20,7 +20,7 @@ class MSBuffer internal MSData[] buffer; /*!< ?? */ } -class Driver +static class Driver { static readonly bool[] s_driverInstalled = new bool[16]; static readonly bool[] s_driverLoaded = new bool[16]; diff --git a/Audio/DspNone.cs b/Audio/DspNone.cs index 26da53d..9560c61 100644 --- a/Audio/DspNone.cs +++ b/Audio/DspNone.cs @@ -2,7 +2,7 @@ namespace SharpDune.Audio; -class DspNone +static class DspNone { internal static bool DSP_Init() => true; diff --git a/Audio/DspSdl.cs b/Audio/DspSdl.cs index 04f1e29..7893c26 100644 --- a/Audio/DspSdl.cs +++ b/Audio/DspSdl.cs @@ -2,7 +2,7 @@ namespace SharpDune.Audio; -class DspSdl +static class DspSdl { static nint s_buffer; static uint s_bufferLen; diff --git a/Audio/MidiNone.cs b/Audio/MidiNone.cs index 7adb650..a69497c 100644 --- a/Audio/MidiNone.cs +++ b/Audio/MidiNone.cs @@ -2,7 +2,7 @@ namespace SharpDune.Audio; -class MidiNone +static class MidiNone { internal static bool Midi_Init() => true; diff --git a/Audio/Mt32Mpu.cs b/Audio/Mt32Mpu.cs index 473b2ff..df39bee 100644 --- a/Audio/Mt32Mpu.cs +++ b/Audio/Mt32Mpu.cs @@ -68,7 +68,7 @@ internal MSData() internal int[] noteOnDuration = new int[MAX_NOTES]; /*!< ?? */ } -class Mt32Mpu +static class Mt32Mpu { /* defines from AIL XMIDI.ASM : */ internal const int NUM_CHANS = 16; diff --git a/Audio/Sound.cs b/Audio/Sound.cs index 2f2de38..c5c07da 100644 --- a/Audio/Sound.cs +++ b/Audio/Sound.cs @@ -26,7 +26,7 @@ class Feedback internal ushort soundId; /*!< Sound. */ } -class Sound +static class Sound { /* Number of voices in the game. */ const byte NUM_VOICES = 131; diff --git a/Codec/Format40.cs b/Codec/Format40.cs index c571bc4..eaac24b 100644 --- a/Codec/Format40.cs +++ b/Codec/Format40.cs @@ -2,7 +2,7 @@ namespace SharpDune.Codec; -class Format40 +static class Format40 { /* * Decode a memory fragment which is encoded with 'format40'. diff --git a/Codec/Format80.cs b/Codec/Format80.cs index 7e8b8fe..1c3e5b9 100644 --- a/Codec/Format80.cs +++ b/Codec/Format80.cs @@ -2,7 +2,7 @@ namespace SharpDune.Codec; -class Format80 +static class Format80 { /* * Decode a memory fragment which is encoded with 'format80'. diff --git a/Config.cs b/Config.cs index a1d3170..5cd61c0 100644 --- a/Config.cs +++ b/Config.cs @@ -42,7 +42,7 @@ class DuneCfg [FieldOffset(9)] internal byte checksum; /*!< Used to check validity on config data. See Config_Read(). */ } -class Config +static class Config { internal static GameCfg g_gameConfig = new() { music = 1, sounds = 1, gameSpeed = 2, hints = 1, autoScroll = 0 }; internal static DuneCfg g_config = new(); diff --git a/CrashLog/CrashLog.cs b/CrashLog/CrashLog.cs index f662097..ee04ea8 100644 --- a/CrashLog/CrashLog.cs +++ b/CrashLog/CrashLog.cs @@ -2,7 +2,7 @@ namespace SharpDune.CrashLog; -class CrashLog +static class CrashLog { internal static void CrashLog_Init() { diff --git a/Cutscene.cs b/Cutscene.cs index acd77e0..f00735e 100644 --- a/Cutscene.cs +++ b/Cutscene.cs @@ -26,7 +26,7 @@ class CreditPosition internal ushort y; } -class Cutscene +static class Cutscene { internal static bool g_canSkipIntro; /*!< When true, you can skip the intro by pressing a key or clicking. */ diff --git a/Explosion.cs b/Explosion.cs index 48d17df..6e111b7 100644 --- a/Explosion.cs +++ b/Explosion.cs @@ -75,7 +75,7 @@ internal CExplosion() => position = new Tile32(); } -class Explosion +static class Explosion { internal const byte EXPLOSION_MAX = 32; /*!< The maximum amount of active explosions we can have. */ diff --git a/File.cs b/File.cs index 0f31dbc..d84c964 100644 --- a/File.cs +++ b/File.cs @@ -78,7 +78,7 @@ class PakFileInfoLinkedElem internal string filenamebuffer; //char[1] } -class File +static class File { //readonly string SEARCHDIR_GLOBAL_DATA_DIR = Path.Combine(Environment.CurrentDirectory, "data"); //readonly string SEARCHDIR_PERSONAL_DATA_DIR = Environment.GetFolderPath(Environment.SpecialFolder.Personal); diff --git a/Gfx.cs b/Gfx.cs index 5d36de0..9bca64d 100644 --- a/Gfx.cs +++ b/Gfx.cs @@ -19,7 +19,7 @@ class DirtyArea internal ushort bottom; } -class Gfx +static class Gfx { static bool s_screen0_is_dirty; static readonly DirtyArea s_screen0_dirty_area = new() { left = 0, top = 0, right = 0, bottom = 0 }; diff --git a/Gui/EditBox.cs b/Gui/EditBox.cs index a495ecc..3c9f7f3 100644 --- a/Gui/EditBox.cs +++ b/Gui/EditBox.cs @@ -2,7 +2,7 @@ namespace SharpDune.Gui; -class EditBox +static class EditBox { static uint tickEditBox; /* Ticker for cursor blinking. */ static bool editBoxShowCursor; /* Cursor is active. */ diff --git a/Gui/Font.cs b/Gui/Font.cs index 63abaa9..248bdee 100644 --- a/Gui/Font.cs +++ b/Gui/Font.cs @@ -18,7 +18,7 @@ class CFont internal FontChar[] chars; } -class Font +static class Font { internal static CFont g_fontIntro; internal static CFont g_fontNew6p; diff --git a/Gui/Gui.cs b/Gui/Gui.cs index c778029..9dded6d 100644 --- a/Gui/Gui.cs +++ b/Gui/Gui.cs @@ -146,7 +146,7 @@ class RankScore internal ushort score; /*!< Score needed to obtain the rank. */ } -class Gui +static class Gui { internal static byte[] g_remap = new byte[256]; diff --git a/Gui/Mentat.cs b/Gui/Mentat.cs index 600f9dc..45b40c0 100644 --- a/Gui/Mentat.cs +++ b/Gui/Mentat.cs @@ -8,7 +8,7 @@ class MentatInfo internal uint length; } -class Mentat +static class Mentat { /* * Information about the mentat. diff --git a/Gui/Security.cs b/Gui/Security.cs index 44c9471..e1099f2 100644 --- a/Gui/Security.cs +++ b/Gui/Security.cs @@ -2,7 +2,7 @@ namespace SharpDune.Gui; -class Security +static class Security { /* * Ask the security question to the user. Give him 3 times. If he fails, diff --git a/Gui/Viewport.cs b/Gui/Viewport.cs index ac5a5db..e606aba 100644 --- a/Gui/Viewport.cs +++ b/Gui/Viewport.cs @@ -2,7 +2,7 @@ namespace SharpDune.Gui; -class Viewport +static class Viewport { static uint s_tickCursor; /*!< Stores last time Viewport changed the cursor spriteID. */ static uint s_tickMapScroll; /*!< Stores last time Viewport ran MapScroll function. */ diff --git a/Gui/Widget.cs b/Gui/Widget.cs index a0db029..e93b9f9 100644 --- a/Gui/Widget.cs +++ b/Gui/Widget.cs @@ -188,7 +188,7 @@ class WidgetScrollbar internal ScrollbarDrawProc drawProc; /*!< Draw proc (called on every draw). Can be null. */ } -class Widget +static class Widget { /* Layout and other properties of the widgets. */ internal static WidgetProperties[] g_widgetProperties = [ //[22] diff --git a/Gui/WidgetClick.cs b/Gui/WidgetClick.cs index f416e95..5776bb7 100644 --- a/Gui/WidgetClick.cs +++ b/Gui/WidgetClick.cs @@ -2,7 +2,7 @@ namespace SharpDune.Gui; -class WidgetClick +static class WidgetClick { static ushort s_savegameIndexBase; static ushort s_savegameCountOnDisk; /*!< Amount of savegames on disk. */ diff --git a/Gui/WidgetDraw.cs b/Gui/WidgetDraw.cs index 52b269f..0e83281 100644 --- a/Gui/WidgetDraw.cs +++ b/Gui/WidgetDraw.cs @@ -2,7 +2,7 @@ namespace SharpDune.Gui; -class WidgetDraw +static class WidgetDraw { /* * Draw the panel on the right side of the screen, with the actions of the diff --git a/House.cs b/House.cs index 6120668..674ebb0 100644 --- a/House.cs +++ b/House.cs @@ -182,7 +182,7 @@ class HouseInfo internal string voiceFilename; /*!< Pointer to filename with the voices of the house. */ } -class House +static class House { /* * HouseAnimation flags diff --git a/IniFile.cs b/IniFile.cs index 64381a7..4e92546 100644 --- a/IniFile.cs +++ b/IniFile.cs @@ -2,7 +2,7 @@ namespace SharpDune; -class IniFile +static class IniFile { static string g_sharpduneini; diff --git a/Input/Input.cs b/Input/Input.cs index 9a6f39c..d99bff4 100644 --- a/Input/Input.cs +++ b/Input/Input.cs @@ -35,7 +35,7 @@ enum InputFlagsEnum INPUT_FLAG_UNKNOWN_2000 = 0x2000 /*!< ?? */ } -class Input +static class Input { static readonly ushort[] s_history = new ushort[128]; /*!< History of input commands. */ static ushort s_historyHead; /*!< The current head inside the #s_history array. */ diff --git a/Input/Mouse.cs b/Input/Mouse.cs index 2e515dc..0947f4f 100644 --- a/Input/Mouse.cs +++ b/Input/Mouse.cs @@ -2,7 +2,7 @@ namespace SharpDune.Input; -class Mouse +static class Mouse { internal static ushort g_mouseLock; /*!< Lock for when handling mouse movement. */ internal static ushort g_mouseX; /*!< Current X position of the mouse. */ diff --git a/Load.cs b/Load.cs index 2ac7c6f..f8ac5f4 100644 --- a/Load.cs +++ b/Load.cs @@ -2,7 +2,7 @@ namespace SharpDune; -class Load +static class Load { /* * In case the current house is Mercenary, another palette is loaded. diff --git a/Map.cs b/Map.cs index 8062532..689ee1d 100644 --- a/Map.cs +++ b/Map.cs @@ -75,7 +75,7 @@ class MapInfo internal ushort sizeY; /*!< Height of the map. */ } -class Map +static class Map { internal static ushort[] g_mapTileID = new ushort[64 * 64]; diff --git a/Object.cs b/Object.cs index 789fdb2..307e512 100644 --- a/Object.cs +++ b/Object.cs @@ -127,7 +127,7 @@ class ObjectInfo internal byte availableHouse; /*!< To which house this Structure / Unit is available. */ } -class Object +static class Object { /* * Clear variable4 in a safe (and recursive) way from an object. diff --git a/Os/Common.cs b/Os/Common.cs index d4a2512..c7b52b9 100644 --- a/Os/Common.cs +++ b/Os/Common.cs @@ -2,7 +2,7 @@ namespace SharpDune.Os; -class Common +static class Common { internal static bool AreArraysEqual(Span array1, int index1, Span array2, int index2, int count) { diff --git a/Os/Endian.cs b/Os/Endian.cs index 09d0086..69fd99b 100644 --- a/Os/Endian.cs +++ b/Os/Endian.cs @@ -2,7 +2,7 @@ namespace SharpDune.Os; -class Endian +static class Endian { static ushort Endian_BSwap16(ushort x) => (ushort)((x & 0xFF00) >> 8 | (x & 0x00FF) << 8); diff --git a/Os/Math.cs b/Os/Math.cs index e5d3cf8..cbd5477 100644 --- a/Os/Math.cs +++ b/Os/Math.cs @@ -2,7 +2,7 @@ namespace SharpDune.Os; -class Math +static class Math { internal static short Clamp(short a, short b, short c) => System.Math.Min(System.Math.Max(a, b), c); diff --git a/Os/Sleep.cs b/Os/Sleep.cs index 2635c01..22ea489 100644 --- a/Os/Sleep.cs +++ b/Os/Sleep.cs @@ -2,7 +2,7 @@ namespace SharpDune.Os; -class Sleep +static class Sleep { #if !WITH_SDL && !WITH_SDL2 internal static void SleepIdle() => diff --git a/Pool/PoolHouse.cs b/Pool/PoolHouse.cs index 5e574cc..41cdff9 100644 --- a/Pool/PoolHouse.cs +++ b/Pool/PoolHouse.cs @@ -1,6 +1,6 @@ namespace SharpDune.Pool; -class PoolHouse +static class PoolHouse { enum HouseIndex { diff --git a/Pool/PoolStructure.cs b/Pool/PoolStructure.cs index 8622778..ac08acf 100644 --- a/Pool/PoolStructure.cs +++ b/Pool/PoolStructure.cs @@ -1,6 +1,6 @@ namespace SharpDune.Pool; -class PoolStructure +static class PoolStructure { internal enum StructureIndex { diff --git a/Pool/PoolTeam.cs b/Pool/PoolTeam.cs index b76cc15..7fbeaf3 100644 --- a/Pool/PoolTeam.cs +++ b/Pool/PoolTeam.cs @@ -1,6 +1,6 @@ namespace SharpDune.Pool; -class PoolTeam +static class PoolTeam { enum TeamIndex { diff --git a/Pool/PoolUnit.cs b/Pool/PoolUnit.cs index 78f3011..64e90d7 100644 --- a/Pool/PoolUnit.cs +++ b/Pool/PoolUnit.cs @@ -1,6 +1,6 @@ namespace SharpDune.Pool; -class PoolUnit +static class PoolUnit { internal enum UnitIndex { diff --git a/Save.cs b/Save.cs index 73a9cea..4e787a3 100644 --- a/Save.cs +++ b/Save.cs @@ -4,7 +4,7 @@ namespace SharpDune; delegate bool SaveProc(BinaryWriter bw); -class Save +static class Save { /* * Save the game to a filename diff --git a/SaveLoad/SaveLoad.cs b/SaveLoad/SaveLoad.cs index 448fb2c..52f09b0 100644 --- a/SaveLoad/SaveLoad.cs +++ b/SaveLoad/SaveLoad.cs @@ -48,7 +48,7 @@ class SaveLoadDesc //internal object address; /*!< The address of the element. */ } -class SaveLoad +static class SaveLoad { //static int offset(Type c, string m) //(((size_t)&((c *)8)->m) - 8) //{ diff --git a/SaveLoad/SaveLoadHouse.cs b/SaveLoad/SaveLoadHouse.cs index 5eaafec..6aeeadc 100644 --- a/SaveLoad/SaveLoadHouse.cs +++ b/SaveLoad/SaveLoadHouse.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadHouse +static class SaveLoadHouse { static readonly SaveLoadDesc[] s_saveHouse = [ SLD_ENTRY2(SLDT_UINT16, nameof(CHouse.index), SLDT_UINT8), diff --git a/SaveLoad/SaveLoadInfo.cs b/SaveLoad/SaveLoadInfo.cs index 75c5168..7fe26eb 100644 --- a/SaveLoad/SaveLoadInfo.cs +++ b/SaveLoad/SaveLoadInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.SaveLoad; -class SaveLoadInfo +static class SaveLoadInfo { static readonly SaveLoadDesc[] s_saveInfo = [ SLD_GSLD(() => g_scenario, g_saveScenario), diff --git a/SaveLoad/SaveLoadMap.cs b/SaveLoad/SaveLoadMap.cs index cb57a11..56f6195 100644 --- a/SaveLoad/SaveLoadMap.cs +++ b/SaveLoad/SaveLoadMap.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadMap +static class SaveLoadMap { /* * Load a Tile structure to a file (Little endian) diff --git a/SaveLoad/SaveLoadObject.cs b/SaveLoad/SaveLoadObject.cs index fe4d8c9..d51cf48 100644 --- a/SaveLoad/SaveLoadObject.cs +++ b/SaveLoad/SaveLoadObject.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadObject +static class SaveLoadObject { internal static readonly SaveLoadDesc[] g_saveObject = [ SLD_ENTRY(SLDT_UINT16, nameof(CObject.index)), diff --git a/SaveLoad/SaveLoadScenario.cs b/SaveLoad/SaveLoadScenario.cs index a158c6d..fce79d1 100644 --- a/SaveLoad/SaveLoadScenario.cs +++ b/SaveLoad/SaveLoadScenario.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadScenario +static class SaveLoadScenario { static readonly SaveLoadDesc[] s_saveReinforcement = [ SLD_ENTRY(SLDT_UINT16, nameof(Reinforcement.unitID)), diff --git a/SaveLoad/SaveLoadScriptEngine.cs b/SaveLoad/SaveLoadScriptEngine.cs index 5480d6b..a411de7 100644 --- a/SaveLoad/SaveLoadScriptEngine.cs +++ b/SaveLoad/SaveLoadScriptEngine.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadScriptEngine +static class SaveLoadScriptEngine { internal static readonly SaveLoadDesc[] g_saveScriptEngine = [ SLD_ENTRY(SLDT_UINT16, nameof(ScriptEngine.delay)), diff --git a/SaveLoad/SaveLoadStructure.cs b/SaveLoad/SaveLoadStructure.cs index f85c52a..72d5830 100644 --- a/SaveLoad/SaveLoadStructure.cs +++ b/SaveLoad/SaveLoadStructure.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadStructure +static class SaveLoadStructure { static readonly SaveLoadDesc[] s_saveStructure = [ SLD_SLD(nameof(CStructure.o), g_saveObject), diff --git a/SaveLoad/SaveLoadTeam.cs b/SaveLoad/SaveLoadTeam.cs index 97354ae..3d5380c 100644 --- a/SaveLoad/SaveLoadTeam.cs +++ b/SaveLoad/SaveLoadTeam.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadTeam +static class SaveLoadTeam { static readonly SaveLoadDesc[] s_saveTeam = [ SLD_ENTRY(SLDT_UINT16, nameof(CTeam.index)), diff --git a/SaveLoad/SaveLoadUnit.cs b/SaveLoad/SaveLoadUnit.cs index cbb4e49..1361a23 100644 --- a/SaveLoad/SaveLoadUnit.cs +++ b/SaveLoad/SaveLoadUnit.cs @@ -1,6 +1,6 @@ namespace SharpDune.SaveLoad; -class SaveLoadUnit +static class SaveLoadUnit { static readonly SaveLoadDesc[] s_saveUnitOrientation = [ SLD_ENTRY(SLDT_INT8, nameof(Dir24.speed)), diff --git a/Scenario.cs b/Scenario.cs index 05dfcc3..fdda4bb 100644 --- a/Scenario.cs +++ b/Scenario.cs @@ -42,7 +42,7 @@ internal CScenario() } } -class Scenario +static class Scenario { internal static CScenario g_scenario = new(); diff --git a/Script/General.cs b/Script/General.cs index 66db61e..5b2fb88 100644 --- a/Script/General.cs +++ b/Script/General.cs @@ -2,7 +2,7 @@ namespace SharpDune.Script; -class General +static class General { /* * Suspend the script execution for a set amount of ticks. diff --git a/Script/Script.cs b/Script/Script.cs index 83980a1..269143a 100644 --- a/Script/Script.cs +++ b/Script/Script.cs @@ -60,7 +60,7 @@ class ScriptInfo internal ushort isAllocated; /*!< Memory has been allocated on load. */ } -class Script +static class Script { static readonly ScriptInfo s_scriptStructure = new(); static readonly ScriptInfo s_scriptTeam = new(); diff --git a/Script/ScriptStructure.cs b/Script/ScriptStructure.cs index f017de7..25289e4 100644 --- a/Script/ScriptStructure.cs +++ b/Script/ScriptStructure.cs @@ -2,7 +2,7 @@ namespace SharpDune.Script; -class ScriptStructure +static class ScriptStructure { /* * Get the state of the current structure. diff --git a/Script/ScriptTeam.cs b/Script/ScriptTeam.cs index 7bcfb4e..c71bdea 100644 --- a/Script/ScriptTeam.cs +++ b/Script/ScriptTeam.cs @@ -2,7 +2,7 @@ namespace SharpDune.Script; -class ScriptTeam +static class ScriptTeam { /* * Gets the amount of members in the current team. diff --git a/Script/ScriptUnit.cs b/Script/ScriptUnit.cs index 963429f..6c2c076 100644 --- a/Script/ScriptUnit.cs +++ b/Script/ScriptUnit.cs @@ -10,7 +10,7 @@ class Pathfinder_Data internal byte[] buffer; /*!< A buffer to store the route. */ } -class ScriptUnit +static class ScriptUnit { static readonly short[] s_mapDirection = [-64, -63, 1, 65, 64, 63, -1, -65]; /*!< Tile index change when moving in a direction. */ diff --git a/SharpDune.cs b/SharpDune.cs index 3f5d893..5e8ef8e 100644 --- a/SharpDune.cs +++ b/SharpDune.cs @@ -25,7 +25,7 @@ class XYPosition internal ushort y; /*!< Y coordinate. */ } -class SharpDune +static class SharpDune { internal const string window_caption = "SharpDUNE - v0.1"; internal static bool g_dune2_enhanced = true; /*!< If false, the game acts exactly like the original Dune2, including bugs. */ diff --git a/Sprites.cs b/Sprites.cs index 078d3c3..0337f09 100644 --- a/Sprites.cs +++ b/Sprites.cs @@ -49,7 +49,7 @@ enum IconMapEntries ICM_ICONGROUP_EOF = 27 /*!< End of file spriteIDs. */ } -class Sprites +static class Sprites { internal static /* uint8** */byte[][] g_sprites; static ushort s_spritesCount; diff --git a/String.cs b/String.cs index 3f1f7c7..75653d5 100644 --- a/String.cs +++ b/String.cs @@ -17,7 +17,7 @@ enum Language INVALID = 0xFF } -class String +static class String { static string[] s_strings; diff --git a/Structure.cs b/Structure.cs index 1fefd71..8326a43 100644 --- a/Structure.cs +++ b/Structure.cs @@ -128,7 +128,7 @@ class XYSize internal ushort height; /*!< Vertical length. */ } -class Structure +static class Structure { internal static ushort g_structureActivePosition; internal static ushort g_structureActiveType; diff --git a/Table/TableActionInfo.cs b/Table/TableActionInfo.cs index 9221dd3..2c9fd5a 100644 --- a/Table/TableActionInfo.cs +++ b/Table/TableActionInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableActionInfo +static class TableActionInfo { internal static ActionInfo[] g_table_actionInfo = [ //[ACTION_MAX] new() { /* 0 */ diff --git a/Table/TableAnimation.cs b/Table/TableAnimation.cs index 4b3f30e..931e7e5 100644 --- a/Table/TableAnimation.cs +++ b/Table/TableAnimation.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableAnimation +static class TableAnimation { internal static AnimationCommandStruct[][] g_table_animation_unitMove = [ //[8][8] [ diff --git a/Table/TableExplosion.cs b/Table/TableExplosion.cs index 33ca701..0295267 100644 --- a/Table/TableExplosion.cs +++ b/Table/TableExplosion.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableExplosion +static class TableExplosion { /* EXPLOSION_IMPACT_SMALL */ static readonly ExplosionCommandStruct[] s_explosion00 = [ diff --git a/Table/TableHouseAnimation.cs b/Table/TableHouseAnimation.cs index ab49112..c59ed79 100644 --- a/Table/TableHouseAnimation.cs +++ b/Table/TableHouseAnimation.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableHouseAnimation +static class TableHouseAnimation { internal static HouseAnimation_Animation[][] g_table_houseAnimation_animation = [ //[HOUSEANIMATION_MAX][32] [ /* 0 - intro */ diff --git a/Table/TableHouseInfo.cs b/Table/TableHouseInfo.cs index de2f20e..0a13bd4 100644 --- a/Table/TableHouseInfo.cs +++ b/Table/TableHouseInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableHouseInfo +static class TableHouseInfo { internal static HouseInfo[] g_table_houseInfo = [ //[HOUSE_MAX] new() { diff --git a/Table/TableLandscapeInfo.cs b/Table/TableLandscapeInfo.cs index 207b572..f250127 100644 --- a/Table/TableLandscapeInfo.cs +++ b/Table/TableLandscapeInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableLandscapeInfo +static class TableLandscapeInfo { internal static LandscapeInfo[] g_table_landscapeInfo = [ //[LST_MAX] new() { /* 0 / LST_NORMAL_SAND */ diff --git a/Table/TableMovementType.cs b/Table/TableMovementType.cs index d680d39..56dd683 100644 --- a/Table/TableMovementType.cs +++ b/Table/TableMovementType.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableMovementType +static class TableMovementType { internal static string[] g_table_movementTypeName = [ diff --git a/Table/TableSelectionType.cs b/Table/TableSelectionType.cs index 4c7877b..c3a6623 100644 --- a/Table/TableSelectionType.cs +++ b/Table/TableSelectionType.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableSelectionType +static class TableSelectionType { internal static readonly SelectionTypeStruct[] g_table_selectionType = [ //[8] [(int)SelectionType.SELECTIONTYPE_MAX] new() { diff --git a/Table/TableSound.cs b/Table/TableSound.cs index 0aa89d6..fb980aa 100644 --- a/Table/TableSound.cs +++ b/Table/TableSound.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableSound +static class TableSound { /* Available voices. * Prefix : diff --git a/Table/TableStrings.cs b/Table/TableStrings.cs index 231ef0b..e501545 100644 --- a/Table/TableStrings.cs +++ b/Table/TableStrings.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableStrings +static class TableStrings { internal enum Text { diff --git a/Table/TableStructureInfo.cs b/Table/TableStructureInfo.cs index 28532ba..1a11f2a 100644 --- a/Table/TableStructureInfo.cs +++ b/Table/TableStructureInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableStructureInfo +static class TableStructureInfo { internal static StructureInfo[] g_table_structureInfo = [ //[STRUCTURE_MAX] new() { /* 0 */ diff --git a/Table/TableTeamAction.cs b/Table/TableTeamAction.cs index 93a3870..cc89d4e 100644 --- a/Table/TableTeamAction.cs +++ b/Table/TableTeamAction.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableTeamAction +static class TableTeamAction { internal static string[] g_table_teamActionName = [ diff --git a/Table/TableTileDiff.cs b/Table/TableTileDiff.cs index aa1ae3e..4510d28 100644 --- a/Table/TableTileDiff.cs +++ b/Table/TableTileDiff.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableTileDiff +static class TableTileDiff { internal static short[] g_table_mapDiff = [ //[4] -64, 1, 64, -1 diff --git a/Table/TableUnitInfo.cs b/Table/TableUnitInfo.cs index dc1fd79..5409f0c 100644 --- a/Table/TableUnitInfo.cs +++ b/Table/TableUnitInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableUnitInfo +static class TableUnitInfo { internal static ushort[] g_table_actionsAI = [(ushort)ActionType.ACTION_HUNT, (ushort)ActionType.ACTION_AREA_GUARD, (ushort)ActionType.ACTION_AMBUSH, (ushort)ActionType.ACTION_GUARD]; diff --git a/Table/TableWidget.cs b/Table/TableWidget.cs index cb17917..07ae60e 100644 --- a/Table/TableWidget.cs +++ b/Table/TableWidget.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableWidget +static class TableWidget { internal static CWidget[] g_table_windowWidgets = [ new() { diff --git a/Table/TableWidgetInfo.cs b/Table/TableWidgetInfo.cs index dbca31d..af80a4e 100644 --- a/Table/TableWidgetInfo.cs +++ b/Table/TableWidgetInfo.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableWidgetInfo +static class TableWidgetInfo { /* TODO : const */ internal static WidgetInfo[] g_table_gameWidgetInfo = [ diff --git a/Table/TableWindowDesc.cs b/Table/TableWindowDesc.cs index 043d655..45c736f 100644 --- a/Table/TableWindowDesc.cs +++ b/Table/TableWindowDesc.cs @@ -2,7 +2,7 @@ namespace SharpDune.Table; -class TableWindowDesc +static class TableWindowDesc { internal static WindowDesc g_saveLoadWindowDesc = new() { diff --git a/Team.cs b/Team.cs index 192726b..3816c9b 100644 --- a/Team.cs +++ b/Team.cs @@ -52,7 +52,7 @@ internal CTeam() } } -class Team +static class Team { static uint s_tickTeamGameLoop; /*!< Indicates next time the GameLoop function is executed. */ diff --git a/Tile.cs b/Tile.cs index 85cbace..6380113 100644 --- a/Tile.cs +++ b/Tile.cs @@ -2,7 +2,7 @@ namespace SharpDune; -class Tile +static class Tile { static readonly sbyte[] _stepX = [ 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, diff --git a/Timer.cs b/Timer.cs index d340819..16e4ea0 100644 --- a/Timer.cs +++ b/Timer.cs @@ -18,7 +18,7 @@ class TimerNode internal bool callonce; } -class Timer +static class Timer { internal static volatile uint g_timerGUI; /*!< Tick counter. Increases with 1 every tick when Timer 1 is enabled. Used for GUI. */ internal static volatile uint g_timerGame; /*!< Tick counter. Increases with 1 every tick when Timer 2 is enabled. Used for game timing (units, . . .). */ diff --git a/Tools.cs b/Tools.cs index 8d58af7..ead1339 100644 --- a/Tools.cs +++ b/Tools.cs @@ -13,7 +13,7 @@ enum IndexType IT_STRUCTURE = 3 } -class Tools +static class Tools { static readonly byte[] s_randomSeed = new byte[4]; static uint s_randomLCG; diff --git a/Unit.cs b/Unit.cs index a5de3f7..9529eaa 100644 --- a/Unit.cs +++ b/Unit.cs @@ -237,7 +237,7 @@ class ActionInfo internal ushort soundID; /*!< The sound played when unit is a Foot unit. */ } -class Unit +static class Unit { static uint s_tickUnitMovement; /*!< Indicates next time the Movement function is executed. */ static uint s_tickUnitRotation; /*!< Indicates next time the Rotation function is executed. */ diff --git a/Video/VideoFps.cs b/Video/VideoFps.cs index 91cbfdc..367c652 100644 --- a/Video/VideoFps.cs +++ b/Video/VideoFps.cs @@ -2,7 +2,7 @@ namespace SharpDune.Video; -class VideoFps +static class VideoFps { delegate void Video_ShowFPS_Proc(Span screen, ushort x, byte digit); diff --git a/Video/VideoSdl2.cs b/Video/VideoSdl2.cs index be6bcee..9958b5c 100644 --- a/Video/VideoSdl2.cs +++ b/Video/VideoSdl2.cs @@ -9,7 +9,7 @@ enum VideoScaleFilter FILTER_HQX /* data; //} -class Wsa +static class Wsa { const int WSAHeaderSize = 36;