• Welcome to Dark Bit Factory & Gravity.
 

convert frame buffer to ascii

Started by ninogenio, February 25, 2008

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rain_storm

dont you mean 80 x? 160 bytes but its 1 byte colour 1 byte ascii for typical dos consoles

Challenge Trophies Won:

ninogenio

#21
nah mate,

although your totally right about it being 1 byte for ascii 1 byte for color and the resolution being 80 x for the ascii console window buffer.

the full bgr frame buffer should be double the size of the ascii window. the 2x dump function does a bit of aa during the conversion.
Challenge Trophies Won:

DrewPee

Nino, (or anyone else) . . .

Im having all sorts of problems compiling this .  .

Here is the debug info

Command executed:
"C:\FreeBasic\fbc.exe" "I:\DBF Stuff\framconv\framconv\FBIDETEMP.bas"

Compiler output:
I:/DBF Stuff/framconv/framconv/AsciiFrameWork.Bi(32) error 136: Default types or suffixes are only valid in -lang deprecated or qb in 'Declare Function AsRgb( ByVal FCol As Integer , ByVal BCol As Integer )'
I:/DBF Stuff/framconv/framconv/AsciiFrameWork.Bi(38) error 41: Variable not declared, Y in 'For Y = 0 To (Buffer->Size.X) * (Buffer->Size.Y)'
I:/DBF Stuff/framconv/framconv/AsciiFrameWork.Bi(55) error 136: Default types or suffixes are only valid in -lang deprecated or qb in 'Function AsRgb( ByVal FCol As Integer , ByVal BCol As Integer )'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(71) error 41: Variable not declared, StartcChar in 'pchar += StartcChar * 12'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(71) warning 12(0): Implicit variable allocation, StartcChar
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(240) error 41: Variable not declared, y in 'For y = 0 To Ysize'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(242) error 41: Variable not declared, targetpos in 'targetpos = y * 80'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(245) error 41: Variable not declared, X in 'For X = 0 To xsize'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(301) error 77: Recursive DEFINE not allowed, found 'MIN' in 'Dim As integer MinV = MIN(R,MIN(G,B))'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(303) error 41: Variable not declared, MaxV in 'If ((MaxV - MinV) < &h3f) Then'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(303) warning 12(0): Implicit variable allocation, MaxV
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(306) error 41: Variable not declared, col in 'col = 15'
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(306) error 123: Too many errors, exiting

Results:
Compilation failed

System:
FBIde: 0.4.6
fbc:   FreeBASIC Compiler - Version 0.18.3 (12-28-2007) for win32 (target:win32)
OS:    Windows NT 6.0 (build 6000)

Phew - can anybody help?

DrewPee

ps. Nice effect though - ran the .exe and that is fantastic!!!!!!
Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Shockwave

It's failing to compile because you have a more up to date version of Freebasic than Nino.
Shockwave ^ Codigos
Challenge Trophies Won:

ninogenio

yeah sorry drew but the old freebasic more than covers what i need so i never updated.

the problems you posted should be easily fixed though and in fact i already fixed most in my comp entry its simply that iv been to lasy to declare the variables in most cases ie

I:/DBF Stuff/framconv/framconv/AsciiFrameWork.Bi(38) error 41: Variable not declared, Y in 'For Y = 0 To (Buffer->Size.X) * (Buffer->Size.Y)'

just put dim as integer y above that line and as for this error.

I:/DBF Stuff/framconv/framconv/AsciiFrameWork.Bi(32) error 136: Default types or suffixes are only valid in -lang deprecated or qb in 'Declare Function AsRgb( ByVal FCol As Integer , ByVal BCol As Integer )'

thats telling you i have declared a function but specified no return type so you could change it to.
Declare Function AsRgb( ByVal FCol As Integer , ByVal BCol As Integer ) As Integer

and this warning
I:/DBF Stuff/framconv/framconv/FrameBufferConv.Bi(301) error 77: Recursive DEFINE not allowed, found 'MIN' in 'Dim As integer MinV = MIN(R,MIN(G,B))'

is telling you that min cannot be used inside min in the new freebasic so try this instead.
Dim As Integer Temp = MIN(G,B)
Dim As integer MinV = MIN(R,Temp)

And so on and so forth it should be quite easy to patch this up though.
Challenge Trophies Won:

Jim

Could just try

fbc -lang deprecated ninosfile.bas

Jim
Challenge Trophies Won:

ninogenio

or you could try as jim said but i found -lang deprecated to be unstable or not to work in some cases.
Challenge Trophies Won: