mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
CHINESE: actually display BobbyR amount purchased correctly at runtime (#398)
* Revert "Move CHINESE BOBBYR_ITEMS_BOUGHT_X conditional definition to i18n"
This reverts commit ecdc8916f2.
* actually display the amount purchased correctly at runtime
This commit is contained in:
@@ -25,7 +25,6 @@ void RenderBobbyR();
|
||||
#define BOBBYR_GRIDLOC_X LAPTOP_SCREEN_UL_X + 4
|
||||
#define BOBBYR_GRIDLOC_Y LAPTOP_SCREEN_WEB_UL_Y + 5 //LAPTOP_SCREEN_WEB_UL_Y + 45
|
||||
|
||||
#define BOBBYR_ORDER_NUM_WIDTH 15
|
||||
|
||||
/*
|
||||
extern UINT16 gusFirstGunIndex;
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#define BOBBYR_ITEM_NAME_X BOBBYR_GRIDLOC_X + 6
|
||||
#define BOBBYR_ITEM_NAME_Y_OFFSET 54
|
||||
|
||||
#define BOBBYR_ORDER_NUM_WIDTH 15
|
||||
#define BOBBYR_ORDER_NUM_X BOBBYR_GRIDLOC_X + 120 - BOBBYR_ORDER_NUM_WIDTH //BOBBYR_ITEM_STOCK_TEXT_X
|
||||
#define BOBBYR_ORDER_NUM_Y_OFFSET 1
|
||||
|
||||
@@ -115,6 +116,8 @@
|
||||
#define BOBBYR_ITEM_QTY_NUM_X BOBBYR_GRIDLOC_X + 105//BOBBYR_ITEM_COST_TEXT_X + 1
|
||||
#define BOBBYR_ITEM_QTY_NUM_Y BOBBYR_ITEM_QTY_TEXT_Y//BOBBYR_ITEM_COST_TEXT_Y + 40
|
||||
|
||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
||||
|
||||
#define BOBBY_RAY_NOT_PURCHASED 255
|
||||
#define BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE 200
|
||||
|
||||
@@ -2500,7 +2503,11 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
||||
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED)
|
||||
{
|
||||
swprintf(sTemp, L"% 4d", BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased);
|
||||
DrawTextToScreen(sTemp, BOBBYR_ITEMS_BOUGHT_X, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
auto bobbyRItemsBoughtX{ BOBBYR_ITEMS_BOUGHT_X };
|
||||
if (g_lang == i18n::Lang::zh) {
|
||||
bobbyRItemsBoughtX -= 10;
|
||||
}
|
||||
DrawTextToScreen(sTemp, bobbyRItemsBoughtX, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,4 @@ extern const i18n::Lang g_lang;
|
||||
|
||||
extern const int MAX_MESSAGES_ON_MAP_BOTTOM;
|
||||
|
||||
extern const int BOBBYR_ITEMS_BOUGHT_X;
|
||||
|
||||
auto GetLanguagePrefix() -> const STR;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#include <language.hpp>
|
||||
|
||||
#include <BobbyR.h>
|
||||
#include <laptop.h>
|
||||
|
||||
/* FIXME: The ugliest of ugly hacks. Getting rid of this and letting language
|
||||
* (ideally text and voice separately) be set in the options menu would be
|
||||
* ideal. */
|
||||
@@ -34,12 +31,6 @@ const int MAX_MESSAGES_ON_MAP_BOTTOM{
|
||||
#endif
|
||||
};
|
||||
|
||||
const int BOBBYR_ITEMS_BOUGHT_X{BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH
|
||||
#ifdef CHINESE
|
||||
- 10
|
||||
#endif
|
||||
};
|
||||
|
||||
auto GetLanguagePrefix() -> const STR {
|
||||
return
|
||||
#if defined(ENGLISH)
|
||||
|
||||
Reference in New Issue
Block a user