コード例 #1
0
ファイル: newmis.cpp プロジェクト: joequant/raceintospace
void MisOrd(char num)
{
    int i, j = 0;

    ShBox(63, 19, 257, 173);
    InBox(74, 36, 246, 163);
    display::graphics.setForegroundColor(36);
    draw_string(77, 30, "       LAUNCH ORDER");

    for (i = 0; i < num; i++) {
        InBox(78, 39 + 21 * j, 105, 55 + 21 * j);
        draw_small_flag(Order[i].plr, 79, 40 + 21 * j);
        display::graphics.setForegroundColor(34);
        draw_string(110, 45 + 21 * j, "SCHEDULED LAUNCH");
        draw_string(110, 52 + 21 * j, "DATE: ");
        display::graphics.setForegroundColor(1);

        draw_string(0, 0,
                    Month[Data->P[Order[i].plr].Mission[Order[i].loc].Month]);

        draw_string(0, 0, " 19");
        draw_number(0, 0, Data->Year);
        j++;
    };

    FadeIn(2, display::graphics.palette(), 10, 0, 0);

    WaitForMouseUp();

    WaitForKeyOrMouseDown();

    WaitForMouseUp();

    FadeOut(2, display::graphics.palette(), 10, 0, 0);
}
コード例 #2
0
ファイル: review.cpp プロジェクト: joequant/raceintospace
void MisRev(char plr, int pres)
{
    if (!AI[plr]) {
        music_start((pres > 0) ? M_SUCCESS : M_UNSUCC);
    }

    FadeOut(2, display::graphics.palette(), 10, 0, 0);
    display::graphics.screen()->clear(0);
    ShBox(0, 0, 319, 22);
    InBox(3, 3, 30, 19);
    IOBox(243, 3, 316, 19);
    draw_heading(40, 5, "MISSION REVIEW", 0, -1);
    display::graphics.setForegroundColor(1);
    draw_string(258, 13, "CONTINUE");
    draw_small_flag(plr, 4, 4);

    key = 0;
    Draw_Mis_Stats(plr, Data->P[plr].PastMissionCount - 1, 0, 1);
    key = 0;
    display::graphics.screen()->clear(0);
    return;
}
コード例 #3
0
ファイル: review.cpp プロジェクト: joequant/raceintospace
void DrawReview(char plr)
{
    int clr, i, cte, P_value;
    char Fired_Flag = 0, Reset_Flag = 0;

    if (Data->P[plr].PresRev[0] != 0x7F) {
        FadeOut(2, display::graphics.palette(), 10, 0, 0);
    }

    PortPal(plr);
    display::graphics.screen()->clear(0);

    if (Data->P[plr].PresRev[0] == 0x7F) {
        Fired_Flag = 1;
        Data->P[plr].PresRev[0] = 16;
    } else if (Data->P[plr].PresRev[0] >= 16) {
        Reset_Flag = 1;
        Data->P[plr].PresRev[0] = 15;
    }

    ShBox(0, 0, 319, 22);
    ShBox(0, 24, 319, 199);
    draw_small_flag(plr, 4, 4);
    fill_rectangle(5, 28, 314, 195, 0);
    fill_rectangle(5, 122, 314, 195, 0);
    ShBox(6, 123, 313, 194);
    fill_rectangle(7, 124, 312, 193, 9);
    InBox(11, 128, 307, 189);
    fill_rectangle(12, 129, 306, 188, 7);
    ShBox(6, 29, 177, 121);
    ShBox(179, 29, 313, 121);
    InBox(182, 32, 309, 117);
    InBox(3, 3, 30, 19);
    IOBox(243, 3, 316, 19);

    if (plr == 0) {
        draw_heading(40, 5, "PRESIDENTIAL REVIEW", 0, -1);
    } else {
        draw_heading(40, 5, "POLITBURO REVIEW", 0, -1);
    }

    display::graphics.setForegroundColor(1);
    draw_string(257, 13, "CONTINUE");
    display::graphics.setForegroundColor(1);
    draw_string(59, 36, "JOB PERFORMANCE");
    display::graphics.setForegroundColor(6);
    draw_string(8, 46, "GOOD");
    display::graphics.setForegroundColor(1);
    draw_string(8, 77, "FAIR");
    display::graphics.setForegroundColor(9);
    draw_string(8, 109, "POOR");
    display::graphics.setForegroundColor(1);
    draw_number(154, 117, Data->Year - 1);
    draw_number(126, 117, Data->Year - 2);
    draw_number(97, 117, Data->Year - 3);
    draw_number(70, 117, Data->Year - 4);
    draw_number(42, 117, Data->Year - 5);
    fill_rectangle(32, 39, 172, 111, 0);
    GradRect(33, 39, 171, 74, 0);
    GradRect(33, 75, 171, 110, 0);
    display::graphics.setForegroundColor(3);
    pline(60, 40, 60, 110);
    pline(88, 40, 88, 110);
    pline(116, 40, 116, 110);
    pline(144, 40, 144, 110);
    pline(33, 48, 171, 48);
    pline(33, 57, 171, 57);
    pline(33, 66, 171, 66);
    pline(33, 75, 171, 75);
    pline(33, 84, 171, 84);
    pline(33, 93, 171, 93);
    pline(33, 102, 171, 102);
    InBox(32, 39, 172, 111);

    for (i = 0; i < 5; i++) if (Data->P[plr].PresRev[i] > 16) {
            Data->P[plr].PresRev[i] = 16;
        }

    for (i = 0; i < 5; i++) {
        cte = 0;

        if (Data->P[plr].PresRev[i] < 8) {
            if (Data->P[plr].PresRev[i] == 7) {
                cte = 73;
            } else {
                cte = 40 + Data->P[plr].PresRev[i] * 5;
            }
        } else if (Data->P[plr].PresRev[i] > 8) {
            if (Data->P[plr].PresRev[i] == 9) {
                cte = 77;
            } else {
                cte = 80 + (Data->P[plr].PresRev[i] - 10) * 5;
            }
        };

        if (Data->P[plr].PresRev[i] == 8) {
            cte = 73;
        }

        fill_rectangle(166 - i * 28, 75, 151 - i * 28, cte, 5 + ((Data->P[plr].PresRev[i] <= 8) ? 0 : 3));
        display::graphics.setForegroundColor(6 + ((Data->P[plr].PresRev[i] <= 8) ? 0 : 3));
        pline(167 - i * 28, 75, 167 - i * 28, cte);
    }

    if (Fired_Flag == 1) {
        clr = 0;

        for (i = 0; i < Data->P[plr].AstroCount; i++)
            if (Data->P[plr].Pool[i].Status == AST_ST_DEAD) {
                clr++;
            }

        Data->P[plr].PresRev[0] = (clr >= 2) ? 17 : 16;
    }

    DrawRevText(plr, Data->P[plr].PresRev[0]);

    if (Data->P[plr].PresRev[0] == 17) {
        Data->P[plr].PresRev[0] = 16;
    }

    P_value = 0;

    // 0 pres. 1 v.p.
    if (plr == 0) {
        if (Data->P[plr].PresRev[0] <= 4 || Data->P[plr].PresRev[0] >= 11) {
            P_value = 0;
        } else {
            P_value = 1;
        }
    };

    if (plr == 1) {
        if (Data->P[plr].PresRev[0] <= 4 || Data->P[plr].PresRev[0] >= 12) {
            P_value = 0;
        } else {
            P_value = 1;
        }
    }

    if (plr == 0) {
        if (Data->Year <= 60) {
            if (P_value == 0) {
                PresPict(0);
            } else {
                PresPict(1);
            }
        } else if (Data->Year >= 61 && Data->Year <= 63) {
            if (P_value == 0) {
                PresPict(2);
            } else {
                PresPict(3);
            }
        } else if (Data->Year >= 64 && Data->Year <= 68) {
            if (P_value == 0) {
                PresPict(4);
            } else {
                PresPict(5);
            }
        } else if (Data->Year >= 69 && Data->Year <= 73) {
            if (P_value == 0) {
                PresPict(6);
            } else {
                PresPict(7);
            }
        } else if (Data->Year >= 74 && Data->Year <= 76) {
            if (P_value == 0) {
                PresPict(8);
            } else {
                PresPict(9);
            }
        } else if (Data->Year >= 77) {
            if (P_value == 0) {
                PresPict(10);
            } else {
                PresPict(11);
            }
        }
    }

    if (plr == 1) {
        if (Data->Year < 61) {
            if (P_value == 0) {
                PresPict(14);
            } else {
                PresPict(15);
            }
        } else if (Data->Year <= 64) {
            if (P_value == 0) {
                PresPict(12);
            } else {
                PresPict(13);
            }
        } else if (Data->Year >= 65) {
            if (P_value == 0) {
                PresPict(16);
            } else {
                PresPict(17);
            }
        }
    }

    if (Reset_Flag == 1) {
        Data->P[plr].PresRev[0] = 16;
    }

    FadeIn(2, display::graphics.palette(), 10, 0, 0);

    return;
}
コード例 #4
0
ファイル: rush.cpp プロジェクト: joequant/raceintospace
void DrawRush(char plr)
{
    int i = 0;
    int k = 0;
    int l = 0;
    int JR = 0;

    FadeOut(2, display::graphics.palette(), 10, 0, 0);

    boost::shared_ptr<display::PalettizedSurface> launchPads(Filesystem::readImage("images/lpads.but.1.png"));
    launchPads->exportPalette();

    display::graphics.screen()->clear(0);
    JR = 0;

    for (l = 0; l < 3; l++) {
        if (Data->P[plr].Mission[l].Joint == 1) {
            JR = 1;
        }

        if (Data->P[plr].Mission[l].MissionCode &&
            Data->P[plr].Mission[l].part == 0) {
            k++;
        }

        if (Data->P[plr].Mission[l].Rushing == 1) {
            Data->P[plr].Cash += 3;
        } else if (Data->P[plr].Mission[l].Rushing == 2) {
            Data->P[plr].Cash += 6;
        }

        Data->P[plr].Mission[l].Rushing = 0; // Clear Data
    }

    if (k == 3) { // Three non joint missions
        Data->P[plr].Mission[0].Month = 2 + Data->Season * 6;
        Data->P[plr].Mission[1].Month = 3 + Data->Season * 6;
        Data->P[plr].Mission[2].Month = 4 + Data->Season * 6;
    };

    if (k == 2 && JR == 0) { // Two non joint missions
        l = 3;

        if (Data->P[plr].Mission[0].MissionCode) {
            Data->P[plr].Mission[0].Month = l + Data->Season * 6;
            l += 2;
        };

        if (Data->P[plr].Mission[1].MissionCode) {
            Data->P[plr].Mission[1].Month = l + Data->Season * 6;
            l += 2;
        };

        if (Data->P[plr].Mission[2].MissionCode) {
            Data->P[plr].Mission[2].Month = l + Data->Season * 6;
        }
    };

    if (k == 1 && JR == 0) { // Single Mission Non joint
        if (Data->P[plr].Mission[0].MissionCode) {
            Data->P[plr].Mission[0].Month = 4 + Data->Season * 6;
        }

        if (Data->P[plr].Mission[1].MissionCode) {
            Data->P[plr].Mission[1].Month = 4 + Data->Season * 6;
        }

        if (Data->P[plr].Mission[2].MissionCode) {
            Data->P[plr].Mission[2].Month = 4 + Data->Season * 6;
        }
    };

    if (k == 2 && JR == 1) { // Two launches, one Joint;
        if (Data->P[plr].Mission[1].part == 1) { // Joint first
            Data->P[plr].Mission[0].Month = 3 + Data->Season * 6;
            Data->P[plr].Mission[1].Month = 3 + Data->Season * 6;
            Data->P[plr].Mission[2].Month = 5 + Data->Season * 6;
        };

        if (Data->P[plr].Mission[2].part == 1) { // Joint second
            Data->P[plr].Mission[0].Month = 3 + Data->Season * 6;
            Data->P[plr].Mission[1].Month = 5 + Data->Season * 6;
            Data->P[plr].Mission[2].Month = 5 + Data->Season * 6;
        };
    };

    if (k == 1 && JR == 1) { //  Single Joint Launch
        if (Data->P[plr].Mission[1].part == 1) { // found on pad 1+2
            Data->P[plr].Mission[0].Month = 4 + Data->Season * 6;
            Data->P[plr].Mission[1].Month = 4 + Data->Season * 6;
        } else {   // found on pad 2+3
            Data->P[plr].Mission[1].Month = 4 + Data->Season * 6;
            Data->P[plr].Mission[2].Month = 4 + Data->Season * 6;
        };
    }

    ShBox(0, 0, 319, 23);
    IOBox(243, 3, 316, 19);
    InBox(3, 3, 30, 19);
    display::graphics.setForegroundColor(1);
    draw_string(263, 13, "ASSIGN");
    draw_small_flag(plr, 4, 4);

    for (i = 0; i < 3; i++) {
        if (Data->P[plr].Mission[i].MissionCode &&
            Data->P[plr].Mission[i].part == 0) {
            ShBox(0, 25 + i * 58, 80, 82 + i * 58 - 1);
            ShBox(83, 25 + i * 58, 319, 82 + i * 58 - 1);

            IOBox(278, 30 + i * 58, 314, 42 + i * 58);
            IOBox(278, 47 + i * 58, 314, 59 + i * 58);
            IOBox(278, 64 + i * 58, 314, 76 + i * 58);

            IOBox(89, 39 + i * 58, 266, 61 + i * 58);
            display::graphics.setForegroundColor(1);
            draw_string(89, 33 + i * 58, "SCHEDULE:");
            draw_string(88, 69 + i * 58, "RUSHING PENALTY: ");
            draw_string(88, 77 + i * 58, "DOWNGRADE PENALTY: ");
            draw_string(199, 69 + i * 58, "COST:");
            OutBox(11 , 33 + i * 58, 69, 74 + i * 58);
            InBox(20, 38 + i * 58, 60, 69 + i * 58);
            display::graphics.screen()->draw(launchPads, 156 * plr, i * 30, 39, 30, 21, 39 + i * 58);

            SetRush(Data->P[plr].Mission[i].Rushing, i);
            display::graphics.setForegroundColor(1);
            draw_heading(55, 5, "MISSION SCHEDULE", 0, -1);

            display::graphics.setForegroundColor(5);

            GetMisType(Data->P[plr].Mission[i].MissionCode);

            draw_string(96, 48 + 58 * i, Mis.Abbr);
            int MisCod;
            MisCod = Data->P[plr].Mission[i].MissionCode;

            if ((MisCod > 24 && MisCod < 32) || MisCod == 33 || MisCod == 34 || MisCod == 35 || MisCod == 37 || MisCod == 40 || MisCod == 41)
                // Show duration level only on missions with a Duration step - Leon
            {
                switch (Data->P[plr].Mission[i].Duration) {
                case 1:
                    draw_string(0, 0, "");
                    break;

                case 2:
                    draw_string(0, 0, " (B)");
                    break;

                case 3:
                    draw_string(0, 0, " (C)");
                    break;

                case 4:
                    draw_string(0, 0, " (D)");
                    break;

                case 5:
                    draw_string(0, 0, " (E)");
                    break;

                case 6:
                    draw_string(0, 0, " (F)");
                    break;

                default:
                    draw_string(0, 0, "");
                    break;
                }
            }

            if (Data->P[plr].Mission[i].Name[24] == 1) {
                display::graphics.setForegroundColor(9);
                draw_string(145, 33 + i * 58, "DOWNGRADED MISSION");
                draw_string(193, 77 + i * 58, "-3 PRESTIGE");
            } else {
                display::graphics.setForegroundColor(7);
                draw_string(145, 33 + i * 58, "ORIGINAL MISSION");
                draw_string(193, 77 + i * 58, "NO PENALTY");
            }

            display::graphics.setForegroundColor(11);
            draw_string(288, 38 + 58 * i, &Mon[Data->P[plr].Mission[i].Month - 0][0]);
            draw_string(288, 55 + 58 * i, &Mon[Data->P[plr].Mission[i].Month - 1][0]);
            draw_string(288, 72 + 58 * i, &Mon[Data->P[plr].Mission[i].Month - 2][0]);
        }; /* End if */
    }; /* End for i */

    return;
}
コード例 #5
0
ファイル: ast2.cpp プロジェクト: BlastarIndia/raceintospace
void DrawLimbo(char plr)
{
    int i;
    int lenprogname;  // Variable to hold and manipulate length of program name
    FadeOut(2, 10, 0, 0);

    helpText = "i039";
    keyHelpText = "k039";
    display::graphics.screen()->clear();
    ShBox(0, 0, 319, 22);
    InBox(3, 3, 30, 19);
    IOBox(243, 3, 316, 19);
    display::graphics.setForegroundColor(1);
    draw_string(258, 13, "CONTINUE");

    if (plr == 0) {
        draw_heading(36, 5, "ASTRONAUT COMPLEX", 0, -1);
    } else {
        draw_heading(40, 5, "COSMONAUT CENTER", 0, -1);
    }

    ShBox(0, 24, 158, 199);
    InBox(9, 51, 90, 102);
    fill_rectangle(25, 129, 153, 195, 0);
    fill_rectangle(5, 129, 19, 195, 0);
    ShBox(6, 130, 18, 161);
    ShBox(6, 163, 18, 194);
    draw_up_arrow(8, 133);
    draw_down_arrow(8, 166);
    ShBox(161, 24, 319, 72);
    InBox(165, 28, 315, 42);
    fill_rectangle(166, 29, 314, 41, 7);
    ShBox(161, 74, 319, 199);
    InBox(165, 77, 315, 89);
    fill_rectangle(166, 78, 314, 88, 10);
    fill_rectangle(10, 52, 89, 101, 7 + plr * 3);
    InBox(165, 46, 315, 67);
    fill_rectangle(166, 47, 314, 66, 0);
    ShBox(167, 48, 239, 65);
    ShBox(241, 48, 313, 65);
    InBox(167, 48, 239, 65);
    InBox(4, 128, 20, 196);
    InBox(24, 128, 154, 196);
    // new boxes
    OutBox(0, 24, 158, 47);
    OutBox(0, 105, 158, 128);
    InBox(9, 28, 148, 42);
    InBox(9, 108, 148, 123);

    display::graphics.setForegroundColor(20);
    draw_string(180, 55, "TRANSFER");

    if (plr == 0) {
        draw_string(178, 62, "ASTRONAUT");
    } else {
        draw_string(178, 62, "COSMONAUT");
    }

    draw_string(256, 55, "FACILITY");
    draw_string(254, 62, "TRANSFER");

    fill_rectangle(166, 78, 314, 88, 10);
    display::graphics.setForegroundColor(11);
    draw_string(185, 85, "TRANSFER TO LOCATION");

    for (i = 0; i < 5; i++) {
        IOBox(165, 93 + 21 * i, 238, 111 + 21 * i);
        IOBox(242, 93 + 21 * i, 315, 111 + 21 * i);

        if (Data->P[plr].Manned[i].Num < 0) {
            InBox(167, 95 + 21 * i, 236, 109 + 21 * i);
            display::graphics.setForegroundColor(17);
        } else {
            display::graphics.setForegroundColor(11);
        }

        lenprogname = (7 - strlen(Data->P[plr].Manned[i].Name)) * 3;
        //lenprogname=(7-lenprogname)*2
        draw_string(181 + lenprogname, 101 + 21 * i, Data->P[plr].Manned[i].Name);
        draw_string(181, 107 + 21 * i, "PROGRAM");

        display::graphics.setForegroundColor(11);
        draw_string(257, 107 + 21 * i, "TRAINING");
        //grMoveTo(254,101+21*i);  This remmed out to manually place the Adv. Training names so they could be centered -Leon

        switch (i) {
        case 0:
            draw_string(258, 101 + 21 * i, "CAPSULE");
            break;

        case 1:
            draw_string(271, 101 + 21 * i, "L.M.");
            break;

        case 2:
            draw_string(268, 101 + 21 * i, "E.V.A.");
            break;

        case 3:
            draw_string(259, 101 + 21 * i, "DOCKING");
            break;

        case 4:
            draw_string(252, 101 + 21 * i, "ENDURANCE");
            break;

        default:
            break;
        }


    }

    display::graphics.setForegroundColor(11);
    draw_string(187, 37, "OPERATION SELECTION");

    display::graphics.setForegroundColor(20);
    //draw_string(256,13,"CONTINUE");
    draw_string(15, 37, "NAME:");
    draw_string(17, 118, "GROUP:");
    draw_string(88, 118, "TENURE:");
    display::graphics.setForegroundColor(11);
    draw_string(102, 60, "MOOD:");
    draw_string(102, 68, "CAP:");
    draw_string(102, 76, "L.M.:");
    draw_string(102, 84, "EVA:");
    draw_string(102, 92, "DOCK:");
    draw_string(102, 100, "END:");
    draw_small_flag(plr, 4, 4);

    return;
}
コード例 #6
0
ファイル: radar.cpp プロジェクト: BlastarIndia/raceintospace
void PadDraw(char plr, char pad)
{
    int i, j, k, l;
    int missions;     // Variable for how many missions each 'naut has flown

    FadeOut(2, 10, 0, 0);
    display::graphics.screen()->clear();
    ShBox(0, 0, 319, 22);
    ShBox(0, 24, 319, 198);
    InBox(3, 3, 30, 19);
    IOBox(243, 3, 316, 19);
    InBox(167, 27, 316, 176);
    fill_rectangle(168, 28, 315, 175, 0);
    IOBox(167, 179, 316, 195);
    ShBox(4, 28, 162, 43);
    InBox(6, 30, 160, 41);
    ShBox(4, 46, 162, 61);
    InBox(6, 48, 160, 59);
    ShBox(4, 68, 162, 97);
    InBox(6, 70, 160, 95);
    ShBox(56, 64, 110, 74);
    InBox(57, 65, 109, 73);
    ShBox(4, 180, 162, 195);
    InBox(6, 182, 160, 193); //sched. duration
    InBox(6, 99, 160, 178);
    display::graphics.setForegroundColor(9);
    draw_string(18, 190, "SCHEDULED DURATION: ");
    display::graphics.setForegroundColor(7);
    int MisCod;
    MisCod = Data->P[plr].Mission[pad].MissionCode;

    if ((MisCod > 24 && MisCod < 37) || MisCod == 40 || MisCod == 41 || MisCod == 43 || MisCod == 44 || MisCod > 45)
        // Show Duration level for manned missions with Duration steps (this keeps the Mission[pad].Duration
        // variable from continuing to show Duration level if mission is scrubbed or downgraded) - Leon
    {
        switch (Data->P[plr].Mission[pad].Duration) {
        case 1:
            draw_string(0, 0, "A");
            break;

        case 2:
            draw_string(0, 0, "B");
            break;

        case 3:
            draw_string(0, 0, "C");
            break;

        case 4:
            draw_string(0, 0, "D");
            break;

        case 5:
            draw_string(0, 0, "E");
            break;

        case 6:
            draw_string(0, 0, "F");
            break;

        default:
            draw_string(0, 0, "NONE");
            break;
        }
    } else {
        if (Data->P[plr].Mission[pad].PCrew - 1 >= 0 || Data->P[plr].Mission[pad].BCrew - 1 >= 0) {
            draw_string(0, 0, "A");
        } else {
            draw_string(0, 0, "NONE");
        }
    }

    display::graphics.setForegroundColor(7);
    draw_string(65, 71, "MISSION");
    draw_small_flag(plr, 4, 4);

    if (Data->P[plr].LaunchFacility[pad] == 1 && Data->P[plr].Mission[pad].MissionCode) {
        PadPict(2 + plr);
    } else if (Data->P[plr].LaunchFacility[pad] == 1 && Data->P[plr].Mission[pad].MissionCode == Mission_None) {
        PadPict(4 + plr);
    } else if (Data->P[plr].LaunchFacility[pad] > 1) {
        PadPict(0 + plr);
    }

    display::graphics.setForegroundColor(1);
    draw_string(15, 37, "STATUS: ");
    display::graphics.setForegroundColor(9);

    if (Data->P[plr].LaunchFacility[pad] == 1) {
        draw_string(0, 0, "OPERATIONAL");
    } else {
        draw_string(0, 0, "DESTROYED");
    }

    display::graphics.setForegroundColor(1);

    if (Data->P[plr].LaunchFacility[pad] > 1) {
        draw_string(15, 56, "REPAIR COST: ");
        display::graphics.setForegroundColor(9);
        draw_number(0, 0, Data->P[plr].LaunchFacility[pad]);
        draw_string(0, 0, "MB");

        if (Data->P[plr].Cash < Data->P[plr].LaunchFacility[pad]) {
            InBox(169, 181, 314, 193);
        }
    } else {
        display::graphics.setForegroundColor(9);

        if (Data->P[plr].Mission[pad].MissionCode == Mission_None) {
            draw_string(15, 56, "NO LAUNCH SCHEDULED");
            InBox(169, 181, 314, 193);
        } else {
            draw_string(15, 56, "PRE-MISSION CHECK");
        }
    }

    display::graphics.setForegroundColor(1);
    draw_string(258, 13, "CONTINUE");

    if (Data->P[plr].LaunchFacility[pad] == 1) {
        display::graphics.setForegroundColor(9);
        draw_string(210, 189, "S");
        display::graphics.setForegroundColor(1);
        draw_string(0, 0, "CRUB MISSION");
    } else {
        display::graphics.setForegroundColor(9);
        draw_string(205, 189, "F");
        display::graphics.setForegroundColor(1);
        draw_string(0, 0, "IX LAUNCH PAD");
    }

    draw_heading(37, 5, "LAUNCH FACILITY", 0, -1);

    switch (pad) {
    case 0:
        draw_heading(201, 5, "A", 0, -1);
        break;

    case 1:
        draw_heading(201, 5, "B", 0, -1);
        break;

    case 2:
        draw_heading(201, 5, "C", 0, -1);
        break;
    }

    display::graphics.setForegroundColor(6);
    MissionName(Data->P[plr].Mission[pad].MissionCode, 11, 81, 20);
    display::graphics.setForegroundColor(1);

    // joint mission part
    if (Data->P[plr].Mission[pad].Joint == 1) {
        ShBox(38, 91, 131, 101);
        InBox(39, 92, 130, 100);
        display::graphics.setForegroundColor(1);

        if (Data->P[plr].Mission[pad].part == 0) {
            draw_string(53, 98, "PRIMARY PART");
        } else {
            draw_string(44, 98, "SECONDARY PART");
        }
    }

    // Hardware to Use

    i = Data->P[plr].Mission[pad].Prog;
    j = Data->P[plr].Mission[pad].PCrew - 1;
    l = Data->P[plr].Mission[pad].BCrew - 1;

    // Crews
    display::graphics.setForegroundColor(7);
    draw_string(13, 107, "PRIMARY CREW  ");

    if (j >= 0) {
        display::graphics.setForegroundColor(11); // Now display the crew number, for player's easy reference - Leon

        if (j == 0) {
            draw_string(0, 0, "(CREW I)");
        }

        if (j == 1) {
            draw_string(0, 0, "(CREW II)");
        }

        if (j == 2) {
            draw_string(0, 0, "(CREW III)");
        }

        if (j == 3) {
            draw_string(0, 0, "(CREW IV)");
        }

        if (j == 4) {
            draw_string(0, 0, "(CREW V)");
        }

        if (j == 5) {
            draw_string(0, 0, "(CREW VI)");
        }

        if (j == 6) {
            draw_string(0, 0, "(CREW VII)");
        }

        if (j == 7) {
            draw_string(0, 0, "(CREW VIII)");
        }

        for (k = 0; k < Data->P[plr].CrewCount[i][j]; k++) {
            // Draw a morale box for each crew member - Leon
            display::graphics.setForegroundColor(1);
            fill_rectangle(13, 110 + 7 * k, 20, 110 + 7 * k, 2); // Top
            fill_rectangle(13, 110 + 7 * k, 13, 116 + 7 * k, 2); // Left
            fill_rectangle(13, 116 + 7 * k, 20, 116 + 7 * k, 4); // Bottom
            fill_rectangle(21, 110 + 7 * k, 21, 116 + 7 * k, 4); // Right

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood >= 65) {
                fill_rectangle(14, 111 + 7 * k, 20, 115 + 7 * k, 16);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood < 65 && Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood >= 40) {
                fill_rectangle(14, 111 + 7 * k, 20, 115 + 7 * k, 11);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood < 40 && Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood >= 20) {
                fill_rectangle(14, 111 + 7 * k, 20, 115 + 7 * k, 8);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood < 20) {
                fill_rectangle(14, 111 + 7 * k, 20, 115 + 7 * k, 0);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Mood == 0) {
                fill_rectangle(14, 111 + 7 * k, 20, 115 + 7 * k, 3);
            }

            display::graphics.setForegroundColor(1);

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Sex == 1) {
                display::graphics.setForegroundColor(5);    // Show female 'nauts in blue
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].RetirementDelay > 0) {
                display::graphics.setForegroundColor(0);    // Show anyone who's announced retirement in black
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Sex == 1 && Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].RetirementDelay > 0) {
                display::graphics.setForegroundColor(7);
            }

            // Show name in purple if 'naut is female AND has announced retirement
            draw_string(25, 115 + 7 * k, &Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Name[0]);
            missions = Data->P[plr].Pool[Data->P[plr].Crew[i][j][k] - 1].Missions;

            if (missions > 0) {
                draw_string(0, 0, " (");
                draw_number(0, 0, missions);
                draw_string(0, 0, ")");
            }
        }

        if (l == -1) {
            draw_string(25, 174, "UNAVAILABLE");
        }
    }

    display::graphics.setForegroundColor(7);
    draw_string(13, 145, "BACKUP CREW  ");

    if (l >= 0) {
        display::graphics.setForegroundColor(11); // Now display the crew number, for player's easy reference - Leon

        if (l == 0) {
            draw_string(0, 0, "(CREW I)");
        }

        if (l == 1) {
            draw_string(0, 0, "(CREW II)");
        }

        if (l == 2) {
            draw_string(0, 0, "(CREW III)");
        }

        if (l == 3) {
            draw_string(0, 0, "(CREW IV)");
        }

        if (l == 4) {
            draw_string(0, 0, "(CREW V)");
        }

        if (l == 5) {
            draw_string(0, 0, "(CREW VI)");
        }

        if (l == 6) {
            draw_string(0, 0, "(CREW VII)");
        }

        if (l == 7) {
            draw_string(0, 0, "(CREW VIII)");
        }

        for (k = 0; k < Data->P[plr].CrewCount[i][l]; k++) {
            // Draw a morale box for each crew member - Leon
            display::graphics.setForegroundColor(1);
            fill_rectangle(13, 148 + 7 * k, 20, 148 + 7 * k, 2); // Top
            fill_rectangle(13, 148 + 7 * k, 13, 154 + 7 * k, 2); // Left
            fill_rectangle(13, 154 + 7 * k, 20, 154 + 7 * k, 4); // Bottom
            fill_rectangle(21, 148 + 7 * k, 21, 154 + 7 * k, 4); // Right

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood >= 65) {
                fill_rectangle(14, 149 + 7 * k, 20, 153 + 7 * k, 16);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood < 65 && Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood >= 40) {
                fill_rectangle(14, 149 + 7 * k, 20, 153 + 7 * k, 11);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood < 40 && Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood >= 20) {
                fill_rectangle(14, 149 + 7 * k, 20, 153 + 7 * k, 8);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood < 20) {
                fill_rectangle(14, 149 + 7 * k, 20, 153 + 7 * k, 0);
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Mood == 0) {
                fill_rectangle(14, 149 + 7 * k, 20, 153 + 7 * k, 3);
            }

            display::graphics.setForegroundColor(1);

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Sex == 1) {
                display::graphics.setForegroundColor(5);    // Show female 'nauts in blue
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].RetirementDelay > 0) {
                display::graphics.setForegroundColor(0);    // But show anyone who's announced retirement in black
            }

            if (Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Sex == 1 && Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].RetirementDelay > 0) {
                display::graphics.setForegroundColor(7);
            }

            // Show name in purple if 'naut is female AND has announced retirement
            draw_string(25, 153 + 7 * k, &Data->P[plr].Pool[Data->P[plr].Crew[i][l][k] - 1].Name[0]);
        }

        if (j == -1) {
            draw_string(25, 136, "UNAVAILABLE");
        }
    }

    if (Data->P[plr].Mission[pad].Prog > 0)
        PatchMe(plr, 126, 40, Data->P[plr].Mission[pad].Prog - 1,
                Data->P[plr].Mission[pad].Patch, 32);

    FadeIn(2, 10, 0, 0);

    return;
}
コード例 #7
0
ファイル: museum.cpp プロジェクト: joequant/raceintospace
void ShowAstrosHist(char plr)
{
    char pos = 0, pos2 = 0, glorf = 0;
    vhptr2 = new display::Surface(112, 55);
    abuf = (struct Astros *) buffer;

    if (Data->P[plr].AstroCount == 0) {
        return;
    }

    memcpy(abuf, Data->P[plr].Pool, sizeof(Data->P[plr].Pool));
    qsort((void *)abuf, Data->P[plr].AstroCount, sizeof(struct Astros), astcomp);

    FadeOut(2, display::graphics.palette(), 5, 0, 0);
    fill_rectangle(1, 39, 157, 184, 3);
    draw_heading(68, 71, "NO", 0, -1);
    draw_heading(46, 90, "MISSION", 0, -1);
    draw_heading(27, 109, "EXPERIENCE", 0, -1);
    vhptr2->copyFrom(display::graphics.screen(), 22, 69, 133, 123);
    PatchMe(0, 0, 0, 0, 0, 32);
    display::graphics.screen()->clear(0);

    ORBox(0, 0, 319, 22, 3); // Draw Inbox around top

    if (plr == 0) {
        draw_heading(45, 4, "ASTRONAUT HISTORY", 0, -1);
    } else {
        draw_heading(45, 4, "COSMONAUT HISTORY", 0, -1);
    }

    IRBox(243, 3, 316, 19, 0); // Inbox around cont box
    ORBox(245, 5, 314, 17, 3); // box for cont box
    InBox(3, 3, 31, 19); // USA inbox

    if (plr == 0) {
        draw_small_flag(0, 4, 4);
    } else {
        draw_small_flag(1, 4, 4);
    }

    display::graphics.setForegroundColor(1);
    draw_string(257, 13, "CONTINUE");
    ShBox(0, 24, 158, 199);
    ShBox(161, 24, 319, 199);
    InBox(233, 29, 314, 80);
    InBox(287, 104, 309, 134);
    IRBox(165, 175, 315, 196, 0);
    IRBox(6, 185, 153, 197, 0);
    ORBox(8, 187, 151, 195, 3);
    IRBox(6, 26, 153, 38, 0);
    ORBox(8, 28, 151, 36, 3);
    display::graphics.setForegroundColor(11);
    draw_string(165, 32, "NAME:");
    draw_string(165, 60, "TENURE:");
    draw_string(165, 78, "MISSIONS: ");
    draw_string(165, 89, "PRESTIGE: ");
    draw_string(165, 99, "SKILLS:");
    draw_string(165, 149, "SPACE DURATION:");
    draw_string(165, 159, "LOCATION: ");
    display::graphics.setForegroundColor(6);
    draw_string(174, 107, "CAPSULE PILOT: ");
    draw_string(174, 115, "L.M. PILOT: ");
    draw_string(174, 123, "E.V.A.: ");
    draw_string(174, 131, "DOCKING: ");
    draw_string(174, 139, "ENDURANCE: ");
    ORBox(167, 177, 202, 194, 3);
    ORBox(204, 177, 239, 194, 3);
    ORBox(241, 177, 276, 194, 3);
    ORBox(278, 177, 313, 194, 3);

    Display_ARROW(0, 179, 179); //left
    Display_ARROW(1, 213, 179); //left arrow
    Display_ARROW(2, 250, 179); //right
    Display_ARROW(3, 290, 179); //right arrow
    display::graphics.setForegroundColor(11);
    draw_string(37, 34, "PREVIOUS MISSION");
    draw_string(47, 193, "NEXT MISSION");
    DisplAst(plr, &pos, &pos2);
    DisplAstData(plr, &pos, &pos2);
    FadeIn(2, display::graphics.palette(), 5, 0, 0);

    WaitForMouseUp();

    while (1) {
        GetMouse();

        // Parse Button actions, note that continue button is not a macro
        if ((x >= 245 && y >= 5 && x <= 314 && y <= 17 && mousebuttons > 0) || key == K_ENTER) {
            InBox(245, 5, 314, 17);

            if (key > 0) {
                delay(300);
                key = 0;
            };

            WaitForMouseUp();

            OutBox(245, 5, 314, 17);

            delete vhptr2;

            vhptr2 = NULL;

            key = 0;

            return;
        }

        pButton(8, 187, 151, 195, UpAstroData(plr, &pos, &pos2), key >> 8, 80);
        pButton(8, 28, 151, 36, DownAstroData(plr, &pos, &pos2), key >> 8, 72);
        pButton(167, 177, 202, 194, ShowAstroBack(plr, &pos, &pos2), key >> 8, 71); //Down to prev Astro
        pButton(204, 177, 239, 194, ShowAstroDown(plr, &pos, &pos2), key >> 8, 75);
        pButton(241, 177, 276, 194, ShowAstroUp(plr, &pos, &pos2), key >> 8, 77);
        pButton(278, 177, 313, 194, ShowAstroFor(plr, &pos, &pos2), key >> 8, 79);

        if (key >= 'A' && key <= 'Z') {
            glorf = 0;

            while (abuf[glorf].Name[0] < key && glorf < Data->P[plr].AstroCount - 1) {
                glorf++;
            }

            pos = glorf;
            DisplAst(plr, &pos, &pos2);
            key = 0;
        }

        key = 0;
    };
}
コード例 #8
0
ファイル: museum.cpp プロジェクト: joequant/raceintospace
void ShowSpHist(char plr)
{
    int pos;

    FadeOut(2, display::graphics.palette(), 5, 0, 0);
    PatchMe(0, 0, 0, 0, 0, 32);
    display::graphics.screen()->clear(0);

    if ((Data->Year == 57 && Data->Season == 0) || Data->P[plr].PastMissionCount == 0) {
        pos = (Data->Year - 57) * 2 + Data->Season;
    } else pos = (Data->P[plr].History[Data->P[plr].PastMissionCount - 1].MissionYear - 57) * 2 +
                     ((Data->P[plr].History[Data->P[plr].PastMissionCount - 1].Month <= 5) ? 0 : 1);

    ORBox(0, 0, 319, 22, 3); // Draw Inbox around top
    draw_heading(48, 5, "MISSION HISTORY", 0, -1);
    IOBox(243, 3, 316, 19);
    InBox(3, 3, 31, 19); // USA inbox
    draw_small_flag(plr, 4, 4);
    display::graphics.setForegroundColor(1);
    draw_string(257, 13, "CONTINUE");

    ORBox(0, 24, 319, 199, 3);
    IRBox(4, 28, 315, 170, 0);
    IRBox(4, 174, 315, 195, 0);
    ORBox(7, 176, 49, 193, 3);
    ORBox(51, 176, 93, 193, 3);
    ORBox(95, 176, 224, 193, 3); //draw the boxes under date
    ORBox(226, 176, 268, 193, 3);
    ORBox(270, 176, 312, 193, 3);
    Display_ARROW(0, 23, 178); //left
    Display_ARROW(1, 63, 178); //left arrow
    Display_ARROW(2, 239, 178); //right
    Display_ARROW(3, 285, 178); //right arrow
    DrawMisHist(plr, &pos);
    FadeIn(2, display::graphics.palette(), 5, 0, 0);

    WaitForMouseUp();

    while (1) {
        GetMouse();
        Mission_Data_Buttons(plr, &pos);

        // Parse Button actions, note that return is embedded in first pButton
        if ((x >= 245 && y >= 5 && x <= 314 && y <= 17 && mousebuttons > 0) || key == K_ENTER) {
            InBox(245, 5, 314, 17);

            if (key > 0) {
                delay(300);
                key = 0;
            };

            WaitForMouseUp();

            OutBox(245, 5, 314, 17);

            return;
        }

        pButton(7, 176, 49, 193, FullRewind(plr, &pos), key >> 8, 71); //FullRewind Button etc..
        pButton(51, 176, 93, 193, RewindOne(plr, &pos), key >> 8, 75);
        pButton(226, 176, 268, 193, FastOne(plr, &pos), key >> 8, 77);
        pButton(270, 176, 312, 193, FullFast(plr, &pos), key >> 8, 79);
        key = 0;
    };
}
コード例 #9
0
ファイル: museum.cpp プロジェクト: joequant/raceintospace
void DPrest(char plr, char *pos, char *pos2)
{
    int i, j = 0, tmp, tt;


    fill_rectangle(12, 129, 295, 190, 0);
    fill_rectangle(70, 31, 175, 40, 3);
    fill_rectangle(183, 31, 300, 40, 3);

    if (*pos2 == -1) {
        display::graphics.setForegroundColor(11);
        draw_string(71, 37, "SPACE FIRSTS:");
        draw_string(187, 37, "TOTAL POINTS:");
    } else {
        display::graphics.setForegroundColor(1);
        draw_string(71, 37, "ATTEMPTS:");
        draw_string(187, 37, "POINTS:");
    }

    display::graphics.setForegroundColor(2);
    tt = 0;

    for (i = *pos; i < *pos + 9 + tt; i++, j++) { // *pos+9+tt
        if (i == 21) {
            i++;
            tt = 1;
        }

        if (i == *pos2) {
            display::graphics.setForegroundColor(11);
        }

        if (i == -1) {
            draw_string(15, 133 + 7 * j, "SUMMARY");
        } else {
            draw_string(15, 133 + 7 * j, &tame[i][0]);

            if (i == *pos2) {
                display::graphics.setForegroundColor(11);
            } else {
                display::graphics.setForegroundColor(12);
            }

            draw_number(150, 133 + 7 * j, Data->Prestige[i].Add[0]);
            draw_number(185, 133 + 7 * j, Data->Prestige[i].Add[1]);
            draw_number(228, 133 + 7 * j, Data->Prestige[i].Add[2]);
            draw_number(265, 133 + 7 * j, Data->Prestige[i].Add[3]);
        }

        display::graphics.setForegroundColor(2);
    }

    fill_rectangle(71, 43, 173, 91, 6 + 3 * plr);
    fill_rectangle(186, 43, 303, 91, 6 + 3 * plr);
    fill_rectangle(10, 86, 55, 92, 3);
    display::graphics.setForegroundColor(3);

    for (i = 1; i < 3; i++) {
        pline(71, 91 - 16 * i, 173, 91 - 16 * i);
    }

    if (*pos2 != -1) {
        if (Data->Prestige[*pos2].Place == -1 && Data->Prestige[*pos2].Year == 0) {
            fill_rectangle(18, 47, 43, 61, 3);
        } else {
            draw_small_flag(Data->Prestige[*pos2].Place, 18, 47);
        }

        i = MAX(Data->Prestige[*pos2].Goal[0], Data->Prestige[*pos2].Goal[1]);

        if (i != 0) {
            j = Data->Prestige[*pos2].Goal[0];
            tmp = Data->Prestige[*pos2].Goal[1];

            fill_rectangle(85, (int) 91 - 48 * ((float)j / i), 111, 91, 5);
            fill_rectangle(133, (int) 91 - 48 * ((float)tmp / i), 159, 91, 8);
            display::graphics.setForegroundColor(11);

            if (j != 0) {
                draw_number(94, 88, j);
            }

            if (tmp != 0) {
                draw_number(142, 88, tmp);
            }

            if (Data->Prestige[*pos2].Year != 0) {
                draw_string(10, 91, Mon[Data->Prestige[*pos2].Month]);
                draw_string(0, 0, " 19");
                draw_number(0, 0, Data->Prestige[*pos2].Year);
            }

        }

        display::graphics.setForegroundColor(3);

        for (i = 0; i < 3; i++) {
            pline(186, 79 - 12 * i, 303, 79 - 12 * i);
        }

        i = MAX(abs(Data->Prestige[*pos2].Points[0]), abs(Data->Prestige[*pos2].Points[1]));
        display::graphics.setForegroundColor(5);
        pline(205, 67, 231, 67);
        display::graphics.setForegroundColor(8);
        pline(258, 67, 284, 67);

        if (i != 0) {
            j = Data->Prestige[*pos2].Points[0];
            tmp = Data->Prestige[*pos2].Points[1];
            fill_rectangle(205, 67, 231, 67 - (float)j * 24 / i, 5);
            fill_rectangle(258, 67, 284, 67 - (float)tmp * 24 / i, 8);
            display::graphics.setForegroundColor(11);

            if (j != 0) {
                draw_number(212, (j > 0) ? 65 : 73, j);
            }

            if (tmp != 0) {
                draw_number(267, (tmp > 0) ? 65 : 73, tmp);
            }
        }
    } else {
        j = 0;
        tmp = 0;

        for (i = 0; i < 28; i++) {
            j += (Data->Prestige[i].Place == 0) ? 1 :  0;
            tmp += (Data->Prestige[i].Place == 1) ? 1 : 0;
        }

        i = MAX(j, tmp);

        if (i != 0) {
            if (j == tmp) {
                fill_rectangle(18, 47, 43, 61, 3);
            } else if (j > tmp) {
                draw_small_flag(0, 18, 47);
            } else {
                draw_small_flag(1, 18, 47);
            }

            fill_rectangle(85, (int) 91 - 48 * ((float)j / i), 111, 91, 5);
            fill_rectangle(133, (int) 91 - 48 * ((float)tmp / i), 159, 91, 8);
            display::graphics.setForegroundColor(11);

            if (j != 0) {
                draw_number(94, 88, j);
            }

            if (tmp != 0) {
                draw_number(142, 88, tmp);
            }
        }  else {
            fill_rectangle(18, 47, 43, 61, 3);
        }

        j = 0;
        tmp = 0;

        for (i = 0; i < 28; i++) {
            j += Data->Prestige[i].Points[0];
            tmp += Data->Prestige[i].Points[1];
        }

        display::graphics.setForegroundColor(3);

        for (i = 0; i < 3; i++) {
            pline(186, 79 - 12 * i, 303, 79 - 12 * i);
        }

        i = MAX(abs(j), abs(tmp));
        pline(205, 67, 231, 67);
        pline(258, 67, 284, 67);

        if (i != 0) {
            fill_rectangle(205, 67, 231, 67 - (float)j * 24 / i, 5);
            fill_rectangle(258, 67, 284, 67 - (float)tmp * 24 / i, 8);
            display::graphics.setForegroundColor(11);

            if (j != 0) {
                draw_number(212, (j > 0) ? 65 : 73, j);
            }

            if (tmp != 0) {
                draw_number(267, (tmp > 0) ? 65 : 73, tmp);
            }
        }
    }

    return;
}
コード例 #10
0
/* Draws the entire Future Missions display, including the mission-
 * specific information. Used to initialize the mission selector
 * interface.
 *
 * This relies on the global buffer vh, which must have been created
 * prior. The future missions button art is loaded into vh by this
 * function.
 *
 * \param plr  The player scheduling the mission's design scheme.
 * \param mis  The mission type.
 * \param pad  0, 1, or 2 depending on which pad is being used.
 */
void DrawFuture(char plr, int mis, char pad)
{
    FadeOut(2, 10, 0, 0);
    Load_FUT_BUT();

    boost::shared_ptr<display::PalettizedSurface> planets(Filesystem::readImage("images/fmin.img.0.png"));
    planets->exportPalette();

    display::graphics.screen()->clear();

    gr_sync();

    fill_rectangle(1, 1, 318, 21, 3);
    fill_rectangle(317, 22, 318, 198, 3);
    fill_rectangle(1, 197, 316, 198, 3);
    fill_rectangle(1, 22, 2, 196, 3);
    OutBox(0, 0, 319, 199);
    InBox(3, 3, 30, 19);
    InBox(3, 22, 316, 196);
    IOBox(242, 3, 315, 19);
    ShBox(5, 24, 183, 47);
    ShBox(5, 24, 201, 47); //name box
    ShBox(5, 74, 41, 82); // RESET
    ShBox(5, 49, 53, 72); //dur/man
    ShBox(43, 74, 53, 82);   // Duration lock
    ShBox(80, 74, 90, 82);   // Docking lock
    ShBox(117, 74, 127, 82); // EVA lock
    ShBox(154, 74, 164, 82); // LM lock
    ShBox(191, 74, 201, 82); // Joint mission lock
    ShBox(5, 84, 16, 130); //arrows up
    ShBox(5, 132, 16, 146); //middle box
    ShBox(5, 148, 16, 194); //    down
    ShBox(203, 24, 238, 31); // new right boxes

    // Mission penalty numerical display
    fill_rectangle(206, 36, 235, 44, 7);
    ShBox(203, 33, 238, 47);
    InBox(205, 35, 236, 45);

    // Mission scroll arrows
    draw_up_arrow(8, 95);
    draw_down_arrow(8, 157);

    // Display mission steps toggle
    vh->copyTo(display::graphics.legacyScreen(), 140, 5, 5, 132, 15, 146);

    // Draw the mission specification toggle buttons
    Toggle(5, 1);
    draw_Pie(0);
    OutBox(5, 49, 53, 72);
    Toggle(1, 1);
    TogBox(55, 49, 0);
    Toggle(2, 1);
    TogBox(92, 49, 0);
    Toggle(3, 1);
    TogBox(129, 49, 0);
    Toggle(4, 1);

    if (JointFlag == false) {
        InBox(191, 74, 201, 82);
        TogBox(166, 49, 1);
    } else {
        OutBox(191, 74, 201, 82);
        TogBox(166, 49, 0);
    }

    gr_sync();

    Missions(plr, 8, 37, mis, 1);

    GetMinus(plr);

    display::graphics.setForegroundColor(5);

    /* lines of text are 1:8,30  2:8,37   3:8,44    */
    switch (pad) { // These used to say Pad 1, 2, 3  -Leon
    case 0:
        draw_string(8, 30, "PAD A:");
        break;

    case 1:
        draw_string(8, 30, "PAD B:");
        break;

    case 2:
        draw_string(8, 30, "PAD C:");
        break;
    }

    display::graphics.setForegroundColor(1);

    draw_string(9, 80, "RESET");
    draw_string(258, 13, "CONTINUE");

    display::graphics.setForegroundColor(11);

    if (Data->Season == 0) {
        draw_string(200, 9, "SPRING");
    } else {
        draw_string(205, 9, "FALL");
    }

    draw_string(206, 16, "19");
    draw_number(0, 0, Data->Year);
    display::graphics.setForegroundColor(1);
    draw_small_flag(plr, 4, 4);
    draw_heading(40, 5, "FUTURE MISSIONS", 0, -1);
    FadeIn(2, 10, 0, 0);

    return;
}
コード例 #11
0
ファイル: ast4.cpp プロジェクト: raceintospace/raceintospace
void DrawProgs(char plr, char prog)
{
    int i, j, Name[30];
    strcpy((char *)Name, Data->P[plr].Manned[prog - 1].Name);
    strcat((char *)Name, " PROGRAM");
    FadeOut(2, 10, 0, 0);
    display::graphics.screen()->clear();
    display::graphics.setForegroundColor(1);
    ShBox(0, 0, 319, 22);
    ShBox(0, 24, 319, 81);
    ShBox(0, 83, 319, 123);
    ShBox(0, 125, 158, 199);
    ShBox(161, 125, 319, 199);
    fill_rectangle(25, 129, 153, 195, 0);
    fill_rectangle(5, 129, 19, 195, 0);
    ShBox(6, 130, 18, 161);
    ShBox(6, 163, 18, 194);
    IOBox(243, 86, 316, 102);
    IOBox(243, 104, 316, 120);
    IOBox(243, 3, 316, 19);
    InBox(4, 128, 20, 196);
    InBox(24, 128, 154, 196);
    InBox(60, 27, 141, 78);
    InBox(3, 3, 30, 19);
    draw_up_arrow(9, 133);
    draw_down_arrow(9, 166);

    {
        char filename[128];
        snprintf(filename, sizeof(filename), "images/aprog.%d.%d.png", plr, prog);
        boost::shared_ptr<display::PalettizedSurface> image(Filesystem::readImage(filename));

        image->exportPalette();
        display::graphics.screen()->draw(image, 61, 28);

    }

    for (j = 0; j < 2; j++) {
        for (i = 0; i < 4; i++) {
            ShBox(164 + 77 * j, 139 + i * 15, 238 + 77 * j, 151 + i * 15);
        }
    }

    ShBox(4, 86, 12, 92);

    if (prog >= 2) {
        ShBox(4, 95, 12, 101);
    }

    if (prog >= 3) {
        ShBox(4, 104, 12, 110);
    }

    if (prog == 5) {
        ShBox(4, 113, 12, 119);
    }

    draw_small_flag(plr, 4, 4);
    display::graphics.setForegroundColor(9);
    draw_string(250, 96, "A");
    display::graphics.setForegroundColor(1);
    draw_string(0, 0, "SSIGN CREW");
    display::graphics.setForegroundColor(9);
    draw_string(252, 114, "B");
    display::graphics.setForegroundColor(1);
    draw_string(0, 0, "REAK CREW");
    draw_string(258, 13, "CONTINUE");
    display::graphics.setForegroundColor(5);
    draw_string(183, 133, "FLIGHT ");
    display::graphics.setForegroundColor(9);
    draw_string(0, 0, "C");
    display::graphics.setForegroundColor(5);
    draw_string(0, 0, "REW SELECTION");
    display::graphics.setForegroundColor(7);
    draw_string(152, 35, &Data->P[plr].Manned[prog - 1].Name[0]);
    display::graphics.setForegroundColor(9);

    if (prog == 1) {
        draw_string(152, 43, "ONE");
    }

    if (prog == 2) {
        draw_string(152, 43, "TWO");
    }

    if (prog == 3 || prog == 4) {
        draw_string(152, 43, "THREE");
    }

    if (prog == 5) {
        draw_string(152, 43, "FOUR");
    }

    draw_string(0, 0, "-PERSON CAPACITY");
    display::graphics.setForegroundColor(7);
    draw_string(152, 51, "SAFETY FACTOR: ");
    display::graphics.setForegroundColor(11);
    draw_number(0, 0, Data->P[plr].Manned[prog - 1].Safety);
    draw_string(0, 0, " %");
    display::graphics.setForegroundColor(7);
    draw_string(152, 59, "UNIT WEIGHT: ");
    display::graphics.setForegroundColor(11);
    draw_number(0, 0, Data->P[plr].Manned[prog - 1].UnitWeight);
    display::graphics.setForegroundColor(7);
    draw_string(152, 67, "MAX DURATION: ");
    display::graphics.setForegroundColor(11);
    draw_number(0, 0, Data->P[plr].Manned[prog - 1].Duration);
    draw_string(0, 0, " DAYS (LVL ");

    if (prog == 1) {
        draw_string(0, 0, "B)");
    }

    if (prog == 2) {
        draw_string(0, 0, "E)");
    }

    if (prog == 3 || prog == 5) {
        draw_string(0, 0, "F)");
    }

    if (prog == 4) {
        draw_string(0, 0, "D)");
    }

    display::graphics.setForegroundColor(7);
    draw_string(152, 75, "AVOID FAILURE: ");
    display::graphics.setForegroundColor(11);

    if (Data->P[plr].Manned[prog - 1].SaveCard > 0) {
        draw_string(0, 0, "YES");
    } else {
        draw_string(0, 0, "NO");
    }

    display::graphics.setForegroundColor(1);
    draw_heading(40, 5, (char *)Name, 0, -1);
    return;
}