Coder FX - implementation of the Moving Shit effect.

Amiga News #01
I'm glad you decided to look into
this section. I'm certainly not RST 7 or
IMP, but I think this article will
useful...
  In this issue I will tell you about such a pro-
ostom effect, like sprite compression or
stretching it (for example, like this
you could see in our INTRO
magazine). You could have a similar effect
watch in ZX-FORMAT's intro.
    I don’t know how they made XL-DESIGN, in
no one doubts their professionalism
it turns out, but as a hacker I’m no good -
ny, (well, it’s a bummer for me to climb to disassemble
someone's code) I decided to think about it
myself And you know, it’s not that difficult!
   I took it and wrote something for testing.
-------------------------------------
        ld hl,30000 ; sprite address
        ld de,#4000 ; address on screen
        ld b,80; sprite height
        xor a; that's how it should be!!
vio add a,64 ; reduction/increase factor
                 ; high=(start high)*coefficient
                 ; coefficient=n/256
                 ; n=64
*jp c,cont; to output tek.lin.
        push de
        ld de,16; sprite width
* add hl,de; skip line
                 ; sprite,
                 ; since it decreases
        pop de; those. f.S=0
* djnz vio ; i.e. C=0,A=nn
                 ; 0.nn
*ret
cont push de: ld c,h
        ldi:ldi:ldi:ldi ; transfer
        ldi:ldi:ldi:ldi ; lines
        ldi:ldi:ldi:ldi ; sprite
        ldi:ldi:ldi:ldi ; from buffer

        pop de
        ex af,af' ; save countercall scline ; next line in screen
        ex af,af' ; restore counter
        djnz vio ; cont. conclusion
        ret ; HOORAY!! we fall out

scline inc d: ld a,d: and 7
        ret nz
        ld a,e: add a,32: ld e,a
        ret c
        ld a,d: sub 8: ld d,a
        ret

-------------------------------------
  This procedure will output your sprite
reduced in accordance with the sub-
brane coefficient.
  Of course you can make it work
to increase it, you just need to replace it
thread lines marked (*),
accordingly:
       jp c,cont->jp nc,cont
       add hl,de->sbc hl,de
       djnz vio ->remove
            ret ->remove
-------------------------------------
  Maybe I put incomprehensible com-
comments, then I will explain very
just all her work:
  this procedure is common, I
I would say the simplest, hatch
sprite. Only one was added to it
nuance: lines are output only when
when register A is full and correspondingly
Actually flag C=1, i.e. installed.
It turns out that the lines are NOT DISPLAYED in
a certain sequence.
Or vice versa are duplicated according to the same
patterns. This pattern
is set at the very beginning, in register A
Further, throughout the entire program,
it folds in on itself.
   It turns out interesting and necessary
thing. It's a bit like work
with fractional numbers. And this joke
can be used very daringly.
  Implemented on this principlewhole-
Bresenheim numerical algorithm for
quickly draw a line from a point
to a point, drawing a circle.
   I don't think this procedure will work
suitable for use in your pro-
Gah, you can write a procedure faster
and more versatile. The principle itself is important
how it works. And then you can
use when solving others
tasks, all you need is imagination.

   Professional secret:
To help you fantasize better, I recommend
have a couple of bottles of beer with you
-PRESIDENT- CHERNIGOV 17% .

-------------------------------------
I think that's enough for the first article.
-------------------------------------

In the next issue I or BER will tell
let's eat something more interesting and
more modern. BER will tell you something
about downloading at breakneck speed or
with music, I'll tell you about a cool example-
understanding of SINUS, something about the algorithm
Bresenheim's move, all sorts of tricks with
graphics, etc.
  I think this section will be
useful for everyone: both beginners and beginners
coders.
_____________________________________
                             VIOLATOR

Share your thoughts about the article