Line | |
---|
1 | #include <iostream> |
---|
2 | #include <sstream> |
---|
3 | #include <SDL.h> |
---|
4 | #include "anugavis.hh" |
---|
5 | #include "output.hh" |
---|
6 | |
---|
7 | using std::cout; |
---|
8 | using std::endl; |
---|
9 | using std::ostringstream; |
---|
10 | |
---|
11 | extern "C" |
---|
12 | int main(int argc, char *argv[]){ |
---|
13 | if(argc != 2){ |
---|
14 | ostringstream ss; |
---|
15 | ss << "Usage: " << argv[0] << " sww_file_name"; |
---|
16 | output_string(ss.str()); |
---|
17 | return 1; |
---|
18 | } |
---|
19 | try{ |
---|
20 | AnugaVis anuga(argv[1], 640, 480); |
---|
21 | HeightQuantity elevation("elevation", 0, 1, 0.5, 0.5, 0.5); |
---|
22 | HeightQuantity stage("stage", 0, 1, 0, 0, 0.8); |
---|
23 | anuga.add_HeightQuantity(elevation); |
---|
24 | anuga.add_HeightQuantity(stage); |
---|
25 | anuga.run(); |
---|
26 | }catch(const char *str){ |
---|
27 | output_string(string(str)); |
---|
28 | }catch(string &str){ |
---|
29 | output_string(str); |
---|
30 | return 1; |
---|
31 | } |
---|
32 | return 0; |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.