mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2024-11-30 09:30:50 +00:00
port Inv_InitColors
This commit is contained in:
parent
9637f30170
commit
06c6a51e64
@ -69,10 +69,10 @@
|
||||
</g>
|
||||
<g transform="translate(0 116)">
|
||||
<text x="0" y="7.50">Tomb2.exe progress according to the physical function order:</text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">61.17% (745)</tspan> · <tspan class="known">36.37% (443)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">61.25% (746)</tspan> · <tspan class="known">36.29% (442)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="456.91" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="271.69" height="6" x="456.91" y="0" class="known"/>
|
||||
<rect width="457.52" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="271.08" height="6" x="457.52" y="0" class="known"/>
|
||||
<rect width="18.40" height="6" x="728.60" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -410,7 +410,7 @@
|
||||
<rect width="12" height="12" x="465" y="90" class="known"><title>int32_t __cdecl GetDebouncedInput(int32_t input);</title></rect>
|
||||
<rect width="12" height="12" x="480" y="90" class="decompiled"><title>void __cdecl Inv_DoInventoryPicture(void);</title></rect>
|
||||
<rect width="12" height="12" x="495" y="90" class="decompiled"><title>void __cdecl Inv_DoInventoryBackground(void);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="90" class="known"><title>void __cdecl InitColours(void);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="90" class="decompiled"><title>void __cdecl Inv_InitColors(void);</title></rect>
|
||||
<rect width="12" height="12" x="525" y="90" class="decompiled"><title>void __cdecl Inv_RingIsOpen(RING_INFO *ring);</title></rect>
|
||||
<rect width="12" height="12" x="540" y="90" class="decompiled"><title>void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);</title></rect>
|
||||
<rect width="12" height="12" x="555" y="90" class="decompiled"><title>void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);</title></rect>
|
||||
@ -817,9 +817,9 @@
|
||||
<rect width="12" height="12" x="570" y="210" class="decompiled"><title>void __cdecl Text_ChangeText(TEXTSTRING *string, const char *text);</title></rect>
|
||||
<rect width="12" height="12" x="585" y="210" class="decompiled"><title>void __cdecl Text_SetScale(TEXTSTRING *string, int32_t scale_h, int32_t scale_v);</title></rect>
|
||||
<rect width="12" height="12" x="600" y="210" class="decompiled"><title>void __cdecl Text_Flash(TEXTSTRING *string, int16_t enable, int16_t rate);</title></rect>
|
||||
<rect width="12" height="12" x="615" y="210" class="decompiled"><title>void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t colour, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="615" y="210" class="decompiled"><title>void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t color, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="630" y="210" class="decompiled"><title>void __cdecl Text_RemoveBackground(TEXTSTRING *string);</title></rect>
|
||||
<rect width="12" height="12" x="645" y="210" class="decompiled"><title>void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t colour, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="645" y="210" class="decompiled"><title>void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t color, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="660" y="210" class="decompiled"><title>void __cdecl Text_RemoveOutline(TEXTSTRING *string);</title></rect>
|
||||
<rect width="12" height="12" x="675" y="210" class="decompiled"><title>void __cdecl Text_CentreH(TEXTSTRING *string, int16_t enable);</title></rect>
|
||||
<rect width="12" height="12" x="690" y="210" class="decompiled"><title>void __cdecl Text_CentreV(TEXTSTRING *string, int16_t enable);</title></rect>
|
||||
@ -1059,7 +1059,7 @@
|
||||
<rect width="12" height="12" x="450" y="285" class="known"><title>void __cdecl WinPlayFMV(const char *file_name, bool is_playback);</title></rect>
|
||||
<rect width="12" height="12" x="465" y="285" class="known"><title>void __cdecl WinStopFMV(bool is_playback);</title></rect>
|
||||
<rect width="12" height="12" x="480" y="285" class="known"><title>bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);</title></rect>
|
||||
<rect width="12" height="12" x="495" y="285" class="known"><title>uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);</title></rect>
|
||||
<rect width="12" height="12" x="495" y="285" class="known"><title>uint16_t __cdecl S_COLOR(int32_t red, int32_t green, int32_t blue);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="285" class="known"><title>void __cdecl S_DrawScreenLine(int32_t x, int32_t y, int32_t z, int32_t x_len, int32_t y_len, BYTE color_idx, D3DCOLOR *gour, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="525" y="285" class="known"><title>void __cdecl S_DrawScreenBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_OUTLINE *gour, uint16_t flags);</title></rect>
|
||||
<rect width="12" height="12" x="540" y="285" class="known"><title>void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_FILL *gour, uint16_t flags);</title></rect>
|
||||
@ -1298,10 +1298,10 @@
|
||||
</g>
|
||||
<g transform="translate(0 546)">
|
||||
<text x="0" y="7.50">Tomb2.exe progress according to the function sizes:</text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">64.88%</tspan> · <tspan class="known">34.79%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">64.96%</tspan> · <tspan class="known">34.71%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="484.68" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="259.88" height="6" x="484.68" y="0" class="known"/>
|
||||
<rect width="485.26" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="259.30" height="6" x="485.26" y="0" class="known"/>
|
||||
<rect width="2.44" height="6" x="744.56" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -1650,7 +1650,7 @@
|
||||
<rect width="12.25" height="11.59" x="465.10" y="363.41" class="known"><title>void __cdecl CopterControl(int16_t item_num);</title></rect>
|
||||
<rect width="12.28" height="11.51" x="480.35" y="108.31" class="known"><title>void __cdecl ControlLavaBlob(int16_t fx_num);</title></rect>
|
||||
<rect width="12.28" height="11.51" x="495.62" y="108.31" class="decompiled"><title>bool __cdecl WinVidGoWindowed(int32_t width, int32_t height, DISPLAY_MODE *dispMode);</title></rect>
|
||||
<rect width="12.22" height="11.51" x="510.90" y="108.31" class="known"><title>void __cdecl InitColours(void);</title></rect>
|
||||
<rect width="12.22" height="11.51" x="510.90" y="108.31" class="decompiled"><title>void __cdecl Inv_InitColors(void);</title></rect>
|
||||
<rect width="12.22" height="11.51" x="526.12" y="108.31" class="known"><title>void __cdecl Pendulum(int16_t item_num);</title></rect>
|
||||
<rect width="12.16" height="11.51" x="541.34" y="108.31" class="known"><title>void __cdecl KillerStatueControl(int16_t item_num);</title></rect>
|
||||
<rect width="12.05" height="11.51" x="556.50" y="108.31" class="decompiled"><title>int32_t __cdecl Text_GetWidth(TEXTSTRING *string);</title></rect>
|
||||
@ -1892,7 +1892,7 @@
|
||||
<rect width="7.54" height="8.03" x="686.79" y="185.54" class="decompiled"><title>const int16_t *__cdecl Output_InsertObjectGT4_Sorted(const int16_t *obj_ptr, int32_t num, SORT_TYPE sort_type);</title></rect>
|
||||
<rect width="7.54" height="8.03" x="697.32" y="185.54" class="decompiled"><title>int32_t __cdecl Lara_IsNearItem(PHD_3DPOS *pos, int32_t distance);</title></rect>
|
||||
<rect width="7.54" height="8.03" x="707.86" y="185.54" class="known"><title>void __cdecl ControlSnowSprite(int16_t fx_num);</title></rect>
|
||||
<rect width="7.54" height="8.03" x="718.39" y="185.54" class="decompiled"><title>void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t colour, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="7.54" height="8.03" x="718.39" y="185.54" class="decompiled"><title>void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t color, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="7.54" height="8.03" x="728.93" y="185.54" class="unused"><title>sub_444B20</title></rect>
|
||||
<rect width="7.54" height="8.03" x="739.46" y="185.54" class="decompiled"><title>bool __cdecl WinVidGetDisplayMode(DISPLAY_MODE *disp_mode);</title></rect>
|
||||
<rect width="7.66" height="7.82" x="567.89" y="196.57" class="decompiled"><title>int32_t __cdecl Box_BadFloor(int32_t x, int32_t y, int32_t z, int32_t box_height, int32_t next_height, int16_t room_num, LOT_INFO *lot);</title></rect>
|
||||
@ -2327,7 +2327,7 @@
|
||||
<rect width="2.85" height="2.96" x="693.31" y="315.45" class="known"><title>void __cdecl S_UnloadLevelFile(void);</title></rect>
|
||||
<rect width="2.85" height="2.96" x="699.16" y="315.45" class="decompiled"><title>int32_t __cdecl S_Audio_Sample_CalculateSampleVolume(int32_t volume);</title></rect>
|
||||
<rect width="2.85" height="2.96" x="705.01" y="315.45" class="known"><title>LONG __cdecl SetRegistryBoolValue(LPCTSTR lpValueName, bool value);</title></rect>
|
||||
<rect width="2.71" height="2.96" x="710.86" y="315.45" class="decompiled"><title>void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t colour, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="2.71" height="2.96" x="710.86" y="315.45" class="decompiled"><title>void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t color, uint16_t *gour_ptr, uint16_t flags);</title></rect>
|
||||
<rect width="2.71" height="2.96" x="716.57" y="315.45" class="known"><title>void __cdecl DInputKeyboardRelease(void);</title></rect>
|
||||
<rect width="2.71" height="2.96" x="722.28" y="315.45" class="decompiled"><title>void __cdecl HWR_ResetTexSource(void);</title></rect>
|
||||
<rect width="2.57" height="2.96" x="727.99" y="315.45" class="decompiled"><title>void __cdecl Overlay_MakeAmmoString(char *string);</title></rect>
|
||||
@ -2365,7 +2365,7 @@
|
||||
<rect width="2.14" height="2.65" x="739.71" y="321.40" class="decompiled"><title>void __cdecl Lara_Col_SurfLeft(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="2.14" height="2.65" x="744.86" y="321.40" class="decompiled"><title>void __cdecl Lara_Col_SurfRight(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="2.57" height="2.21" x="698.40" y="327.05" class="known"><title>void __cdecl SecretControl(int16_t item_num);</title></rect>
|
||||
<rect width="2.57" height="2.21" x="698.40" y="332.27" class="known"><title>uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);</title></rect>
|
||||
<rect width="2.57" height="2.21" x="698.40" y="332.27" class="known"><title>uint16_t __cdecl S_COLOR(int32_t red, int32_t green, int32_t blue);</title></rect>
|
||||
<rect width="2.57" height="2.21" x="698.40" y="337.48" class="known"><title>void __cdecl FreePalette(int32_t palette_idx);</title></rect>
|
||||
<rect width="2.57" height="2.07" x="698.40" y="342.69" class="decompiled"><title>void __cdecl Matrix_Pop_I(void);</title></rect>
|
||||
<rect width="2.57" height="2.07" x="698.40" y="347.76" class="decompiled"><title>void __cdecl Inv_Ring_MotionRotation(RING_INFO *ring, int16_t rotation, int16_t target);</title></rect>
|
||||
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
@ -285,9 +285,9 @@ typedef struct __unaligned {
|
||||
int16_t rate;
|
||||
int16_t count;
|
||||
} flash;
|
||||
int16_t bgnd_colour;
|
||||
int16_t bgnd_color;
|
||||
const uint16_t *bgnd_gour;
|
||||
int16_t outl_colour;
|
||||
int16_t outl_color;
|
||||
const uint16_t *outl_gour;
|
||||
struct {
|
||||
int16_t x;
|
||||
@ -1022,6 +1022,21 @@ typedef enum {
|
||||
RT_KEYS = 2,
|
||||
} RING_TYPE;
|
||||
|
||||
typedef enum {
|
||||
INV_COLOR_BLACK = 0,
|
||||
INV_COLOR_GRAY = 1,
|
||||
INV_COLOR_WHITE = 2,
|
||||
INV_COLOR_RED = 3,
|
||||
INV_COLOR_ORANGE = 4,
|
||||
INV_COLOR_YELLOW = 5,
|
||||
INV_COLOR_DARK_GREEN = 12,
|
||||
INV_COLOR_GREEN = 13,
|
||||
INV_COLOR_CYAN = 14,
|
||||
INV_COLOR_BLUE = 15,
|
||||
INV_COLOR_MAGENTA = 16,
|
||||
INV_COLOR_NUMBER_OF = 17,
|
||||
} INV_COLOR;
|
||||
|
||||
typedef enum {
|
||||
INV_GAME_MODE = 0,
|
||||
INV_TITLE_MODE = 1,
|
||||
@ -3208,7 +3223,7 @@ typedef enum {
|
||||
0x004239F0 0x0132 + void __cdecl Inv_DoInventoryBackground(void);
|
||||
|
||||
# game/invfunc.c
|
||||
0x00423B30 0x010A -R void __cdecl InitColours(void);
|
||||
0x00423B30 0x010A + void __cdecl Inv_InitColors(void);
|
||||
0x00423C40 0x0167 + void __cdecl Inv_RingIsOpen(RING_INFO *ring);
|
||||
0x00423DB0 0x0081 + void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
|
||||
0x00423E40 0x0369 + void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);
|
||||
@ -3667,9 +3682,9 @@ typedef enum {
|
||||
0x00440590 0x0037 + void __cdecl Text_ChangeText(TEXTSTRING *string, const char *text);
|
||||
0x004405D0 0x0017 + void __cdecl Text_SetScale(TEXTSTRING *string, int32_t scale_h, int32_t scale_v);
|
||||
0x004405F0 0x002B + void __cdecl Text_Flash(TEXTSTRING *string, int16_t enable, int16_t rate);
|
||||
0x00440620 0x008C + void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t colour, uint16_t *gour_ptr, uint16_t flags);
|
||||
0x00440620 0x008C + void __cdecl Text_AddBackground(TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off, int16_t y_off, int16_t z_off, int16_t color, uint16_t *gour_ptr, uint16_t flags);
|
||||
0x004406B0 0x0010 + void __cdecl Text_RemoveBackground(TEXTSTRING *string);
|
||||
0x004406C0 0x0029 + void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t colour, uint16_t *gour_ptr, uint16_t flags);
|
||||
0x004406C0 0x0029 + void __cdecl Text_AddOutline(TEXTSTRING *string, int16_t enable, int16_t color, uint16_t *gour_ptr, uint16_t flags);
|
||||
0x004406F0 0x0010 + void __cdecl Text_RemoveOutline(TEXTSTRING *string);
|
||||
0x00440700 0x001E + void __cdecl Text_CentreH(TEXTSTRING *string, int16_t enable);
|
||||
0x00440720 0x001E + void __cdecl Text_CentreV(TEXTSTRING *string, int16_t enable);
|
||||
@ -3914,7 +3929,7 @@ typedef enum {
|
||||
0x0044BE10 0x02E0 -R void __cdecl WinPlayFMV(const char *file_name, bool is_playback);
|
||||
0x0044C0F0 0x0048 -R void __cdecl WinStopFMV(bool is_playback);
|
||||
0x0044C140 0x0088 -R bool __cdecl IntroFMV(const char *file_name1, const char *file_name2);
|
||||
0x0044C1D0 0x0023 -R uint16_t __cdecl S_COLOUR(int32_t red, int32_t green, int32_t blue);
|
||||
0x0044C1D0 0x0023 -R uint16_t __cdecl S_COLOR(int32_t red, int32_t green, int32_t blue);
|
||||
0x0044C200 0x0035 -R void __cdecl S_DrawScreenLine(int32_t x, int32_t y, int32_t z, int32_t x_len, int32_t y_len, BYTE color_idx, D3DCOLOR *gour, uint16_t flags);
|
||||
0x0044C240 0x0116 -R void __cdecl S_DrawScreenBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_OUTLINE *gour, uint16_t flags);
|
||||
0x0044C360 0x002E -R void __cdecl S_DrawScreenFBox(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_FILL *gour, uint16_t flags);
|
||||
@ -4677,3 +4692,4 @@ typedef enum {
|
||||
0x00464558 - const uint16_t g_Requester_MainGour2[];
|
||||
0x00464590 - const uint16_t g_Requester_SelectionGour2[];
|
||||
0x004645A8 - const uint16_t g_Requester_UnselectionGour1[];
|
||||
0x005216E0 - uint16_t g_InvColors[17]; // INV_COLOR_NUMBER_OF
|
||||
|
@ -1373,7 +1373,7 @@ int32_t __cdecl Level_Initialise(
|
||||
g_Effects = game_malloc(MAX_EFFECTS * sizeof(FX_INFO), GBUF_EFFECTS_ARRAY);
|
||||
Effect_InitialiseArray();
|
||||
LOT_InitialiseArray();
|
||||
InitColours();
|
||||
Inv_InitColors();
|
||||
Text_Init();
|
||||
Overlay_InitialisePickUpDisplay();
|
||||
S_InitialiseScreen(level_type);
|
||||
|
@ -50,6 +50,21 @@ static void Inv_ShowAmmoQuantity(const char *const fmt, const int32_t qty)
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl Inv_InitColors(void)
|
||||
{
|
||||
g_InvColors[INV_COLOR_BLACK] = S_COLOR(0x00, 0x00, 0x00);
|
||||
g_InvColors[INV_COLOR_GRAY] = S_COLOR(0x40, 0x40, 0x40);
|
||||
g_InvColors[INV_COLOR_WHITE] = S_COLOR(0xFF, 0xFF, 0xFF);
|
||||
g_InvColors[INV_COLOR_RED] = S_COLOR(0xFF, 0x00, 0x00);
|
||||
g_InvColors[INV_COLOR_ORANGE] = S_COLOR(0xFF, 0x80, 0x00);
|
||||
g_InvColors[INV_COLOR_YELLOW] = S_COLOR(0xFF, 0xFF, 0x00);
|
||||
g_InvColors[INV_COLOR_DARK_GREEN] = S_COLOR(0x00, 0x80, 0x00);
|
||||
g_InvColors[INV_COLOR_GREEN] = S_COLOR(0x00, 0xFF, 0x00);
|
||||
g_InvColors[INV_COLOR_CYAN] = S_COLOR(0x00, 0xFF, 0xFF);
|
||||
g_InvColors[INV_COLOR_BLUE] = S_COLOR(0x00, 0x00, 0xFF);
|
||||
g_InvColors[INV_COLOR_MAGENTA] = S_COLOR(0xFF, 0x00, 0xFF);
|
||||
}
|
||||
|
||||
void __cdecl Inv_Construct(void)
|
||||
{
|
||||
S_SetupAboveWater(0);
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "global/types.h"
|
||||
|
||||
void __cdecl Inv_InitColors(void);
|
||||
void __cdecl Inv_Construct(void);
|
||||
int32_t __cdecl Inv_Display(int32_t inventory_mode);
|
||||
void __cdecl Inv_SelectMeshes(INVENTORY_ITEM *inv_item);
|
||||
|
@ -524,7 +524,7 @@ static void __cdecl Level_LoadDepthQ(VFILE *const file)
|
||||
memcpy(g_GamePalette8, palette, sizeof(g_GamePalette8));
|
||||
|
||||
for (int32_t i = 0; i < 256; i++) {
|
||||
g_DepthQIndex[i] = S_COLOUR(
|
||||
g_DepthQIndex[i] = S_COLOR(
|
||||
g_GamePalette8[i].red, g_GamePalette8[i].green,
|
||||
g_GamePalette8[i].blue);
|
||||
}
|
||||
|
@ -35,8 +35,9 @@ static void Option_Controls_InitText(void)
|
||||
Text_CentreV(g_ControlsText[0], 1);
|
||||
Option_Controls_ShowControls();
|
||||
m_Cursor = -1;
|
||||
Text_AddBackground(g_ControlsText[0], 0, 0, 0, 0, 48, 0, 0, 0);
|
||||
Text_AddOutline(g_ControlsText[0], 1, 15, 0, 0);
|
||||
Text_AddBackground(
|
||||
g_ControlsText[0], 0, 0, 0, 0, 48, INV_COLOR_BLACK, 0, 0);
|
||||
Text_AddOutline(g_ControlsText[0], 1, INV_COLOR_BLUE, 0, 0);
|
||||
}
|
||||
|
||||
static void Option_Controls_ShutdownText(void)
|
||||
@ -75,8 +76,9 @@ static void Option_Controls_Control_Navigate(void)
|
||||
}
|
||||
g_ControlsTextB[m_Cursor]->pos.z = 0;
|
||||
Text_AddBackground(
|
||||
g_ControlsTextB[m_Cursor], 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
Text_AddOutline(g_ControlsTextB[m_Cursor], 1, 15, 0, 0);
|
||||
g_ControlsTextB[m_Cursor], 0, 0, 0, 0, 0, INV_COLOR_BLACK, 0,
|
||||
0);
|
||||
Text_AddOutline(g_ControlsTextB[m_Cursor], 1, INV_COLOR_BLUE, 0, 0);
|
||||
}
|
||||
} else if (
|
||||
(g_InputDB & IN_DESELECT)
|
||||
|
@ -20,20 +20,21 @@ static void Option_Sound_InitText(void)
|
||||
char text[8];
|
||||
sprintf(text, "| %2d", g_OptionMusicVolume);
|
||||
g_SoundText[0] = Text_Create(0, 0, 0, text);
|
||||
Text_AddBackground(g_SoundText[0], 128, 0, 0, 0, 8, 0, 0, 0);
|
||||
Text_AddOutline(g_SoundText[0], 1, 4, 0, 0);
|
||||
Text_AddBackground(g_SoundText[0], 128, 0, 0, 0, 8, INV_COLOR_BLACK, 0, 0);
|
||||
Text_AddOutline(g_SoundText[0], 1, INV_COLOR_ORANGE, 0, 0);
|
||||
|
||||
sprintf(text, "} %2d", g_OptionSoundVolume);
|
||||
g_SoundText[1] = Text_Create(0, 25, 0, text);
|
||||
|
||||
g_SoundText[2] = Text_Create(0, -32, 0, " ");
|
||||
Text_AddBackground(g_SoundText[2], 140, 85, 0, 0, 48, 0, 0, 0);
|
||||
Text_AddOutline(g_SoundText[2], 1, 15, 0, 0);
|
||||
Text_AddBackground(
|
||||
g_SoundText[2], 140, 85, 0, 0, 48, INV_COLOR_BLACK, 0, 0);
|
||||
Text_AddOutline(g_SoundText[2], 1, INV_COLOR_BLUE, 0, 0);
|
||||
|
||||
g_SoundText[3] =
|
||||
Text_Create(0, -30, 0, g_GF_PCStrings[GF_S_PC_SET_VOLUMES]);
|
||||
Text_AddBackground(g_SoundText[3], 136, 0, 0, 0, 8, 0, 0, 0);
|
||||
Text_AddOutline(g_SoundText[3], 1, 15, 0, 0);
|
||||
Text_AddBackground(g_SoundText[3], 136, 0, 0, 0, 8, INV_COLOR_BLACK, 0, 0);
|
||||
Text_AddOutline(g_SoundText[3], 1, INV_COLOR_BLUE, 0, 0);
|
||||
|
||||
for (int32_t i = 0; i < 4; i++) {
|
||||
Text_CentreH(g_SoundText[i], true);
|
||||
@ -67,8 +68,10 @@ void __cdecl Option_Sound(INVENTORY_ITEM *const item)
|
||||
Text_RemoveBackground(g_SoundText[g_SoundOptionLine]);
|
||||
g_SoundOptionLine--;
|
||||
Text_AddBackground(
|
||||
g_SoundText[g_SoundOptionLine], 128, 0, 0, 0, 8, 0, 0, 0);
|
||||
Text_AddOutline(g_SoundText[g_SoundOptionLine], 1, 4, 0, 0);
|
||||
g_SoundText[g_SoundOptionLine], 128, 0, 0, 0, 8, INV_COLOR_BLACK, 0,
|
||||
0);
|
||||
Text_AddOutline(
|
||||
g_SoundText[g_SoundOptionLine], 1, INV_COLOR_ORANGE, 0, 0);
|
||||
}
|
||||
|
||||
if ((g_InputDB & IN_BACK) && g_SoundOptionLine < 1) {
|
||||
@ -76,8 +79,10 @@ void __cdecl Option_Sound(INVENTORY_ITEM *const item)
|
||||
Text_RemoveBackground(g_SoundText[g_SoundOptionLine]);
|
||||
g_SoundOptionLine++;
|
||||
Text_AddBackground(
|
||||
g_SoundText[g_SoundOptionLine], 128, 0, 0, 0, 8, 0, 0, 0);
|
||||
Text_AddOutline(g_SoundText[g_SoundOptionLine], 1, 4, 0, 0);
|
||||
g_SoundText[g_SoundOptionLine], 128, 0, 0, 0, 8, INV_COLOR_BLACK, 0,
|
||||
0);
|
||||
Text_AddOutline(
|
||||
g_SoundText[g_SoundOptionLine], 1, INV_COLOR_ORANGE, 0, 0);
|
||||
}
|
||||
|
||||
if (g_SoundOptionLine) {
|
||||
|
@ -100,10 +100,11 @@ int32_t __cdecl Requester_Display(
|
||||
Text_AlignBottom(req->heading_text1, true);
|
||||
if (backgrounds) {
|
||||
Text_AddBackground(
|
||||
req->heading_text1, req->pix_width - 4, 0, 0, 0, 8, 0,
|
||||
g_Requester_MainGour1, 2u);
|
||||
req->heading_text1, req->pix_width - 4, 0, 0, 0, 8,
|
||||
INV_COLOR_BLACK, g_Requester_MainGour1, 2);
|
||||
Text_AddOutline(
|
||||
req->heading_text1, 1, 4, g_Requester_MainGour2, 0);
|
||||
req->heading_text1, 1, INV_COLOR_ORANGE,
|
||||
g_Requester_MainGour2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,10 +127,11 @@ int32_t __cdecl Requester_Display(
|
||||
Text_AlignBottom(req->heading_text2, true);
|
||||
if (backgrounds) {
|
||||
Text_AddBackground(
|
||||
req->heading_text2, req->pix_width - 4, 0, 0, 0, 8, 0,
|
||||
g_Requester_MainGour1, 2u);
|
||||
req->heading_text2, req->pix_width - 4, 0, 0, 0, 8,
|
||||
INV_COLOR_BLACK, g_Requester_MainGour1, 2);
|
||||
Text_AddOutline(
|
||||
req->heading_text2, 1, 4, g_Requester_MainGour2, 0);
|
||||
req->heading_text2, 1, INV_COLOR_ORANGE,
|
||||
g_Requester_MainGour2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,10 +153,11 @@ int32_t __cdecl Requester_Display(
|
||||
Text_AlignBottom(req->background_text, true);
|
||||
Text_AddBackground(
|
||||
req->background_text, req->pix_width,
|
||||
req->line_height + lines_height + 12, 0, 0, 48, 0,
|
||||
g_Requester_BackgroundGour1, 1u);
|
||||
req->line_height + lines_height + 12, 0, 0, 48, INV_COLOR_BLACK,
|
||||
g_Requester_BackgroundGour1, 1);
|
||||
Text_AddOutline(
|
||||
req->background_text, 1, 15, g_Requester_BackgroundGour2, 0);
|
||||
req->background_text, 1, INV_COLOR_BLUE,
|
||||
g_Requester_BackgroundGour2, 0);
|
||||
}
|
||||
|
||||
/* arrows */
|
||||
@ -194,9 +197,10 @@ int32_t __cdecl Requester_Display(
|
||||
Text_RemoveOutline(*text1);
|
||||
} else {
|
||||
Text_AddBackground(
|
||||
*text1, req->pix_width - 12, 0, 0, 0, 16, 0,
|
||||
g_Requester_UnselectionGour1, 1u);
|
||||
Text_AddOutline(*text1, 1, 4, g_Requester_SelectionGour2, 0);
|
||||
*text1, req->pix_width - 12, 0, 0, 0, 16, INV_COLOR_BLACK,
|
||||
g_Requester_UnselectionGour1, 1);
|
||||
Text_AddOutline(
|
||||
*text1, 1, INV_COLOR_ORANGE, g_Requester_SelectionGour2, 0);
|
||||
}
|
||||
|
||||
if (req->pitem_flags1[n] & REQ_ALIGN_LEFT) {
|
||||
|
@ -140,7 +140,7 @@ void __cdecl Text_Flash(
|
||||
void __cdecl Text_AddBackground(
|
||||
TEXTSTRING *const string, const int16_t x_size, const int16_t y_size,
|
||||
const int16_t x_off, const int16_t y_off, const int16_t z_off,
|
||||
const int16_t colour, const uint16_t *const gour_ptr, const uint16_t flags)
|
||||
const INV_COLOR color, const uint16_t *const gour_ptr, const uint16_t flags)
|
||||
{
|
||||
if (string == NULL) {
|
||||
return;
|
||||
@ -153,7 +153,7 @@ void __cdecl Text_AddBackground(
|
||||
string->bgnd_off.x = (scale_h * x_off) / PHD_ONE;
|
||||
string->bgnd_off.y = (scale_v * y_off) / PHD_ONE;
|
||||
string->bgnd_off.z = z_off;
|
||||
string->bgnd_colour = colour;
|
||||
string->bgnd_color = color;
|
||||
string->bgnd_gour = gour_ptr;
|
||||
string->bgnd_flags = flags;
|
||||
}
|
||||
@ -167,7 +167,7 @@ void __cdecl Text_RemoveBackground(TEXTSTRING *const string)
|
||||
}
|
||||
|
||||
void __cdecl Text_AddOutline(
|
||||
TEXTSTRING *const string, const int16_t enable, const int16_t colour,
|
||||
TEXTSTRING *const string, const int16_t enable, const INV_COLOR color,
|
||||
const uint16_t *const gour_ptr, const uint16_t flags)
|
||||
{
|
||||
if (string == NULL) {
|
||||
@ -175,7 +175,7 @@ void __cdecl Text_AddOutline(
|
||||
}
|
||||
string->flags.outline = 1;
|
||||
string->outl_gour = gour_ptr;
|
||||
string->outl_colour = colour;
|
||||
string->outl_color = color;
|
||||
string->outl_flags = flags;
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ void __cdecl Text_DrawText(TEXTSTRING *const string)
|
||||
if (string->flags.background) {
|
||||
S_DrawScreenFBox(
|
||||
box_x, box_y, string->bgnd_off.z + z + 2, box_w, box_h,
|
||||
string->bgnd_colour, (const GOURAUD_FILL *)string->bgnd_gour,
|
||||
string->bgnd_color, (const GOURAUD_FILL *)string->bgnd_gour,
|
||||
string->bgnd_flags);
|
||||
}
|
||||
|
||||
|
@ -12,11 +12,11 @@ void __cdecl Text_SetScale(
|
||||
void __cdecl Text_Flash(TEXTSTRING *string, int16_t enable, int16_t rate);
|
||||
void __cdecl Text_AddBackground(
|
||||
TEXTSTRING *string, int16_t x_size, int16_t y_size, int16_t x_off,
|
||||
int16_t y_off, int16_t z_off, int16_t colour, const uint16_t *gour_ptr,
|
||||
int16_t y_off, int16_t z_off, INV_COLOR color, const uint16_t *gour_ptr,
|
||||
uint16_t flags);
|
||||
void __cdecl Text_RemoveBackground(TEXTSTRING *string);
|
||||
void __cdecl Text_AddOutline(
|
||||
TEXTSTRING *string, int16_t enable, int16_t colour,
|
||||
TEXTSTRING *string, int16_t enable, INV_COLOR color,
|
||||
const uint16_t *gour_ptr, uint16_t flags);
|
||||
void __cdecl Text_RemoveOutline(TEXTSTRING *string);
|
||||
void __cdecl Text_CentreH(TEXTSTRING *string, int16_t enable);
|
||||
|
@ -93,7 +93,6 @@
|
||||
#define HairControl ((void __cdecl (*)(int32_t in_cutscene))0x00420F20)
|
||||
#define DrawHair ((void __cdecl (*)(void))0x00421920)
|
||||
#define GetDebouncedInput ((int32_t __cdecl (*)(int32_t input))0x004239C0)
|
||||
#define InitColours ((void __cdecl (*)(void))0x00423B30)
|
||||
#define HarpoonBolt_Control ((void __cdecl (*)(int16_t item_num))0x0042C0F0)
|
||||
#define Rocket_Control ((void __cdecl (*)(int16_t item_num))0x0042C530)
|
||||
#define Flare_DoLight ((int32_t __cdecl (*)(XYZ_32 *pos, int32_t flare_age))0x0042F7A0)
|
||||
@ -299,7 +298,7 @@
|
||||
#define WinPlayFMV ((void __cdecl (*)(const char *file_name, bool is_playback))0x0044BE10)
|
||||
#define WinStopFMV ((void __cdecl (*)(bool is_playback))0x0044C0F0)
|
||||
#define IntroFMV ((bool __cdecl (*)(const char *file_name1, const char *file_name2))0x0044C140)
|
||||
#define S_COLOUR ((uint16_t __cdecl (*)(int32_t red, int32_t green, int32_t blue))0x0044C1D0)
|
||||
#define S_COLOR ((uint16_t __cdecl (*)(int32_t red, int32_t green, int32_t blue))0x0044C1D0)
|
||||
#define S_DrawScreenLine ((void __cdecl (*)(int32_t x, int32_t y, int32_t z, int32_t x_len, int32_t y_len, BYTE color_idx, D3DCOLOR *gour, uint16_t flags))0x0044C200)
|
||||
#define S_DrawScreenBox ((void __cdecl (*)(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_OUTLINE *gour, uint16_t flags))0x0044C240)
|
||||
#define S_DrawScreenFBox ((void __cdecl (*)(int32_t sx, int32_t sy, int32_t z, int32_t width, int32_t height, BYTE color_idx, const GOURAUD_FILL *gour, uint16_t flags))0x0044C360)
|
||||
|
@ -301,9 +301,9 @@ typedef struct __unaligned {
|
||||
int16_t rate;
|
||||
int16_t count;
|
||||
} flash;
|
||||
int16_t bgnd_colour;
|
||||
int16_t bgnd_color;
|
||||
const uint16_t *bgnd_gour;
|
||||
int16_t outl_colour;
|
||||
int16_t outl_color;
|
||||
const uint16_t *outl_gour;
|
||||
struct {
|
||||
int16_t x;
|
||||
@ -1038,6 +1038,21 @@ typedef enum {
|
||||
RT_KEYS = 2,
|
||||
} RING_TYPE;
|
||||
|
||||
typedef enum {
|
||||
INV_COLOR_BLACK = 0,
|
||||
INV_COLOR_GRAY = 1,
|
||||
INV_COLOR_WHITE = 2,
|
||||
INV_COLOR_RED = 3,
|
||||
INV_COLOR_ORANGE = 4,
|
||||
INV_COLOR_YELLOW = 5,
|
||||
INV_COLOR_DARK_GREEN = 12,
|
||||
INV_COLOR_GREEN = 13,
|
||||
INV_COLOR_CYAN = 14,
|
||||
INV_COLOR_BLUE = 15,
|
||||
INV_COLOR_MAGENTA = 16,
|
||||
INV_COLOR_NUMBER_OF = 17,
|
||||
} INV_COLOR;
|
||||
|
||||
typedef enum {
|
||||
INV_GAME_MODE = 0,
|
||||
INV_TITLE_MODE = 1,
|
||||
|
@ -400,6 +400,7 @@
|
||||
#define g_ValidLevelStrings1 (*(char(*)[])0x005207E0)
|
||||
#define g_RequesterFlags2 (*(uint32_t(*)[24])0x00520CA0)
|
||||
#define g_RequesterFlags1 (*(uint32_t(*)[24])0x00520D00)
|
||||
#define g_InvColors (*(uint16_t(*)[17])0x005216E0)
|
||||
#define g_ValidLevelStrings2 (*(char(*)[])0x00521720)
|
||||
#define g_SaveGameReqFlags2 (*(uint32_t(*)[24])0x00521BE0)
|
||||
#define g_SaveGameReqFlags1 (*(uint32_t(*)[24])0x00521C40)
|
||||
|
@ -623,6 +623,7 @@ static void Inject_Inventory(const bool enable)
|
||||
INJECT(enable, 0x00423590, Inv_DrawInventoryItem);
|
||||
INJECT(enable, 0x004239E0, Inv_DoInventoryPicture);
|
||||
INJECT(enable, 0x004239F0, Inv_DoInventoryBackground);
|
||||
INJECT(enable, 0x00423B30, Inv_InitColors);
|
||||
INJECT(enable, 0x00423C40, Inv_RingIsOpen);
|
||||
INJECT(enable, 0x00423DB0, Inv_RingIsNotOpen);
|
||||
INJECT(enable, 0x00423E40, Inv_RingNotActive);
|
||||
|
Loading…
Reference in New Issue
Block a user