File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,11 +451,11 @@ namespace TFE_DarkForces
451451 {
452452 return JFALSE;
453453 }
454- saveData->agentData .selectedMission = TFE_Endian::le32_to_cpu (saveData->agentData .selectedMission );
455- saveData->agentData .nextMission = TFE_Endian::le32_to_cpu (saveData->agentData .nextMission );
454+ saveData->agentData .selectedMission = TFE_Endian::cpu_to_le32 (saveData->agentData .selectedMission );
455+ saveData->agentData .nextMission = TFE_Endian::cpu_to_le32 (saveData->agentData .nextMission );
456456 for (s32 i = 0 ; i < 140 ; i++)
457457 {
458- saveData->ammo [i] = TFE_Endian::le32_to_cpu (saveData->ammo [i]);
458+ saveData->ammo [i] = TFE_Endian::cpu_to_le32 (saveData->ammo [i]);
459459 }
460460 file->writeBuffer (saveData, sizeof (LevelSaveData));
461461 return JTRUE;
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ namespace TFE_Endian
1515 return SDL_SwapLE32 (x);
1616 }
1717
18+ inline u32 cpu_to_le32 (u32 x)
19+ {
20+ return SDL_SwapLE32 (x);
21+ }
22+
1823 inline u64 le64_to_cpu (u64 x)
1924 {
2025 return SDL_SwapLE64 (x);
You can’t perform that action at this time.
0 commit comments