extern void tab_generate();
extern void ulaw_generate();
-int em_main(int argc, char **argv)
+int em_main_OLD(int argc, char **argv)
{
int result;
int option;
return(result);
}
+int em_main()
+{
+ int result;
+
+ /* pre-calculate some data */
+ tab_generate();
+ ulaw_generate();
+
+ progname = "emerald mine";
+
+ result = open_all();
+ if(result)
+ goto fail;
+
+ result = game_start();
+ if(result)
+ goto fail;
+
+ result = 0;
+fail:
+ close_all();
+ return(result);
+}
+
/* massive kludge for buffer overflows
* i cant think of an elegant way to handle this situation.
* oh wait yes i can. dynamically allocate each string. oh well