HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Native pack

08-19-2006, 03:51 AM#1
PipeDream
Some new natives for data types and timing. I'm posting here for testing and suggestions. It's just a wrapper for STL, so anything that is in the STL that you would like can be added trivially.
Collapse JASS:
native StopWatchCreate    takes nothing returns integer
native StopWatchMark    takes integer stopwatch returns real //seconds
native StopWatchDestroy    takes integer stopwatch returns nothing

native ArrayAlloc        takes integer len returns integer
native ArraySetI        takes integer arr, integer index, integer value returns integer
native ArrayGetI        takes integer arr, integer index returns integer
native ArrayFree        takes integer arr returns nothing

native consII            takes integer x, integer y returns integer
native carI                takes integer p returns integer
native cdrI                takes integer p returns integer
native destroypair        takes integer p returns nothing

native DequeNew            takes nothing returns integer
native DequePushFrontI    takes integer deque, integer x returns integer
native DequePushBackI    takes integer deque, integer x returns integer
native DequeFrontI        takes integer deque returns integer
native DequeBackI        takes integer deque returns integer
native DequePopFrontI    takes integer deque returns integer
native DequePopBackI    takes integer deque returns integer
native DequeFree        takes integer deque returns nothing

native MapNew            takes nothing returns integer

native MapSetII            takes integer map, integer in, integer out returns integer
native MapGetII            takes integer map, integer in returns integer

native MapSetSI            takes integer map, string in, integer out returns integer
native MapGetSI            takes integer map, string in returns integer

native MapFree            takes integer map returns nothing

native ItoR                takes integer x returns real
native RtoI                takes real r returns integer

At the moment it is insecure and not recommended for production maps.

See demomap.w3x for example use.

I would also like to know how many people are making maps for which a third party loader is appropriate.
Attached Files
File type: rarnativepack.rar (158.1 KB)
08-19-2006, 12:25 PM#2
Toadcop
cool !!! =)
PipeDream can you (try/or it's possible ?) to realyse some kind of CustomValue for any object tmr,trg,ta,destructables and etc... ??? it would be Great !

PS just paste you natives into common.j ???
08-19-2006, 01:03 PM#3
Vexorian
that would rather be a wrapper for the hash table template

Quote:
PS just paste you natives into common.j ???

And use the loader.
08-19-2006, 01:21 PM#4
Anitarf
We've had a debate about 3rd party native packs a while ago.

We came to the fascinating prospect that a natives pack could be made a standard if sufficiently backed up by map developers and respected JASSers.

Many considerations arise at the thought, but it's such a fascinating thought that I feel it's worth attempting to bring it to reality regardless of potential obstacles.

Why not try to make a third party loader appropriate for all maps?
08-19-2006, 01:35 PM#5
Zoxc
Request: GetMouseX/Y and GetScreenWidth/Height natives ^^
08-19-2006, 01:38 PM#6
iNfraNe
Request: MoveTrackable and DestroyTrackable ;)
08-19-2006, 01:38 PM#7
Vexorian
That would require messing with directinput. Me dislikes the fact you need a valid windows copy in order to download the directx SDK, forces us (latinamericans) all to use SDL (although that's not such a bad thing)
08-19-2006, 01:40 PM#8
Alevice
Quote:
Originally Posted by Zoxc
Request: GetMouseX/Y and GetScreenWidth/Height natives ^^

Thar doesn't related to the STL




Anyway, if you can make it work stable enough for single player, you'd be my hero. I remember someone saying that there were tests on reading data from sylk files, how well did that go?
08-19-2006, 09:20 PM#9
Zoxc
Quote:
Originally Posted by Vexorian
That would require messing with directinput. Me dislikes the fact you need a valid windows copy in order to download the directx SDK, forces us (latinamericans) all to use SDL (although that's not such a bad thing)
Get a *valid* Windows copy then... ^^
08-19-2006, 09:22 PM#10
Vexorian
nobody buys software here, and I do not intent going against tradition
08-20-2006, 12:00 AM#11
Alevice
Where are you from Vex?
08-21-2006, 03:36 PM#12
Toadcop
Quote:
nobody buys software here, and I do not intent going against tradition
- =) i respect you ! :cool: ! we rus use 99.9999999% only pirate and cracked software i would never setup on my machine a licenced Windows shit... and pay for it a fucking huge amount of money so about 100$ is crazy !!! i can buy it for 2$ =)

PipeDream - it is possible to create custom events ??? player event = key_event ;) you understand !
Quote:
Where are you from Vex?
- from a real cool place =)
08-21-2006, 09:19 PM#13
Alevice
Quote:
Originally Posted by Toadcop
- from a real cool place =)

I asked that actually because I am mexican.
08-21-2006, 09:22 PM#14
PipeDream
Quote:
PipeDream - it is possible to create custom events ??? player event = key_event ;) you understand !
Yes, if someone gets excited enough for some major reversing. Instead do things asynchronously with timer loops to poll a queue.

I'll look into moving trackables.

Knock off the off topic.
08-22-2006, 06:34 AM#15
Anitarf
GetUnitArmour (with or without bonuses)
GetUnitMin/MaxDamage