1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2014 Mike Becker. All rights reserved. |
4 * Copyright 2016 Mike Becker. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
216 } else { |
212 } else { |
217 fprintf(stderr, "Non-colored terminals are not supported yet."); |
213 fprintf(stderr, "Non-colored terminals are not supported yet."); |
218 endwin(); |
214 endwin(); |
219 return EXIT_FAILURE; |
215 return EXIT_FAILURE; |
220 } |
216 } |
221 atexit(leavescr); |
217 atexit((void(*)())endwin); |
222 |
218 |
223 int exitcode; |
219 int exitcode; |
224 if (settings.singlemachine) { |
220 if (settings.singlemachine) { |
225 game_start_singlemachine(&settings); |
221 game_start_singlemachine(&settings); |
226 exitcode = EXIT_SUCCESS; |
222 exitcode = EXIT_SUCCESS; |