Rev 57 | Rev 75 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 57 | Rev 59 | ||
|---|---|---|---|
| Line 9... | Line 9... | ||
| 9 | #include <windowsx.h> | 
            9 | #include <windowsx.h> | 
          
| 10 | #include <wininet.h> | 
            10 | #include <wininet.h> | 
          
| 11 | #include <commctrl.h> | 
            11 | #include <commctrl.h> | 
          
| 12 | #include <richedit.h> | 
            12 | #include <richedit.h> | 
          
| 13 | #include <stdio.h> | 
            13 | #include <stdio.h> | 
          
| - | 14 | #include <io.h> | 
          |
| 14 | #include <malloc.h> | 
            15 | #include <malloc.h> | 
          
| 15 | #include <math.h> | 
            16 | #include <math.h> | 
          
| 16 | #include <time.h> | 
            17 | #include <time.h> | 
          
| 17 | #include <share.h> | 
            18 | #include <share.h> | 
          
| 18 | #include <shlwapi.h> | 
            19 | #include <shlwapi.h> | 
          
| Line 562... | Line 563... | ||
| 562 | typedef struct text_s  | 
            563 | typedef struct text_s  | 
          
| 563 | { | 
            564 | { | 
          
| 564 | wchar_t *id_string; // ID string for the given text (mallocated), example: "AboutBox_Title"  | 
            565 | wchar_t *id_string; // ID string for the given text (mallocated), example: "AboutBox_Title"  | 
          
| 565 | wchar_t *localized_string; // localized string for the given text (mallocated), example: "A propos de ce logiciel"  | 
            566 | wchar_t *localized_string; // localized string for the given text (mallocated), example: "A propos de ce logiciel"  | 
          
| 566 | } text_t;  | 
            567 | } text_t;  | 
          
| - | 568 | ||
| - | 569 | ||
| - | 570 | // languages | 
          |
| - | 571 | typedef struct language_s  | 
          |
| - | 572 | { | 
          |
| - | 573 | wchar_t name[64]; // language name, e.g. "French", "English" or "Norwegian (norsk)"  | 
          |
| - | 574 | text_t *texts; // mallocated array of localized texts  | 
          |
| - | 575 | int text_count; // size of the texts array  | 
          |
| - | 576 | } language_t;  | 
          |
| 567 | 577 | ||
| 568 | 578 | ||
| 569 | // global declarations | 
            579 | // global declarations | 
          
| 570 | #ifndef DEFINE_GLOBALS | 
            580 | #ifndef DEFINE_GLOBALS | 
          
| 571 | #define GLOBAL extern | 
            581 | #define GLOBAL extern | 
          
| 572 | #else | 
            582 | #else | 
          
| 573 | #define GLOBAL | 
            583 | #define GLOBAL | 
          
| 574 | #endif | 
            584 | #endif | 
          
| - | 585 | GLOBAL int language_id;  | 
          |
| 575 | GLOBAL bool is_registered;  | 
            586 | GLOBAL bool is_registered;  | 
          
| 576 | GLOBAL bool terminate_everything;  | 
            587 | GLOBAL bool terminate_everything;  | 
          
| 577 | GLOBAL HINSTANCE hAppInstance; | 
            588 | GLOBAL HINSTANCE hAppInstance; | 
          
| 578 | GLOBAL wchar_t app_path[MAX_PATH];  | 
            589 | GLOBAL wchar_t app_path[MAX_PATH];  | 
          
| 579 | GLOBAL wchar_t os_language[64];  | 
            - | |
| 580 | GLOBAL wchar_t load_pathname[MAX_PATH];  | 
            590 | GLOBAL wchar_t load_pathname[MAX_PATH];  | 
          
| 581 | GLOBAL wchar_t save_pathname[MAX_PATH];  | 
            591 | GLOBAL wchar_t save_pathname[MAX_PATH];  | 
          
| - | 592 | GLOBAL HMENU hMainMenu; | 
          |
| - | 593 | GLOBAL HACCEL hMainAccelerators; | 
          |
| 582 | GLOBAL HWND hMainWnd; | 
            594 | GLOBAL HWND hMainWnd; | 
          
| 583 | GLOBAL HWND hChatterChannelsWnd; | 
            595 | GLOBAL HWND hChatterChannelsWnd; | 
          
| 584 | GLOBAL HWND hGamesWnd; | 
            596 | GLOBAL HWND hGamesWnd; | 
          
| 585 | GLOBAL HWND hMOTDWnd; | 
            597 | GLOBAL HWND hMOTDWnd; | 
          
| 586 | GLOBAL HWND hOpponentsWnd; | 
            598 | GLOBAL HWND hOpponentsWnd; | 
          
| Line 636... | Line 648... | ||
| 636 | GLOBAL backgroundsprite_t custombg; | 
            648 | GLOBAL backgroundsprite_t custombg; | 
          
| 637 | // main objects | 
            649 | // main objects | 
          
| 638 | GLOBAL options_t options; | 
            650 | GLOBAL options_t options; | 
          
| 639 | GLOBAL board_t the_board; | 
            651 | GLOBAL board_t the_board; | 
          
| 640 | GLOBAL scene_t the_scene; | 
            652 | GLOBAL scene_t the_scene; | 
          
| 641 | //  | 
            653 | // languages | 
          
| 642 | GLOBAL  | 
            654 | GLOBAL language_t *languages; // mallocated  | 
          
| 643 | GLOBAL int  | 
            655 | GLOBAL int language_count;  | 
          
| 644 | // online stuff | 
            656 | // online stuff | 
          
| 645 | GLOBAL wchar_t server_motd[USHRT_MAX];  | 
            657 | GLOBAL wchar_t server_motd[USHRT_MAX];  | 
          
| 646 | GLOBAL onlineplayer_t *onlineplayers; // mallocated  | 
            658 | GLOBAL onlineplayer_t *onlineplayers; // mallocated  | 
          
| 647 | GLOBAL int onlineplayer_count; // -1 means "reply not arrived"  | 
            659 | GLOBAL int onlineplayer_count; // -1 means "reply not arrived"  | 
          
| 648 | GLOBAL bool onlineplayers_updated; // TRUE when display is to be updated  | 
            660 | GLOBAL bool onlineplayers_updated; // TRUE when display is to be updated  |