aboutsummaryrefslogtreecommitdiff
path: root/src/stubs.hh
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-05-25 22:37:57 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-05-25 22:37:57 -0300
commitad8213f35523cbb07f418ae275af448a47cc0288 (patch)
tree4d77b8ff2b44461734b5a2cbaad5402b4a94736f /src/stubs.hh
parent5f883a80175a4cc9abda9d647a6a0d73bda84878 (diff)
downloadgame-ad8213f35523cbb07f418ae275af448a47cc0288.tar.gz
game-ad8213f35523cbb07f418ae275af448a47cc0288.zip
linux Makefile + fix most compilation problems
I wanted to see if the compiler had any problems with the code so far and added a few stub definitions so that each file would properly compile. We still fail when linking but we're able to to find and fix compile time errors.
Diffstat (limited to 'src/stubs.hh')
-rw-r--r--src/stubs.hh64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/stubs.hh b/src/stubs.hh
new file mode 100644
index 0000000..72c898d
--- /dev/null
+++ b/src/stubs.hh
@@ -0,0 +1,64 @@
+#ifndef TIBIA_STUBS_HH_
+#define TIBIA_STUBS_HH_ 1
+
+#include "common.hh"
+#include "enums.hh"
+#include "connection.hh"
+#include "creature.hh"
+#include "map.hh"
+#include "player.hh"
+
+// IMPORTANT(fusion): These function definitions exist to test compilation. They're
+// not yet implemented and will cause the linker to fail with unresolved symbols.
+
+typedef void TRefreshSectorFunction(int SectorX, int SectorY, int SectorZ, TReadStream *Stream);
+typedef void TSendMailsFunction(TPlayerData *PlayerData);
+
+extern void AbortWriter(void);
+extern uint32 AddDynamicString(const char *Text);
+extern void AnnounceChangedCreature(uint32 CreatureID, int Type);
+extern void BroadcastMessage(int Mode, const char *Text, ...) ATTR_PRINTF(2, 3);
+extern bool CheckRight(uint32 CreatureID, RIGHT Right);
+extern void CleanupDynamicStrings(void);
+extern void CreatePlayerList(bool Online);
+extern void CronChange(Object Obj, int NewDelay);
+extern void CronExpire(Object Obj, int Delay);
+extern uint32 CronInfo(Object Obj, bool Delete);
+extern uint32 CronStop(Object Obj);
+extern void DeleteDynamicString(uint32 Number);
+extern bool FileExists(const char *FileName);
+extern TCreature *GetCreature(uint32 CreatureID);
+extern const char *GetDynamicString(uint32 Number);
+extern TConnection *GetFirstConnection(void);
+extern TConnection *GetNextConnection(void);
+extern bool IsProtectionZone(int x, int y, int z);
+extern void Log(const char *ProtocolName, const char *Text, ...) ATTR_PRINTF(2, 3);
+extern void LogoutAllPlayers(void);
+extern void MoveCreatures(int Delay);
+extern void NetLoadCheck(void);
+extern void NetLoadSummary(void);
+extern void NotifyAllCreatures(Object Obj, int Type, Object OldCon);
+extern void ProcessCommunicationControl(void);
+extern void ProcessConnections(void);
+extern void ProcessCreatures(void);
+extern void ProcessCronSystem(void);
+extern void ProcessMonsterhomes(void);
+extern void ProcessMonsterRaids(void);
+extern void ProcessReaderThreadReplies(TRefreshSectorFunction *RefreshSector, TSendMailsFunction *SendMails);
+extern void ProcessSkills(void);
+extern void ProcessWriterThreadReplies(void);
+extern void ReceiveData(void);
+extern void RefreshCylinders(void);
+extern void RefreshMap(void);
+extern void RefreshSector(int SectorX, int SectorY, int SectorZ, TReadStream *Stream);
+extern void SavePlayerDataOrder(void);
+extern void SendAll(void);
+extern void SendAmbiente(TConnection *Connection);
+extern void SendMails(TPlayerData *PlayerData);
+extern void SendMessage(TConnection *Connection, int Mode, const char *Text, ...) ATTR_PRINTF(3, 4);
+extern void SendPlayerData(TConnection *Connection);
+extern void SendPlayerSkills(TConnection *Connection);
+extern void SendPlayerState(TConnection *Connection, uint8 State);
+extern void WriteKillStatistics(void);
+
+#endif //TIBIA_STUBS_HH_