pikmin2/include/id32.h

49 lines
786 B
C
Raw Normal View History

2021-10-03 00:44:38 +00:00
#ifndef _ID32_H
#define _ID32_H
Squashed commit of the following: commit 1aebcc3b566ea2937375f32b1a8bcaec483ad086 Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Sun Jan 30 17:18:58 2022 -0500 Fix build commit 557102b1dc6bc352a1c0c473fba1cb9010eeb4ff Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Sun Jan 30 13:04:20 2022 -0500 tab alignment in makefile minor edit commit 6fad05508ed56656dc3305c5f0920df58aede94a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Thu Jan 27 22:30:48 2022 -0500 Create .gitattributes commit 0276b2dd5ff4043a2c70d86be92d5d7e6de7f1a3 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:45:06 2022 -0500 undo naïve change of mine commit 77c4f5183d192bec4ad7f3126fef361a418bc15f Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:25:15 2022 -0500 correct fakepiki and associates repair @intns mistake from d0e0ebe4e4632d74e51663b286bd364bfa5991dc properly toss in motionlistener commit cf1e8fab44e0802db35acf05c92deda48fe916e0 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Mon Jan 24 18:35:11 2022 -0500 formatting commit e2182b5352cf056cca84020f8c820cf69e73f03a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:35:01 2022 -0500 Rename LICENSE to LICENSE.MD commit 99d42518c02a22380ae068690bc063a38501859b Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:34:44 2022 -0500 Create LICENSE commit 8fd5812f2cc1a8340586468737454a2993dfb57e Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Thu Jan 20 20:00:20 2022 -0500 Massive collinfo.cpp progress. Also everything else I had.
2022-01-30 22:21:06 +00:00
#include "Dolphin/runtime.h"
2022-01-04 11:42:37 +00:00
#include "types.h"
#include "stream.h"
2021-10-04 10:42:01 +00:00
class ID32 {
2022-01-04 11:59:11 +00:00
private:
char mStr[5]; // _00
union {
2022-01-04 11:42:37 +00:00
char strView[4];
u32 intView;
} mId; // _08
2021-10-03 00:44:38 +00:00
2022-01-04 11:59:11 +00:00
void updateString();
public:
2022-01-04 11:42:37 +00:00
ID32();
ID32(u32);
2022-01-04 13:08:03 +00:00
Squashed commit of the following: commit 1aebcc3b566ea2937375f32b1a8bcaec483ad086 Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Sun Jan 30 17:18:58 2022 -0500 Fix build commit 557102b1dc6bc352a1c0c473fba1cb9010eeb4ff Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Sun Jan 30 13:04:20 2022 -0500 tab alignment in makefile minor edit commit 6fad05508ed56656dc3305c5f0920df58aede94a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Thu Jan 27 22:30:48 2022 -0500 Create .gitattributes commit 0276b2dd5ff4043a2c70d86be92d5d7e6de7f1a3 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:45:06 2022 -0500 undo naïve change of mine commit 77c4f5183d192bec4ad7f3126fef361a418bc15f Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:25:15 2022 -0500 correct fakepiki and associates repair @intns mistake from d0e0ebe4e4632d74e51663b286bd364bfa5991dc properly toss in motionlistener commit cf1e8fab44e0802db35acf05c92deda48fe916e0 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Mon Jan 24 18:35:11 2022 -0500 formatting commit e2182b5352cf056cca84020f8c820cf69e73f03a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:35:01 2022 -0500 Rename LICENSE to LICENSE.MD commit 99d42518c02a22380ae068690bc063a38501859b Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:34:44 2022 -0500 Create LICENSE commit 8fd5812f2cc1a8340586468737454a2993dfb57e Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Thu Jan 20 20:00:20 2022 -0500 Massive collinfo.cpp progress. Also everything else I had.
2022-01-30 22:21:06 +00:00
inline ID32& operator=(const ID32& other)
{
__copy(mStr, const_cast<char*>(other.mStr), 5);
mId = other.mId;
Squashed commit of the following: commit 1aebcc3b566ea2937375f32b1a8bcaec483ad086 Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Sun Jan 30 17:18:58 2022 -0500 Fix build commit 557102b1dc6bc352a1c0c473fba1cb9010eeb4ff Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Sun Jan 30 13:04:20 2022 -0500 tab alignment in makefile minor edit commit 6fad05508ed56656dc3305c5f0920df58aede94a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Thu Jan 27 22:30:48 2022 -0500 Create .gitattributes commit 0276b2dd5ff4043a2c70d86be92d5d7e6de7f1a3 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:45:06 2022 -0500 undo naïve change of mine commit 77c4f5183d192bec4ad7f3126fef361a418bc15f Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Wed Jan 26 14:25:15 2022 -0500 correct fakepiki and associates repair @intns mistake from d0e0ebe4e4632d74e51663b286bd364bfa5991dc properly toss in motionlistener commit cf1e8fab44e0802db35acf05c92deda48fe916e0 Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Mon Jan 24 18:35:11 2022 -0500 formatting commit e2182b5352cf056cca84020f8c820cf69e73f03a Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:35:01 2022 -0500 Rename LICENSE to LICENSE.MD commit 99d42518c02a22380ae068690bc063a38501859b Author: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Fri Jan 21 21:34:44 2022 -0500 Create LICENSE commit 8fd5812f2cc1a8340586468737454a2993dfb57e Author: SodiumChlorideLogic <19625889+SodiumChlorideLogic@users.noreply.github.com> Date: Thu Jan 20 20:00:20 2022 -0500 Massive collinfo.cpp progress. Also everything else I had.
2022-01-30 22:21:06 +00:00
return *this;
}
2022-01-04 11:42:37 +00:00
void operator=(u32);
bool operator==(u32);
bool operator!=(u32);
2022-01-04 13:08:03 +00:00
bool match(u32, char);
bool isEof();
2022-01-04 11:42:37 +00:00
void setID(u32);
void updateID();
void read(Stream&);
void write(Stream&);
void sprint(char*);
void print();
inline char* getStrID() { return mId.strView; }
inline u32 getID() { return mId.intView; }
inline char* getStr() { return mStr; }
static ID32 eof; // BSS
};
2021-10-03 00:44:38 +00:00
2021-10-14 19:43:06 +00:00
#endif