Gamestudio Links
Zorro Links
Newest Posts
Performance reporting showing Annual and monthly % returns
by OptimusPrime
Today at 01:19
Issue with inconsistent test results
by kvm
Yesterday at 17:24
Access string content through another string
by ChrstphFr
Yesterday at 11:30
How to return a vector from a function
by Superku
Yesterday at 05:39
Vector Displacement, realtime Blendshapes
by jumpman
08/14/18 23:46
Code Repository
by OptimusPrime
08/14/18 13:25
Votes for future features
by OptimusPrime
08/14/18 07:18
AUM Magazine
Latest Screens
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
Who's Online
6 registered (Dalla, kvm, jenGs, firecrest, alibaba, bailemad), 452 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Ulenspegel, toto, FloMi, behr065, OptimusPrime
18027 Registered Users
Topic Options
Rate This Topic
#472602 - 05/07/18 19:34 In Beta - New Dynamic Array Library
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 338
Loc: Chicago
Hi guys,

I wrote a basic dynamic array library for use with Lite-C.

The purpose of this library is to provide a higher-level approach to memory allocation. The overhead should be non-existent (as long as the library is used correctly).

Included is an example script. In it, we create an arbitrary struct, fill it with values, and we push back. This behavior is much like a C++ std::vector; in fact, a C++ std::vector is used in the backend.

I'm sure you will have questions and/or feature requests. Please let me know in this thread.

Source code is here:
https://github.com/AndrewAMD/DynamicArray

The current build is attached.

I do apologize for the lack of documentation - right now, it is all in the include/dynamic.h header. Formal documentation to follow.

Thanks,
Andrew

EDIT: File removed. Scroll down for the latest build.


Edited by AndrewAMD (05/08/18 03:28)
Edit Reason: new build

Top
#472605 - 05/07/18 22:23 Re: In Beta - New Dynamic Array Library [Re: AndrewAMD]
MatPed Offline
Senior Member

Registered: 02/28/15
Posts: 449
Loc: Milano, Italy
Thank you, nice share.

Top
#472608 - 05/08/18 03:27 Re: In Beta - New Dynamic Array Library [Re: MatPed]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 338
Loc: Chicago
New function, new build!

Added darr_destroy_all(). It clears all of the dynamic arrays from memory (in the DLL).

I recommend running this function either at the beginning of main or at the beginning of INITRUN. I believe Zorro does not clean this stack between runs of the script.


Attachments
DynamicArray_beta20180507c.zip (30 downloads)


Top
#472698 - 05/15/18 05:22 REVISED - Dynamic Array Library [Re: AndrewAMD]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 338
Loc: Chicago
Major revision, new build!

Known changes:
* Added insert functionality.
* Can add multiple elements at a time.
* "destroy" was renamed to "delete" for consistency of syntax purposes. (That is, OOP regulars know what "new" and "delete" implies.)
* darr_ renamed to da_ to make functions less annoying to type.
* The example is far clearer in its demonstration of functionality, and well-commented.
* The Zorro header is the same file as the DLL header.

Other than fixing the documentation, I hope that this will be my last build before we go to first release.

I appreciate any feedback. If I receive no complaints in the next week, I will recommend it for redistribution with Zorro.

Cheers,
Andrew


Attachments
DynamicArray_beta20180514.zip (20 downloads)


Top
#472873 - 05/27/18 11:25 Re: REVISED - Dynamic Array Library [Re: AndrewAMD]
sdh309795gaas Offline
Member

Registered: 12/07/14
Posts: 100
Looks awesome, thanks for sharing!

Top
#473243 - 06/23/18 17:18 RELEASED - Dynamic Array Library [Re: sdh309795gaas]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 338
Loc: Chicago
I guess no news is good news?

RELEASED FOR PRODUCTION!

Attached is the latest build.

Regarding documentation:
* Overview and build instructions: https://github.com/AndrewAMD/DynamicArray
* Function descriptions are in the header.
* The example script should have more than enough info to get you started.

Thanks,
Andrew


Attachments
DynamicArray_release_20180623.zip (17 downloads)


Top
#473431 - 07/05/18 16:12 Re: RELEASED - Dynamic Array Library [Re: AndrewAMD]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 338
Loc: Chicago
The software is now in the downloads section under Zorro Tools:
http://zorro-project.com/download.php

Top



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

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