Copy Link
Add to Bookmark
Report

NULL mag Issue 06 07 Tribute to Gutter II

eZine's profile picture
Published in 
null magazine
 · 26 Dec 2020

  




in issue x005 i explained some new features i implemented in gutter
emag engine and how some stuff worked in the past. now its time for
me to share this code as the gutter crew did and explain how to use
it to make an emag of yours. its my way to say a thank you to filth,
jack phlash and natedogg for making gutter and releasing their code,
freely. so lets begin...

download the code here: https://github.com/xqtr/null
extract it in a directory that you have access with dosbox. you will
need dosbox! turbo pascal 7! aciddraw/thedraw! remember... this is
DOS programming! :)

first of, you should know, that in some point you'll have to play
with the source code! you may try to avoid it, but... you wont. the
engine even in its original form, wasn't 100% "automatic". its not
just writing the articles, compile them and done. so keep this is
mind and that you have to know some basic pascal. its not so
difficult, specially if you have experience in other programming
languages. if you want to make an emag and you have questions, you
may also ask me for help. i will be happy to offer any help.

-- fade effects --
if you want to use fade effects (fade in/out) you have to include the
fade.pas unit in your uses statement. you can use the following
procedures: BlackOut; ResetScreen; Fadein; Fadeout; which are self
explanatory.

-- mod music --
the new engine supports music in .mod format only. it can play tracks
in about 150kb in size and protracker format. if you use something
else, it may crash, stop responding etc. so if you compiled the
executable and show such a behavior, probably its the .mod file.

the source code is ready to use and initializes the sound system,
ready to play some chip music ;) make sure to change the file names
and add them also to the music selection menu. in the do_music
procedure is a playfile procedure, which you can make global, if you
want to change music in other parts of the mag, except the music
selection menu. if you want to keep it simple. just change filenames,
don't forget to include the files and you are done.

-- menu screens / logo --
the menu screens and logo are in the menu dir. they have to be in
pascal format! use thedraw or aciddraw to convert any ansi image to
pascal format. make sure to include ({$I .\menu\logo.pas}) these
files and also be aware of the names of the arrays, in case you use
different. you can change them but you'll have to mess with the code
after.

-- fonts --
the engine comes with many fonts available. they all are inside the
./bin dir and are compiled inside the .dat file (see below). to use
one, load it like: loadfont(1); you can use them all or remove the
ones you dont want. make sure that when you call the loadfont()
command you don't use a number bigger than the number of fonts
included in the .dat file

-- screen transition fxs --
by using the textfx unit, you can use screen fx like page flips, as i
did in issue x005. its just three procedures and its an easy process
to do. as always you can leave the code as it is, but using specific
fxs in some ways, it brings nice results. in issue x005 i just used
random transitions, just as a show off for the engine.

-- articles --
this is the important and hard part! so lets take it step by step.

1. you write the tutor/article.
2. as a first line you add a string in this format:

title;author;category;id

title,author : no need to explain
category : its just a string, it doesn't have any specific use
other than to show to the reader, what about is the
article. so you can use it also in other ways...
like add a date.
id : this is the very IMPORTANT! part! if you wrote an
article, so you want it to appear in the articles
menu you have to add an id like ARTxx. the ART
thing has to be unchanged. the xx can be anything
you want. i prefer to add it as a number, but this
doesn't represent the position in the menu. so in
an article you can add an id like ART01, ARTFF,
ART#4 etc.

there are other ids for ansi art, editorial, interview etc. but the
rest string format is the same: title;author;category;id and you
always add it as a first line! do not add empty lines before this
line. other ids:

TUTxx : for tutorials. same format as ANSxx
ANSxx : for ansi gallery/menu
ABOUT : this id is for the about menu/page only. you can only use
it once.
EDIT : this is for the editorial. same as about, use it once.
INTER : for the interview text

you can put all text and ansi files into a directory if you want, but
for my convinience i use one dir. for ansis, one for articles and one
for tutors. now the tricky part... you have to convert these text
files into binary format, like TheDraw and AcidDraw does. lets see an
example.

you write an article, put the first line as we said above and you
open the file in AcidDraw. press alt-s to save it and select B-inary.
you enter the filename. the filename HAS to HAVE an extension of
.GUT! this is important! after saving the file (in binary format with
.GUT extension) move it to the ./bin directory. confusing? timeful?
well, no one said, that making emags is easy... :p

because of this, i made an utility, written in freepascal. in the
archive is included the source code and the linux x64 version, but
you can compile it in windows or linux 32b if you want. to use it,
inside the directory you have extracted the archive execute the
utility like this: ./ans2bin . <-- add the full stop

the utility will find all .txt, .ans files, convert them to binary
files, change their extension to .GUT and put them into the ./bin
directory! all in one move. but we are not finished yet... :( we are
close... be strong my young pandawan...

now from dos/box, go into the bin dir. inside you have the .GUT
files, some .FNT files for the font choosing menu and a file called
articles.exe. execute this file and it will compile all elements to a
file called null.dat, if you haven't changed the code. rename this
.dat file to your liking and move it where the mag. executable is.

compile the main executable null.pas with turbo pascal and you are
done... you made your first emag! don't get fustrated... if i did, so
you can! be patient, check the code, make tests and as a last resort,
ask me :)

there are also, other emag engines out there, that you can use.
perhaps in a prog.lang. you may know better. i used gutters engine,
because a) it was all ready written in pascal, which i know b) gutter
is a mag, that certainly left an impact to the scene. others also,
but i think gutter the most. so, i was very happy to hear that filth
and jp, read issue x005 and were also happy to see their "child"
reborn, through NULL. who knows... they may even think to join NULL
or bring back gutter?... hmmm... will see... :)




← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT