Mercurial > sdl-ios-xcode
annotate EXCLUDE/GLTSF/src/Main.cpp @ 4740:abf528de6d2e
Added condition check macros to make the code clear and easier to debug.
Updated code to use macros.
author | dewyatt |
---|---|
date | Sun, 27 Jun 2010 22:03:08 -0400 |
parents | 0c7c67d4e6ee |
children |
rev | line source |
---|---|
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
1 #include "App.hpp" |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
2 #include <stdexcept> |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
3 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
4 int main(int argc, char *argv[]) |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
5 { |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
6 int Result = EXIT_SUCCESS; |
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
7 try |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
8 { |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
9 App theApp; |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
10 theApp.Run(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
11 } |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
12 catch (const std::exception& e) |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
13 { |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
14 printf("Error: %s\n", e.what()); |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
15 Result = EXIT_FAILURE; |
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
16 } |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
17 catch (...) |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
18 { |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
19 printf("Unhandled exception\n"); |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
20 Result = EXIT_FAILURE; |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
21 } |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
22 system("PAUSE"); |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
23 return Result; |
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
24 } |