|
Post by davy on Aug 12, 2006 16:00:12 GMT -5
Here is the c++ for it...
/// Remove decimal /// void DLLFUNC Func_NoDecimal(IDLL_Basic4GL_Runtime &basic4gl) { const float in = basic4gl.GetFloatParam(1); float result; result = ((int)in); basic4gl.SetFloatResult(result); }
/// Leave decimal only /// void DLLFUNC Func_Decimal(IDLL_Basic4GL_Runtime &basic4gl) { const float in = basic4gl.GetFloatParam(1); float result; result = in-((int)in); basic4gl.SetFloatResult(result); }
|
|
|
Post by matthew on Aug 12, 2006 16:05:03 GMT -5
Excellent 
|
|
|
Post by davy on Aug 12, 2006 16:07:35 GMT -5
|
|
|
Post by James :) (aka Madcow) on Sept 5, 2006 17:26:29 GMT -5
ae you gonna update for basic 2.4.3
|
|
|
Post by davy on Sept 5, 2006 17:30:05 GMT -5
I guess if anyone wants the commands... But I've been working on a lot of other stuff lately so I'll probably drop that experiment.
|
|
|
Post by James :) (aka Madcow) on Sept 6, 2006 13:14:53 GMT -5
i remebered a while ago tom taught you how to do opengl in a plugin how do you that?
|
|
|
Post by davy on Sept 6, 2006 13:22:44 GMT -5
You just have to include the headers and link them in the compiler. I dont remember which ones, I usually just include...
#include <gl\gl.h> #include <gl\glu.h>
and then I link the "opengl32" and "glu32" libraries.
|
|
|
Post by James :) (aka Madcow) on Sept 6, 2006 13:30:43 GMT -5
oh then you can type the code you type in bsic4gl
|
|
|
Post by davy on Sept 6, 2006 13:34:19 GMT -5
You can create functions and commands FOR basic4gl USING c++
|
|
|
Post by James :) (aka Madcow) on Sept 6, 2006 13:39:44 GMT -5
i know but the opengl code
|
|
|
Post by davy on Sept 6, 2006 13:44:36 GMT -5
You can use OpenGL, yeah... OpenGL IS OpenGL, it's syntax is the same no matter what its implimented on (unless its a poor implimentation) but Tom wrote basic4gl very true to the OpenGL syntax... Just remember that casing matters in c++
GLbegin(gl_quads)
is not the same as
glBegin(GL_QUADS)
and you have to put a ";" after each command...
glBegin(GL_QUADS);
|
|
|
Post by James :) (aka Madcow) on Sept 7, 2006 9:54:50 GMT -5
ok so that was why codeblocks was complaining
|
|
|
Post by davy on Sept 7, 2006 12:57:59 GMT -5
Yeah, c++ is also case sensitive about variable names... For instance...
#include <iostream>
int main(){ float x; float X; x=10.5; X=3.25;
std::cout << (x+X); return 0; }
Would actually be two variables, x and X.
|
|
|
Post by James :) (aka Madcow) on Sept 8, 2006 9:29:28 GMT -5
yeap
|
|
|
Post by James :) (aka Madcow) on Sept 8, 2006 9:29:44 GMT -5
a bit like action script in flash
|
|