diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-11 15:01:21 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-11 15:01:21 +0200 |
commit | e763dfa3ddf5c499875a6e1e9ec91d7fc154c076 (patch) | |
tree | 8fddc5ecbb1d867afa4690cfdde245929cafb21c /plugins/dumb/dumb-kode54/studio/src/options.c | |
parent | dc0b9121ff16d57f92f4ab2b16bf78518d3a8b9b (diff) |
moved DUMB to dynamic plugin
Diffstat (limited to 'plugins/dumb/dumb-kode54/studio/src/options.c')
-rw-r--r-- | plugins/dumb/dumb-kode54/studio/src/options.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/dumb/dumb-kode54/studio/src/options.c b/plugins/dumb/dumb-kode54/studio/src/options.c new file mode 100644 index 00000000..e387db13 --- /dev/null +++ b/plugins/dumb/dumb-kode54/studio/src/options.c @@ -0,0 +1,31 @@ +#include <stdlib.h>
+#include <allegro.h>
+#include "options.h"
+
+
+
+void load_options(void)
+{
+ {
+ char ef[256], cf[256];
+
+ get_executable_name(ef, 256);
+ replace_filename(cf, ef, "studio.ini", 256);
+
+ set_config_file(cf);
+ }
+
+ opt.gfx_w = get_config_int("options", "gfx_w", DEF_GFX_W);
+ opt.gfx_h = get_config_int("options", "gfx_h", DEF_GFX_H);
+
+ atexit(&save_options);
+}
+
+
+
+void save_options(void)
+{
+ set_config_int("options", "gfx_w", opt.gfx_w);
+ set_config_int("options", "gfx_h", opt.gfx_h);
+}
+
|