PokeMe64/include/core/common.h
Philippe Symons e51726eef9 Initial import of the first (extremely early) functional version.
It doesn't look like much, but it's functional ;-)

It can inject distribution pokémon into gen 1 and gen 2 original
cartridges and inject the GS ball in Pokémon Crystal.

That's it. But that was the minimal feature set I had in mind for the
project. In the Readme.md you can find the ideas I have for expanding
the project.

But the first priority is the UI, because it really looks bad right now.
(as I was mostly focused on building blocks and transfer pak
functionality. Not on making it looks good)
2024-07-19 21:46:11 +02:00

35 lines
733 B
C
Executable File

#ifndef _CORE_COMMON_H
#define _CORE_COMMON_H
typedef struct Dimensions
{
int width;
int height;
} Dimensions;
typedef struct Rectangle
{
int x;
int y;
int width;
int height;
} Rectangle;
/**
* Whether or not the rectangle has a size of 0.
*/
bool isZeroSizeRectangle(const Rectangle& rect);
/**
* @brief This function adds the x,y coordinates of rectangle b
* to rectangle a and returns a new rectangle with these combined x,y coords and
* the width and height of rectangle a
*/
Rectangle addOffset(const Rectangle& a, const Rectangle& b);
/**
* @brief Extract a Dimensions struct from a Rectangle that only contains the width and height
*/
Dimensions getDimensions(const Rectangle& r);
#endif