This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
614 additions
and 61 deletions.
- +2 −0 premake5.lua
- +1 −1 src/core/ControllerConfig.cpp
- +14 −17 src/core/Frontend.cpp
- +0 −20 src/core/PCSave.cpp
- +0 −23 src/core/PCSave.h
- +2 −0 src/core/main.h
- +91 −0 src/save/Date.cpp
- +18 −0 src/save/Date.h
- +267 −0 src/save/GenericGameStorage.cpp
- +38 −0 src/save/GenericGameStorage.h
- +143 −0 src/save/PCSave.cpp
- +38 −0 src/save/PCSave.h
There are no files selected for viewing
| @@ -0,0 +1,91 @@ | ||
| #include "common.h" | ||
| #include "Date.h" | ||
|
|
||
| CDate::CDate() | ||
| { | ||
| m_nYear = 0; | ||
| m_nSecond = 0; | ||
| m_nMinute = 0; | ||
| m_nHour = 0; | ||
| m_nDay = 0; | ||
| m_nMonth = 0; | ||
| } | ||
|
|
||
| bool | ||
| CDate::operator>(const CDate &right) | ||
| { | ||
| if (m_nYear > right.m_nYear) | ||
| return true; | ||
| if (m_nYear != right.m_nYear) | ||
| return false; | ||
|
|
||
| if (m_nMonth > right.m_nMonth) | ||
| return true; | ||
| if (m_nMonth != right.m_nMonth) | ||
| return false; | ||
|
|
||
| if (m_nDay > right.m_nDay) | ||
| return true; | ||
| if (m_nDay != right.m_nDay) | ||
| return false; | ||
|
|
||
| if (m_nHour > right.m_nHour) | ||
| return true; | ||
| if (m_nHour != right.m_nHour) | ||
| return false; | ||
|
|
||
| if (m_nMinute > right.m_nMinute) | ||
| return true; | ||
| if (m_nMinute != right.m_nMinute) | ||
| return false; | ||
| return m_nSecond > right.m_nSecond; | ||
| } | ||
|
|
||
| bool | ||
| CDate::operator<(const CDate &right) | ||
| { | ||
| if (m_nYear < right.m_nYear) | ||
| return true; | ||
| if (m_nYear != right.m_nYear) | ||
| return false; | ||
|
|
||
| if (m_nMonth < right.m_nMonth) | ||
| return true; | ||
| if (m_nMonth != right.m_nMonth) | ||
| return false; | ||
|
|
||
| if (m_nDay < right.m_nDay) | ||
| return true; | ||
| if (m_nDay != right.m_nDay) | ||
| return false; | ||
|
|
||
| if (m_nHour < right.m_nHour) | ||
| return true; | ||
| if (m_nHour != right.m_nHour) | ||
| return false; | ||
|
|
||
| if (m_nMinute < right.m_nMinute) | ||
| return true; | ||
| if (m_nMinute != right.m_nMinute) | ||
| return false; | ||
| return m_nSecond < right.m_nSecond; | ||
| } | ||
|
|
||
| bool | ||
| CDate::operator==(const CDate &right) | ||
| { | ||
| if (m_nYear != right.m_nYear || m_nMonth != right.m_nMonth || m_nDay != right.m_nDay || m_nHour != right.m_nHour || m_nMinute != right.m_nMinute) | ||
| return false; | ||
| return m_nSecond == right.m_nSecond; | ||
| } | ||
|
|
||
| void | ||
| CDate::PopulateDateFields(int8 &second, int8 &minute, int8 &hour, int8 &day, int8 &month, int16 year) | ||
| { | ||
| m_nSecond = second; | ||
| m_nMinute = minute; | ||
| m_nHour = hour; | ||
| m_nDay = day; | ||
| m_nMonth = month; | ||
| m_nYear = year; | ||
| } |
| @@ -0,0 +1,18 @@ | ||
| #pragma once | ||
|
|
||
| class CDate | ||
| { | ||
| public: | ||
| int m_nSecond; | ||
| int m_nMinute; | ||
| int m_nHour; | ||
| int m_nDay; | ||
| int m_nMonth; | ||
| int m_nYear; | ||
|
|
||
| CDate(); | ||
| bool operator>(const CDate &right); | ||
| bool operator<(const CDate &right); | ||
| bool operator==(const CDate &right); | ||
| void PopulateDateFields(int8 &second, int8 &minute, int8 &hour, int8 &day, int8 &month, int16 year); | ||
| }; |
Oops, something went wrong.