Add EVENT_DISPLAYOVERHEADMAPPLAYER.

RETURN is the tilenum to be displayed. It is pre-populated with what the game will display for the current frame.

Set RETURN to -1 to disable.

git-svn-id: https://svn.eduke32.com/eduke32@6608 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-01-28 04:31:04 +00:00
parent 25ccdca408
commit 97fd71c3db
3 changed files with 7 additions and 0 deletions

View file

@ -141,6 +141,7 @@ enum GameEvent_t {
EVENT_EXITGAMESCREEN,
EVENT_EXITPROGRAMSCREEN,
EVENT_ALTWEAPON,
EVENT_DISPLAYOVERHEADMAPPLAYER,
#ifdef LUNATIC
EVENT_ANIMATEALLSPRITES,
#endif

View file

@ -737,6 +737,7 @@ const char *EventNames[MAXEVENTS] =
"EVENT_EXITGAMESCREEN",
"EVENT_EXITPROGRAMSCREEN",
"EVENT_ALTWEAPON",
"EVENT_DISPLAYOVERHEADMAPPLAYER",
#ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES",
#endif

View file

@ -593,6 +593,11 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
else
i = APLAYERTOP;
int32_t i = VM_OnEventWithReturn(EVENT_DISPLAYOVERHEADMAPPLAYER, g_player[p].ps->i, p, i);
if (i < 0)
continue;
j = klabs(g_player[p].ps->truefz-g_player[p].ps->pos.z)>>8;
j = mulscale16(czoom*(sprite[g_player[p].ps->i].yrepeat+j), yxaspect);