Skip to content

Commit

Permalink
Move CHINESE BOBBYR_ITEMS_BOUGHT_X conditional definition to i18n
Browse files Browse the repository at this point in the history
Just awful
  • Loading branch information
majcosta committed Dec 31, 2024
1 parent 4b563fe commit ecdc891
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions Laptop/BobbyR.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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;
Expand Down
7 changes: 0 additions & 7 deletions Laptop/BobbyRGuns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
#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

Expand Down Expand Up @@ -116,12 +115,6 @@
#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

#ifdef CHINESE
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH - 10 //BOBBYR_ITEM_QTY_NUM_X
#else
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
#endif

#define BOBBY_RAY_NOT_PURCHASED 255
#define BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE 200

Expand Down
2 changes: 2 additions & 0 deletions i18n/include/language.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ 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;
9 changes: 9 additions & 0 deletions i18n/language.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#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. */
Expand Down Expand Up @@ -31,6 +34,12 @@ 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)
Expand Down

0 comments on commit ecdc891

Please sign in to comment.