BBC BASIC for Windows
« GFXLIB 3 »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:10pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: GFXLIB 3  (Read 373 times)
David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx GFXLIB 3
« Thread started on: Oct 13th, 2011, 4:21pm »

GFXLIB 3 doesn't exist yet, and it may not ever, but I'll start the ball rolling and who knows where it may lead.

Comments, ideas, suggestions, debate, arguments welcome!


What would GFXLIB 3 be?

A library of subroutines, functions and utilities geared primarily to facilitate the creation of 2D, bitmap-based games.

(It could just be called GAMELIB instead?)

Architecturally, it would be a new, ground-up re-design, the code structured and written in quite strict accordance with the guidelines set out in this article:

http://bb4w.wikispaces.com/Guide+to+writing+libraries

===

Why a GFXLIB 3?

===

Why not a GFXLIB 3

  • GFXLIB 2 is very easy to use (at least from the point of view of someone writing a game)
  • Tiny potential userbase means GFXLIB 3 could just end up a wasted effort of gargantuan proportions


===

Proposal for GFXLIB 3 library components structure

In BB4W's LIB folder, I propose the following files and resource folders:

BBC BASIC for Windows\LIB\GFXLIB3.BBC
BBC BASIC for Windows\LIB\GFXLIB3
BBC BASIC for Windows\LIB\GFXLIB3\modules
BBC BASIC for Windows\LIB\GFXLIB3\resources
BBC BASIC for Windows\LIB\GFXLIB3\utilities

GFXLIB3.BBC is the core library (more on this below)
GFXLIB3 is a subfolder containing the three subfolders modules, resources, utilities
GFXLIB/modules contains the external GFXLIB modules; bitmap drawing and manipulation routines, etc.
GFXLIB/resources various images required by example and demonstration programs, font definitions, filter kernels, etc.
GFXLIB/utilities would contain a variety of PROCs, FNs (including assembler routines) useful to game creation

GFXLIB3.BBC

Contains only essential subroutines - image and data loaders, DirectDraw 7 initialiser, DIBSection setup, etc.

The following core assembler routines are what I would consider essential:


  • Bitmap clipper (returns clipping parameters to enable bitmap to be clipped to the edges of a frame buffer)
  • Rectangle clipper
  • Line clipper (prefer not one reliant on FPU calculations, with respect to MH!)
  • Circle clipper (No FPU calculations, thank you)
  • Fast, no-frills, colour-keyed bitmap plotter (like GFXLIB_Plot)
  • Fast, no-frills 'solid' bitmap plotter (like GFXLIB_BPlot)
  • Line drawer
  • Circle plotter (solid and outline); no FPU calculations!
  • Rectangle plotter (solid and outline)
  • Pixel plotter



Display variables/parameters structure (not necessarily called dispVars !!!)

This has to be massively simplified. I propose:

{ flags%, pBuffer%, bW%, bH% }

Where:

flags% contains (obviously) flag bits read by GFXLIB routines
pBuffer% contains the base address of the frame buffer (which could be a DIB section, or memory bitmap, etc.).
bW% and bH% are the buffer widths and heights, respectively.


To be continued?


EDIT (19.01.2012): Well, obviously not. rolleyes

« Last Edit: Jan 19th, 2012, 3:07pm by David Williams » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls