Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, AndrewAMD, howardR), 1,095 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: GSHashmap DLL [Re: pegamode] #327518
06/06/10 20:46
06/06/10 20:46
Joined: Oct 2006
Posts: 36
BigM Offline
Newbie
BigM  Offline
Newbie

Joined: Oct 2006
Posts: 36
Hello all,

Users of the latest lite-C free version (at least version 7.84) may have noticed that GSHashmap.dll fails to load. The most obvious symptom is the "Empty prototype called in ..." run-time error. This happens because support for engine plugins has been removed from the free version (it seems it should have never been there in the first place; read more here). This change also seems to break automagic function loading from DLLs. The way to load such functions is now by prototyping and defining PRAGMA_API (read the manual).

I rewrote GSHashmap.h (with feedback from pegamode; thanks!) to be compliant with the newer lite-C free. I use the API macro, which is equivalent to the #define PRAGMA_API statement but more readable.
Code:
/***************************************************************************************

Header for GSHashmap DLL

Version 1.0 - by Pegamode - 2008-11-01

modified 06-06-2010 by BigM to use the API macro, for compatibility with lite-C free

****************************************************************************************/

#ifndef GSHashmap_header
#define GSHashmap_header

	var createDynamicGSHashmap();
	void destroyDynamicGSHashmap(var);
	void addToDynamicGSHashmap(var, char*, var);
	var getFromDynamicGSHashmap(var, char*);
	void clearDynamicGSHashmap(var);
	void removeFromDynamicGSHashmap(var, char*);
	var isInDynamicGSHashmap(var, char*);
	var sizeOfDynamicGSHashmap(var);
	var sizeInBytesOfDynamicGSHashmap(var);
	void addToGSHashmap(char* key, var value);
	var getFromGSHashmap(char* key);
	void clearGSHashmap();
	void removeFromGSHashmap(char* key);
	var isInGSHashmap(char* key);
	var sizeOfGSHashmap();
	var sizeInBytesOfGSHashmap();

	API(createDynamicGSHashmap, GSHashmap)
	API(destroyDynamicGSHashmap, GSHashmap)
	API(addToDynamicGSHashmap, GSHashmap)
	API(getFromDynamicGSHashmap, GSHashmap)
	API(clearDynamicGSHashmap, GSHashmap)
	API(removeFromDynamicGSHashmap, GSHashmap)
	API(isInDynamicGSHashmap, GSHashmap)
	API(sizeOfDynamicGSHashmap, GSHashmap)
	API(sizeInBytesOfDynamicGSHashmap, GSHashmap)
	API(addToGSHashmap, GSHashmap)
	API(getFromGSHashmap, GSHashmap)
	API(clearGSHashmap, GSHashmap)
	API(removeFromGSHashmap, GSHashmap)
	API(isInGSHashmap, GSHashmap)
	API(sizeOfGSHashmap, GSHashmap)
	API(sizeInBytesOfGSHashmap, GSHashmap)
	
#endif


I did only minor testing and cannot guarantee all functions will work with lite-C free. The essential functions createDynamicGSHashmap, addToDynamicGSHashmap, getFromDynamicGSHashmap and isInDynamicGSHashmap seem to be ok.

Hope this helps the lite-C free community!

Cheers

Re: GSHashmap DLL [Re: BigM] #351219
12/22/10 20:39
12/22/10 20:39
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Any chance someone will make this work on A6 too? tongue We might be small , but it still counts as a community :}


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1