Browse Source

feat: ajout du logiciel test2d.ce qui permet de vérifier le bon fonctionnement des fonctions graphiques 2D

develop
Nicolas Hordé 17 years ago
parent
commit
b8248c75a2
  1. 2
      programs/MAKEFILE
  2. 55
      programs/test2d.asm

2
programs/MAKEFILE

@ -1,7 +1,7 @@
asm= lzasm /z/t
lnk= elink
all: exem-lib.lib exem-ce.ce pmode.ce isa.ce editeur.ce volume.ce test.ce verifier.ce gestion.ce logo.ce souris.ce test3d.ce
all: exem-lib.lib exem-ce.ce pmode.ce isa.ce editeur.ce volume.ce test.ce verifier.ce gestion.ce logo.ce souris.ce test3d.ce test2d.ce
.asm.obj:
$(asm) $<

55
programs/test2d.asm

@ -0,0 +1,55 @@
model tiny,stdcall
p586N
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\fat.h"
include "..\include\divers.h"
include "..\include\3d.h"
org 0h
start:
header exe <"CE",1,0,0,,offset imports,,offset realstart>
realstart:
call [cs:randomize]
call [cs:savestate]
call [cs:setvideomode],10
call [cs:clearscreen]
mov cx,65535
show:
call [cs:random]
and ax,1111b
push ax
call [cs:random]
push ax
call [cs:random]
push ax
call [cs:random]
push ax
call [cs:random]
push ax
call [cs:line]
dec cx
jnz show
call [cs:bioswaitkey]
call [cs:restorestate]
retf
importing
use VIDEO.LIB,print
use VIDEO,savestate
use VIDEO,clearscreen
use VIDEO,setvideomode
use VIDEO,restorestate
use VIDEO,waitretrace
use GRAPHIC,line ;@x1:word,@y1:word,@x2:word,@y2:word,@color:word
use GRAPHIC,polyfill ;@pointer:word,@nbfaces:word,@color:word;
use SYSTEME,bioswaitkey
use MATH.LIB,randomize
use MATH.LIB,random
endi
Loading…
Cancel
Save