Answer to your questions in order:
Yes, code your algorithms in DBPro, then convert to C++, either for the whole program, or for your own commands.
Performance - there is a small overhead involved, but the C++ optimiser will remove most (if not all) of this.
Yes you will need the DBPro compiler for two very good reasons:
1) I have no idea what initialisation or shutdown steps DBPro needs to get everything running and it would take a lot of effort to find out.
2) It would encourage piracy if all you needed was the libraries.
The libraries I have implemented so far are: Basic2D, Bitmap, Core, Image, Input, Memblocks, Sprites, System and Text.
I have changed the way I've implemented the library already - Although namespaces are a great idea, I decided that I was nesting them too deeply, so I have removed a level. This means that I have to deal with naming conflicts between the libraries. For example both sprites and images have a function named 'Delete'. I also had a problem with functions that return floats which I have now fixed.
Here is som example code, with added calls to core, sprite and image libraries.
// InterfaceTest.cpp : Defines the entry point for the DLL application.
//
#include <cstdio>
#include <DBPro/Interface.hpp>
#include <DBPro/Basic2D.hpp>
#include <DBPro/Bitmap.hpp>
#include <DBPro/Core.hpp>
#include <DBPro/Image.hpp>
#include <DBPro/Input.hpp>
#include <DBPro/Sprites.hpp>
#include <DBPro/System.hpp>
#include <DBPro/Text.hpp>
// Remove warnings about conversions between floats and ints
#pragma warning(disable:4244)
using namespace DBPro;
void main()
{
char Buffer[1024];
float Angle=0.0;
int S;
// Basic setup
SyncOn();
SyncRate(60);
HideMouse();
// Set up a sprite
Cls();
BoxGradient(0,0,50,50,Rgb(255,0,0),Rgb(0,255,0),Rgb(0,0,255),Rgb(255,255,255));
GrabImage(1,0,0,50,50,1);
Sprite(1,0,0,1);
SpriteOffset(1,25,25);
do
{
// Clear the screen
Cls();
// Check for keypresses
S=ScanCode();
sprintf(Buffer, "Key pressed : %d", S);
Text(0,0,Buffer);
// Position and rotate the sprite
int SpriteX=(int) NewXValue(0.0, Angle, 50.0);
int SpriteY=(int) NewZValue(0.0, Angle, 20.0);
Sprite(1,120+SpriteX,120+SpriteY,1);
RotateSprite(1, Angle);
// Update the framebuffer
Sync();
Angle+=3.0;
} while (S != 1);
}
You'll see that it reads almost the same as the equivalent DBPro program at the moment - but I will have the ability to group functionality into classes later.