Battery might post about Laika soon, as it's got it compiled for Windows. Unfortunately, he's left the Mac port in my care, so expect it, um, next year or so.
I've been learning about C++ headers, and including classes. When I say "learning about", I in fact mean "swearing at", because for someone who is used to Python it is a horrendously aggravating process.
1) Including a normal header more than once makes it die.
2) Including C++ files works but is looked down upon (and doing it more than once makes it die anyway).
3) Two way includes? TWO WAY INCLUDES? You're having a laugh!
After experimenting ("I could include this variable once across all my classes in it's own file!" "Hahaha no."), for a few days (Battery: "Have you tried the #ifndef trick?" Ratchet: "Yep." Battery: "Did it work?" Ratchet: "Nope.") I think I've finally stumbled across the magic formula.
1) You can't include -definitions- more than once.
2) You can't have global variables, unless they're defined as "extern const static immutable invulnerable impervious" or something. Naturally this means you can't change the value later, which would make it useful.
3) the #ifndef trick DOES work, but only most of the time. Not always. I'm not sure why so I'm leaving it alone, like a house of cards balanced on a single, bottom Ace.
4) Class definitions in the header, a REFERENCE to that class and class functions in the main file. This makes perfect sense when functions have to have their type defined in both, of course.
So here's the examples.
inventory.h:
#include <OpenGL/OpenGL.h>
#include <string>
using namespace std;
#ifndef INVENTLOL
#define INVENTLOL
class Inventory {
public:
bool active;
GLfloat black[];
Inventory(int glocation);
void update(string action, int x, int y);
void draw(int W_WIDTH, int W_HEIGHT);
};
#endif
inventory.cpp
#include <OpenGL/OpenGL.h>
#include <string>
#include "inventory.h"
using namespace std;
Inventory::Inventory(int glocation){
active = true;
}
void Inventory::update(string action, int x, int y){
//do update
}
void Inventory::draw(int W_WIDTH, int W_HEIGHT){
glPushMatrix();
GLfloat black[] = {0,0,0};
etc...
It's probably bad practice to define black on every draw(), but I checked and it's using hte same memory address, so it's only CPU time that would be a problem. I'll probably be moving that around later.
Also, note that I have to pass the window's width and height to the draw() function, because I can't store them globally somewhere. I miss Python

So, I hope that beginner coders like me find this, and I hope it helps them. And, I hope I haven't just got it wrong and mislead anyone reading it =D