-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (39 loc) · 1.33 KB
/
Copy pathProgram.cs
File metadata and controls
42 lines (39 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpAllods.Shared;
using SharpAllods.Client;
using SharpAllods.Client.GUI;
namespace SharpAllods
{
class Program
{
private static void AddResourceWrapper(string res)
{
Console.Write(" * Adding {0}... ", res);
if (ResourceManager.AddResource(res))
Console.Write("ok.\n");
else Console.Write("fail!\n");
}
[STAThread]
public static void Main(string[] args)
{
AddResourceWrapper("main.res");
AddResourceWrapper("graphics.res");
AddResourceWrapper("music.res");
AddResourceWrapper("sfx.res");
AddResourceWrapper("world.res");
AddResourceWrapper("patch.res");
AddResourceWrapper("scenario.res");
// lets assume that we aren't hosting the server
Mouse.LoadAll();
Fonts.LoadAll();
Widgets.SetRootWidget(new MainMenu());
AllodsWindow.SetVideoMode(1024, 768, false);
// redirect console to clientconsole. note that with this, all messages are tied to the main client loop.
ClientConsole.AttachInterceptor();
AllodsWindow.Run();
}
}
}