@@ -30,7 +30,7 @@ namespace fallout {
30
30
31
31
#define DISPLAY_MONITOR_X (23 )
32
32
#define DISPLAY_MONITOR_Y (24 )
33
- #define DISPLAY_MONITOR_WIDTH (167 )
33
+ #define DISPLAY_MONITOR_WIDTH (167 + gInterfaceBarContentOffset )
34
34
#define DISPLAY_MONITOR_HEIGHT (60 )
35
35
36
36
#define DISPLAY_MONITOR_HALF_HEIGHT (DISPLAY_MONITOR_HEIGHT / 2 )
@@ -59,12 +59,7 @@ static bool gDisplayMonitorInitialized = false;
59
59
// The rectangle that display monitor occupies in the main interface window.
60
60
//
61
61
// 0x518510
62
- static const Rect gDisplayMonitorRect = {
63
- DISPLAY_MONITOR_X,
64
- DISPLAY_MONITOR_Y,
65
- DISPLAY_MONITOR_X + DISPLAY_MONITOR_WIDTH - 1 ,
66
- DISPLAY_MONITOR_Y + DISPLAY_MONITOR_HEIGHT - 1 ,
67
- };
62
+ static Rect gDisplayMonitorRect ;
68
63
69
64
// 0x518520
70
65
static int gDisplayMonitorScrollDownButton = -1 ;
@@ -106,6 +101,13 @@ static int gConsoleFilePrintCount = 0;
106
101
int displayMonitorInit ()
107
102
{
108
103
if (!gDisplayMonitorInitialized ) {
104
+ gDisplayMonitorRect = {
105
+ DISPLAY_MONITOR_X,
106
+ DISPLAY_MONITOR_Y,
107
+ DISPLAY_MONITOR_X + DISPLAY_MONITOR_WIDTH - 1 ,
108
+ DISPLAY_MONITOR_Y + DISPLAY_MONITOR_HEIGHT - 1 ,
109
+ };
110
+
109
111
int oldFont = fontGetCurrent ();
110
112
fontSetCurrent (DISPLAY_MONITOR_FONT);
111
113
@@ -120,24 +122,35 @@ int displayMonitorInit()
120
122
return -1 ;
121
123
}
122
124
123
- CacheEntry* backgroundFrmHandle;
124
- int backgroundFid = buildFid (OBJ_TYPE_INTERFACE, 16 , 0 , 0 , 0 );
125
- Art* backgroundFrm = artLock (backgroundFid, &backgroundFrmHandle);
126
- if (backgroundFrm == NULL ) {
127
- internal_free (gDisplayMonitorBackgroundFrmData );
128
- return -1 ;
129
- }
125
+ if (gInterfaceBarIsCustom ) {
126
+ _intface_full_width = gInterfaceBarWidth ;
127
+ blitBufferToBuffer (customInterfaceBarGetBackgroundImageData () + gInterfaceBarWidth * DISPLAY_MONITOR_Y + DISPLAY_MONITOR_X,
128
+ DISPLAY_MONITOR_WIDTH,
129
+ DISPLAY_MONITOR_HEIGHT,
130
+ gInterfaceBarWidth ,
131
+ gDisplayMonitorBackgroundFrmData ,
132
+ DISPLAY_MONITOR_WIDTH);
133
+ } else {
134
+ CacheEntry* backgroundFrmHandle;
135
+ int backgroundFid = buildFid (OBJ_TYPE_INTERFACE, 16 , 0 , 0 , 0 );
136
+ Art* backgroundFrm = artLock (backgroundFid, &backgroundFrmHandle);
137
+ if (backgroundFrm == NULL ) {
138
+ internal_free (gDisplayMonitorBackgroundFrmData );
139
+ return -1 ;
140
+ }
130
141
131
- unsigned char * backgroundFrmData = artGetFrameData (backgroundFrm, 0 , 0 );
132
- _intface_full_width = artGetWidth (backgroundFrm, 0 , 0 );
133
- blitBufferToBuffer (backgroundFrmData + _intface_full_width * DISPLAY_MONITOR_Y + DISPLAY_MONITOR_X,
134
- DISPLAY_MONITOR_WIDTH,
135
- DISPLAY_MONITOR_HEIGHT,
136
- _intface_full_width,
137
- gDisplayMonitorBackgroundFrmData ,
138
- DISPLAY_MONITOR_WIDTH);
142
+ unsigned char * backgroundFrmData = artGetFrameData (backgroundFrm, 0 , 0 );
143
+ _intface_full_width = artGetWidth (backgroundFrm, 0 , 0 );
139
144
140
- artUnlock (backgroundFrmHandle);
145
+ blitBufferToBuffer (backgroundFrmData + _intface_full_width * DISPLAY_MONITOR_Y + DISPLAY_MONITOR_X,
146
+ DISPLAY_MONITOR_WIDTH,
147
+ DISPLAY_MONITOR_HEIGHT,
148
+ _intface_full_width,
149
+ gDisplayMonitorBackgroundFrmData ,
150
+ DISPLAY_MONITOR_WIDTH);
151
+
152
+ artUnlock (backgroundFrmHandle);
153
+ }
141
154
142
155
gDisplayMonitorScrollUpButton = buttonCreate (gInterfaceBarWindow ,
143
156
DISPLAY_MONITOR_X,
0 commit comments