Author Topic: convert frame buffer to ascii  (Read 11316 times)

0 Members and 1 Guest are viewing this topic.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: convert frame buffer to ascii
« Reply #20 on: March 03, 2008 »
dont you mean 80 x? 160 bytes but its 1 byte colour 1 byte ascii for typical dos consoles

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: convert frame buffer to ascii
« Reply #21 on: March 03, 2008 »
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.
« Last Edit: March 03, 2008 by ninogenio »
Challenge Trophies Won:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: convert frame buffer to ascii
« Reply #22 on: April 04, 2008 »
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

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: convert frame buffer to ascii
« Reply #23 on: April 04, 2008 »
It's failing to compile because you have a more up to date version of Freebasic than Nino.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: convert frame buffer to ascii
« Reply #24 on: April 04, 2008 »
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:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: convert frame buffer to ascii
« Reply #25 on: April 04, 2008 »
Could just try

fbc -lang deprecated ninosfile.bas

Jim
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: convert frame buffer to ascii
« Reply #26 on: April 05, 2008 »
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: