|
|
| version 1.5, 2003/10/23 19:31:58 | version 1.8, 2003/10/25 09:08:24 |
|---|---|
| Line 3 | Line 3 |
| #include "strres.h" | #include "strres.h" |
| #include "np2.h" | #include "np2.h" |
| #include "dosio.h" | #include "dosio.h" |
| #include "commng.h" | |
| #include "scrnmng.h" | #include "scrnmng.h" |
| #include "soundmng.h" | #include "soundmng.h" |
| #include "sysmng.h" | #include "sysmng.h" |
| Line 10 | Line 11 |
| #include "mackbd.h" | #include "mackbd.h" |
| #include "ini.h" | #include "ini.h" |
| #include "menu.h" | #include "menu.h" |
| #include "np2open.h" | |
| #include "dialog.h" | #include "dialog.h" |
| #include "memory.h" | #include "memory.h" |
| #include "pccore.h" | #include "pccore.h" |
| Line 244 static void HandleMenuChoice(long wParam | Line 246 static void HandleMenuChoice(long wParam |
| update |= SYS_UPDATECFG; | update |= SYS_UPDATECFG; |
| break; | break; |
| case IDM_SCREENOPT: | |
| dialog_scropt(); | |
| break; | |
| #if defined(NP2GCC) | #if defined(NP2GCC) |
| case IDM_MOUSE: | case IDM_MOUSE: |
| mouse_running(MOUSE_XOR); | mouse_running(MOUSE_XOR); |
| Line 447 static void HandleUpdateEvent(EventRecor | Line 453 static void HandleUpdateEvent(EventRecor |
| hWnd = (WindowPtr)pevent->message; | hWnd = (WindowPtr)pevent->message; |
| BeginUpdate(hWnd); | BeginUpdate(hWnd); |
| scrndraw_redraw(); | if (np2running) { |
| scrndraw_redraw(); | |
| } | |
| else { | |
| np2open(); | |
| } | |
| EndUpdate(hWnd); | EndUpdate(hWnd); |
| } | } |
| Line 458 static void HandleMouseDown(EventRecord | Line 469 static void HandleMouseDown(EventRecord |
| switch(FindWindow(pevent->where, &hWnd)) { | switch(FindWindow(pevent->where, &hWnd)) { |
| case inMenuBar: | case inMenuBar: |
| soundmng_stop(); | if (np2running) { |
| HandleMenuChoice(MenuSelect(pevent->where)); | soundmng_stop(); |
| HandleMenuChoice(MenuSelect(pevent->where)); | |
| } | |
| break; | break; |
| case inDrag: | case inDrag: |
| Line 509 static void eventproc(EventRecord *event | Line 522 static void eventproc(EventRecord *event |
| case keyDown: | case keyDown: |
| case autoKey: | case autoKey: |
| mackbd_f12down(((event->message) & keyCodeMask) >> 8); | if (np2running) { |
| if (event->modifiers & cmdKey) { | mackbd_f12down(((event->message) & keyCodeMask) >> 8); |
| HandleMenuChoice(MenuKey(event->message & charCodeMask)); | if (event->modifiers & cmdKey) { |
| HandleMenuChoice(MenuKey(event->message & charCodeMask)); | |
| } | |
| } | } |
| break; | break; |
| Line 598 int main(int argc, char *argv[]) { | Line 613 int main(int argc, char *argv[]) { |
| Rect wRect; | Rect wRect; |
| EventRecord event; | EventRecord event; |
| UINT t; | |
| dosio_init(); | dosio_init(); |
| file_setcd(target); | file_setcd(target); |
| Line 647 int main(int argc, char *argv[]) { | Line 663 int main(int argc, char *argv[]) { |
| return(0); | return(0); |
| } | } |
| np2open(); | |
| t = GETTICK(); | |
| while((GETTICK() - t) < 100) { | |
| if (WaitNextEvent(everyEvent, &event, 0, 0)) { | |
| eventproc(&event); | |
| } | |
| } | |
| commng_initialize(); | |
| sysmng_initialize(); | sysmng_initialize(); |
| mackbd_initialize(); | mackbd_initialize(); |
| pccore_init(); | pccore_init(); |
| Line 657 int main(int argc, char *argv[]) { | Line 682 int main(int argc, char *argv[]) { |
| mouse_running(MOUSE_ON); | mouse_running(MOUSE_ON); |
| } | } |
| #endif | #endif |
| scrndraw_redraw(); | // scrndraw_redraw(); |
| pccore_reset(); | pccore_reset(); |
| if (np2oscfg.resume) { | if (np2oscfg.resume) { |