mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
(Proposal) Introduction of naming convention checker (ncc
) (#322)
* Add ncc tool * Add symlink * Fixes * Try this * Try this * Try this * Try this * Add include path * Update style * Update style * Add more rules * Fix style * Update styles * Fix name parameter * Fix MxParam p * Fix m_unk0x pattern * Allow 4 digits for relative hex * Add missing offset * Fix some parameters * Fix some vtables * Fix more vtables * Update rules, fixes * More fixes * More fixes * More fixes * More fixes * More fixes * More fixes * More fixes * Fix last issue * Update readme * Update readme * Update CONTRIBUTING.md * Fix annotations * Rename * Update CONTRIBUTING.md * Update README.md
This commit is contained in:

committed by
GitHub

parent
3b155bfe38
commit
bc5ca621a4
@@ -7,7 +7,7 @@
|
||||
#include <process.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8bb0
|
||||
MxTickleThread::MxTickleThread(MxCore* p_target, int p_frequencyMS)
|
||||
MxTickleThread::MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS)
|
||||
{
|
||||
m_target = p_target;
|
||||
m_frequencyMS = p_frequencyMS;
|
||||
@@ -18,14 +18,15 @@ MxTickleThread::MxTickleThread(MxCore* p_target, int p_frequencyMS)
|
||||
MxResult MxTickleThread::Run()
|
||||
{
|
||||
MxTimer* timer = Timer();
|
||||
int lastTickled = -m_frequencyMS;
|
||||
MxS32 lastTickled = -m_frequencyMS;
|
||||
while (IsRunning()) {
|
||||
int currentTime = timer->GetTime();
|
||||
MxLong currentTime = timer->GetTime();
|
||||
|
||||
if (currentTime < lastTickled) {
|
||||
lastTickled = -m_frequencyMS;
|
||||
}
|
||||
int timeRemainingMS = (m_frequencyMS - currentTime) + lastTickled;
|
||||
|
||||
MxS32 timeRemainingMS = (m_frequencyMS - currentTime) + lastTickled;
|
||||
if (timeRemainingMS <= 0) {
|
||||
m_target->Tickle();
|
||||
timeRemainingMS = 0;
|
||||
@@ -54,7 +55,7 @@ MxThread::~MxThread()
|
||||
typedef unsigned(__stdcall* ThreadFunc)(void*);
|
||||
|
||||
// FUNCTION: LEGO1 0x100bf610
|
||||
MxResult MxThread::Start(int p_stack, int p_flag)
|
||||
MxResult MxThread::Start(MxS32 p_stack, MxS32 p_flag)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
if (m_semaphore.Init(0, 1) == SUCCESS) {
|
||||
|
Reference in New Issue
Block a user