Search found 29 matches

by maurosebastian91
Nov 23, 2022 21:24
Forum: Beginners
Topic: string in c++?
Replies: 7
Views: 1292

Re: string in c++?

Extraordinary, I think it's what I'm looking for.

just one more little query.
what does s:s mean on the line
static as string s:s=hello()

Thanks a lot :)
by maurosebastian91
Nov 23, 2022 20:37
Forum: Beginners
Topic: string in c++?
Replies: 7
Views: 1292

Re: string in c++?

splendid, thank you very much for your answers. I thought it would be simpler, but it wasn't. I tell you why. Yesterday I downloaded the code in this topic, https://users.freebasic-portal.de/mod/download/MD5Checksum.zip and all hashing functions work with string. I am thinking of using those functio...
by maurosebastian91
Nov 23, 2022 18:36
Forum: Beginners
Topic: string in c++?
Replies: 7
Views: 1292

string in c++?

Hi mates, good morning. Please, I'm trying to make my code written in FB work in c++, but everything was fine, until I got the following question. If I have a function in a lib or dll that returns a string in FB, how can I execute it in my C++ or C code? example: function hello() as string dim text ...
by maurosebastian91
Aug 08, 2022 15:23
Forum: Libraries Questions
Topic: headers in C and freebasic?
Replies: 2
Views: 5272

Re: headers in C and freebasic?

Without having tested it, translated to the best of my knowledge: #Inclib "jfwapi" #Ifndef JFWAPI_H_INCLUDED #define JFWAPI_H_INCLUDED #Ifndef JFWAPI #define JFWAPI __declspec(dllimport) #EndIf Extern "c" Declare Sub JFWRunScript (ByVal lpszScriptName As ZString Ptr) Declare Fun...
by maurosebastian91
Aug 07, 2022 19:26
Forum: Libraries Questions
Topic: headers in C and freebasic?
Replies: 2
Views: 5272

headers in C and freebasic?

Hello colleagues, good morning. I'm here today to ask for your help with a small translation of a C header, an interface for the JAWS screen reader. there are two or three functions, one to pass it a string to make it talk, and the other to make it crash. I was reading the wiki on how to translate C...
by maurosebastian91
Jan 25, 2022 20:16
Forum: Beginners
Topic: pointers to UDT?
Replies: 5
Views: 1072

Re: pointers to UDT?

Thank you very much for your answers,
They were very useful to me.

a greeting.
by maurosebastian91
Jan 24, 2022 23:48
Forum: Beginners
Topic: pointers to UDT?
Replies: 5
Views: 1072

pointers to UDT?

Hello partners. I'm here today to ask you about UDTS pointers, which I've already read a lot about, I've tried a lot but it doesn't work for me. remember my UDT sounds? Type sonidos Dim As Byte Ptr memoria dim buffer as sfSoundBuffer ptr dim sonido as sfSound ptr End Type what I am looking for, is t...
by maurosebastian91
Jan 16, 2022 22:02
Forum: Beginners
Topic: Small size of executable?
Replies: 5
Views: 1027

Re: Small size of executable?

Thank you for your answers.

since you mention it, finally my executable increased in size, by 0.5 MB.
by maurosebastian91
Jan 16, 2022 16:49
Forum: Beginners
Topic: Small size of executable?
Replies: 5
Views: 1027

Small size of executable?

Hello colleagues, good morning. In the development of my little audio game, I noticed a small detail that I didn't know how to answer. My executable combining sdl and csfml audio 2, is 51 KB, (52224 bits), and as I add more code and function calls and all that, when I check how the size has changed,...
by maurosebastian91
Jan 11, 2022 3:49
Forum: Beginners
Topic: Simplify my audio loading code?
Replies: 2
Views: 637

Re: Simplify my audio loading code?

Hi, I have never worked with csfml and the code below is untested (probably does not even compile), but: There are apparently 2 two things to keep track of: A buffer and a sound object. A freebasic cannot return 2 values like e.g. python in the form a, b = return_multiple() So a way to do it is to ...
by maurosebastian91
Jan 10, 2022 10:50
Forum: Beginners
Topic: Simplify my audio loading code?
Replies: 2
Views: 637

Simplify my audio loading code?

Hello colleagues, good morning. I need your help to solve this little question with my code. I am using csfml, the version 2 that was shared here, and I am trying to simplify my code to load the audios from files, with a function. This is what I came up with. In the sound.bi file: Function cargar ( ...
by maurosebastian91
Nov 04, 2021 3:13
Forum: Beginners
Topic: keys in multiple threads?
Replies: 6
Views: 2211

keys in multiple threads?

Hello colleagues,. Please, I continue with the development of my audio game, and now it is time for the keystrokes. I am using the old version of SDL, and its handling of keyboard events. Although I can code everything well, I need the keys to have different durations, but to be able to do multiple ...
by maurosebastian91
Oct 18, 2021 0:51
Forum: Beginners
Topic: encryption in zip or xor?
Replies: 49
Views: 8957

Re: encryption in zip or xor?

@maurosebastian91 Even at 1MB of data we are only talking about 4.5 milliseconds for 32-bit. I am getting old and impatient, but I reckon I could wait that long. https://deltarho.org.uk/Downloads/smile.png I don't have the PCG32II.BAS file, should it be in the include folder? I wanted to avoid bein...
by maurosebastian91
Oct 17, 2021 19:38
Forum: Beginners
Topic: encryption in zip or xor?
Replies: 49
Views: 8957

Re: encryption in zip or xor?

@deltarho[1859], I don't have the PCG32II.BAS file, should it be in the include folder?
by maurosebastian91
Oct 17, 2021 19:31
Forum: Beginners
Topic: encryption in zip or xor?
Replies: 49
Views: 8957

Re: encryption in zip or xor?

Instead of populating a string, I thought about populating an array. #include "PCG32II.bas" Sub EncDecFile( a() As Byte, ByVal flag As Long ) ' flag = 1 for encryption, = -1 for decryption or vice versa Dim As Long i, temp pcg.MyRandomize( Ubound(a), Ubound(a) ) 'For j As Long = 1 To 3 ' ...