Gah, a tutorial on DLLs would be nice
I cant find out how to include the DLL in the exe
Edit:
Wow, sorry for making multiple posts, didnt notice the edit button before ^_^.
Anyway, when i try:
Load DLL "DBDTest.dll",1
Call DLL 1,"?TestBox@@YAXXZ"
end
Remstart
We force inclusion of a DBPro library by using a command from that library.
Just comment out the ones that you don't want from this list to reduce the size
of your executable.
Remend
`delete animation 1 : ` Animation
dot 0,0 : ` Basic2D
`load object "",1 : ` Basic3D
`load bitmap "",1 : ` Bitmap
`autocam off : ` Camera
cls : ` Core
`ftp connect "","","" : ` FTP
`close file 1 : ` File
`load image "",1 : ` Image
`hide mouse : ` Input
`delete terrain 1 : ` LODTerrain
`delete light 1 : ` Light
`delete matrix 1 : ` Matrix
`delete memblock 1 : ` Memblock
`free net game : ` Multiplayer
`delete music 1 : ` Music
`delete particles 1 : ` Particle
`show window : ` Setup
`delete sound 1 : ` Sound
`sprite 1,0,0,1 : ` Sprite
`disable systemkeys : ` System
`text 0,0,"" : ` Text
`normalize vector2 1,1 : ` Vector
`delete bsp : ` World3D
The screen just flashes for a second then goes away, same if i put a
wait key before the
end.
Here is dll code:
#include "stdafx.h"
#include <DBPro.hpp>
#include <cstdio>
using namespace DBPro;
EXPORT void TestBox()
{
SyncOn();
SyncRate(60);
Cls();
Box(200,200,300,300,RGB(0,0,255),RGB(0,0,150),RGB(100,100,255),RGB(0,0,255));
Sync();
WaitKey();
}
BOOL APIENTRY DllMain( HANDLE Module, DWORD Reason, LPVOID Reserved )
{
switch(Reason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Even when i run your DBP Examples it says something like:
Could not understand command:
SET TILE SIZE 64, 64
Even if I copy the Matrix DLL into the folder it gives that error.