Subversion Repositories eduke32

Rev

Rev 8481 | Rev 8504 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8481 Rev 8482
Line 712... Line 712...
712
    int pos;
712
    int pos;
713
713
714
    if (engineLoadBoard(filename, SW_SHAREWARE ? 1 : 0, (vec3_t *)&Player[0], &Player[0].pang, &Player[0].cursectnum) == -1)
714
    if (engineLoadBoard(filename, SW_SHAREWARE ? 1 : 0, (vec3_t *)&Player[0], &Player[0].pang, &Player[0].cursectnum) == -1)
715
    {
715
    {
716
        TerminateGame();
716
        TerminateGame();
717
#ifdef RENDERTYPEWIN
717
#if 1 /* defined RENDERTYPEWIN */
718
        {
-
 
719
            char msg[256];
-
 
720
            Bsnprintf(msg, 256, "Level not found: %s", filename);
718
        wm_msgbox(apptitle, "Level not found: %s", filename);
721
            wm_msgbox(apptitle, msg);
-
 
722
        }
-
 
723
#else
719
#else
724
        printf("Level Not Found: %s\n", filename);
720
        printf("Level Not Found: %s\n", filename);
725
#endif
721
#endif
726
        exit(0);
722
        exit(0);
727
    }
723
    }
Line 734... Line 730...
734
    FILE *fin;
730
    FILE *fin;
735
731
736
    if (artLoadFiles(filename, 32*1048576) == -1)
732
    if (artLoadFiles(filename, 32*1048576) == -1)
737
    {
733
    {
738
        TerminateGame();
734
        TerminateGame();
739
#ifdef RENDERTYPEWIN
735
#if 1 /* defined RENDERTYPEWIN */
740
        {
-
 
741
            wm_msgbox(apptitle, "Art not found. Please check your GRP file.");
736
        wm_msgbox(apptitle, "Art not found. Please check your GRP file.");
742
        }
-
 
743
#else
737
#else
744
        printf("Art not found. Please check your GRP file.\n");
738
        printf("Art not found. Please check your GRP file.\n");
745
#endif
739
#endif
746
        exit(-1);
740
        exit(-1);
747
    }
741
    }
Line 832... Line 826...
832
void MultiSharewareCheck(void)
826
void MultiSharewareCheck(void)
833
{
827
{
834
    if (!SW_SHAREWARE) return;
828
    if (!SW_SHAREWARE) return;
835
    if (numplayers > 4)
829
    if (numplayers > 4)
836
    {
830
    {
837
#ifdef RENDERTYPEWIN
831
#if 1 /* defined RENDERTYPEWIN */
838
        wm_msgbox(apptitle,"To play a Network game with more than 4 players you must purchase "
832
        wm_msgbox(apptitle,"To play a Network game with more than 4 players you must purchase "
839
                  "the full version.  Read the Ordering Info screens for details.");
833
                  "the full version.  Read the Ordering Info screens for details.");
840
#else
834
#else
841
        printf(
835
        printf(
842
            "\n\nTo play a Network game with more than 4 players you must purchase the\n"
836
            "\n\nTo play a Network game with more than 4 players you must purchase the\n"
Line 2925... Line 2919...
2925
    buildprintf(ds, "Assertion failed: %s %s, line %u", expr, strFile, uLine);
2919
    buildprintf(ds, "Assertion failed: %s %s, line %u", expr, strFile, uLine);
2926
    debug_break();
2920
    debug_break();
2927
2921
2928
    TerminateGame();
2922
    TerminateGame();
2929
2923
2930
#if 1 //def RENDERTYPEWIN
2924
#if 1 /* defined RENDERTYPEWIN */
2931
    wm_msgbox(apptitle, "%s", ds);
2925
    wm_msgbox(apptitle, "%s", ds);
2932
#else
2926
#else
2933
    printf("Assertion failed: %s\n %s, line %u\n", expr, strFile, uLine);
2927
    printf("Assertion failed: %s\n %s, line %u\n", expr, strFile, uLine);
2934
#endif
2928
#endif
2935
    exit(0);
2929
    exit(0);
Line 2943... Line 2937...
2943
2937
2944
    //DSPRINTF(ds, "Error: %s, line %u", strFile, uLine);
2938
    //DSPRINTF(ds, "Error: %s, line %u", strFile, uLine);
2945
    //MONO_PRINT(ds);
2939
    //MONO_PRINT(ds);
2946
    TerminateGame();
2940
    TerminateGame();
2947
2941
2948
#if 1 //def RENDERTYPEWIN
2942
#if 1 /* defined RENDERTYPEWIN */
2949
    {
2943
    {
2950
        char msg[256], *p;
2944
        char msg[256], *p;
2951
        Bsnprintf(msg, sizeof(msg), "Error: %s, line %u\n", strFile, uLine);
2945
        Bsnprintf(msg, sizeof(msg), "Error: %s, line %u\n", strFile, uLine);
2952
        p = &msg[strlen(msg)];
2946
        p = &msg[strlen(msg)];
2953
        va_start(arglist, format);
2947
        va_start(arglist, format);
Line 3341... Line 3335...
3341
3335
3342
3336
3343
void CommandLineHelp(char const * const * argv)
3337
void CommandLineHelp(char const * const * argv)
3344
{
3338
{
3345
    int i;
3339
    int i;
3346
#ifdef RENDERTYPEWIN
3340
#if 1 /* defined RENDERTYPEWIN */
3347
    char *str;
3341
    char *str;
3348
    int strl;
3342
    int strl;
3349
3343
3350
    strl = 30 + 70;
3344
    strl = 30 + 70;
3351
    for (i=0; i < (int)SIZ(cli_arg); i++)
3345
    for (i=0; i < (int)SIZ(cli_arg); i++)
Line 3660... Line 3654...
3660
            }
3654
            }
3661
        }
3655
        }
3662
#if DEBUG
3656
#if DEBUG
3663
        else if (Bstrncasecmp(arg, "debug",5) == 0)
3657
        else if (Bstrncasecmp(arg, "debug",5) == 0)
3664
        {
3658
        {
3665
#ifdef RENDERTYPEWIN
3659
#if 1 /* defined RENDERTYPEWIN */
3666
            char *str;
3660
            char *str;
3667
            int strl;
3661
            int strl;
3668
3662
3669
            strl = 24 + 70;
3663
            strl = 24 + 70;
3670
            for (i=0; i < (int)SIZ(cli_dbg_arg); i++)
3664
            for (i=0; i < (int)SIZ(cli_dbg_arg); i++)
Line 3981... Line 3975...
3981
            if (strchr(UserMapName, '.') == 0)
3975
            if (strchr(UserMapName, '.') == 0)
3982
                strcat(UserMapName, ".map");
3976
                strcat(UserMapName, ".map");
3983
3977
3984
            if ((fil = kopen4load(UserMapName,0)) == -1)
3978
            if ((fil = kopen4load(UserMapName,0)) == -1)
3985
            {
3979
            {
3986
#ifdef RENDERTYPEWIN
-
 
3987
                char msg[256];
-
 
3988
                Bsnprintf(msg, 256, "ERROR: Could not find user map %s!",UserMapName);
3980
                wm_msgbox(apptitle, "ERROR: Could not find user map %s!", UserMapName);
3989
                wm_msgbox(apptitle, msg);
-
 
3990
#else
-
 
3991
                printf("ERROR: Could not find user map %s!\n\n",UserMapName);
-
 
3992
#endif
-
 
3993
                kclose(fil);
3981
                kclose(fil);
3994
                swexit(0);
3982
                swexit(0);
3995
            }
3983
            }
3996
            else
3984
            else
3997
                kclose(fil);
3985
                kclose(fil);