Search found 93 matches

by fatman2021
Jun 14, 2018 21:32
Forum: General
Topic: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'
Replies: 11
Views: 390

Re: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'

counting_pine wrote:I'm not familiar enough with the LISP library (is it coderJeff's?) to know how you'd pass pointers around to functions.


Yes. It is coderJeffs's LISP library.
by fatman2021
Jun 14, 2018 20:22
Forum: General
Topic: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'
Replies: 11
Views: 390

Re: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'

Are you setting a graphics screen before bload? screen 20,32 or something similar Yes using LISP dim lsp AS LispModule, expr as string BIND_FUNC( lsp.functions, "setvideo", SetVideo) BIND_FUNC( lsp.functions, "setpixel", SetPixel) BIND_FUNC( lsp.functions, "setline", S...
by fatman2021
Jun 14, 2018 18:49
Forum: General
Topic: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'
Replies: 11
Views: 390

Re: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'

fxm wrote:Can you insert in your code (for example just before the Bload line):
#Print Typeof(p1)
and post the compiler output (the type of p1) ?


Expected End-of-Line, found 'Typeof' in 'Print Typeof(p1)'
by fatman2021
Jun 14, 2018 17:08
Forum: General
Topic: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'
Replies: 11
Views: 390

Re: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'

fxm wrote:
fatman2021 wrote:*p1 is a pointer to a string

If ' *p1 ' is really a pointer to a string, then try with ' **p1 ' !


Expected pointer, before ',' in 'Bload **p1, cint(*p2), cint(*p3)'
by fatman2021
Jun 14, 2018 16:23
Forum: General
Topic: new complete FB version ?
Replies: 34
Views: 1616

Re: new complete FB version ?

lizard wrote:4) when santa becomes shaved



Image
by fatman2021
Jun 14, 2018 16:09
Forum: General
Topic: Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'
Replies: 11
Views: 390

Type mismatch, at parameter 1 of BLOAD() in 'Bload *p1, cint(*p2), cint(*p3)'

*p1 is a pointer to a string define_lisp_function(LoadImage, args) _OBJ(p1) = _EVAL(_CAR(args)) _OBJ(p2) = _EVAL(_CAR(_CDR(args))) _OBJ(p3) = _EVAL(_CAR(_CDR(_CDR(args)))) _OBJ(res) = any if( _LENGTH(args) < 1) then _RAISEERROR(LISP_ERR_TOO_FEW_ARGUMENTS) end if if(_IS_STRING(p1)) then res = _NEW(OB...
by fatman2021
May 30, 2018 17:06
Forum: Community Discussion
Topic: Suspicious pointer assignment
Replies: 4
Views: 213

Re: Suspicious pointer assignment

#include once "fbgfx.bi" #include once "lisp.bi" #include once "lisp_runtime.bi" using FB namespace LISP define_lisp_function( SetVideo, args ) _OBJ(p1) = _EVAL(_CAR(args)) _OBJ(res) = any if(_LENGTH(args) < 1) then _RAISEERROR(LISP_ERR_TOO_FEW_ARGUMENTS) end if if(_IS...
by fatman2021
May 30, 2018 16:53
Forum: Community Discussion
Topic: Suspicious pointer assignment
Replies: 4
Views: 213

Re: Suspicious pointer assignment

This line of code:

Code: Select all

 line (*p1, *p2)-(*p3, *p4), *p5


gives this warning:
test.bas(122) warning 4(1): Suspicious pointer assignment


I do not see any reason for a "Suspicious pointer assignment" warning.
by fatman2021
May 30, 2018 14:38
Forum: Community Discussion
Topic: Suspicious pointer assignment
Replies: 4
Views: 213

Suspicious pointer assignment

define_lisp_function( SetLine, args) _OBJ(p1) = _EVAL(_CAR(args)) _OBJ(p2) = _EVAL(_CAR(_CDR(args))) _OBJ(p3) = _EVAL(_CAR(_CDR(_CDR(args)))) _OBJ(p4) = _EVAL(_CAR(_CDR(_CDR(_CDR(args))))) _OBJ(p5) = _EVAL(_CAR(_CDR(_CDR(_CDR(_CDR(args)))))) _OBJ(res) = any if(_LENGTH(args) < 5) then _RAISEERROR( L...
by fatman2021
Nov 19, 2017 1:10
Forum: Game Dev
Topic: A matter of perspective...
Replies: 28
Views: 1756

Re: A matter of perspective...

Same perspective as my previous example. Draw the cube pixel by pixel and texture (shade) the surface. Direct pixel clipping. Move by mouse. This is a 32 bit snippet. 64 bit is too slow. Type screendata As Integer w,h,depth,pitch As Any Pointer row End Type Type V3 As Single x,y,z As Ulong col As S...
by fatman2021
Oct 18, 2017 16:29
Forum: Tips and Tricks
Topic: Tutorial - Create awesome 3D artwork
Replies: 2
Views: 608

Tutorial - Create awesome 3D artwork

https://www.youtube.com/watch?v=ZuN-WjzaS04 Note: This tutorial requires Blender, DOSBOX, DJGPP, FreeBASIC for DOS, and LuxRender Have you ever wanted to create awesome 3D artwork but did not know where to start. Just follow these 55 easy steps and you will be well on your way to becoming a 3D artw...
by fatman2021
Oct 15, 2017 1:09
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 206
Views: 10558

Re: Pure FB Runtime Library (in progress)

Here is the memcpy in C. Maybe someone else may have better luck. void memcpy(void *dest, void *src, size_t n) { // Typecast src and dest addresses to (char *) char *csrc = (char *)src; char *cdest = (char *)dest; // Copy contents of src[] to dest[] for (int i=0; i<n; i++) cdest[i] = csrc[i]; }
by fatman2021
Oct 14, 2017 14:37
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 206
Views: 10558

Re: Pure FB Runtime Library (in progress)

malloc, realloc, memcpy, etc should be easy to implement in FreeBASIC as the C versions the functions are really not all that complicated. What I need to know is the names of the files that contain various functions such as __fb_ct, fb_hListInit, fb_hListAllocElem, fb_StrDelete, etc. function memcpy...
by fatman2021
Oct 14, 2017 2:08
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 206
Views: 10558

Re: Pure FB Runtime Library (in progress)

I have run into a snag using your version of the runtime: #include "LibFB/fb.bi" #include "LibFB/str_chr.bas" #include "LibFB/str_core.bas" DECLARE SUB PrintString(src AS Byte Ptr, x AS LONG, y AS LONG) DECLARE SUB main () SUB multiboot () Asm 'setting up the Multiboot ...

Go to advanced search