Search found 823 matches
- Jun 20, 2020 6:08
- Forum: Sources, Examples, Tips and Tricks
- Topic: PHP-like associative arrays
- Replies: 45
- Views: 16932
Re: PHP-like associative arrays
Sir Valdez (srvaldez)! Some code for you: https://github.com/DotStarMoney/13C/blob/master/CoTGH/hashmap.bi Turning back the clock to 2016 and I remember the 64 bit implementation was borked: for the FBGD competition I used it and I *seem* to remember fixing the 64bit hash code. Give the code at the ...
- Feb 12, 2019 23:48
- Forum: Community Discussion
- Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize
- Replies: 360
- Views: 70618
Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize
The Secret Gallery https://drive.google.com/file/d/1mfyQ4j0D5EILLbdyicHFGULBT5Kp4xu3/view Hi folks! Sorry about the technical difficulties, above is a version compiled that should work on machines that were having trouble running the game before. Oh and if you don't like reading the hints in game: ...
- Dec 08, 2018 7:51
- Forum: General
- Topic: Been a while...
- Replies: 4
- Views: 1443
Re: Been a while...
Yeah so not being an bright and just specifying "-l stdc++" doesn't get me anywhere, it compiles but with the usual undefined reference errors.
- Dec 08, 2018 0:24
- Forum: General
- Topic: Been a while...
- Replies: 4
- Views: 1443
Re: Been a while...
I wasn't! I get "invalid command line option" when I try this (i.e. directly adding -lstdc++ to my compiler invocation). Is this wrong/dumb/both?
- Dec 06, 2018 8:10
- Forum: General
- Topic: Been a while...
- Replies: 4
- Views: 1443
Been a while...
Hey all... great to be back (for Lachie's last hurrah competition)...! Quick Q here: I have a C++ library I want to link into an FB program, and when I try to compile I get hit with linker errors like "undefined reference to `__std_terminate'", which I think means it can't find the c++ run...
- Nov 21, 2016 20:58
- Forum: Sources, Examples, Tips and Tricks
- Topic: AES Encryption/Decryption Algorithm
- Replies: 22
- Views: 18114
Re: AES Encryption/Decryption Algorithm
Hey! Guy who wrote the code here! It should be (heh) to AES spec as back when I wrote it (sheesh 9 years ago) I ran it on the AES test vectors and it was fully correct. However you guys are right, do not use this for any serious encryption application. Why? As said previously, AES is pretty suscepti...
- Apr 18, 2016 19:49
- Forum: Sources, Examples, Tips and Tricks
- Topic: 2D shadows
- Replies: 26
- Views: 7134
Re: 2D shadows
Yo @badidea, I think this is what you're looking for: https://www.dropbox.com/s/dgxth9osypwd9im/PointLight.zip?dl=0 Incidentally I updated that code many years later to use it for something! To anyone who doesn't know, this is a pixel based 2D light casting routine, so ideal for all ur baz needs. It...
- Mar 28, 2016 16:22
- Forum: General
- Topic: Multiple function definitions for fake templating
- Replies: 5
- Views: 1403
Re: Multiple function definitions for fake templating
Thanks guys, I had most of that but St_W's solution to use FB_MAIN is close to what I needed. Unfortunately this requires that the code is included at least once in the main module. Is there a way to do it so that its included in exactly ONE of the modules even if not included in FB_MAIN?
- Mar 28, 2016 8:02
- Forum: General
- Topic: Multiple function definitions for fake templating
- Replies: 5
- Views: 1403
Multiple function definitions for fake templating
Hey so I wrote a header with some template macros that generate types/methods based on a data type provided to the macro (standard C style fake templating). What I wasn't paying attention to was that including the header in multiple .bas units would confused the linker since their would be multiple ...
- Feb 23, 2016 20:42
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Ultimate FB HashMap
- Replies: 10
- Views: 5163
Re: The Ultimate FB HashMap
Right right, I know there are tons of these lying around, I just thought mine was pretty quick :)
- Feb 23, 2016 8:11
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Ultimate FB HashMap
- Replies: 10
- Views: 5163
The Ultimate FB HashMap
I know we've all done 96 of these, but are yours as overboard as this? I'm updating my personal FB libraries and wanted to redo my associated array via templated Hash map, so I did. Design choices: Key types are strictly long and zstring for now, and are not explicitly OOP constructs. Key types must...
- Feb 12, 2016 7:03
- Forum: General
- Topic: Calling realloc from assembly block
- Replies: 7
- Views: 2000
Re: Calling realloc from assembly block
I didn't even know about FB exported functions until you said so! I'll certainly keep that in mind going forward. I ended up calling a different procedure inside the routine anyway, mostly wanted to keep the common case fast since reallocates should be rare in this code.
- Feb 12, 2016 3:55
- Forum: General
- Topic: Calling realloc from assembly block
- Replies: 7
- Views: 2000
Re: Calling realloc from assembly block
actually, "call reallocate" works just fine!
- Feb 12, 2016 0:58
- Forum: General
- Topic: Calling realloc from assembly block
- Replies: 7
- Views: 2000
Re: Calling realloc from assembly block
Okay okay I'm dumb yeah I see it HA, forgive me I was having a special moment
- Feb 12, 2016 0:21
- Forum: General
- Topic: Calling realloc from assembly block
- Replies: 7
- Views: 2000
Re: Calling realloc from assembly block
Even weirder, if I debug it in x32dbg it runs without a problem (can even print stuff after the block), so whats wrong here? Here's the source listing from the member function making the call: sub DArray.reserve naked cdecl(byref _this as DArray, _elements as size_t) asm #ifdef __FB_64BIT__ #else mo...