Search found 1448 matches

by badidea
Sep 16, 2019 17:42
Forum: Projects
Topic: Full RGB image to DOS CGA and EGA
Replies: 7
Views: 199

Re: Full RGB image to DOS CGA and EGA

caseih wrote:The 8-Bit Guy recently released a game that has pretty good graphics for CGA as seen in the screenshot below.

I prefer the the 256-color mode:
Image
by badidea
Sep 15, 2019 22:17
Forum: Projects
Topic: Full RGB image to DOS CGA and EGA
Replies: 7
Views: 199

Re: Full RGB image to DOS CGA and EGA

All nice, but CGA and EGA, that is a quite long ago. 25 years?

Anyway, I thought that freebasic automatically converts "/" to "\" (and the other way around?) for file usage depending on the OS.
by badidea
Sep 14, 2019 19:11
Forum: Windows
Topic: Setting gcc compiler for WinFBE
Replies: 93
Views: 2517

Re: Setting gcc compiler for WinFBE

Sorry, Microsoft not that anyone there is reading this. Don't worry, if Microsoft invalidates your licence key, you can always switch to GNU/linux. Don't have any experience with DPI-awareness on linux yet. Switched it off because I don't have a really high-DPI screen and standard font size (e.g. i...
by badidea
Sep 14, 2019 12:17
Forum: General
Topic: String to number conversion with error handling
Replies: 4
Views: 133

Re: String to number conversion with error handling

Maybe this topic can help: IsValue vs IsNumeric If only unsigned integer values are of interest, then a custom check is quickly written, e.g.: 'for single-byte encoded strings an unsigned integer values only function checkNumber(numberStr as string) as integer for i as integer = 0 to len(numberStr) ...
by badidea
Sep 14, 2019 10:59
Forum: Linux
Topic: Installing on Linux Mint 19
Replies: 8
Views: 160

Re: Installing on Linux Mint 19

There are some hints in the readme.txt that comes with freebasic: ... o Installation & Usage ... Linux (if FreeBASIC is not available through your package manager): Download and extract the latest FreeBASIC-x.xx.x-linux.tar.gz. Open a terminal and cd into the extracted FreeBASIC-x.xx.x-linux dir...
by badidea
Sep 12, 2019 22:08
Forum: General
Topic: First try at extended classes
Replies: 5
Views: 181

Re: First try at extended classes

Thanks both, enough clarification for now.
I forgot about &, much cleaner then + str(...) indeed.
by badidea
Sep 11, 2019 22:45
Forum: General
Topic: First try at extended classes
Replies: 5
Views: 181

First try at extended classes

I found a reason to have look at extended classes. Although, not for the example code below, but for something similar. It is not as complicated as it thought is was. But 2 questions for the example code below: 1. I initially used base.constructor(...) instead of base(...) in the extended class. But...
by badidea
Sep 09, 2019 22:35
Forum: Game Dev
Topic: Physics question
Replies: 74
Views: 5703

Re: Physics question

Small update: * One can shoot at a asteroid to remove it, costs 10% fuel * Helium-3 atom clouds with rotating core animation * Additional control of side thrusters <A>, <D> (does not make control easier) #Include "fbgfx.bi" Type int2d As Integer x, y Declare Constructor Declare Constructor...
by badidea
Sep 09, 2019 20:24
Forum: General
Topic: Squares
Replies: 6886
Views: 403407

Re: Squares

Random square doodle, not worth its own topic: const SW = 800, SH = 600 Const As Single PI = 4 * Atn(1) Const As Single RAD_PER_DEG = (PI / 180) Const As Single DEG_PER_RAD = 180 / PI '------------------------------------------------------------------------------- type int2d dim as integer x, y Decl...
by badidea
Sep 09, 2019 17:05
Forum: Projects
Topic: FBStyle - Source code formatter
Replies: 3
Views: 2194

Re: FBStyle - Source code formatter

Alternative: FBeauty
by badidea
Sep 08, 2019 22:42
Forum: General
Topic: Help with direct mouse input
Replies: 3
Views: 170

Re: Help with direct mouse input

This works here with SDL2 (relative motion, no window or screen borders): 'https://wiki.libsdl.org/CategoryMouse 'http://gigi.nullneuron.net/gigilabs/handling-keyboard-and-mouse-events-in-sdl2/ #include "SDL2/SDL.bi" dim sdlversion as SDL_version SDL_GetVersion(@sdlversion) print "SDL...
by badidea
Sep 08, 2019 12:25
Forum: Community Discussion
Topic: 'dword ptr [K2]' is not a valid base/index expression
Replies: 1
Views: 73

'dword ptr [K2]' is not a valid base/index expression

This 'complex' code: Dim Shared k2 As integer print k2 Triggers this error with 32-bit fbc (1.05.0 and 1.07.0) linux hello.asm:47: Error: `dword ptr [K2]' is not a valid base/index expression (see also: https://freebasic.net/forum/viewtopic.php?f=2&t=27835&p=264088#p264088) Is this a known b...
by badidea
Sep 08, 2019 12:04
Forum: Community Discussion
Topic: any ptr bug?
Replies: 5
Views: 128

Re: any ptr bug?

Or *(Cptr(Integer ptr, pp) + i)
by badidea
Sep 07, 2019 10:52
Forum: General
Topic: Help with direct mouse input
Replies: 3
Views: 170

Re: Help with direct mouse input

Something like this might work. I can try to make some FB code later today... Update: Translating the linked code will be difficult. The low level I/O functions for linux are missing in freebasic(). Don't know how to get the file descriptors. Update: The low level I/O functions for linux aren't miss...
by badidea
Sep 06, 2019 21:32
Forum: Beginners
Topic: A MIND GAME SIMULATION (sketch)
Replies: 6
Views: 265

Re: A MIND GAME SIMULATION (sketch)

=- -> -= & =+ -> += :-)

Go to advanced search