MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xSG_sv_commit

Function xSG_sv_commit

src/SB/Core/x/xsavegame.cpp:1137–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135}
1136
1137S32 xSG_sv_commit(st_XSAVEGAME_DATA* xsgdata)
1138{
1139 S32 result = 1;
1140 S32 rc;
1141 char browselabel[64] = {};
1142
1143 char* name = iSGMakeName(ISG_NGTYP_GAMEDIR, NULL, 0);
1144 if (!iSGSetupGameDir(xsgdata->isgsess, name, 1))
1145 {
1146 result = 0;
1147 }
1148 else
1149 {
1150 xSG_areaComposeLabel(browselabel, xsgdata->thumbIconIdx, xsgdata->label,
1151 xsgdata->gslot + 1);
1152
1153 if (!iSGSaveFile(xsgdata->isgsess, iSGMakeName(ISG_NGTYP_GAMEFILE, NULL, xsgdata->gslot),
1154 xsgdata->membuf, xsgdata->memsize, 1, browselabel))
1155 {
1156 result = 0;
1157 }
1158 }
1159
1160 return result;
1161}
1162
1163void xSG_cb_ISGChange(void*, en_CHGCODE what)
1164{

Callers 1

xSGProcessFunction · 0.70

Calls 4

xSG_areaComposeLabelFunction · 0.85
iSGMakeNameFunction · 0.50
iSGSetupGameDirFunction · 0.50
iSGSaveFileFunction · 0.50

Tested by

no test coverage detected