FB Wiki Pages that need work

Forum for discussion about the documentation project.
blahboybang
Posts: 385
Joined: Oct 16, 2005 0:15
Location: USA
Contact:

Post by blahboybang »

CRAP! I read that it did what I thought on the forum!

TRIXORS! YOU HAVE MADE ME OUT AS A FOOL!!!


Can you fix it?
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Post by Imortis »

Update to the List that still need Code:

Dateadd
Datediff
Datepart
Datevalue
Erl
Field
Flip
Import
Inp
Input(file i/o)
Int
Lib
Loc
Option byval
Output
Pcopy
Pmap
Pointer
Random
Rgba
Screencopy
Threadwait
Wait
Window

This list has also been added to the wiki.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

I can't find any info about ConvertRow?

Joshy
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

Only gods know....
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

i tried... i thought this would work....

Code: Select all

'' fb_GfxImageConvertRow( byval src as any ptr, byval src_bpp as integer, _
''						  byval dst as any ptr, byval dst_bpp as integer, _
''						  byval width as integer, byval isrgb as integer = 1 ) as void

Dim As uByte Ptr img1
Dim As uInteger Ptr img2
Dim As Integer rowCopy

Screen 13

img1 = ImageCreate( 20, 20, 4 ) '' fill it with red
Put( 20, 20), img1
Sleep

Screen 14, 32

img2 = ImageCreate( 20, 20, 0 )


For rowCopy = 0 To 19

  imageconvertrow( _ 
                   img1 + rowCopy * 20 + 4, 8 , _
                   img2 + rowCopy * 20 + 1, 32, _
                   20 )

Next



Put( 20, 20 ), img2            
Sleep
            
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Post by VirusScanner »

Pages for Namespace, Using, and Extern "C++" have been added.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

cha0s@
Thanx curently i have no sourcecode of the runtimelibs but with your example i can renember on this helper sub.

Joshy

EDIT: sorry but your example won't work any idea what's are wrong?

This works on my box

Code: Select all

type pic8 field=1
  as short   w,h
  as byte    pixels(20*20)
end type
type pic32 field=1
  as short   w,h
  as integer pixels(20*20)
end type

dim as pic8  image8
dim as pic32 image32
dim as integer x,y
image8.w  =(20 shl 3) or 1
image8.h  = 20
image32.w =(20 shl 3) or 4 
image32.h = 20

for y=0 to 19
  for x=0 to 19
    image8.pixels (x+y*20)=rnd*255
  next
next



screenres 640,480,8
put (0,0),@image8,pset 
Sleep 
imageconvertrow  @image8.pixels(0) ,8, _ 
                 @image32.pixels(0),32,20*20

screenres 640,480,32 
put (0,0),@image32,pset 
sleep
            
Sleep
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

no, i had no idea what was wrong, but good that you posted a working one =)

i just guessed after trying to read the c rtlib src...
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

hello cha0s
what are differs is i convert the image before i switch to the new mode seams to be a bug in image creation (imagecreate) and i sugest to a new name of this useful helper sub.

"ImageConvert" all images are continues block of memory so the width param shold be changed to numofpixels.

Code: Select all

imageconvert  @image8.pixels(0) ,8, _
              @image32.pixels(0),32,20*20

Joshy
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

We have undocumented keywords again!

* IMAGECONVERTROW
* __FB_OPTION_EXPLICIT__
* __FB_OPTION_ESCAPE__
* __FB_OPTION_DYNAMIC__
* __FB_OPTION_PRIVATE__
* __FB_OPTION_BYVAL__
* __FB_OUT_EXE__
* __FB_OUT_DLL__
* __FB_OUT_LIB__
* __FB_OUT_OBJ__
* ERFN
* ERMN
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Post by coderJeff »

I added the base pages for:
Antoni wrote: * __FB_OPTION_EXPLICIT__
* __FB_OPTION_ESCAPE__
* __FB_OPTION_DYNAMIC__
* __FB_OPTION_PRIVATE__
* __FB_OPTION_BYVAL__
I will also add the other new keywords as well as content, and Links on the CatPg* pages. I've been having too much fun recompiling my old progs with fb.16 to finish it at the moment. Will do it soon, sorry.
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

I've been having too much fun recompiling my old progs with fb.16 to finish it at the moment.
You forgot the <sarcasm></sarcasm> tags :).
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Post by coderJeff »

No, seriously! All my programs compile and run. guidemo, atom smash, rigid bodies. The worst problem I get is "Function result was not explicitly set" warnings. fb.16 has been kind to me. ;)

I'm now going back and working on mkwiki (for posting wiki pages). It was pretty quick and dirty before. I think it could be handy tool, but I haven't looked at it in a month until now.
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Post by coderJeff »

Antoni wrote:We have undocumented keywords again!

* __FB_OPTION_EXPLICIT__
* __FB_OPTION_ESCAPE__
* __FB_OPTION_DYNAMIC__
* __FB_OPTION_PRIVATE__
* __FB_OPTION_BYVAL__
* __FB_OUT_EXE__
* __FB_OUT_DLL__
* __FB_OUT_LIB__
* __FB_OUT_OBJ__
* ERFN
* ERMN

Pages, added. Categories updated. ERFN, ERMN are incomplete. FB_OUT* need examples. I have not even looked at IMAGECONERTROW.

I will return to this when I can. In the meantime, anyone else who has the time, please look over these pages. You could

- report an error
- suggest an example
- make a correction

Please report here.

Thanks
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

I've had a go at the ImageConvertRow page. But I think it could use a little more explanation.
Post Reply