PDA

View Full Version : using CL_CollisionOutline from ClanLib



Zaxuhe
08-05-2012, 11:15 PM
what would I need to add in proton to use CL_CollisionOutline? it's a great part of ClanLib and wanting to use it on the project I'm working on, but it is on proton, any guide?

Tried to move some files but I guess I'm missing some dependencies so before destroying everything I want to know if there is a simple way to do it?

Thanks!

Seth
08-06-2012, 12:08 PM
what would I need to add in proton to use CL_CollisionOutline? it's a great part of ClanLib and wanting to use it on the project I'm working on, but it is on proton, any guide?

Tried to move some files but I guess I'm missing some dependencies so before destroying everything I want to know if there is a simple way to do it?

Thanks!

Hmm, it looks like CL_CollisionOutline has a lot of CL dependencies:


#include "Display/precomp.h"
#include "API/Core/IOData/virtual_file_system.h"
#include "API/Core/IOData/virtual_directory.h"
#include "API/Core/IOData/path_help.h"
#include "API/Display/Collision/collision_outline.h"
#include "API/Display/Collision/outline_provider_bitmap.h"
#include "API/Display/Collision/outline_provider_file.h"
#include "API/Display/Collision/outline_circle.h"
#include "API/Display/Window/display_window.h"
#include "API/Display/Render/graphic_context.h"
#include "API/Display/Image/pixel_format.h"
#include "API/Display/ImageProviders/provider_factory.h"
#include "API/Display/Image/pixel_buffer.h"
#include "API/Display/2D/draw.h"
#include "API/Display/Render/pen.h"
#include "API/Core/Resources/resource_manager.h"
#include "API/Core/Resources/resource_data_session.h"
#include "API/Core/System/exception.h"
#include "API/Core/IOData/path_help.h"
#include "resourcedata_collisionoutline.h"
#include "collision_outline_generic.h"
#include "API/Core/Text/string_format.h"

My guess is there would be two ways:


Bring in as much Clanlib as you need, which would end up being a LOT most likely. It's probably possible to co-exist with Proton ok (like Irrlicht can, for instance), but I would guess that pieces of it are not cross platform enough, so you'd end up replacing those pieces with Proton calls. (I'm thinking file handling, getting the time, stuff like that)
Carefully rework the collision outline code, cut out just the pieces you need and make a new class designed to work with a proton SoftSurface to get the pixel data instead of CL's pixel buffer, etc. I don't know how much work this would be...