Retro68/Rez/Rez.cc

35 lines
736 B
C++
Raw Normal View History

2014-10-05 21:52:34 +00:00
#include <fstream>
#include <iostream>
#include "RezParser.generated.hh"
#include "RezLexer.h"
#include "RezWorld.h"
2014-10-05 21:52:34 +00:00
2014-10-08 00:52:34 +00:00
#include "ResourceFiles.h"
#include "BinaryIO.h"
2014-10-05 21:52:34 +00:00
int main()
{
//RezLexer lexer("/home/wolfgang/Projects/Retro68/RIncludes/Types.r");
RezLexer lexer("/home/wolfgang/Projects/Retro68/Rez/Test.r");
RezWorld world;
RezParser parser(lexer, world);
2014-10-05 21:52:34 +00:00
parser.parse();
2014-10-08 00:52:34 +00:00
{
std::ofstream dataOut("test.rsrc");
system("mkdir -p .rsrc");
std::ofstream rsrcOut(".rsrc/test.rsrc");
world.getResources().writeFork(rsrcOut);
system("mkdir -p .finf");
std::ofstream finfOut(".finf/test.rsrc");
ostype(finfOut, "rsrc");
ostype(finfOut, "RSED");
for(int i = 8; i < 32; i++)
byte(finfOut, 0);
}
2014-10-05 21:52:34 +00:00
return 0;
}