Six agents took over OnlineEmotes (emote wheel), OnlineStatsScreen's deeds, VictoryRunPrompt, RevivePlayerMenu, HUD, PauseScreen, Minimap, PreloadManager, ProceduralItemManager, Game::LoadBossRushXml, GameState's loading, the menu loose ends, Manager::StartNewGame, LevelGenerator and Level (Game now derives from Level). Integration: completion_widget.h breaks an include loop, call sites moved to the new APIs. --mute (main.cpp) keeps the mixer running at zero gain. build/isaac reaches the main menu by itself (input skips the intro); under gdb, picking a character calls StartNewGame and stops at Game::Start. 1611 functions taken over, boot path 287/615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
99 lines
2.5 KiB
C++
99 lines
2.5 KiB
C++
#pragma once
|
|
|
|
#include "anm2.h"
|
|
#include <vector>
|
|
|
|
constexpr const char* ONLINE_EMOTES_ANM2 = "gfx/OnlineEmotes.anm2";
|
|
|
|
// The emotes a player can show, by the animation each plays in OnlineEmotes.anm2.
|
|
// The die rolls show their result on a frame of the result animation, each face its own emote.
|
|
// Nicalis plays one of its frames the same way.
|
|
enum Emote : int
|
|
{
|
|
EMOTE_UP,
|
|
EMOTE_DOWN,
|
|
EMOTE_LEFT,
|
|
EMOTE_RIGHT,
|
|
EMOTE_HAPPY,
|
|
EMOTE_SAD,
|
|
EMOTE_THUMBS_UP,
|
|
EMOTE_THUMBS_DOWN,
|
|
EMOTE_HEART,
|
|
EMOTE_BOMB,
|
|
EMOTE_COIN,
|
|
EMOTE_KEY,
|
|
EMOTE_TINTED_ROCK,
|
|
EMOTE_ANGEL,
|
|
EMOTE_DEVIL,
|
|
EMOTE_POOP,
|
|
EMOTE_RAISE_HAND,
|
|
EMOTE_QUESTION_MARK,
|
|
EMOTE_D6,
|
|
EMOTE_D20,
|
|
EMOTE_RESET,
|
|
EMOTE_TYPING,
|
|
EMOTE_D6_ROLL,
|
|
EMOTE_D20_ROLL = EMOTE_D6_ROLL + 6,
|
|
EMOTE_NICALIS = EMOTE_D20_ROLL + 20,
|
|
EMOTE_COUNT = EMOTE_NICALIS + 11,
|
|
EMOTE_NONE = 60
|
|
};
|
|
|
|
// Where the emote wheel is in opening and closing.
|
|
enum EmoteWheelState : int
|
|
{
|
|
EMOTE_WHEEL_CLOSED,
|
|
EMOTE_WHEEL_OPENING,
|
|
EMOTE_WHEEL_OPEN,
|
|
EMOTE_WHEEL_CLOSING
|
|
};
|
|
|
|
// Construction, copies and destruction (0042fa30, 0042fac0) are the defaults.
|
|
// An emote shown over a player or on the wheel (OnlineEmotes): the emote in its bubble, or dots while its player types.
|
|
// It plays for a duration in frames, or until replaced when that is 0.
|
|
class OnlineEmotes
|
|
{
|
|
public:
|
|
ANM2 bubbleSprite;
|
|
ANM2 emoteSprite;
|
|
Emote emote = EMOTE_NONE;
|
|
int duration = 0;
|
|
int timer = 0;
|
|
bool isActive = false;
|
|
bool isBubbleShown = true;
|
|
|
|
void Load();
|
|
void Play(Emote shown, int frames);
|
|
void Update();
|
|
void Render(Vector position);
|
|
};
|
|
|
|
// Construction and destruction (008d1d20) are the defaults.
|
|
// The online emote wheel (EmoteWheel): two sets of emotes laid out around a ring that opens and closes from the
|
|
// screen center, the emote the stick points at, and the emote drawing each one.
|
|
// The ring radii are those of the ring and selection images the open wheel draws.
|
|
class EmoteWheel
|
|
{
|
|
public:
|
|
std::vector<std::vector<Emote>> emoteSets;
|
|
OnlineEmotes emote;
|
|
EmoteWheelState state = EMOTE_WHEEL_CLOSED;
|
|
float angleStep = 0;
|
|
float innerRadius = 70;
|
|
float maxRadius = 110;
|
|
float openProgress = 0;
|
|
float ringRadius = 0;
|
|
float selectionRadius = 0;
|
|
int emoteSetIndex = 0;
|
|
int selection = -1;
|
|
bool isInitialized = false;
|
|
|
|
void Init();
|
|
void SetEmoteSet(int index);
|
|
void Update();
|
|
void Render();
|
|
|
|
private:
|
|
void angle_step_update();
|
|
};
|