Eight agents took over ScoreSheet, DeathmatchManager, giantbook and boss overlays, FXLayers, PlayerManager, the menu manager with the save and prompt flow, twelve menus (character wheel, options, challenges, daily (offline), special seeds, leaderboard (local), collection, bestiary, stats, controller select, key config, cutscenes), console text input and gamepad hot-plug through platform listeners. Integration moved input to device ids. KAGE's projection matrix now reaches the 'ProjectionMatrix' uniform the basic shaders from afterbirthp.a declare, as well as the exe's 'Transform', which takes the color-mod and HQ4X passes from black to correct output. Under gdb with stubs skipped, the intro, title, file select, main menu and character wheel render as in the game. 1330 functions taken over, boot path 261/615. build/isaac stops at OnlineEmotes::init in Game::LoadConfigXmls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
117 lines
3.0 KiB
C++
117 lines
3.0 KiB
C++
#pragma once
|
|
|
|
#include "classes.h"
|
|
#include <vector>
|
|
|
|
// How a run ended (REPENTOGON's Ending), which picks the boss bonus of its score.
|
|
enum RunEnding : int
|
|
{
|
|
RUN_ENDING_NONE,
|
|
RUN_ENDING_DIE,
|
|
RUN_ENDING_EPILOGUE,
|
|
RUN_ENDING_CREDITS,
|
|
RUN_ENDING_SATAN,
|
|
RUN_ENDING_ISAAC,
|
|
RUN_ENDING_LAMB,
|
|
RUN_ENDING_BLUE_BABY,
|
|
RUN_ENDING_MEGA_SATAN,
|
|
RUN_ENDING_ULTRA_GREED,
|
|
RUN_ENDING_HUSH,
|
|
RUN_ENDING_DELIRIUM,
|
|
RUN_ENDING_ULTRA_GREEDIER,
|
|
RUN_ENDING_MOTHER,
|
|
RUN_ENDING_BEAST
|
|
};
|
|
|
|
// A room the score counts: its type, whether it is a red room, and how much the floor still scores.
|
|
struct RoomScore
|
|
{
|
|
float multiplier = 0;
|
|
int type = 0;
|
|
bool isRedRoom = false;
|
|
};
|
|
|
|
// A room cleared, as Room tells the score sheet: its type, shape and clear count, and whether it is a red room.
|
|
struct RoomClear
|
|
{
|
|
int clearCount = 0;
|
|
int shape = 0;
|
|
int type = 0;
|
|
bool isRedRoom = false;
|
|
};
|
|
|
|
// A floor by stage and type, and whether it was played on the Ascent.
|
|
struct StageVisit
|
|
{
|
|
int stage = 0;
|
|
int stageType = 0;
|
|
bool isAscent = false;
|
|
};
|
|
|
|
// What a run's score is computed from, which a saved game state keeps (store_state and restore_state copy it whole).
|
|
struct ScoreRecord
|
|
{
|
|
std::vector<RoomScore> clearedRooms;
|
|
std::vector<RoomScore> visitedRooms;
|
|
std::vector<StageVisit> finishedStages;
|
|
std::vector<StageVisit> replayedStages;
|
|
RunEnding runEnding = RUN_ENDING_NONE;
|
|
int angelsKilled = 0;
|
|
int bossChallengesCleared = 0;
|
|
int enemyPoints = 0;
|
|
int pickupPoints = 0;
|
|
int runTime = 0;
|
|
int runTimeLevel = 0;
|
|
int runTimeLevelType = 0;
|
|
};
|
|
|
|
// The version a score is submitted with: 1.9, build 460.
|
|
constexpr int BUILD_ID = 1 << 24 | 9 << 16 | 460;
|
|
|
|
// Construction (009e5300) is the default, as is everything else std members make unnecessary.
|
|
// The run's score (g_game->scoreSheet, and one per leaderboard row): what the run did, and the bonuses and penalties
|
|
// Calculate turns it into.
|
|
class ScoreSheet : public ScoreRecord
|
|
{
|
|
public:
|
|
int beastBonus = 0;
|
|
int blueBabyBonus = 0;
|
|
int damagePenalty = 0;
|
|
int deliriumBonus = 0;
|
|
int explorationBonus = 0;
|
|
int itemPenalty = 0;
|
|
int lambBonus = 0;
|
|
int megaSatanBonus = 0;
|
|
int motherBonus = 0;
|
|
int rushBonus = 0;
|
|
int schwagBonus = 0;
|
|
int stageBonus = 0;
|
|
int timePenalty = 0;
|
|
int totalScore = 0;
|
|
int buildId = BUILD_ID;
|
|
bool isRedRoomBonusCapped = false;
|
|
|
|
void Reset();
|
|
void store_state(ScoreRecord& state);
|
|
void restore_state(const ScoreRecord& state);
|
|
|
|
void add_cleared_room(const RoomClear& clear);
|
|
void add_pickup_points(int variant, int subType, Vector position);
|
|
void AddKilledEnemy(Entity& npc);
|
|
void AddFinishedStage(const StageVisit& visit, int time);
|
|
|
|
void Calculate();
|
|
void calculate_room_score();
|
|
float stage_multiplier_get(const StageVisit& visit);
|
|
};
|
|
|
|
// What a room type scores entered and cleared.
|
|
struct RoomPoints
|
|
{
|
|
int cleared = 0;
|
|
int visited = 0;
|
|
};
|
|
|
|
RoomPoints room_points_get(int roomType);
|
|
int room_shape_weight_get(int shape);
|