summaryrefslogtreecommitdiff
path: root/mm/src/code/z_message.c
diff options
context:
space:
mode:
authorinspectredc <78732756+inspectredc@users.noreply.github.com>2024-05-09 15:58:52 +0100
committerGarrett Cox <garrettjcox@gmail.com>2024-05-22 09:05:04 -0500
commitad478cfc594ec8820bda726b3dc5fffe2df65e30 (patch)
treebcea98a74768141b8f812373abeb939116e6d770 /mm/src/code/z_message.c
parent1d5d9be0694e0ee6886925ca81929900e7047c9a (diff)
DPad Items (#228)
* Initial Dpad * remove old hud stuff * and comment * s.. * add dpad equip macro back in * fix inputs * fix equipping (hopefully all) * finish some todos * add 2s2h asset header * check dpad macro * remove 2s2h_assets * re-add empty texture * use correct struct for default dpad equips * dpad save stuff * fix item offering, use correct equip offset values * finally figure out unk_154 and fix mask equipping * avoid ugly code * add necessary condition * correct save names for dpad items/slots * remove todos and sort out suggestions and rename cvar * func standardise renaming * Add dpad to hud presets * dpad save migration
Diffstat (limited to 'mm/src/code/z_message.c')
-rw-r--r--mm/src/code/z_message.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mm/src/code/z_message.c b/mm/src/code/z_message.c
index aff05b005..becbe0695 100644
--- a/mm/src/code/z_message.c
+++ b/mm/src/code/z_message.c
@@ -14,9 +14,7 @@
#include "assets/interface/message_texture_static/message_texture_static.h"
#include <string.h>
-// #region 2S2H [Port] Asset tables we can pull from instead of from ROM
-#define dgEmptyTexture "__OTR__textures/virtual/gEmptyTexture"
-static const ALIGN_ASSET(2) char gEmptyTexture[] = dgEmptyTexture;
+#include "2s2h_assets.h"
const char* gBombersNotebookPhotos[] = {
gBombersNotebookPhotoAnjuTex,
@@ -2883,7 +2881,13 @@ void Message_Decode(PlayState* play) {
decodedBufPos--;
} else if (curChar == 0x22E) {
digits[0] = digits[1] = digits[2] = 0;
- digits[3] = gItemPrices[GET_CUR_FORM_BTN_ITEM(player->heldItemButton)];
+ // #region 2S2H [Dpad]
+ if (IS_HELD_DPAD(player->heldItemButton)) {
+ digits[3] = gItemPrices[DPAD_GET_CUR_FORM_BTN_ITEM(HELD_ITEM_TO_DPAD(player->heldItemButton))];
+ } else {
+ digits[3] = gItemPrices[GET_CUR_FORM_BTN_ITEM(player->heldItemButton)];
+ }
+ // #endregion
while (digits[3] >= 1000) {
digits[0]++;