2014-10-05 21:52:34 +00:00
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
|
|
#include "RezParser.generated.hh"
|
|
|
|
#include "RezLexer.h"
|
2014-10-07 18:15:46 +00:00
|
|
|
#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");
|
2014-10-07 18:15:46 +00:00
|
|
|
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;
|
|
|
|
}
|