All FreeBASIC Code

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

All FreeBASIC Code

Post by yetifoot »

I'm thinking of starting a new version of the ABC, but for FB code. I'd appriciate any opinions etc. I've got a prototype done which i'll post up later when ive fished some of the worst spaghetti out.
Sterling Christensen
Posts: 142
Joined: May 27, 2005 6:13

Post by Sterling Christensen »

Absolutely! Right now a lot of the good demos, examples, etc with source code are hidden in forums. It would be really nice to have a catagorized archive.

I think sites like that helped bring people into the QB community (at least as much as forums did) and it could do the same for FB.
Ryan
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY
Contact:

Post by Ryan »

It would be a great benefit to many, myself included. I always find myself searching through the forums trying to find that one sample that I saw two months ago that would really help me now. ^_^ Good luck! Hopefully I'll be able to contribute a tidbit every now and then.
Z!re

Post by Z!re »

[Content removed at author's request]
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

ive been playing around and have a file format sorted but am wondering how to go about getting snippits to make a release. Should i just trawl the forums, or ask for submissions? obviously it would be easier to take submissions, and it would give authors the chance to give it a final check, but trawling would yield more.

Anyway heres my file format as it stands. any suggestions would be good. At the moment it compresses .bas files but leaves others untouched as trying to recompress zips (which i guess would be the other main format) is pointless. Also i am i two minds about how to deal with category. using a string would give future proof i guess to add more categorys.

ID 5 Bytes "AFBC" (Null terminated)
NumSnippets 2 Bytes unsigned number of snippets in packet

[ (offset table for snippits)
Offset NumSnippets * 4 Bytes unsigned offset to snippit info
]

At each offset

[
ID 1 Byte "@" used for checking valid

FileNameLen 2 Bytes unsigned len of FileSize
FileName 1 * FileNameLen Bytes Filename (not null terminated)

SubjectLen 2 Bytes unsigned len of Subject
Subject 1 * SubjectLen Bytes Subject (not null terminated)

AuthorLen 2 Bytes unsigned len of Author
Author 1 * AuthorLen Bytes Author (not null terminated)

CategoryLen 2 Bytes unsigned len of Category
Category 1 * CategoryLen Bytes Category (not null terminated)

CRC32 4 Bytes unsigned CRC32 of file
NormalSize 4 Bytes unsigned size of file
CompressedSize 4 Bytes unsigned size actually used (if same as normal size then data is uncompressed)
]

Data 1 * CompressedSize Bytes Files Data (can be compressed or plain, check if compressedsize = normalsize)
Post Reply