Search found 33 matches

by SMC
Jun 11, 2025 16:55
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 192
Views: 87630

Re: Audio library for FreeBasic - Features

I guess it was a case of a non standard file. For the library, I'll give building it on freedos a try. Also, in case I haven't said it, thanks for all your hard work on this.
by SMC
Jun 11, 2025 16:47
Forum: Beginners
Topic: Calculating the size of a sprite sheet.
Replies: 8
Views: 670

Re: Calculating the size of a sprite sheet.

Thanks for the help. I'm just going to add both an extra row and column, that should give me the same result as the CEIL function would. I'll have a lot of extra space when I get a lower number from the Sqr function, but I'm not going to stress over it anymore. I will be holding on to the CEIL macro...
by SMC
Jun 11, 2025 2:52
Forum: Beginners
Topic: Calculating the size of a sprite sheet.
Replies: 8
Views: 670

Calculating the size of a sprite sheet.

I made a program to generate a sprite sheet from a list of sprites, but my way of calculating the size for the sheet is broken. If lcount < 4 Then ''lcount = number of sprites sh_col = 2 ''columns sh_row = 2 ''rows Else sh_col = Int(Sqr(lcount)) sh_row = sh_col If sh_col * sh_row < lcount Then sh_ro...
by SMC
Jun 08, 2025 3:36
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 192
Views: 87630

Re: Audio library for FreeBasic - Features

Should be fixed in the last version Awesome, thanks. Everything seems to be working right now. Just one question, is there a limit on midi files? I tried loading a 20KB file and it still core dumped on me. Other, shorter midis, worked great. Here is the midi I tried to download and play: https://fr...
by SMC
Jun 06, 2025 3:36
Forum: Game Dev
Topic: Catfish Bouncer - Raylib minigame by Syn9
Replies: 3
Views: 795

Re: Catfish Bouncer - Raylib minigame by Syn9

Neat. How do you like Raylib? I don't really want to learn a new library, but I like how simple things look.
by SMC
Jun 03, 2025 1:45
Forum: Linux
Topic: Which Linux should I use?
Replies: 4
Views: 1002

Re: Which Linux should I use?

I like Linux Mint. When I made the jump myself I was using Win 8 and was just looking for something that worked like Windows XP. Linux Mint has a bootable USB you can play around with before you install it. You might take a look at Zorin OS and Linux Lite also.
by SMC
May 30, 2025 3:36
Forum: Game Dev
Topic: Asylum - A (short) text adventure by Syn9
Replies: 1
Views: 499

Re: Asylum - A (short) text adventure by Syn9

Damn hobo got me.
by SMC
May 25, 2025 19:54
Forum: Game Dev
Topic: Guess the number game
Replies: 2
Views: 549

Re: Guess the number game

Hello, I always liked your Griffon Legend game you did years ago.
by SMC
May 23, 2025 1:22
Forum: Libraries Questions
Topic: Converting and using const char * strings.
Replies: 2
Views: 613

Re: Converting and using const char * strings.

RetardedAndProud wrote: May 22, 2025 19:06 Dereference SDL_GetError()...

Code: Select all

Print #EF, "SDL_LoadBMP() failed "; *SDL_GetError()
That works, thanks.
by SMC
May 22, 2025 16:58
Forum: Libraries Questions
Topic: Converting and using const char * strings.
Replies: 2
Views: 613

Converting and using const char * strings.

I guess what I would really like to know is if this is working right. ''Create a texture Var bitmap = SDL_LoadBMP("square.bmp") If bitmap = 0 Then Print #EF, "SDL_LoadBMP() failed "; SDL_GetError() End End If I'm asking because with freebasic I get this written to my error file: ...
by SMC
May 19, 2025 20:45
Forum: DOS
Topic: Can you still use inp and out in 32bit protected mode?
Replies: 2
Views: 976

Re: Can you still use inp and out in 32bit protected mode?

Thanks, I thought it had a vsync routine, but I forgot what it was called and was looking in the wrong places.
by SMC
May 19, 2025 5:01
Forum: DOS
Topic: Can you still use inp and out in 32bit protected mode?
Replies: 2
Views: 976

Can you still use inp and out in 32bit protected mode?

I'm trying to make a vsync funtion in dos. ''vsync with freebasic Declare Sub vsync() Screen 13 SetMouse ,,0 Dim count as Integer Dim seconds as Integer Do Do count = count + 1 vsync Loop Until count = 70 ''only counts to 33 because vsync tested twice seconds = seconds + 1 Locate 1, 1 Print Space(20...
by SMC
Apr 07, 2025 4:35
Forum: Beginners
Topic: Sorting output of Dir()
Replies: 44
Views: 6057

Re: Sorting output of Dir()

I propose to count the files with an initial Dir() loop, then Redim a string array, FNam, with N elements, where N is the number of files. Then I Redim a UShort array with N elements, FNum, to store the hex values of the corresponding filenames, plus an additional Index array where Index(N) = N. I ...
by SMC
Apr 05, 2025 23:55
Forum: Beginners
Topic: Extracting smaller strings from a larger string
Replies: 3
Views: 929

Re: Extracting smaller strings from a larger string

fxm wrote: Apr 05, 2025 18:21 I just corrected the one line (#12) in error:
str_cont = Mid(mr_str, start_pos, char_pos - start_pos)
I'm a doofus. I thought Mid() needed an end position. Thanks to both of you.
by SMC
Apr 05, 2025 16:56
Forum: Beginners
Topic: Extracting smaller strings from a larger string
Replies: 3
Views: 929

Extracting smaller strings from a larger string

I'm getting weird results from something really simple. Maybe I'm doing something wrong. Simple logic sometimes confounds me. Anyway, I'm trying to extract small strings from a larger string using "_" as a separating character. Dim as String mr_str = "Hello_world_this_is_a_string"...