|
|
| version 1.1, 2003/10/23 10:57:49 | version 1.2, 2004/07/15 19:22:36 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "strres.h" | |
| #include "resource.h" | #include "resource.h" |
| #include "np2.h" | #include "np2.h" |
| #include "dosio.h" | #include "dosio.h" |
| Line 7 | Line 8 |
| #include "dialogs.h" | #include "dialogs.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "scrnbmp.h" | #include "scrnsave.h" |
| #include "font.h" | #include "font.h" |
| Line 26 void dialog_font(void) { | Line 27 void dialog_font(void) { |
| void dialog_writebmp(void) { | void dialog_writebmp(void) { |
| SCRNBMP bmp; | SCRNSAVE ss; |
| char path[MAX_PATH]; | char path[MAX_PATH]; |
| FILEH fh; | const char *ext; |
| bmp = scrnbmp(); | ss = scrnsave_get(); |
| if (bmp) { | if (ss == NULL) { |
| if (dlgs_selectwritefile(path, sizeof(path), "np2.bmp")) { | return; |
| fh = file_create(path); | } |
| if (fh != FILEH_INVALID) { | if (dlgs_selectwritefile(path, sizeof(path), "np2.bmp")) { |
| file_write(fh, bmp->ptr, bmp->size); | ext = file_getext(path); |
| file_close(fh); | if ((ss->type <= SCRNSAVE_8BIT) && |
| } | (!file_cmpname(ext, "gif"))) { |
| scrnsave_writegif(ss, path, SCRNSAVE_AUTO); | |
| } | |
| else if (!file_cmpname(ext, str_bmp)) { | |
| scrnsave_writebmp(ss, path, SCRNSAVE_AUTO); | |
| } | } |
| _MFREE(bmp); | |
| } | } |
| scrnsave_trash(ss); | |
| } | } |