mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f117678ee | ||
|
|
499f994c37 | ||
|
|
d6c17c1876 | ||
|
|
347bf8b135 | ||
|
|
faf6439293 |
+18
-8
@@ -359,8 +359,6 @@ void _InitLoadSave()
|
||||
if (quickSaveSlots > 0 && quickSaveSlots <= saveLoadTotalSlots) {
|
||||
autoQuickSaveSlots = true;
|
||||
}
|
||||
|
||||
pipboyMessageListInit();
|
||||
}
|
||||
|
||||
// 0x47B85C
|
||||
@@ -461,6 +459,8 @@ int lsgSaveGame(int mode)
|
||||
return -1;
|
||||
}
|
||||
|
||||
pipboyMessageListInit();
|
||||
|
||||
if (_GetSlotList() == -1) {
|
||||
windowRefresh(gLoadSaveWindow);
|
||||
|
||||
@@ -941,6 +941,8 @@ int lsgSaveGame(int mode)
|
||||
|
||||
lsgWindowFree(LOAD_SAVE_WINDOW_TYPE_SAVE_GAME);
|
||||
|
||||
pipboyMessageListFree();
|
||||
|
||||
tileWindowRefresh();
|
||||
|
||||
if (mode == LOAD_SAVE_MODE_QUICK) {
|
||||
@@ -1083,6 +1085,8 @@ int lsgLoadGame(int mode)
|
||||
return -1;
|
||||
}
|
||||
|
||||
pipboyMessageListInit();
|
||||
|
||||
if (_GetSlotList() == -1) {
|
||||
gameMouseSetCursor(MOUSE_CURSOR_ARROW);
|
||||
windowRefresh(gLoadSaveWindow);
|
||||
@@ -1472,6 +1476,8 @@ int lsgLoadGame(int mode)
|
||||
? LOAD_SAVE_WINDOW_TYPE_LOAD_GAME_FROM_MAIN_MENU
|
||||
: LOAD_SAVE_WINDOW_TYPE_LOAD_GAME);
|
||||
|
||||
pipboyMessageListFree();
|
||||
|
||||
if (mode == LOAD_SAVE_MODE_QUICK) {
|
||||
if (rc == 1) {
|
||||
_quick_done = true;
|
||||
@@ -2297,9 +2303,11 @@ static void _ShowSlotList(int windowType)
|
||||
int inactiveColor = _colorTable[8804];
|
||||
|
||||
{
|
||||
MessageListItem messageListItemBack;
|
||||
messageListItemBack.num = 201; // Back
|
||||
messageListGetItem(&gPipboyMessageList, &messageListItemBack);
|
||||
MessageListItem messageListItemBack = {201 , 0, nullptr, nullptr};
|
||||
if (!messageListGetItem(&gPipboyMessageList, &messageListItemBack)){
|
||||
debugPrint("Error: Couldn't find LoadSave Message!");
|
||||
messageListItemBack.text = "BACK";
|
||||
}
|
||||
fontDrawText(
|
||||
gLoadSaveWindowBuffer + LS_WINDOW_WIDTH * (y + 0) + 95,
|
||||
messageListItemBack.text,
|
||||
@@ -2308,9 +2316,11 @@ static void _ShowSlotList(int windowType)
|
||||
_currentSlotPage > 0 ? activeColor : inactiveColor);
|
||||
}
|
||||
{
|
||||
MessageListItem messageListItemMore;
|
||||
messageListItemMore.num = 200; // More
|
||||
messageListGetItem(&gPipboyMessageList, &messageListItemMore);
|
||||
MessageListItem messageListItemMore = {200 , 0, nullptr, nullptr};
|
||||
if (!messageListGetItem(&gPipboyMessageList, &messageListItemMore)){
|
||||
debugPrint("Error: Couldn't find LoadSave Message!");
|
||||
messageListItemMore.text = "MORE";
|
||||
}
|
||||
fontDrawText(gLoadSaveWindowBuffer + LS_WINDOW_WIDTH * (y + 0) + 210,
|
||||
messageListItemMore.text,
|
||||
LS_WINDOW_WIDTH,
|
||||
|
||||
+10
-8
@@ -490,13 +490,7 @@ int pipboyOpen(int intent)
|
||||
|
||||
int pipboyMessageListInit()
|
||||
{
|
||||
if (gPipboyMessageList.entries != nullptr) {
|
||||
messageListFree(&gPipboyMessageList);
|
||||
}
|
||||
|
||||
if (!messageListInit(&gPipboyMessageList)) {
|
||||
return -1;
|
||||
}
|
||||
pipboyMessageListFree();
|
||||
|
||||
char path[COMPAT_MAX_PATH];
|
||||
snprintf(path, sizeof(path), "%s%s", asc_5186C8, "pipboy.msg");
|
||||
@@ -508,6 +502,14 @@ int pipboyMessageListInit()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pipboyMessageListFree()
|
||||
{
|
||||
if (gPipboyMessageList.entries != nullptr) {
|
||||
messageListFree(&gPipboyMessageList);
|
||||
}
|
||||
messageListInit(&gPipboyMessageList);
|
||||
}
|
||||
|
||||
// 0x497228
|
||||
static int pipboyWindowInit(int intent)
|
||||
{
|
||||
@@ -728,7 +730,7 @@ static void pipboyWindowFree()
|
||||
|
||||
windowDestroy(gPipboyWindow);
|
||||
|
||||
messageListFree(&gPipboyMessageList);
|
||||
pipboyMessageListFree();
|
||||
|
||||
// NOTE: Uninline.
|
||||
holodiskFree();
|
||||
|
||||
@@ -19,6 +19,7 @@ int pipboyLoad(File* stream);
|
||||
|
||||
extern MessageList gPipboyMessageList;
|
||||
int pipboyMessageListInit();
|
||||
void pipboyMessageListFree();
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
|
||||
Reference in New Issue
Block a user