forum-msg-id-136551-edit

Original date:2021-12-02 00:37:31 Edited by: Icy_Viking Subject: Game Library Running on Top of SDL2

Hello all,

I am starting work on my own little game library. It will be running on top of SDL2. Of course I am making it as very C as possible, so that I can easily make a Euphoria wrapper for it, which I have done for testing purposes.

It is in the very early stages, but it is coming along nicely. If anyone has ideas or suggestions, feel free to talk about them. I want something kinda like MonoGame/XNA for C/Euphoria. Anyways that's my starting point/idea.

C Code

extern "C" IVGL_API int IVGL_Vector2Add(int num, int num2); 
 
int IVGL_Vector2Add(int num, int num2) 
{ 
	return num + num2; 
} 

--Wrapper code 
public constant xIVGL_Vector2Add = define_c_func(ivgl,"+IVGL_Vector2Add",{C_INT,C_INT},C_INT) 
 
public function IVGL_Vector2Add(atom num,atom num2) 
 
 return c_func(xIVGL_Vector2Add,{num,num2}) 
	 
end function 
 
--Test program 
include "EuIVGL.ew" 
 
 
atom x = 10 
atom y = 5 
 
--atom total = IVGL_Vector2Add(x,y) 
 
position(1,1) 
printf(1,"%d\n",{IVGL_Vector2Add(x,y)}) -- this adds 10 + 5 for the result of 15 
Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu