Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Pascal Форум Информер Страны мира
   Demo Making    >>    tf_texmp
   
 
 Full Screen Texturing Demo [320x200x256]  Stefan Ohrhallinger 19.10.93

Демонстрация полноэкранного текстурирования. Вращение и масштабирование битмапов.
Full screen texturing. Looks alot better than in 2nd Reality =)



34k 
 

Another Release by The Faker! Full screen texturing: It runs full screen (320x200) at 70 frames/second on a 486DX-66 Local Bus or even larger areas. It runs at about half screen (200x120 or so) on a 486DX-33 without Local Bus or at 35 frames/second full screen. (and looks alot better than in 2nd Reality =) BTW, this was coded quite a time before that; but couldn't be released earlier due to upload problems (fuck the sysops!) coded by The Fakerо / AARDVARK Feel free to use this in your productions - Feel free to credit me =) Notes: This is the same routine as in TEXTURE.PAS except that the 'db 66h' (386er opcodes) are replaced. That may be also useful for ASM-only programmers. Look at the sample program in the tf_texmp.zip ! PROCEDURE PutTexture(IncX,IncY:Integer; P:Pointer); VAR Y,PosX,PosY,PX,PY:Integer; BEGIN PosX:=-(ScreenX SHR 1)*IncX; { ScreenX,-Y are size of screen; PosX,-Y } PosY:=-(ScreenY SHR 1)*IncY; { PosX,-Y are set so rotation is around middle } FOR Y:=0 TO ScreenY-1 DO BEGIN PX:=PosX; { PosX,-Y is updated every line, PX,-Y taken from those } PY:=PosY; ASM push ds mov ax,0a000h mov es,ax mov ax,y xchg al,ah mov di,ax shr di,2 add di,ax lds si,p { in P there should be a 256x256 bitmap } mov cx,screenx shr 1 cld mov ax,incx shl eax,16 mov ax,incy mov esi,eax mov dx,px shl edx,16 mov dx,py @1: add edx,esi mov ebx,edx shr ebx,16 mov bl,dh mov al,[bx] add edx,esi mov ebx,edx shr ebx,16 mov bl,dh mov ah,[bx] stosw dec cx jnz @1 pop ds END; Inc(PosX,IncY); Inc(PosY,-IncX); END; END;