Introduction


T
his book demostrates the usage of visual Runes. This includes switching to graphic mode, drawing lines, programming the VGA color palette, and animating the palette.

T
he color effects are done by shifting the palette. In this way the screen has to be drawn only once (at startup) and then during every tick a different part of the color palette becomes active. This is very effective since only a few instructions are required to reprogram the palette while redrawing the screen would take lot of time.

Palette Demo


T
he following source code is commented in German and is using German names for labels, procedures, and variables. But most procedures used here can be found in the "Visual Effect Runes" book where they are in English.


;Author     : Daniel, Master Sourcerer at Kitana's Cas...
;Last change: February 15, 2004
;Email      : sourcerer@kitana.org


;Stellt einen animierten  Farbverlauf mit 384 Farben d...

.286


videoseg    EQU 0A000h
videobreite EQU 320
videohoehe  EQU 200
palport     EQU 3C8h
statusport  EQU 3DAh



;Codesegment
code SEGMENT
ASSUME CS:code,DS:code


start:
CLD
MOV AX,SEG data
MOV DS,AX

;Grafikmodus einschalten
CALL grafikein

;Farbverlauf berechnen
CALL berechnepalette

Arena Play Ground Throne Room Theatre Hall Library Back Print Next page Last page