Search found 1708 matches
- Thu Aug 31, 2023 1:57 am
- Forum: Coding Questions
- Topic: Fetching JSON value
- Replies: 5
- Views: 796
Re: Fetching JSON value
Some people prefer the Structure method, but I like the module/includefile approach like Little John :D You can also check out my JSON_helper.pbi here (just an includefile, not module) https://github.com/kenmo-pb/includes/blob/master/JSON_Helper.pbi The equivalent of Little John's example would be: ...
- Fri Aug 18, 2023 3:05 am
- Forum: Bugs - Documentation
- Topic: Unclear doc for UncompressMemory, Base64Decoder, and Base64DecoderBuffer
- Replies: 6
- Views: 944
Re: Unclear/nonsensical doc for UncompressMemory, Base64Decoder, and Base64DecoderBuffer
Hi nsstudios. The help is maybe not clear enough, but it's not nonsensical. You do understand these key facts, right: - Compressed memory is smaller than the uncompressed original - by an amount that varies depending on the data - Base64 encoded memory is LARGER than the original - by a fixed amount...
- Fri Aug 11, 2023 12:21 pm
- Forum: Game Programming
- Topic: Joysticks
- Replies: 18
- Views: 3553
Re: Joysticks
Yeah, in PureBasic "Prototypes" are a more advanced feature, it's like calling a function or procedure except the function is loaded at run-time from a DLL (or equivalent on Mac/Linux). For example, if you're programming a game using SDL2.dll for gamepad input, it's not efficient to do thi...
- Fri Aug 11, 2023 1:16 am
- Forum: Game Programming
- Topic: Joysticks
- Replies: 18
- Views: 3553
Re: Joysticks
OK, here is a very quick example of reading "Game Controllers" using SDL2.dll on Windows... It should recognize whatever gamepads you plug in, and remap them all to a standard "Xbox like" mapping (Left Stick, Right Stick, Analog Triggers, 15 buttons...) This is bad coding style, ...
- Sun Aug 06, 2023 8:14 pm
- Forum: Game Programming
- Topic: SGL (Simple GL)
- Replies: 39
- Views: 7162
Re: SGL (Simple GL)
I haven't had time to play with this yet, but it looks good and I like your code style, Luis
- Sun Aug 06, 2023 8:12 pm
- Forum: Game Programming
- Topic: Joysticks
- Replies: 18
- Views: 3553
Re: Joysticks
Unfortunately I don't have a simple SDL2 / GameController example ready, maybe I could write a small one this week. Assuming you're on Windows, you just need to grab the latest SDL2.dll or SDL2.lib and start loading or importing functions into PB... But here are some links I can point you to: My own...
- Sat Aug 05, 2023 6:22 pm
- Forum: Game Programming
- Topic: Joysticks
- Replies: 18
- Views: 3553
Re: Joysticks
Hi coco2, I went through this a few years ago... attempting to identify joysticks, and map them all to standard interface, stored as a database... I had a basic version of it working... then I found a much better way that already exists. If you're serious about supporting a variety of game controlle...
- Fri May 19, 2023 5:05 am
- Forum: Tricks 'n' Tips
- Topic: Reading Exif Data without foreign libraries or programs
- Replies: 7
- Views: 941
Re: Reading Exif Data without foreign libraries or programs
Thank you for this!!! Useful for batch renaming JPEGs to their original timestamp, rather than "IMG_1234.jpg" or whatever.
- Tue Oct 18, 2022 4:12 am
- Forum: Feature Requests and Wishlists
- Topic: String length should be stored for string variables
- Replies: 51
- Views: 11050
Re: String length should be stored for string variables
Hi @BarryG , that was 2 years ago so I don't know exactly what bugs I was thinking of. But off the top of my head: - sometimes in PB, people allocate a string variable, and then poke a different string over it (or an API call writes over it) - sometimes people poke a NUL char to truncate a string sh...
- Sun Sep 18, 2022 2:37 pm
- Forum: Coding Questions
- Topic: How to get selected Open With file & path sent to program
- Replies: 9
- Views: 671
Re: How to get selected Open With file & path sent to program
Hi, On Windows you definitely want to check ProgramParameter(0) to get the path sent to program. If you need to support multiple paths sent at the same time, use CountProgramParameters() and check from from index 0 to index (Count-1). If you ever want to do this on Mac, it's more complicated, you ne...
- Sun Sep 18, 2022 2:19 pm
- Forum: The PureBasic Editor
- Topic: Retain source file tab order in IDE?
- Replies: 2
- Views: 1009
Re: Retain source file tab order in IDE?
You are in luck, this feature was merged into the IDE project 8 days ago, so it should be in the next official release:
https://github.com/fantaisie-software/p ... c/pull/197
https://github.com/fantaisie-software/p ... c/pull/197
- Thu Sep 08, 2022 2:52 am
- Forum: The PureBasic Editor
- Topic: Remember the current procedures positions on the right panel
- Replies: 23
- Views: 8973
Re: Remember the current procedures positions on the right panel
Do you have or would it be possible to have a branch, based on the official branch, which would regroup all your main additions, your improvements. It's sometimes this kind of little thing that make the difference in use. This is on my to-do list... it's almost there... a public fork which merges m...
- Thu Sep 08, 2022 2:48 am
- Forum: The PureBasic Editor
- Topic: Remember the current procedures positions on the right panel
- Replies: 23
- Views: 8973
Re: Remember the current procedures positions on the right panel
Thanks for implementing this cross-platform! I often don't have the knowledge or the toolchain setup to code and test a feature across 2-3 different OSfreak wrote: ↑Sat Sep 03, 2022 4:11 pm Cross-platform version: https://github.com/fantaisie-software/p ... c/pull/211
- Wed Aug 31, 2022 1:57 am
- Forum: The PureBasic Editor
- Topic: Remember the current procedures positions on the right panel
- Replies: 23
- Views: 8973
Re: Remember the current procedures positions on the right panel
You caught me at a good time... I pushed a (Windows) IDE build with the procedure browser change. GitHub branch showing changes: https://github.com/fantaisie-software/purebasic/compare/devel...kenmo-pb:purebasic:preserve-proc-browser-build The file PureBasic-PreserveProcBrowser.exe https://github.co...
- Mon Aug 29, 2022 3:43 am
- Forum: The PureBasic Editor
- Topic: Remember the current procedures positions on the right panel
- Replies: 23
- Views: 8973
Re: Remember the current procedures positions on the right panel
Yes of course it is currently wrapped in a CompilerIf and has no effect on Mac/Linux. But in my experience, features are not officially merged unless they are implemented for all OS, for example this one from last summer: https://github.com/fantaisie-software/purebasic/pull/167 "I really don't ...