Compare commits
1
Commits
8f09415b37
..
waf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfd1861d7b |
No files matched your search
+6
-1
@@ -1,5 +1,10 @@
|
|||||||
|
*.dep
|
||||||
fart
|
fart
|
||||||
*.bmp
|
*.bmp
|
||||||
*.png
|
*.png
|
||||||
/.rscons*
|
parser/parser.tab.cc
|
||||||
|
parser/parser.tab.hh
|
||||||
|
parser/lex.yy.cc
|
||||||
|
/.lock-waf*
|
||||||
|
/.waf-*/
|
||||||
/build/
|
/build/
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
.PHONY: all
|
|
||||||
all:
|
all:
|
||||||
@./rscons
|
@./waf build
|
||||||
|
|
||||||
|
install:
|
||||||
|
@./waf install
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
@./waf distclean
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
clean:
|
||||||
@./rscons clean
|
@./waf clean
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
require "rscons"
|
||||||
|
|
||||||
|
task :default do
|
||||||
|
Rscons::Environment.new do |env|
|
||||||
|
env.build_root = "build"
|
||||||
|
|
||||||
|
lexer_source = "#{env.build_root}/lex.yy.cc"
|
||||||
|
env.CFile(lexer_source, "parser/parser.ll")
|
||||||
|
|
||||||
|
parser_source = "#{env.build_root}/parser.tab.cc"
|
||||||
|
env.CFile(parser_source, "parser/parser.yy")
|
||||||
|
|
||||||
|
sources = Dir["{util,shapes,main,distrib,parser}/**/*.cc"]
|
||||||
|
sources << lexer_source
|
||||||
|
sources << parser_source
|
||||||
|
|
||||||
|
env["CXXFLAGS"] += ["-Wall", "-O2"]
|
||||||
|
env["CPPPATH"] += Dir["{util,shapes,main,distrib,parser}/**/"]
|
||||||
|
env["CPPPATH"] << "."
|
||||||
|
env["LIBS"] += ["fl", "pthread", "freeimage"]
|
||||||
|
|
||||||
|
env.Program("fart", sources)
|
||||||
|
end
|
||||||
|
end
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
configure do
|
|
||||||
check_cxx_compiler
|
|
||||||
check_program "flex"
|
|
||||||
check_program "bison"
|
|
||||||
check_lib "pthread"
|
|
||||||
end
|
|
||||||
|
|
||||||
env do |env|
|
|
||||||
env["CCFLAGS"] += %w[-Wall -O2]
|
|
||||||
env["CPPPATH"] += glob("src/**")
|
|
||||||
|
|
||||||
env.CFile("^/parser/lexer.cc", "src/parser/parser.ll")
|
|
||||||
env.CFile("^/parser/parser.cc", "src/parser/parser.yy")
|
|
||||||
env["CPPPATH"] += ["#{env.build_root}/parser"]
|
|
||||||
|
|
||||||
sources = glob("src/**/*.cc")
|
|
||||||
sources += ["^/parser/lexer.cc", "^/parser/parser.cc"]
|
|
||||||
env.Program("fart", sources)
|
|
||||||
end
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec ./rscons configure "$@"
|
exec ./waf configure
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Regular → Executable
File renamed without changes.
File renamed without changes.
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "Scene.h"
|
#include "Scene.h"
|
||||||
#include "Light.h"
|
#include "Light.h"
|
||||||
#include "util/stb_image.h"
|
|
||||||
#include "parser/parser.h"
|
#include "parser/parser.h"
|
||||||
#include "parser/nodes.h"
|
#include "parser/nodes.h"
|
||||||
#include "util/Polygon.h"
|
#include "util/Polygon.h"
|
||||||
@@ -348,23 +347,19 @@ refptr<Material> Scene::processMaterial(refptr<Node> node)
|
|||||||
else if ( typeid(**it) == typeid(TextureNode) )
|
else if ( typeid(**it) == typeid(TextureNode) )
|
||||||
{
|
{
|
||||||
string filename = (*it)->getString();
|
string filename = (*it)->getString();
|
||||||
Texture * texture = NULL;
|
FIBITMAP * fib = NULL;
|
||||||
if (m_textures.find(filename) != m_textures.end())
|
if (m_textures.find(filename) != m_textures.end())
|
||||||
{
|
{
|
||||||
/* texture already loaded */
|
/* texture already loaded */
|
||||||
texture = m_textures[filename];
|
fib = m_textures[filename];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texture = loadTexture(filename);
|
fib = loadTexture((*it)->getString());
|
||||||
if (texture != NULL)
|
|
||||||
{
|
|
||||||
m_textures[filename] = texture;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (texture != NULL)
|
if (fib != NULL)
|
||||||
{
|
{
|
||||||
material->setTexture(texture);
|
material->setTexture(fib);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -816,24 +811,30 @@ void Scene::processShapeDefinition(refptr<Node> node)
|
|||||||
m_transforms.pop();
|
m_transforms.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
Texture * Scene::loadTexture(const std::string & filename)
|
FIBITMAP * Scene::loadTexture(const std::string & filename)
|
||||||
{
|
{
|
||||||
int width = 0;
|
FREE_IMAGE_FORMAT fif = FreeImage_GetFileType(filename.c_str(), 0);
|
||||||
int height = 0;
|
if (fif == FIF_UNKNOWN)
|
||||||
int channels = 0;
|
|
||||||
/* request 4 channels so the data is always tightly packed RGBA */
|
|
||||||
unsigned char * data = stbi_load(filename.c_str(), &width, &height,
|
|
||||||
&channels, 4);
|
|
||||||
if (data == NULL)
|
|
||||||
{
|
{
|
||||||
cerr << "Error: image \"" << filename << "\" could not be loaded: "
|
fif = FreeImage_GetFIFFromFilename(filename.c_str());
|
||||||
<< stbi_failure_reason() << endl;
|
if (fif == FIF_UNKNOWN)
|
||||||
|
{
|
||||||
|
cerr << "Error: couldn't determine image format for \""
|
||||||
|
<< filename << "\"" << endl;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!FreeImage_FIFSupportsReading(fif))
|
||||||
|
{
|
||||||
|
cerr << "Error: image format of \"" << filename
|
||||||
|
<< "\" does not support reading" << endl;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
Texture * texture = new Texture;
|
FIBITMAP * fib = FreeImage_Load(fif, filename.c_str(), 0);
|
||||||
texture->width = width;
|
if (fib == NULL)
|
||||||
texture->height = height;
|
{
|
||||||
texture->channels = 4;
|
cerr << "Error: image \"" << filename << "\" could not be loaded"
|
||||||
texture->data = data;
|
<< endl;
|
||||||
return texture;
|
}
|
||||||
|
return fib;
|
||||||
}
|
}
|
||||||
@@ -7,11 +7,11 @@
|
|||||||
#include <utility> /* pair */
|
#include <utility> /* pair */
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm> /* sort() */
|
#include <algorithm> /* sort() */
|
||||||
|
#include <functional> /* binary_function */
|
||||||
#include <typeinfo> /* typeid operator support */
|
#include <typeinfo> /* typeid operator support */
|
||||||
|
|
||||||
#include "Scene.h"
|
#include "Scene.h"
|
||||||
#include "BMP.h"
|
#include "BMP.h"
|
||||||
#include "util/stb_image.h"
|
|
||||||
#include "util/Color.h"
|
#include "util/Color.h"
|
||||||
#include "shapes/Shape.h"
|
#include "shapes/Shape.h"
|
||||||
#include "Light.h"
|
#include "Light.h"
|
||||||
@@ -75,13 +75,12 @@ Scene::Scene(const map<string, const char *> & options,
|
|||||||
|
|
||||||
Scene::~Scene()
|
Scene::~Scene()
|
||||||
{
|
{
|
||||||
/* clean up any textures loaded with stb_image */
|
/* clean up any textures loaded with freeimage */
|
||||||
for (std::map< std::string, Texture * >::iterator it = m_textures.begin();
|
for (std::map< std::string, FIBITMAP * >::iterator it = m_textures.begin();
|
||||||
it != m_textures.end();
|
it != m_textures.end();
|
||||||
it++)
|
it++)
|
||||||
{
|
{
|
||||||
stbi_image_free(it->second->data);
|
FreeImage_Unload(it->second);
|
||||||
delete it->second;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
|
#include <FreeImage.h>
|
||||||
|
|
||||||
#include "util/refptr.h"
|
#include "util/refptr.h"
|
||||||
#include "util/Ray.h"
|
#include "util/Ray.h"
|
||||||
#include "util/Color.h"
|
#include "util/Color.h"
|
||||||
@@ -80,7 +82,7 @@ class Scene
|
|||||||
std::vector<ShapeRef> processForNode(refptr<Node> node);
|
std::vector<ShapeRef> processForNode(refptr<Node> node);
|
||||||
void processMaterialDefinition(refptr<Node> node);
|
void processMaterialDefinition(refptr<Node> node);
|
||||||
void processShapeDefinition(refptr<Node> node);
|
void processShapeDefinition(refptr<Node> node);
|
||||||
Texture * loadTexture(const std::string & filename);
|
FIBITMAP * loadTexture(const std::string & filename);
|
||||||
|
|
||||||
/* rendering parameters */
|
/* rendering parameters */
|
||||||
int m_width;
|
int m_width;
|
||||||
@@ -102,7 +104,7 @@ class Scene
|
|||||||
double m_sample_span;
|
double m_sample_span;
|
||||||
double m_half_sample_span;
|
double m_half_sample_span;
|
||||||
std::map< std::string, refptr<Material> > m_materials;
|
std::map< std::string, refptr<Material> > m_materials;
|
||||||
std::map< std::string, Texture * > m_textures;
|
std::map< std::string, FIBITMAP * > m_textures;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
#include <FreeImage.h>
|
||||||
|
|
||||||
#include "Scene.h"
|
#include "Scene.h"
|
||||||
#include "distrib/distrib.h"
|
#include "distrib/distrib.h"
|
||||||
#include "BMP.h"
|
#include "BMP.h"
|
||||||
@@ -186,6 +188,8 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
|
FreeImage_Initialise(FALSE);
|
||||||
|
|
||||||
const char * filename = argv[optind];
|
const char * filename = argv[optind];
|
||||||
client_options.push_back(filename);
|
client_options.push_back(filename);
|
||||||
Scene scene(scene_options, filename);
|
Scene scene(scene_options, filename);
|
||||||
@@ -334,6 +338,8 @@ int main(int argc, char * argv[])
|
|||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FreeImage_DeInitialise();
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
%option nounput
|
%option nounput
|
||||||
%option noyywrap
|
|
||||||
%option bison-locations
|
%option bison-locations
|
||||||
|
|
||||||
%{
|
%{
|
||||||
@@ -9,7 +8,7 @@
|
|||||||
|
|
||||||
#include "nodes.h"
|
#include "nodes.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "parser.hh"
|
#include "parser.tab.h"
|
||||||
|
|
||||||
#define YY_USER_ACTION yylloc->first_column += yyleng;
|
#define YY_USER_ACTION yylloc->first_column += yyleng;
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "util/Scope.h"
|
#include "util/Scope.h"
|
||||||
#include "nodes.h"
|
#include "nodes.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "parser.hh" /* bison-generated header with YY[SL]TYPE */
|
#include "parser.tab.h" /* bison-generated header with YY[SL]TYPE */
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define yyerror(msg) errFunc(msg, &yylloc)
|
#define yyerror(msg) errFunc(msg, &yylloc)
|
||||||
@@ -19,14 +19,19 @@ extern FILE * yyin;
|
|||||||
|
|
||||||
void errFunc(const char * str, YYLTYPE * yyllocp);
|
void errFunc(const char * str, YYLTYPE * yyllocp);
|
||||||
|
|
||||||
|
int yywrap()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static refptr<Node> parsed_scene_node;
|
static refptr<Node> parsed_scene_node;
|
||||||
refptr<Scope> parser_scope;
|
refptr<Scope> parser_scope;
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%define api.pure
|
%pure-parser
|
||||||
%locations
|
%locations
|
||||||
%define parse.error verbose
|
%error-verbose
|
||||||
|
|
||||||
%token PLUS;
|
%token PLUS;
|
||||||
%token MINUS;
|
%token MINUS;
|
||||||
File renamed without changes.
@@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
# Copyright (c) 2013-2022 Josh Holtrop
|
|
||||||
#
|
|
||||||
# MIT License
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
# a copy of this software and associated documentation files (the
|
|
||||||
# "Software"), to deal in the Software without restriction, including
|
|
||||||
# without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
# permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
# the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be
|
|
||||||
# included in all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
script = File.join(File.dirname(__FILE__), ".rscons-3.1.0-4892f95d56c30bbe9aa0c9964062ec5b.rb")
|
|
||||||
unless File.exist?(script)
|
|
||||||
if File.read(__FILE__, mode: "rb") =~ /^#==>(.*)/
|
|
||||||
require "zlib"
|
|
||||||
require "base64"
|
|
||||||
encoded_compressed = $1
|
|
||||||
unescaped_compressed = Base64.decode64(encoded_compressed)
|
|
||||||
inflated = Zlib::Inflate.inflate(unescaped_compressed)
|
|
||||||
File.open(script, "wb") do |fh|
|
|
||||||
fh.write(inflated)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
raise "Could not decompress."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
load script
|
|
||||||
if __FILE__ == $0
|
|
||||||
Rscons::Cli.new.run(ARGV)
|
|
||||||
end
|
|
||||||
#==>eJztff13GzeS4O/5K9ptJyZlirIzN7PvMVYkW5IT7cmWT5KznqUZDkU2pR6T3dxuUrJW5v7thyp8VQHoJiXbuey+87yJ2PgoAIVCoVAoVD18sLUoi63zNNtKsquoWJzffFck/7FIiySKs2S+dTmfz2KbNEovknIefzfNR4tJEp2Uwzwrv4si9f0iK1PxFUXDyaAso+fPozKZjDElik4OTg/Oou0o/pB0n05jlTpKxtF1kc6TRpq3oo1pUpaDi6SpckV+3h/mk7wQFWVr7cFsNkmHg3maZ22ROxBtyiKmTjo21dpZOtkxGQycqrsjGrbNJdnI/M4Xc+huHIJLQA4XRZFkc9tNGCdtMikF7kaV+WrI7WQwvBTwo8/TzyQXW52207I/2Gmczos0u2iy7CiapFlSCsDTdikwM2/EH7K4FW0+C5bDZvrX6fyyn2aj5BO2CDmtKP3sVMC2IS96wPDA8vnwRUE23kAdidgn6xR0UbuqBp09rzkYiJcbqiEGlUbPFbrK9D+TaDN6tubg3cn1elFdYBUdrTVImPs1BummJJPSxc1wUCbR1Em8vkyyqCOm4Cea6lI4rvCf/vJs6nZFVr8okiT7aWX1Hyuq3ySTSX7906rqf6mofj5ZJLT3FdX/V0X1qViq2Xzw04rqf62oPrwZZGu0/reK6teXglOuRt2/VI09n4zo5IWqP6ueOKhOJ6+ietXEQXU6eRXVKydOVKeTV1G9auKgOp28iupVEwfV6eRVVK+aOKhOJ6+iet3ErSKbqlkrkjKZ19BMi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sioMm/LdHutgOj4qA4YgQpDgo+4JxXOYjbfljbqU6DJhB3Ay63x9PBhdlA/9LDqf4Le9RHzg3qCpLcItkMmk8euafxosreqt7nRd44XYK5fFD3Q2zNsuP6cy5Q5RlQ/dtkMMu2+CiVAAgkxOAB/9ADRg8IEgi48dUgS8kZLqpFFdw4gL7ImIkQzOeWAp327gUkzBJVreBB4oJUmOEB4+JrysDMpkIUIikLt4f8h1MIYCp6QPmhQAFLiHhgF/RkERNF3sq/jvprRbfEDR0Da16NgfF8NI7MdX2XrUZ7+29Onrxy6mQK7sKDGKrFy59tL+6NMdACEvy1lv2HhbAw1vN8uK9t28F9357cvDq8L0Qbj3bAjnDXVXu8M0B9OURGRuFDZhRd/lfATka0peOGHtV3pRFns+/Rrc0qLXnrabGF83d4Zu9tSbu7YuzX2tmzYF6dPjy6PDN/14NWRSsIwYf7P7hyVpQV/QX5nOa5ZvDm4vrlD1gCMwXVGEYD8yQU8ZrS7Qyyq/LUEvrQ5lJW8tv213A+ea/DVoedjWYF6cazKNnxKCpDtqkGprt1NrQZtXQBKWuDQ4smIs57qI7jXiTHRdWo7UKzpM7wllzepJQBbl4vNIBfUFx5UmIRNB5wKUOLctUikIo24Uy8MNrqb64lGVmg7TArV/LyVyMEUIhE7HVvciLohjcNHGrhm2aJlKWKGpLOdsVQzhebbkqaSV0PhwtplrEkqJv/3JQXkbbRhKe5/1LvwCe0lAZ1z+/afzQAcukJtOEMM1iv5wXUhusr4Rupuf5pBntyDR5Eo5QZjb1gtZW8KakpUESCyqwI0CNiu4hSm7mjE0MrEJYWPdgJtXC6xshQ2FusaKuI/UpBv50475OjZ2VRTQrtFcUSPgtpmjJ3HAuSqYIQQJrsFwyc+LT07eINNZfB2B9X3Xlr6POqG6HtpHqVcuwjEkLine truncated
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Regular → Executable
+4
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "Shape.h"
|
#include "Shape.h"
|
||||||
#include <algorithm> /* sort() */
|
#include <algorithm> /* sort() */
|
||||||
|
#include <functional> /* binary_function */
|
||||||
#include <utility>
|
#include <utility>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -27,6 +28,9 @@ void Shape::setMaterial(refptr<Material> material)
|
|||||||
}
|
}
|
||||||
|
|
||||||
class BoolIntersectionComparator
|
class BoolIntersectionComparator
|
||||||
|
: public std::binary_function<Shape::BoolIntersection,
|
||||||
|
Shape::BoolIntersection,
|
||||||
|
bool>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BoolIntersectionComparator(const Vector & refPoint)
|
BoolIntersectionComparator(const Vector & refPoint)
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
#ifndef TEXTURE_H
|
|
||||||
#define TEXTURE_H TEXTURE_H
|
|
||||||
|
|
||||||
/* A loaded image texture. Pixel data is stored as tightly packed RGBA
|
|
||||||
* bytes (4 channels) and is owned by this struct -- free it with
|
|
||||||
* stbi_image_free(). */
|
|
||||||
struct Texture
|
|
||||||
{
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int channels;
|
|
||||||
unsigned char * data;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
/* Single translation unit that compiles the stb_image implementation. */
|
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
|
||||||
#include "stb_image.h"
|
|
||||||
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,8 @@
|
|||||||
#ifndef MATERIAL_H
|
#ifndef MATERIAL_H
|
||||||
#define MATERIAL_H MATERIAL_H
|
#define MATERIAL_H MATERIAL_H
|
||||||
|
|
||||||
#include "Texture.h"
|
#include <FreeImage.h>
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
class Material
|
class Material
|
||||||
@@ -54,8 +55,8 @@ class Material
|
|||||||
void setTransparency(double t) { m_transparency = t; }
|
void setTransparency(double t) { m_transparency = t; }
|
||||||
double getTransparency() const { return m_transparency; }
|
double getTransparency() const { return m_transparency; }
|
||||||
|
|
||||||
void setTexture(Texture * texture) { m_texture = texture; }
|
void setTexture(FIBITMAP * fib) { m_texture = fib; }
|
||||||
Texture * getTexture() const { return m_texture; }
|
FIBITMAP * getTexture() const { return m_texture; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Color m_ambient_color;
|
Color m_ambient_color;
|
||||||
@@ -65,7 +66,7 @@ class Material
|
|||||||
double m_reflectance;
|
double m_reflectance;
|
||||||
double m_refraction;
|
double m_refraction;
|
||||||
double m_transparency;
|
double m_transparency;
|
||||||
Texture * m_texture;
|
FIBITMAP * m_texture;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,12 +8,12 @@ template <typename T>
|
|||||||
class refptr
|
class refptr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
refptr();
|
refptr<T>();
|
||||||
refptr(T * ptr);
|
refptr<T>(T * ptr);
|
||||||
refptr(const refptr<T> & orig);
|
refptr<T>(const refptr<T> & orig);
|
||||||
refptr & operator=(const refptr<T> & orig);
|
refptr<T> & operator=(const refptr<T> & orig);
|
||||||
refptr & operator=(T * ptr);
|
refptr<T> & operator=(T * ptr);
|
||||||
~refptr();
|
~refptr<T>();
|
||||||
T & operator*() const;
|
T & operator*() const;
|
||||||
T * operator->() const;
|
T * operator->() const;
|
||||||
bool isNull() const { return m_ptr == NULL; }
|
bool isNull() const { return m_ptr == NULL; }
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# encoding: ISO8859-1
|
||||||
|
# Thomas Nagy, 2005-2015
|
||||||
|
|
||||||
|
"""
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||||
|
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os, sys, inspect
|
||||||
|
|
||||||
|
VERSION="1.8.14"
|
||||||
|
REVISION="9fa0538d9aef6e87468d0d8369f1c2f3"
|
||||||
|
GIT="9625343f91810ffeb8b844f14f997daf44a91ff5"
|
||||||
|
INSTALL=''
|
||||||
|
C1='#+'
|
||||||
|
C2='#*'
|
||||||
|
C3='#)'
|
||||||
|
cwd = os.getcwd()
|
||||||
|
join = os.path.join
|
||||||
|
|
||||||
|
|
||||||
|
WAF='waf'
|
||||||
|
def b(x):
|
||||||
|
return x
|
||||||
|
if sys.hexversion>0x300000f:
|
||||||
|
WAF='waf3'
|
||||||
|
def b(x):
|
||||||
|
return x.encode()
|
||||||
|
|
||||||
|
def err(m):
|
||||||
|
print(('\033[91mError: %s\033[0m' % m))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def unpack_wafdir(dir, src):
|
||||||
|
f = open(src,'rb')
|
||||||
|
c = 'corrupt archive (%d)'
|
||||||
|
while 1:
|
||||||
|
line = f.readline()
|
||||||
|
if not line: err('run waf-light from a folder containing waflib')
|
||||||
|
if line == b('#==>\n'):
|
||||||
|
txt = f.readline()
|
||||||
|
if not txt: err(c % 1)
|
||||||
|
if f.readline() != b('#<==\n'): err(c % 2)
|
||||||
|
break
|
||||||
|
if not txt: err(c % 3)
|
||||||
|
txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r')).replace(b(C3), b('\x00'))
|
||||||
|
|
||||||
|
import shutil, tarfile
|
||||||
|
try: shutil.rmtree(dir)
|
||||||
|
except OSError: pass
|
||||||
|
try:
|
||||||
|
for x in ('Tools', 'extras'):
|
||||||
|
os.makedirs(join(dir, 'waflib', x))
|
||||||
|
except OSError:
|
||||||
|
err("Cannot unpack waf lib into %s\nMove waf in a writable directory" % dir)
|
||||||
|
|
||||||
|
os.chdir(dir)
|
||||||
|
tmp = 't.bz2'
|
||||||
|
t = open(tmp,'wb')
|
||||||
|
try: t.write(txt)
|
||||||
|
finally: t.close()
|
||||||
|
|
||||||
|
try:
|
||||||
|
t = tarfile.open(tmp)
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
os.system('bunzip2 t.bz2')
|
||||||
|
t = tarfile.open('t')
|
||||||
|
tmp = 't'
|
||||||
|
except:
|
||||||
|
os.chdir(cwd)
|
||||||
|
try: shutil.rmtree(dir)
|
||||||
|
except OSError: pass
|
||||||
|
err("Waf cannot be unpacked, check that bzip2 support is present")
|
||||||
|
|
||||||
|
try:
|
||||||
|
for x in t: t.extract(x)
|
||||||
|
finally:
|
||||||
|
t.close()
|
||||||
|
|
||||||
|
for x in ('Tools', 'extras'):
|
||||||
|
os.chmod(join('waflib',x), 493)
|
||||||
|
|
||||||
|
if sys.hexversion<0x300000f:
|
||||||
|
sys.path = [join(dir, 'waflib')] + sys.path
|
||||||
|
import fixpy2
|
||||||
|
fixpy2.fixdir(dir)
|
||||||
|
|
||||||
|
os.remove(tmp)
|
||||||
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
try: dir = unicode(dir, 'mbcs')
|
||||||
|
except: pass
|
||||||
|
try:
|
||||||
|
from ctypes import windll
|
||||||
|
windll.kernel32.SetFileAttributesW(dir, 2)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test(dir):
|
||||||
|
try:
|
||||||
|
os.stat(join(dir, 'waflib'))
|
||||||
|
return os.path.abspath(dir)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def find_lib():
|
||||||
|
src = os.path.abspath(inspect.getfile(inspect.getmodule(err)))
|
||||||
|
base, name = os.path.split(src)
|
||||||
|
|
||||||
|
#devs use $WAFDIR
|
||||||
|
w=test(os.environ.get('WAFDIR', ''))
|
||||||
|
if w: return w
|
||||||
|
|
||||||
|
#waf-light
|
||||||
|
if name.endswith('waf-light'):
|
||||||
|
w = test(base)
|
||||||
|
if w: return w
|
||||||
|
err('waf-light requires waflib -> export WAFDIR=/folder')
|
||||||
|
|
||||||
|
dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
|
||||||
|
for i in (INSTALL,'/usr','/usr/local','/opt'):
|
||||||
|
w = test(i + '/lib/' + dirname)
|
||||||
|
if w: return w
|
||||||
|
|
||||||
|
#waf-local
|
||||||
|
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
|
||||||
|
w = test(dir)
|
||||||
|
if w: return w
|
||||||
|
|
||||||
|
#unpack
|
||||||
|
unpack_wafdir(dir, src)
|
||||||
|
return dir
|
||||||
|
|
||||||
|
wafdir = find_lib()
|
||||||
|
sys.path.insert(0, wafdir)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
from waflib import Scripting
|
||||||
|
Scripting.waf_entry_point(cwd, VERSION, wafdir)
|
||||||
|
|
||||||
|
#==>
|
||||||
|
#BZh91AY&SY¾ ÛO/fÿÿÿ°�ÁÿÿÿÿÿÿÿÿÿÿÿF`††"ª@Œ#)! (aô÷ynˆ#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)ãÑYLµÛ¸7Þî¯m†ˆ¡¯}Üë9÷q{uïjËWÑõÔ¤/&ßvwÓr>wwnìµ6FŽî)å¾úûË…�o{½·˜{ma(:2[vî®�J;¬é×zÞ÷·nÔôëÈèßxÎ}ÝÅ{ºÍï†ï|£«ÝÜõ]ï#)®›ÝÎ÷—}áôÖ.øÞÑ;{ݵǮ﹮ï—7kí»#)#)#) >€>vh¥¶°ï½ÀÐéõð#+ß{yáí·pTê@Ù¾�Rô÷vÛ�l4#)QU¡«>óZ{°=sMºë£aJ:Ý‹al2B‰B€J‹ßnR½²€#+ƒëD¥ #+ÖŠ/°[ {yÆûîׯZ>ì>ÕkS¯{�Ùïz^¯puÆA5é©:Ö[}:ö�»ƒ�×s_9Ð÷·×žÛo¥Þ®õÓÝÛÙäSíÖ»ÎÝϾmÝÎû^j´Êû^ß]Ññ³çg³¹Õ÷´u’€´ú8ö4#)ºÀ¥�”·;Þgyïrd4¡öÞ{T@|”Ä„·»ÞKØ(#)E…) ð4Ú×Ó»^úîé�{ÜÙïBÁîõéÏ»Þë}î ^Í#+%6`oVÏ/s w=×g^»Ù@=÷Gz§£X縛»ï}ÆïŽï5t3Þy^Øñ—×�ºFÇ@9Uí›ï¼xöpž\ôÒ«¦ßovÂòîów¯\}Õîç^׳z÷½îï7^fûrº—f÷¾Þ.z+ï0x/9÷{ÎãïXkÜÕvzÅwºÅ¡§ë¶iÄ{˜¥µm·Œíîz÷ÕJ¨VÓ]71çµ{³‹¹�ö¶úû½¼w{vqöû}l|å´Ûg¯¹Åîǧ—´´}Þ�^¯o“Ø#)½éç^]>_wÛÇ=;.#)�P¢Ól5 ¶#+è÷�¶UOsjÐ:]ç�ßo¯¦ƒÜoyž÷·uo—ݯR{¬’â³^°•Þ«Û°Ò£ªú÷o¸|#)w¸ê€�bö÷³w²×yï¯x󾦸ûm‹îûß]9·Ñ�šïk<õçn�µ kϱëÄŸ}ÙÞÙmÓ�±;‘ÞíSÞt[8»ç·Û§€•@ä{Zöàêc®€öW�¥=õja_jϵÞÞ'Ý÷ÝïSÙám¶û¾öò¼lí#Ýöï»sœùö^Ï}Û¨»ìû¯g—•�Ámµ€sîæŽ©Ó�öî¼_#*æ×A¯¶¥á}Sï2ù#*ËÞÍ÷—Þ]oº#)À¶ÅtÅU>ç݃ß{·ºä;RîÑ{{Þ®c;#+w˽{o¹¯CçÜ3Ü×·®Þõ÷Ú×Ì^öÖÞû‡Éõí¥ÑA ·MBºVî#*]mõÝF†#*y·¹:0൷zëÞo¾#*öÈ#)#*z.^î:ïq£Ð=³¸ô6ÏÞï{ ½`Û#)Z÷4Øô¯½Ž}@!»9c‰U©ënûž>Þ÷»sµéÞÞ¶àìXÐQG7_yÞÏ%TÔÜß{ºlËØ·K‰ë=2÷Öuò.çwõ{×ÅÒøúwÝÜ'yÏž›¦$´ôrÞg™µÖ‡îûy}yí½rãXuâû½É’O‡wvã^Guây¼èçÙ| ”Ò#)@#)€#)˜�#)4Ä “&“Tý)ú�õP=CFFž¦&4Ÿª M� ˆÒbd=š)êzG¤�¦‚z&š#*�#)#)#)#)#)#)�Hˆ @šhb!¥OjŸµIàjG‰=CÊ4zšhmM44Ð#)diˆ#)#) =R’)‰=Òc%OÒbž§´§¨Ì¦†ŒMP#)4#)ê#)i¦@#)#)#)$„Ð#)&†‚dÔÁL‰¦©ãÓRzi§ªhiê@@#)#)$ÔD#)&@Í¢žÓJ›jOÓMSÉ“T=’›Õ?MSÔõ#) #)ñÿù?ضڗ_î•[›XÝÉ~ÖÛS”ĦEðÛj\Í#**H !’€y¬èËåô}?F0Oò%ã–)Ê.Ò”ø‘Hâ§œ^,UQñ½É2qk»¼kSûg@úÏó!ü„Kæ�€ê’@Äá:´ ³·ðnÛá¥Kš×Ž&S.Óˆ¡=ÍañO‚a]Ô¼c¥‚ ¹B ¯ã¾�¯yG€Ä Â#+"ºšØ¶£m¶£ZÔmZ+Y‘@nªJˆõAZS˜Rh@@D�Ê -�‚؈©>ø!D² ¤@L£Cj#TkÕµm}Õmj© �4ă1,fiˆ ‘#*Í£fh‰)©ÆDÉJ)Šm¤¨cL’X XMR£l”DJ™¢l¡l˜ÉY”fh–4&˜R‚Æ’)6"ÑŠ!©LŠ¢,´�T’ ƒ)"E¶“T-e›±5(Å$¢šDŒ,Ê‹F¢´i«T¤–¢dÉ2EE±jV±ša›2™jKM¶&¦Ø˜ÙT™50²(’j6�‘©VŠÈFɤÐS$£AAi ´RšÆHfÆ&X(ÌÒ˜šlb`•)`�€Ä1™ˆTÉ2%%&Ô�$RÄ"²hdˆ™H¤””±I’#*¢˜ÉJMhJ‹AS•"¡‹$ÃERXQ$¢M"”LbÄÅA²e6ŠI–�ÊHšYdd•(¢™†´…C"‰aDšI Sb5%�²Ñ$¤IEEDA±%!LØ‚I5$E$R!"fF2L�£0Œ–Ì©�hJŒD„I Rl! I&“h1&MR˜6m¦‘F„Q#+R@ÊLÐi2©fÀ‹)E2�É¥’lÓ(Ж),ÈØÑ•’f$‘E ±K$*$²Ê‚›3F*,Ò60Êi¢Jki ÐÄ&iiA“%&�4ÒRÍF’Ê•L0QIPDÄ™IJ#+c„‘’dP�h!4̶‘†k!¥‘dÈR�¦ÒT”[$mI’IBQd¦¤[ £d†L¢"†É&Ê�35ˆÆiPÌÍ)ˆHl*dÑ,bÍMŠL¢Èɉ(Sd’QS"ÄLÓ#h1I’ÊI˜l›&Œ™#+†‘¬$™•”˜m“d¤„I,™FB)š‘”ÊFXŒ’•Mš*6ŠˆL ™’ ÚŒ[IšÈ¡¤ÆŒ$†•Bˆ Q5Š”˜QX”Ổš4˜IdD¡RÈQ¤Èc(Í!³Z¥´[$© ZJ#*”‘¢Å2S$Æ5“S,Ѧ)3LÓM’ÊXµ21°¶IF…M”e#4ie¯Ümti+IHJ”d¦±VŠÅ¢£BfTDÓi-£a$µLE#*‹,E,¥!4‘¬ÆÆB#+†Z„Ö‹"šÉ�ØÊ-*4‹BÄɘԴ³$i1a™”ªÍd5dlЦØV)²‰,¨ÊUbš´›HU f¥)M0µ˜¡¦DXÖ�5*$´Ê4FX¬V*™Ql%¶‰–ÆÛBF¤£m�£cd£Tf’!TR�Xª6©#*¬Bk$(�¬Ñ¦$¢�M0ÍJ%6¥Q¨Ù$¬cR+L™mµ›VšÑa©µ4‰›5‘&fjiHÉ2Ú¥¨¥¤¦ji³5¥Si*¦˜LU•2”›SJÓf-Ù¬ÌÉ%e�Ø5&ÚU–CbÔÒŠ"5J4‰E!C… ¡$À¦ÔmI’¢™M±´¤ÒÆ£&M%0È¢‘K6#b�ZYR šh¦JdƲ›41bBP¨´Y’Å+5%€ÆÙ–M,ÆSÈED”¤“!f%‚"�FÄ””dÍ‘fQµ31LRma3`Ñ’¢ÆaŠ™j4P›D"šm3h¨±±±F„h�&¦„ŠL…,´Dh¬‘))Mƒ%±#+MJ"I6jQ UU3(�†ÅJi6FÒei-b † (‘2l¤š¤Ô™˜Ùšb©l³bÐVRÊ(�ŒMŠ,Ô“)“ELµ¤dÊZ,”‰°"DPK1¢¦Q¢²É²R†&"jHH´j"¨M‹EFŠ6ÄmHÒa’f‰()4‹E0 QI%‹³iI&¤(#+�dÌ,”³!¦£FÂF¢Ö$Ñ¡2´‘i-Š‚Œa…E%©J%F¨Ö4¤ÍlY$¬È©"J�!¢,²LhdÔmÄÊÉh¦”¡Q¥%4IRÉ*Je)FÖĤŠ,”l•FFÉcY4•-T¦)(©Kd5b¡¤™²%&ņ�B"Å‹L2R3F#*¤Á¨“40UJ#L&”¶b)E¢´m�d„6%Ac)±¨Ú6™% QI„I«J#+-)ªSi5±¬Vɬ–³H#+ѶMIEŠb”‘”Ù¡P”l”Á£[Dm�‹hØÒ•Y!–ˆ+šŠ‰#+Ñ3l³j6�¢¢Ö2ImJ3fÈiebU´S,UMICiFXÑJ&’,©±h$±F²V-’Š¤ÕŠM¥3(Òm�E%-m¶m#PÒh‰*e��¡@´KKf¬˜ÈÅ‹Z(‹hØ´[mT2ɵ±©©YZ%E±#i&0l¬,¥Š’6i1±&$“)&D�µ&س6©�…þ³ýÏý†hËi“ý*”ú™ýø©—ýͶ!½9ÿ‹ÕË&‰‡Göa¤\2#+Jd]*¢$LLY²µaÃþ?ãF±SPf–5Qÿ’·Å?ÇÚR+^pˆ|ösy‘x±V&šå�Ü–#+WD2›¤-¶†ª¤Gjÿk·íò»{Ãþ¤?ãò?·üÜxóÿnÊÆ^8˪*˜)gmv²Ñˆò; aˆ†‰Û7q8gç|X{#*/}ZˆS;î¦ù®éÇX;£‰F‘åâíi�r7¨£�Ûìkd˜RTÆÛ®WÇâÒ�¡øE1Ì�m·Ë#*ÖMqãAŽY×[#¿3ÊnënËÅì¯Ýp«Ý^ÏGø½z•éW°¹¹¨Øµ˜&Ûåuäžr¢K]ïÕÞ]�;µü¯;f^ÍÍ&‹SiËJÁéÄçJ¨?üpÿ5˜ÃµR@Ö«Ö“fXÅQSÙF[,оÿ÷\°ñí€TèÊ7ªAÐÊÃ#+#+/v¶LÿCÒ³78m‰V™H#ûõšÀÿlC±83,";I§¬ÓÑ©�èi[3,DÖlJ�l×Oõ^Þ¹[@[àÐ,5Öí@²i“<öóxE5Ý΋¸Ñ\Üɤ)5¤‚¢Å£î‡!, …Té^7<’DѤ$PYô�¨ÈØ4Î{PGê¥ÈxxzaÀ2¹6]yg³FÉ¢‰IpUDA´êˆäKÇ(¢’ÔÔKÓDÍôÞÞ–FDR�.‘VŽZH�Å#*4©â»ßº�Ôt®\“w]‰×]1Vj�.ëþS�V(€ y¥f†‰B0h•²•¸�i+õUÏM¯çZc?êz`™Aÿ#+)6JªåšÂŠ…Ih^* P!)¦Jˆ®c;ŸÃ04ºˆŠjgê3•V�(ûj¶î¹}Fo÷ÔÛå×|fâ+UœáYí«˜“<Ô1ÖGÎgöâõE¬@åŽÆ{T¹¦Ê!É#*’pC¡-ÙÙ]Òt)9b¹î§w®†ÆtD#+„Ÿ(á w¸fthQIšzÝlÊŽ7°ÇZÌ™¸Z2©kÕ�‡ú1{5ŒMÖ/b„m½:Þ>ÇáŠ0ö TNÍh³f ØÒ‚Æ7=캙[ânß×`›#*KHÝ£¿ç�_�ºö7Öí6IFFü}v¾Ë¸Yè3�”LºÝsr%â¡ÊÊQþãKìHÇàçH¯LŽVÚiþ}!F1dQ?ÅÜ{—u6Š1¢¼s2ɼW.V5_¶òš�>Ç�½7~>¯Ðð™Ÿí·×ü¾×Ó{]£·5®êíˆÆ‹1MIëºåyçmICBE:42*Μ« „‹Å#+ÄC¥¼mËX½/'æõÑJ_*#+¾Ç³ÌÆÆã(ß¹5È|R[&·mÅðï£Ï!å5‹%Gþ4´Ñ#+E�ñhTMhí½D=Y£ ÿ°j] Ó&¾TM³cùQ9ä¨aˆ®•µ›3Å$ÀÁDT†µñl)·S|%Ô�Î%о}Ño‹â2›ÕÖˆ\´CÐ’Õc”¨ÄJHP‚vÔ&®µJnσ«5“¨¶•D׺ïšcã·<€í\XZvö]¤AI2U#xÕXj…¦F‘HñªKvŒðx†KQðÄea¶–œjÉ2ÔQµNÆŒ¡¾ø-ˆ©Â¼î…g�mC͘PC‹24;¨gr]Ì�ìŽx=¶O#*ñ–š†~>cò‰\'Ö;˦Xô‚?ÆçÆz@á„e\ŸkЇ?®ãé‘PöbŒÎТMˆJ(‚vÕ Ÿq]t•ˆ!ER,PãEJi¸®©�ùãyaîÚ»Y:¡¨ã…ufþÿuXšr'@�iN !Îú½FâéîƒÖšÍ˜tiɬ% (V¥9¨"·åEÊÅÓ-Ø�\ª÷²êe�c{ÔCefBÖçØõ�dMæµýZ5›‡¬‹§Âtw¿iW/Ù¤$t[ÿ°�¤)àC‹)É~™ÇÛx_/ø#*b+¹wß$™ã6ÞXÊÆ+Ææ¤Ï¢¦ˆ§?->Ó#)J±ªŽkiTLine truncated
|
||||||
|
#<==
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
opt.load("compiler_cxx")
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
conf.load("compiler_cxx flex bison")
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
subdirs = ["util", "shapes", "main", "distrib", "parser"]
|
||||||
|
sources = []
|
||||||
|
for s in subdirs:
|
||||||
|
sources += bld.path.ant_glob("%s/*.cc" % s)
|
||||||
|
lexer_source = "parser/parser.l"
|
||||||
|
parser_source = "parser/parser.yy"
|
||||||
|
sources += [lexer_source, parser_source]
|
||||||
|
bld.program(
|
||||||
|
source = sources,
|
||||||
|
cxxflags = ["-Wall", "-O2"],
|
||||||
|
target = "fart",
|
||||||
|
includes = subdirs + ["."],
|
||||||
|
lib = ["fl", "pthread", "freeimage"])
|
||||||
Reference in new issue
Block a user