mirror of
https://github.com/TheBozos/DC_Recomp.git
synced 2026-12-01 07:38:29 -10:00
Widescreen (the Video tab, the in-game Graphics page, video.ini, PS2X_WIDESCREEN; hidden runs read only the environment): the native frame is 853.33 GS pixels wide about the game's centre. The game's projection is unchanged (Hor+); MGClipVertex is native and culls against the frame's width. The game's 2D stays centred; a draw over the whole frame (fades, fills, frame copies) spans the wider one, a fill touching an edge reaches it (the dungeon fade's tiles), and the field HUD's side pieces move to the edges (the town clock, the dungeon's status, floor and gauge, the minimap as one piece). Frame copies take each side on its own, so the game's half-size work copies round-trip. Travel (Options -> Travel, F2 -> Travel, --cheat-script): warps to the 52 town and area maps and to any floor of the seven dungeons through the game's own fades and loads (MapJump, the town exit, the interior loop's map jump, the dungeon's exit task and floor build, the entrance menu's preset), next to the floor's monsters, every georama part (the Atla tables through AtraPartsGet/AtraChipGet), the whole world map and a story chapter select. A dungeon's story floors need its chapter's allies; ahead of the story the warp says so. The in-game Graphics page also sets widescreen, anti-aliasing and texture smoothing. BozoEngine moves to master c27ce41 (the widescreen setting and picture shape). Checked headless: 139/139 suites; the 4:3 routes keep identical cards; tours of every town map and every dungeon floor (208) in widescreen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
143 lines
9.1 KiB
C++
143 lines
9.1 KiB
C++
#include "dc_cheats.h"
|
|
#include "dc_warp.h"
|
|
#include "bozo/app/settings_tabs.h"
|
|
#include "imgui.h"
|
|
#include <algorithm>
|
|
|
|
namespace dc::cheats
|
|
{
|
|
void registerMenu()
|
|
{
|
|
bozo::app::ui::registerTab("Cheats", [] {
|
|
auto toggle = [](const char *label, Cheat cheat, const char *description) {
|
|
bool on = enabled(cheat);
|
|
if (ImGui::Checkbox(label, &on)) setEnabled(cheat, on);
|
|
ImGui::TextDisabled("%s", description);
|
|
ImGui::Spacing();
|
|
};
|
|
toggle("Infinite health", Cheat::InfiniteHealth, "Keeps your party's HP full.");
|
|
toggle("Infinite weapon durability", Cheat::InfiniteWeaponDurability, "Keeps equipped weapons at full WHP.");
|
|
toggle("Infinite thirst", Cheat::InfiniteThirst, "Keeps your party's thirst gauges full.");
|
|
toggle("Infinite stamina", Cheat::InfiniteStamina, "Keeps the bottom-left attack/combo gauge full.");
|
|
ImGui::Separator();
|
|
const int current = equippedWeaponAttack();
|
|
if (current >= 0) ImGui::Text("Equipped weapon ATK: %d", current);
|
|
else ImGui::TextDisabled("No equipped weapon available.");
|
|
static int attack = 100;
|
|
ImGui::SetNextItemWidth(220);
|
|
ImGui::InputInt("Weapon ATK (0-999)", &attack);
|
|
attack = std::clamp(attack,0,999);
|
|
ImGui::BeginDisabled(current < 0);
|
|
if (ImGui::Button("Apply to equipped weapon")) requestWeaponAttack(attack);
|
|
ImGui::EndDisabled();
|
|
ImGui::TextWrapped("Applies when gameplay resumes. The edited ATK is included when you save your game.");
|
|
ImGui::Separator();
|
|
int abs=absMultiplier();if(ImGui::SliderInt("Weapon ABS multiplier",&abs,1,16,"%dx"))setAbsMultiplier(abs);
|
|
int damage=damageMultiplier();if(ImGui::SliderInt("Damage multiplier",&damage,1,16,"%dx"))setDamageMultiplier(damage);
|
|
toggle("One-hit kills", Cheat::OneHitKills, "Any hit that deals damage defeats the monster; immunities still apply.");
|
|
toggle("No damage taken", Cheat::NoDamageTaken, "Monster attacks never land: no damage, knock-down or theft.");
|
|
toggle("Key finder", Cheat::KeyFinder, "The monster carrying the floor's key blinks gold on the map.");
|
|
int speed=movementPercent();if(ImGui::SliderInt("Movement speed",&speed,50,200,"%d%%"))setMovementPercent(speed);
|
|
toggle("Freeze time of day",Cheat::FreezeTimeOfDay,"Holds sky and lighting; game timers continue.");
|
|
static int gold=1000;
|
|
ImGui::Text("Current Gilda: %d",gilda());ImGui::InputInt("Gilda (0-65535)",&gold,100,1000);gold=std::clamp(gold,0,65535);
|
|
ImGui::BeginDisabled(gilda()<0);if(ImGui::Button("Apply Gilda"))requestGilda(gold);ImGui::EndDisabled();
|
|
static int slot=0,quantity=1;
|
|
ImGui::SliderInt("Active consumable slot",&slot,0,2,"%d (0=left)");
|
|
const auto item=activeConsumable(slot);
|
|
if(item.id>=0)ImGui::Text("Item ID %d: %d held, maximum %d",item.id,item.quantity,item.maximum);
|
|
else ImGui::TextDisabled("Equip a consumable in this HUD slot first.");
|
|
ImGui::InputInt("Quantity",&quantity);quantity=std::clamp(quantity,1,std::max(1,item.maximum));
|
|
ImGui::BeginDisabled(item.id<0 || item.maximum<1);if(ImGui::Button("Apply quantity"))requestConsumableQuantity(slot,quantity);ImGui::EndDisabled();
|
|
static int capacity=50;
|
|
ImGui::Text("Inventory: %d slots; minimum occupied size: %d",inventorySize(),minimumInventorySize());
|
|
ImGui::InputInt("Inventory size (1-100)",&capacity);capacity=std::clamp(capacity,std::min(100,minimumInventorySize()),100);
|
|
ImGui::BeginDisabled(inventorySize()<0);if(ImGui::Button("Apply inventory size"))requestInventorySize(capacity);ImGui::EndDisabled();
|
|
ImGui::TextWrapped("Inventory edits apply when gameplay resumes and are included in game saves. Existing items are never discarded by resizing.");
|
|
ImGui::Separator();
|
|
ImGui::BeginDisabled(current < 0);
|
|
if (ImGui::Button("Level up equipped weapon")) requestWeaponLevelUp();
|
|
ImGui::EndDisabled();
|
|
ImGui::TextDisabled("Fills its ABS; choose Level up in the weapon menu. Not for default weapons.");
|
|
toggle("Reveal floor map", Cheat::RevealFloorMap, "Shows the whole dungeon floor on the map, chests and Atla included.");
|
|
toggle("Fish always bite", Cheat::FishingHelper, "Fish near the bait take it and stay hooked until you reel in.");
|
|
static int spawn = 0, spawnCount = 1;
|
|
const int items = spawnItemCount();
|
|
if (items)
|
|
{
|
|
spawn = std::clamp(spawn, 0, items - 1);
|
|
if (ImGui::BeginCombo("Spawn item", spawnItem(spawn).name))
|
|
{
|
|
for (int i = 0; i < items; ++i)
|
|
if (ImGui::Selectable(spawnItem(i).name, i == spawn)) spawn = i;
|
|
ImGui::EndCombo();
|
|
}
|
|
ImGui::SliderInt("Spawn count", &spawnCount, 1, 10);
|
|
if (ImGui::Button("Give item")) requestSpawn(spawnItem(spawn).id, spawnCount);
|
|
ImGui::TextDisabled("Given when gameplay resumes, while there is room. Story and key items are excluded.");
|
|
}
|
|
else ImGui::TextDisabled("Item names appear once the game has loaded its messages.");
|
|
ImGui::Separator();
|
|
toggle("Fast-forward always on", Cheat::FastForwardLock,
|
|
"At the Video tab's fast-forward speed. Or hold the Fast forward binding (Controls tab: ` or the touchpad). Sound is muted.");
|
|
ImGui::Separator();
|
|
ImGui::TextWrapped("Cheats reset each launch: toggles off, ABS 1x, movement 100%.");
|
|
});
|
|
// Travel and progress (dc_warp.h): carried out when the game is idle (a town's free walk, a dungeon's free
|
|
// play), through the game's own fades and loads.
|
|
bozo::app::ui::registerTab("Travel", [] {
|
|
ImGui::TextWrapped("Status: %s", dc::warp::status().c_str());
|
|
ImGui::TextDisabled("Each runs as soon as you are walking freely in a town or a dungeon (not in a menu, a talk or an interior).");
|
|
ImGui::Separator();
|
|
static int place = 0;
|
|
if (ImGui::BeginCombo("Town or area", dc::warp::place(place).name))
|
|
{
|
|
for (int i = 0; i < dc::warp::placeCount(); ++i)
|
|
if (ImGui::Selectable(dc::warp::place(i).name, i == place))
|
|
place = i;
|
|
ImGui::EndCombo();
|
|
}
|
|
if (ImGui::Button("Warp there"))
|
|
dc::warp::requestPlace(dc::warp::place(place).map);
|
|
ImGui::Separator();
|
|
static int dungeon = 0, floor = 1;
|
|
if (ImGui::BeginCombo("Dungeon", dc::warp::dungeon(dungeon).name))
|
|
{
|
|
for (int i = 0; i < dc::warp::dungeonCount(); ++i)
|
|
if (ImGui::Selectable(dc::warp::dungeon(i).name, i == dungeon))
|
|
dungeon = i;
|
|
ImGui::EndCombo();
|
|
}
|
|
ImGui::SliderInt("Floor", &floor, 1, dc::warp::dungeon(dungeon).floors);
|
|
floor = std::clamp(floor, 1, dc::warp::dungeon(dungeon).floors);
|
|
if (ImGui::Button("Warp to that floor"))
|
|
dc::warp::requestDungeon(dungeon, floor - 1);
|
|
ImGui::TextDisabled("The last floor is the boss's. A floor reached by warp counts as reached on the entrance menu.");
|
|
if (ImGui::Button("Teleport to the next monster"))
|
|
dc::warp::requestMonster();
|
|
ImGui::TextDisabled("In a dungeon: next to the next live monster of the floor, in turn.");
|
|
ImGui::Separator();
|
|
if (ImGui::Button("Unlock every georama part"))
|
|
dc::warp::requestGeorama();
|
|
ImGui::TextDisabled("Every town's buildings, villagers and elements, as if every Atla were opened. The dungeons' Atla are then empty.");
|
|
if (ImGui::Button("Open the whole world map"))
|
|
dc::warp::requestWorld();
|
|
ImGui::TextDisabled("Every town and dungeon on the world map, and the World Map item.");
|
|
ImGui::Separator();
|
|
static int chapter = 2;
|
|
if (ImGui::BeginCombo("Story chapter", dc::warp::chapterName(chapter)))
|
|
{
|
|
for (int i = 1; i <= dc::warp::chapterCount(); ++i)
|
|
if (ImGui::Selectable(dc::warp::chapterName(i), i == chapter))
|
|
chapter = i;
|
|
ImGui::EndCombo();
|
|
}
|
|
if (ImGui::Button("Advance the story to that chapter"))
|
|
dc::warp::requestChapter(chapter);
|
|
ImGui::TextWrapped("Sets the story state a playthrough has when that chapter starts (allies and their weapons, the "
|
|
"dungeons before it cleared, the places visited). It never moves the story back. Save first: "
|
|
"it is meant for testing, and skipped key items and house events are not all recreated.");
|
|
});
|
|
}
|
|
}
|