예제 #1
0
        internal static void title_screen()
        {
            DaxBlock dax_ptr;

            dax_ptr = seg040.LoadDax(0, false, 1, "Title");
            seg040.draw_picture(dax_ptr, 0, 0, 0);

            delay_or_key(5);

            dax_ptr = seg040.LoadDax(0, false, 2, "Title");
            seg040.draw_picture(dax_ptr, 0, 0, 0);

            dax_ptr = seg040.LoadDax(0, false, 3, "Title");
            seg040.draw_picture(dax_ptr, 0x0b, 6, 0);
            delay_or_key(10);

            dax_ptr = seg040.LoadDax(0, false, 4, "Title");

            seg044.PlaySound(Sound.sound_d);

            seg040.draw_picture(dax_ptr, 0x0b, 0, 0);
            delay_or_key(10);

            Seg041.ClearScreen();
            credits();
            delay_or_key(10);

            Seg041.ClearScreen();
        }
예제 #2
0
 internal static void lose_item(Item item, Player player)
 {
     if (!player.items.Remove(item))
     {
         Seg041.DisplayAndPause("Tried to Lose item & couldn't find it!", 14);
     }
 }
예제 #3
0
        internal static void display_highlighed_text(int highlighed_word, int highlightFgColor,
                                                     string text, int xOffset, int fgColor, HighlightSet highlights) /* sub_6C1E9 */
        {
            if (text.Length > 0)
            {
                for (int i = 0; i < text.Length; i++)
                {
                    if (highlights[highlighed_word].start <= i &&
                        highlights[highlighed_word].end >= i &&
                        highlightFgColor != 0)
                    {
                        Seg041.DisplayChar(text[i], 1, highlightFgColor, 0, 0x18, xOffset + i);
                    }
                    else if (highlightable_text.MemberOf(text[i]) == true)
                    {
                        Seg041.DisplayChar(text[i], 1, 0, highlightFgColor, 0x18, xOffset + i);
                    }
                    else
                    {
                        Seg041.DisplayChar(text[i], 1, 0, fgColor, 0x18, xOffset + i);
                    }
                }

                if (text.Length + xOffset < 0x27)
                {
                    Seg041.DisplayChar(' ', (0x27 - text.Length - xOffset) + 1,
                                       0, 0, 0x18, xOffset + text.Length);
                }

                Display.Update();
            }
        }
예제 #4
0
        DisplayPlayerStatusString(bool clearDisplay, int lineY, string text, Player player)     /* sub_67788 */
        {
            if (gbl.game_state == GameState.Combat)
            {
                seg037.draw8x8_clear_area(0x15, 0x26, lineY, 0x17);

                displayPlayerName(false, lineY, 0x17, player);
                Seg041.press_any_key(text, true, 10, 0x15, 0x26, lineY + 1, 0x17);
            }
            else
            {
                int line_y = gbl.displayPlayerStatusLine18 ? 18 : 17;

                seg037.draw8x8_clear_area(0x16, 0x26, line_y, 1);

                displayPlayerName(false, line_y + 1, 1, player);
                Seg041.press_any_key(text, true, 10, 0x16, 0x26, line_y + 2, 1);
            }

            if (clearDisplay == true)
            {
                Seg041.GameDelay();
                ovr025.ClearPlayerTextArea();
            }
        }
예제 #5
0
        static void display_resting_time(int highlight_time) /* sub_58615 */
        {
            int[] colors = new int[6];

            for (int index = 0; index < 6; index++)
            {
                colors[index] = 10;
            }

            colors[highlight_time] = 15;

            Seg041.DisplayString("Rest Time:", 0, 10, 17, 1);
            int col_x = 11;

            string text = format_time(gbl.timeToRest.field_8);

            Seg041.DisplayString(text, 0, colors[4], 0x11, col_x + 1);
            Seg041.DisplayString(":", 0, 10, 17, col_x + 3);
            col_x += 3;

            text = format_time(gbl.timeToRest.field_6);
            Seg041.DisplayString(text, 0, colors[3], 0x11, col_x + 1);
            Seg041.DisplayString(":", 0, 10, 17, col_x + 3);
            col_x += 3;

            text = format_time((gbl.timeToRest.field_4 * 10) + gbl.timeToRest.field_2);

            Seg041.DisplayString(text, 0, colors[2], 0x11, col_x + 1);
        }
예제 #6
0
        static void rest_heal(bool show_text) /* reset_heal */
        {
            gbl.rest_10_seconds++;

            if (gbl.rest_10_seconds >= (8 * 36))
            {
                bool update_ui = false;

                foreach (Player player in gbl.TeamList)
                {
                    if (ovr024.heal_player(0, 1, player) == true)
                    {
                        update_ui = true;
                    }
                }

                if (show_text == true)
                {
                    display_resting_time(0);
                }

                Seg041.DisplayString("The Whole Party Is Healed", 0, 10, 19, 1);

                if (update_ui)
                {
                    ovr025.PartySummary(gbl.SelectedPlayer);
                }

                Seg041.GameDelay();
                ovr025.ClearPlayerTextArea();
                gbl.rest_10_seconds = 0;
            }
        }
예제 #7
0
        internal static bool buy_cure(int cost, string cure_name) /* buy_cure */
        {
            string text = string.Format("{0} will only cost {1} gold pieces.", cure_name, cost);

            Seg041.press_any_key(text, true, 10, TextRegion.NormalBottom);

            bool buy = false;

            if ('Y' == ovr027.yes_no(gbl.defaultMenuColors, "pay for cure "))
            {
                if (cost <= gbl.SelectedPlayer.Money.GetGoldWorth())
                {
                    gbl.SelectedPlayer.Money.SubtractGoldWorth(cost);
                    buy = true;
                }
                else if (cost <= gbl.pooled_money.GetGoldWorth())
                {
                    gbl.pooled_money.SubtractGoldWorth(cost);
                    buy = true;
                }
                else
                {
                    ovr025.string_print01("Not enough money.");
                    buy = false;
                }
            }

            if (buy)
            {
                ovr025.ClearPlayerTextArea();
                ovr025.DisplayPlayerStatusString(true, 0, "is cured.", gbl.SelectedPlayer);
            }

            return(buy);
        }
예제 #8
0
        internal static void ShowAnimation(int num_loops, byte block_id, short row_y, short col_x) // sub_52B79
        {
            int loop_count = 0;
            int start_time = Seg041.CentiSeconds();

            DaxArray animation = new DaxArray();

            ovr030.load_pic_final(ref animation, false, block_id, "PIC");
            seg040.OverlayBounded(animation.frames[0].picture, 0, 0, row_y - 1, col_x - 1);
            seg040.DrawOverlay();

            do
            {
                ovr030.DrawMaybeOverlayed(animation.CurrentPicture(), true, row_y, col_x);
                int current_time = Seg041.CentiSeconds();

                int delay = animation.CurrentDelay() * (gbl.game_speed_var + 3);

                if ((current_time - start_time) > delay)
                {
                    animation.curFrame += 1;

                    if (animation.curFrame > animation.numFrames)
                    {
                        animation.curFrame = 1;
                        loop_count++;
                    }

                    start_time = current_time;
                }
            } while (loop_count != num_loops);

            ovr030.DaxArrayFreeDaxBlocks(animation);
        }
예제 #9
0
        internal static void head_body(byte body_id, byte head_id)
        {
            string text = gbl.game_area.ToString();

            if (head_id != 0xff &&
                (gbl.current_head_id == 0xff || gbl.current_head_id != head_id))
            {
                gbl.headX_dax = seg040.LoadDax(0, false, head_id, "HEAD" + text);

                if (gbl.headX_dax == null)
                {
                    Seg041.DisplayAndPause("head not found", 14);
                }

                gbl.current_head_id = head_id;
            }

            if (body_id != 0xff &&
                (gbl.current_body_id == 0xff || gbl.current_body_id != body_id))
            {
                gbl.bodyX_dax = seg040.LoadDax(0, false, body_id, "BODY" + text);
                if (gbl.bodyX_dax == null)
                {
                    Seg041.DisplayAndPause("body not found", 14);
                }

                gbl.current_body_id = body_id;
            }

            seg043.clear_keyboard();
        }
예제 #10
0
        internal static void game_speed()
        {
            char inputKey;

            do
            {
                Seg041.DisplayString(string.Format("Game Speed = {0} (0=fastest 9=slowest)", gbl.game_speed_var), 0, 10,
                                     18, 1);

                string text = string.Empty;

                if (gbl.game_speed_var > 0)
                {
                    text += " Faster";
                }

                if (gbl.game_speed_var < 9)
                {
                    text += " Slower";
                }

                text += " Exit";

                bool controlKey;
                inputKey = ovr027.displayInput(out controlKey, true, 1, gbl.defaultMenuColors, text, "Game Speed:");

                if (controlKey == true)
                {
                    if (inputKey == 0x50)
                    {
                        if (gbl.game_speed_var > 0)
                        {
                            gbl.game_speed_var--;
                        }
                    }
                    else if (inputKey == 0x48)
                    {
                        if (gbl.game_speed_var < 9)
                        {
                            gbl.game_speed_var++;
                        }
                    }
                }
                else
                {
                    if (inputKey == 0x46)
                    {
                        gbl.game_speed_var--;
                    }
                    else if (inputKey == 0x53)
                    {
                        gbl.game_speed_var++;
                    }
                }
            } while (AlterSet.MemberOf(inputKey) == false);

            ovr025.ClearPlayerTextArea();
        }
예제 #11
0
        internal static void AfterCombatExpAndTreasure() // sub_2E7A2
        {
            gbl.area2_ptr.field_58E = 0;
            gbl.byte_1AB14          = false;

            if (gbl.inDemo == false)
            {
                CleanupPlayersStateAfterCombat();
            }

            gbl.game_state = GameState.AfterCombat;

            DeallocateNonTeamMemebers();

            if (gbl.inDemo == false)
            {
                foreach (Player player in gbl.TeamList)
                {
                    ovr025.reclac_player_values(player);
                }

                if (gbl.party_killed == false ||
                    gbl.combat_type == CombatType.duel)
                {
                    if (gbl.party_fled == true)
                    {
                        gbl.items_pointer.Clear();
                    }

                    if (gbl.inDemo == false)
                    {
                        distributeNpcTreasure();
                        displayCombatResults(gbl.exp_to_add);
                        distributeCombatTreasure();
                    }

                    gbl.items_pointer.Clear();
                }
                else
                {
                    gbl.area2_ptr.field_58E = 0x80;
                    seg037.DrawFrame_Outer();
                    gbl.textXCol = 2;
                    gbl.textYCol = 6;
                    Seg041.press_any_key("The monsters rejoice for the party has been destroyed", true, 10, 0x16, 0x25,
                                         5, 2);
                    Seg041.DisplayAndPause("Press any key to continue", 13);
                }

                gbl.DelayBetweenCharacters = true;
                gbl.area2_ptr.field_6E0    = 0;
                gbl.area2_ptr.field_6E2    = 0;
                gbl.area2_ptr.field_6E4    = 0;
                gbl.area2_ptr.field_5C6    = 0;
                gbl.area2_ptr.isDuel       = false;
            }
        }
예제 #12
0
        internal static void string_print01(string text)
        {
            ovr027.ClearPromptAreaNoUpdate();

            Seg041.DisplayString(text, 0, 10, 0x18, 0);

            Seg041.GameDelay();

            ovr027.ClearPromptAreaNoUpdate();
        }
예제 #13
0
        internal static void MagicAttackDisplay(string text, bool showMagicStars, Player player) // sub_6818A
        {
            if (gbl.game_state == GameState.Combat)
            {
                int iconId = showMagicStars ? 0x16 : 0x17;

                load_missile_icons(iconId);

                if (ovr033.PlayerOnScreen(true, player) == false)
                {
                    ovr033.redrawCombatArea(8, 3, ovr033.PlayerMapPos(player));
                }

                if (showMagicStars)
                {
                    seg044.PlaySound(Sound.sound_4);
                }
                else
                {
                    seg044.PlaySound(Sound.sound_3);
                }

                DisplayPlayerStatusString(false, 10, text, player);

                int   idx = ovr033.GetPlayerIndex(player);
                Point pos = gbl.CombatMap[idx].screenPos * 3;

                int loops = showMagicStars ? gbl.game_speed_var : 0;
                for (int loop = 0; loop <= loops; loop++)
                {
                    for (int frame = 0; frame <= 3; frame++)
                    {
                        Display.SaveVidRam();

                        seg040.OverlayBounded(gbl.missile_dax, 5, frame, pos.y, pos.x);
                        seg040.DrawOverlay();

                        seg049.SysDelay(70);

                        Display.RestoreVidRam();
                    }
                }

                seg040.DrawOverlay();

                if (loops == 0)
                {
                    Seg041.GameDelay();
                }
            }
            else
            {
                DisplayPlayerStatusString(true, 10, text, player);
            }
        }
예제 #14
0
        internal static void BattleSetup() // battle_begins
        {
            gbl.DelayBetweenCharacters = false;

            ovr030.DaxArrayFreeDaxBlocks(gbl.byte_1D556);

            gbl.headX_dax       = null;
            gbl.bodyX_dax       = null;
            gbl.bigpic_dax      = null;
            gbl.bigpic_block_id = 0xff;
            gbl.current_head_id = 0xff;
            gbl.current_body_id = 0xff;
            ovr027.ClearPromptArea();
            Seg041.GameDelay();

            Seg041.DisplayString("A battle begins...", 0, 0x0a, 0x18, 0);

            gbl.AutoPCsCastMagic             = false; // TODO review this...
            gbl.combat_round                 = 0;
            gbl.combat_round_no_action_limit = gbl.combat_round_no_action_value;
            gbl.attack_roll = 0;

            gbl.StinkingCloud  = new List <GasCloud>();
            gbl.CloudKillCloud = new List <GasCloud>();
            gbl.item_ptr       = null;

            gbl.downedPlayers = new List <DownedPlayerTile>();

            gbl.area2_ptr.field_666 = 0;

            SetupGroundTiles();

            SetupCombatActions();
            PlaceCombatants();

            seg043.clear_one_keypress();

            gbl.missile_dax = new DaxBlock(4, 3, 0x18);

            Point pos = ovr033.PlayerMapPos(gbl.TeamList[0]);

            gbl.mapToBackGroundTile.mapScreenTopLeft = pos - Point.ScreenCenter;

            ovr025.RedrawCombatScreen();
            foreach (Player player in gbl.TeamList)
            {
                ovr024.CheckAffectsEffect(player, CheckType.Type_8);
                ovr024.CheckAffectsEffect(player, CheckType.Type_22);
            }

            ovr014.calc_enemy_health_percentage();
            gbl.game_state = GameState.Combat;
        }
예제 #15
0
        internal static Player load_mob(int monster_id, bool exit)
        {
            string area_text = gbl.game_area.ToString();

            byte[] data;
            short  decode_size;

            seg042.load_decode_dax(out data, out decode_size, monster_id, "MON" + area_text + "CHA.dax");

            if (decode_size == 0)
            {
                if (exit)
                {
                    Seg041.DisplayAndPause("Unable to load monster", 15);
                    seg043.print_and_exit();
                }
                else
                {
                    return(null);
                }
            }

            Player player = new Player(data, 0);

            seg042.load_decode_dax(out data, out decode_size, monster_id, "MON" + area_text + "SPC.dax");

            if (decode_size != 0)
            {
                int offset = 0;

                do
                {
                    Affect affect = new Affect(data, offset);
                    player.affects.Add(affect);

                    offset += 9;
                } while (offset < decode_size);
            }

            seg042.load_decode_dax(out data, out decode_size, monster_id, "MON" + area_text + "ITM.dax");

            if (decode_size != 0)
            {
                for (int offset = 0; offset < decode_size; offset += Item.StructSize)
                {
                    player.items.Add(new Item(data, offset));
                }
            }

            seg043.clear_keyboard();

            return(player);
        }
예제 #16
0
        static void ListItemHighlighted(int index, List <MenuItem> stringList, int yCol, int xCol, int bgColor)
        {
            MenuItem menu_item = getStringListEntry(stringList, index);

            int stringStart = getBegingOfString(menu_item.Text);

            Seg041.DisplayString(
                menu_item.Text.Trim(),
                bgColor,
                0,
                yCol + (index - gbl.menuScreenIndex),
                xCol + stringStart);
        }
예제 #17
0
        internal static void distributeNpcTreasure() /*sub_2E50E*/
        {
            bool treasureTaken = false;

            int npcParts   = 0;
            int totalParts = 0;

            foreach (Player player in gbl.TeamList)
            {
                if (player.control_morale >= Control.NPC_Base &&
                    player.health_status == Status.okey)
                {
                    npcParts   += player.npcTreasureShareCount & 7;
                    totalParts += player.npcTreasureShareCount & 7;
                }
                else
                {
                    totalParts++;
                }
            }

            if (npcParts > 0)
            {
                treasureTaken = gbl.pooled_money.ScaleAll(npcParts / totalParts);
            }

            if (treasureTaken)
            {
                seg037.DrawFrame_Outer();
                int yCol = 0;

                foreach (Player player in gbl.TeamList)
                {
                    if (player.control_morale >= Control.NPC_Base &&
                        player.health_status == Status.okey &&
                        player.npcTreasureShareCount > 0)
                    {
                        string output = player.name + " takes and hides " + ((player.sex == 0) ? "his" : "her") +
                                        " share.";

                        Seg041.press_any_key(output, true, 10, 0x16, 0x22, yCol + 5, 5);

                        yCol += 2;
                    }
                }

                ovr027.displayInput(false, 1, new MenuColorSet(15, 15, 15), "press <enter>/<return> to continue",
                                    string.Empty);
            }
        }
예제 #18
0
        internal static void PartySummary(Player player)
        {
            if (gbl.game_state == GameState.WildernessMap)
            {
                return;
            }

            int x_pos = (gbl.game_state == GameState.StartGameMenu) ? 1 : 17;
            int y_pos = 2;

            Seg041.DisplayString("Name", 0, 15, y_pos, x_pos);
            Seg041.DisplayString("AC  HP", 0, 15, y_pos, 0x21);

            y_pos += 2;

            foreach (Player tmp_player in gbl.TeamList)
            {
                seg037.draw8x8_clear_area(y_pos, 0x26, y_pos, x_pos);

                if (tmp_player == player)
                {
                    Seg041.DisplayString(tmp_player.name, 0, 15, y_pos, x_pos);
                }
                else
                {
                    displayPlayerName(false, y_pos, x_pos, tmp_player);
                }

                Seg041.DisplayString(string.Format("{0,-3}", tmp_player.DisplayAc), 0, 10, y_pos, 0x1F);

                int hpXPos = 0;
                if (tmp_player.hit_point_current >= 0 && tmp_player.hit_point_current <= 9)
                {
                    hpXPos = 2;
                }
                else if (tmp_player.hit_point_current >= 10 && tmp_player.hit_point_current <= 99)
                {
                    hpXPos = 1;
                }

                display_hp(false, y_pos, hpXPos + 0x24, tmp_player);
                y_pos++;
            }

            //seg037.draw8x8_clear_area(y_pos, 0x26, y_pos, x_pos);
        }
예제 #19
0
        internal static void CombatDisplayPlayerSummary(Player player) /* hitpoint_ac */
        {
            if (gbl.display_hitpoints_ac == true)
            {
                gbl.display_hitpoints_ac = false;
                seg037.draw8x8_clear_area(TextRegion.CombatSummary);

                int line = 1;

                DisplayPlayerStatusString(false, line, " ", player);

                line++;

                Seg041.DisplayString("Hitpoints", 0, 10, line + 1, 0x17);

                display_hp(false, line + 1, 0x21, player);
                line += 2;

                Seg041.DisplayString("AC", 0, 10, line + 1, 0x17);
                display_AC(line + 1, 0x1A, player);

                gbl.textYCol = line + 1;

                if (player.activeItems.primaryWeapon != null)
                {
                    line += 2;
                    /*var_1 = 0x17;*/
                    ItemDisplayNameBuild(false, false, 0, 0, player.activeItems.primaryWeapon);

                    Seg041.press_any_key(player.activeItems.primaryWeapon.name, true, 10, line + 3, 0x26, line + 1,
                                         0x17);
                }

                line = gbl.textYCol + 1;

                if (player.in_combat == false)
                {
                    Seg041.DisplayString(ovr020.statusString[(int)player.health_status], 0, 15, line + 1, 0x17);
                }
                else if (player.IsHeld() == true)
                {
                    Seg041.DisplayString("(Helpless)", 0, 15, line + 1, 0x17);
                }
            }
        }
예제 #20
0
        static void ListItemNormal(int index, List <MenuItem> list, int yCol, int xCol, int normalColor,
                                   int headingColor)
        {
            MenuItem menu_item = getStringListEntry(list, index);

            int var_5 = getBegingOfString(menu_item.Text);

            string text = menu_item.Text.Trim();

            if (menu_item.Heading)
            {
                Seg041.DisplayString(text, 0, headingColor, yCol + (index - gbl.menuScreenIndex), xCol + var_5);
            }
            else
            {
                Seg041.DisplayString(text, 0, normalColor, yCol + (index - gbl.menuScreenIndex), xCol + var_5);
            }
        }
예제 #21
0
        internal static void ItemDisplayNameBuild(bool display_new_name, bool displayReadied,
                                                  int yCol, int xCol, Item item) /*id_item*/
        {
            item.name = string.Empty;

            if (displayReadied == true)
            {
                if (item.readied)
                {
                    item.name = " Yes  ";
                }
                else
                {
                    item.name = " No   ";
                }
            }

            bool detectMagic = gbl.TeamList.Exists(pla => pla.HasAffect(Affects.detect_magic));

            if (detectMagic == true &&
                (item.plus > 0 || item.plus_save > 0 || item.cursed == true))
            {
                item.name += "* ";
            }

            if (item.count > 0)
            {
                item.name += item.count.ToString() + " ";
            }

            int hidden_names_flag = item.hidden_names_flag;

            if (Cheats.display_full_item_names)
            {
                hidden_names_flag = 0;
            }

            item.name += item.GenerateName(hidden_names_flag);

            if (display_new_name)
            {
                Seg041.DisplayString(item.name, 0, 10, yCol, xCol);
            }
        }
예제 #22
0
        static void credits()
        {
            Display.UpdateStop();

            seg037.draw8x8_02();

            Seg041.DisplayString("based on the tsr novel 'azure bonds'", 0, 10, 1, 2);
            Seg041.DisplayString("by:", 0, 10, 2, 6);
            Seg041.DisplayString("kate novak", 0, 11, 2, 9);
            Seg041.DisplayString("and", 0, 10, 2, 0x14);
            Seg041.DisplayString("jeff grubb", 0, 11, 2, 0x18);
            Seg041.DisplayString("scenario created by:", 0, 10, 4, 0x0a);
            Seg041.DisplayString("tsr, inc.", 0, 0x0e, 5, 0x0b);
            Seg041.DisplayString("and", 0, 0x0a, 5, 0x15);
            Seg041.DisplayString("ssi", 0, 0x0e, 5, 0x19);
            Seg041.DisplayString("jeff grubb", 0, 0x0b, 6, 0x0e);
            Seg041.DisplayString("george mac donald", 0x0, 0x0B, 0x7, 0x0B);
            Seg041.DisplayString("game created by:", 0x0, 0x0A, 0x9, 0x1);
            Seg041.DisplayString("ssi special projects", 0x0, 0x0E, 0x9, 0x12);
            Seg041.DisplayString("project leader:", 0x0, 0x0E, 0x0B, 0x2);
            Seg041.DisplayString("george mac donald", 0x0, 0x0B, 0x0C, 0x2);
            Seg041.DisplayString("programming:", 0x0, 0x0E, 0x0E, 0x2);
            Seg041.DisplayString("scot bayless", 0x0, 0x0B, 0x0F, 0x2);
            Seg041.DisplayString("russ brown", 0x0, 0x0B, 0x10, 0x2);
            Seg041.DisplayString("michael mancuso", 0x0, 0x0B, 0x11, 0x2);
            Seg041.DisplayString("development:", 0x0, 0x0E, 0x13, 0x2);
            Seg041.DisplayString("david shelley", 0x0, 0x0B, 0x14, 0x2);
            Seg041.DisplayString("michael mancuso", 0x0, 0x0B, 0x15, 0x2);
            Seg041.DisplayString("oran kangas", 0x0, 0x0B, 0x16, 0x2);
            Seg041.DisplayString("graphic arts:", 0x0, 0x0E, 0x0B, 0x16);
            Seg041.DisplayString("tom wahl", 0x0, 0x0B, 0x0C, 0x16);
            Seg041.DisplayString("fred butts", 0x0, 0x0B, 0x0D, 0x16);
            Seg041.DisplayString("susan manley", 0x0, 0x0B, 0x0E, 0x16);
            Seg041.DisplayString("mark johnson", 0x0, 0x0B, 0x0F, 0x16);
            Seg041.DisplayString("cyrus lum", 0x0, 0x0B, 0x10, 0x16);
            Seg041.DisplayString("playtesting:", 0x0, 0x0E, 0x12, 0x16);
            Seg041.DisplayString("jim jennings", 0x0, 0x0B, 0x13, 0x16);
            Seg041.DisplayString("james kucera", 0x0, 0x0B, 0x14, 0x16);
            Seg041.DisplayString("rick white", 0x0, 0x0B, 0x15, 0x16);
            Seg041.DisplayString("robert daly", 0x0, 0x0B, 0x16, 0x16);

            Display.UpdateStart();
        }
예제 #23
0
        internal static void display_hp(bool hightlighted, int y_pos, int x_pos, Player player)
        {
            int colour;

            if (player.hit_point_current < player.hit_point_max)
            {
                colour = 0x0E;
            }
            else
            {
                colour = 0x0A;
            }

            if (hightlighted == true)
            {
                colour = 0x0D;
            }

            Seg041.DisplayString(player.hit_point_current.ToString(), 0, colour, y_pos, x_pos);
        }
예제 #24
0
        internal static void load_ecl_dax(byte block_id)
        {
            byte[] block_mem;
            short  block_size = 0;

            gbl.ecl_ptr.Clear();

            do
            {
                ovr027.ClearPromptArea();
                Seg041.DisplayString("Loading...Please Wait", 0, 10, 0x18, 0);

                seg042.load_decode_dax(out block_mem, out block_size, block_id,
                                       string.Format("ECL{0}.dax", gbl.game_area));
            } while (block_size < 2);

            gbl.ecl_ptr.SetData(block_mem, 2, block_size - 2);

            ovr027.ClearPromptArea();
        }
예제 #25
0
        internal static void displayPlayerName(bool pural, int y_offset, int x_offset, Player player) /*sub_678A2*/
        {
            int color;

            if (player.in_combat == false)
            {
                color = 0x0C;
            }
            else if (player.combat_team == CombatTeam.Enemy)
            {
                color = 0x0E;
            }
            else
            {
                color = 0x0B;
            }

            string name = player.name + ((pural) ? "'s" : "");

            Seg041.DisplayString(name, 0, color, y_offset, x_offset);
        }
예제 #26
0
        internal static void sub_32200(Player player, int damage) /* sub_32200 */
        {
            if (player.health_status != Status.dead)
            {
                string text;
                bool   clear_text_area = false;

                if ((player.hit_point_current + 10) < damage)
                {
                    text = string.Format("  {0} dies. ", player.name);
                }
                else
                {
                    text = string.Format("  {0} is hit FOR {1} points of Damage.", player.name, damage);
                }

                if (gbl.textYCol > 0x16)
                {
                    gbl.textYCol    = 0x11;
                    clear_text_area = true;
                    Seg041.DisplayAndPause("press <enter>/<return> to continue", 15);
                }
                else
                {
                    clear_text_area = false;
                }

                gbl.textXCol = 0x26;

                Seg041.press_any_key(text, clear_text_area, 15, 0x16, 0x26, 17, 1);

                ovr025.damage_player(damage, player);
                seg037.draw8x8_clear_area(0x0f, 0x26, 1, 0x11);

                ovr025.PartySummary(player);
            }
        }
예제 #27
0
        internal static void display_map_position_time() // camping_search
        {
            if (gbl.game_state != GameState.WildernessMap)
            {
                string output = string.Empty;

                string hours   = gbl.area_ptr.time_hour.ToString("00");
                string minutes =
                    ((gbl.area_ptr.time_minutes_tens * 10) + gbl.area_ptr.time_minutes_ones).ToString("00");

                if (gbl.area_ptr.block_area_view == 0 ||
                    Cheats.always_show_areamap)
                {
                    output = string.Format("{0},{1} ", gbl.mapPosX, gbl.mapPosY);
                }

                output += direction(gbl.mapDirection) + " " + hours + ":" + minutes;

                if (gbl.printCommands == true)
                {
                    output += "*";
                }

                if (gbl.game_state == GameState.Camping)
                {
                    output += " camping";
                }
                else if ((gbl.area2_ptr.search_flags & 1) > 0)
                {
                    output += " search";
                }

                seg037.draw8x8_clear_area(15, 0x26, 15, 17);

                Seg041.DisplayString(output, 0, 10, 15, 17);
            }
        }
예제 #28
0
        static void sub_6C897(int index,
                              int yEnd, int xEnd, int yStart, int xStart, List <MenuItem> list,
                              int normalColor, int headingColor, int displayFillWidth) // sub_6C897
        {
            seg037.draw8x8_clear_area(yEnd, xEnd, yStart, xStart);

            MenuItem var_4 = getStringListEntry(list, index);

            int yCol  = yStart;
            int count = System.Math.Min(yEnd - yStart + 1, list.Count - index);

            foreach (var menu in list.GetRange(index, count))
            {
                Seg041.DisplayString(menu.Text, 0, menu.Heading ? headingColor : normalColor, yCol, xStart);

                if (menu.Text.Length < displayFillWidth)
                {
                    Seg041.DisplayChar(' ', displayFillWidth - menu.Text.Length, 0, 0, yCol,
                                       menu.Text.Length + xStart);
                }

                yCol++;
            }
        }
예제 #29
0
        internal static void DuelClass(Player player)
        {
            List <MenuItem> list = new List <MenuItem>();

            list.Add(new MenuItem("Pick New Class", true));

            foreach (var _class in gbl.RaceClasses[(int)player.race])
            {
                if (SecondClassAllowed(_class, player) == true)
                {
                    list.Add(new MenuItem(ovr020.classString[(int)_class]));
                }
            }

            if (list.Count == 1)
            {
                Seg041.DisplayStatusText(15, 4, player.name + " doesn't qualify.");
                list.Clear();
                return;
            }

            MenuItem list_ptr;
            int      index     = 1;
            bool     show_exit = true;
            bool     var_F     = true;

            char input_key;

            do
            {
                input_key = ovr027.sl_select_item(out list_ptr, ref index, ref var_F, show_exit, list,
                                                  0x16, 0x26, 2, 1, gbl.defaultMenuColors, "Select", string.Empty);

                if (input_key == 0)
                {
                    return;
                }
            } while (input_key != 'S');

            player.exp          = 0;
            player.attacksCount = 2;
            int newClass = 0;

            while (newClass <= 7 && ovr020.classString[newClass] != list_ptr.Text)
            {
                newClass++;
            }

            list.Clear();

            player.ClassLevelsOld[(int)HumanCurrentClass_Unknown(player)] = HumanCurrentClassLevel_Zero(player);

            player.multiclassLevel = player.HitDice;
            player.HitDice         = 1;

            player.ClassLevel[(int)HumanCurrentClass_Unknown(player)] = 0;
            player.ClassLevel[newClass] = 1;

            for (int i = 0; i < 5; i++)
            {
                player.spellCastCount[0, i] = 0;
                player.spellCastCount[1, i] = 0;
                player.spellCastCount[2, i] = 0;
            }

            if (newClass == 0)
            {
                player.spellCastCount[0, 0] = 1;
            }
            else if (newClass == 5)
            {
                player.spellCastCount[2, 0] = 1;
                player.LearnSpell(Spells.detect_magic_MU);
                player.LearnSpell(Spells.read_magic);
                player.LearnSpell(Spells.sleep);
            }

            player._class = (ClassId)newClass;

            Seg041.DisplayStatusText(0, 10, player.name + " is now a 1st level " + ovr020.classString[newClass] + ".");

            player.spellList.Clear();

            ReclacClassBonuses(player);
            calc_cleric_spells(true, player);
            reclac_saving_throws(player);
            reclac_thief_skills(player);

            foreach (var item in player.items)
            {
                if ((gbl.ItemDataTable[item.type].classFlags & player.classFlags) == 0 &&
                    item.cursed == false)
                {
                    item.readied = false;
                }
            }
        }
예제 #30
0
        internal static void end_game_text()
        {
            gbl.last_game_state = gbl.game_state;
            gbl.game_state      = GameState.EndGame;

            Seg041.press_any_key(aTyranthraxusSp, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aStormGiant_You, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aTheAmuletOfLyt, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aYouOfYourVicto, false, 10, TextRegion.NormalBottom);
            Seg041.DisplayAndPause("Press any key to continue.", 13);

            Seg041.press_any_key(aAsYouReachForT, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aOutKeepTheGaun, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aWillUnleashDan, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aGauntletContac, false, 10, TextRegion.NormalBottom);

            ShowAnimation(1, 0x4a, 3, 3);

            Seg041.DisplayAndPause("Press any key to continue.", 13);
            ovr027.ClearPromptArea();

            Seg041.press_any_key(aIAmTrappedWith, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aWhereArmiesHav, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aIsSlainThisDay, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aNothingness_, false, 10, TextRegion.NormalBottom);

            ShowAnimation(1, 0x4B, 3, 3);

            Seg041.DisplayAndPause("Press any key to continue.", 13);
            ovr027.ClearPromptArea();

            Seg041.press_any_key(aYouAreCertainH, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aFinalBondFades, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aHasFinallyBeen, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aLast, false, 10, TextRegion.NormalBottom);

            gbl.area_ptr.picture_fade = 1;

            ShowAnimation((10 - gbl.game_speed_var) * 2, 0x4d, 3, 3);

            gbl.area_ptr.picture_fade = 0;

            ovr030.head_body(0x41, 0x41);
            ovr030.draw_head_and_body(true, 3, 3);

            Seg041.press_any_key(aTheKnightsOfMy, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aCongratulati_0, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aWithThePowerOf, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aThisFoulPlaceT, false, 10, TextRegion.NormalBottom);

            Seg041.DisplayAndPause("Press any key to continue.", 13);
            ovr027.ClearPromptArea();
            ovr030.load_bigpic(0x7A);

            ovr030.draw_bigpic();

            Seg041.press_any_key(aYouAreTeleport, true, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aHaveAlreadyBeg, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aGharriAndNacac, false, 10, TextRegion.NormalBottom);
            Seg041.press_any_key(aFromTheNearbyS, false, 10, TextRegion.NormalBottom);
            endgame_529F4();

            gbl.game_state = gbl.last_game_state;
            ovr025.LoadPic();
        }