Imported file from Okzoniom / MIRA

Won't compile yet, but the most important files are here.
They'll be changed soon, to make the engine more generic, and improved
on many ways.