Skip to content

Commit

Permalink
Add more names for different areas of the game IG
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggem committed Jan 1, 2025
1 parent 731f2ce commit 6e5fed0
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions desktop_version/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ static volatile Uint64 f_time = 0;
static volatile Uint64 f_timePrev = 0;
#endif

// RPC variables
static const char* rpcArea = "";
static const char* rpcRoomname = "";

enum FuncType
{
Func_null,
Expand Down Expand Up @@ -978,8 +982,25 @@ static enum LoopCode loop_begin(void)
key.Poll();
}

// Update network per frame.
NETWORK_update(map.currentarea(game.roomx, game.roomy), map.roomname);
// Discord RPC handling (and maybe later Steam RPC OwO)
rpcArea = map.currentarea(game.roomx, game.roomy);
rpcRoomname = map.roomname;
if (game.gamestate == TITLEMODE)
{
rpcArea = "Exploring the Menus";
rpcRoomname = "";
}
if (game.gamestate == EDITORMODE)
{
rpcArea = "Making a Level";
rpcRoomname = "";
}
// Dirty fix for custom levels getting the area from Dimension VVVVVV
if (map.custommode) {
rpcArea = game.customleveltitle.c_str();
}
// Update network APIs once per frame
NETWORK_update(rpcArea, rpcRoomname);

return Loop_continue;
}
Expand Down

0 comments on commit 6e5fed0

Please sign in to comment.