mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 17:34:05 +00:00
Refactor geom library into geom and shape (#1263)
* Refactor `geom` library into `geom` and `util` * Rename to `shape`
This commit is contained in:
committed by
GitHub
parent
5b19d7953a
commit
1b99d75543
@@ -1,22 +0,0 @@
|
||||
#include "legocolor.h"
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legostorage.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoColor, 0x03)
|
||||
|
||||
// FUNCTION: LEGO1 0x100d3a20
|
||||
LegoResult LegoColor::Read(LegoStorage* p_storage)
|
||||
{
|
||||
LegoResult result;
|
||||
if ((result = p_storage->Read(&m_red, sizeof(m_red))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_green, sizeof(m_green))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_blue, sizeof(m_blue))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef __LEGOCOLOR_H
|
||||
#define __LEGOCOLOR_H
|
||||
|
||||
#include "legotypes.h"
|
||||
|
||||
class LegoStorage;
|
||||
|
||||
// SIZE 0x03
|
||||
class LegoColor {
|
||||
public:
|
||||
LegoColor() { m_red = m_green = m_blue = 0; }
|
||||
LegoU8 GetRed() { return m_red; }
|
||||
void SetRed(LegoU8 p_red) { m_red = p_red; }
|
||||
LegoU8 GetGreen() { return m_green; }
|
||||
void SetGreen(LegoU8 p_green) { m_green = p_green; }
|
||||
LegoU8 GetBlue() { return m_blue; }
|
||||
void SetBlue(LegoU8 p_blue) { m_blue = p_blue; }
|
||||
LegoResult Read(LegoStorage* p_storage);
|
||||
|
||||
protected:
|
||||
LegoU8 m_red; // 0x00
|
||||
LegoU8 m_green; // 0x01
|
||||
LegoU8 m_blue; // 0x02
|
||||
};
|
||||
|
||||
#endif // __LEGOCOLOR_H
|
||||
Reference in New Issue
Block a user