Hey Guys!
I've created a plugin for gamestudio!
Maybe you think, not another plugin...
But i think my plugin gives you many possibilities to create some code.
Some features of my plugin:
  • Lists
  • Queues
  • Stacks
  • FTP
  • HTTP
  • Registry
  • INI-Files
  • Threading
  • Color conversion
  • Bitmap functions
  • File functions
  • Binary file functions
  • Folder functions
  • Logs
So if you need only one of those functions, please test this plugin.

You can download it here:
DOWNLOAD!

And now some examples, because i did't wrote a documentation yet...

List functions:
Code:
int iList = list_create();
list_add(iList,you);    //Add you to the list
list_add(iList,me);     //Add me to the list
list_remove(iList,you);   //Remove you from list
int iLen = list_length(iList);
int i;
for(i = 0; i < iLen; i++)
{
    ENTITY* ent = list_getitem(iList,i);
    ent.x += 5;
}


You can store every pointer or value in a list.

Registry:
Code:
registry_open(REG_HKEY_LOCAL_MACHINE);

registry_writestring("SOFTWARE\\WinHelper","PlayerName","Felix"));
registry_writevar("SOFTWARE\\WinHelper","PlayerHeight",1.780);
registry_writeint("SOFTWARE\\WinHelper","PlayerAge",17);
registry_writedouble("SOFTWARE\\WinHelper","PlayerWeight",83.2);

STRING* str_buffer = str_create("#1024");
	
registry_readstring(str_buffer,"SOFTWARE\\WinHelper","PlayerAge");
error(str_buffer);



The same with INI-Files
Code:
ini_init();
ini_writestring("data.ini","PlayerInfo","Name","Felix");
ini_writeint("data.ini","PlayerInfo","Age",17);
ini_writevar("data.ini","PlayerInfo","Height",1.780);
ini_writedouble("data.ini,"PlayerInfo","Weight",83.2);

ini_readstring(str_buffer,"data.ini","PlayerInfo","Name");
error(str_buffer);



An example of HTTP:
Code:
net_http_open();
STRING* result = net_http_post("http://www.google.de","",""));
error(result);



New Example with threading functions:
var value = 0;
Code:
function cnt_up(void* data)
{
	while(1)
	{
		value++;
		thread_wait(1);  //Never use the normal wait here!!!!
	}
}

//To call it:
int thread1 = thread_create(cnt_up,NULL);  //Create the thread with no params
wait(-2);
thread_kill(thread1);  //Kill the thread


You have to kill every running thread at the end of your game, because you'll get a crash if not

Hope you get my coding style.
Please requests and bugs in this thread...

Felix

Last edited by Richi007; 01/04/11 12:43. Reason: New example

Visit my site: www.masterq32.de