CPC-POWER :
CPC-SOFTS
(Base de données) -
CPCArchives
(Articles) -
NGServers
(Hébergement)
Accueil
19582 PROGRAMMES
PROTECTIONS
Dumpeurs
9572 commentaires
Liens
Contact
Donations
FORUM
Session end : 11h59m56s
Hide picture Sexe : OFF
Donations 2024 : 855.48 €
11224
© Dirty Minds (
2014
)
 
Voxel1K
NOTICE / MANUAL
ZIP (1)
TXT (1)
NOTICE ZIP n° 5 (6.02 Ko)
source
NOTICE TEXTE n° 1 (2.03 Ko)
int angle = playerAngle - 32; for (int x=0; x<64; x++) { int stepX = icos(angle); int stepY = icos(angle + 64); // sin(angle) int px = onTheMapX; int py = onTheMapY; for (int y=0; y<32; y++) { px += stepX; py += stepY; int height = getFromMap(px >> 8, py >> 8); // store height or do something with height } angle++; } ld ix,heightCalcBuffer ; where to right temporarily the sampled heights ld iyh, sin1_highbyte ld iyl,playerAngle - 32; ld b,64 loopX: ld h,0:ld l, constant_onTheMapY: ld a,(iy + 64) exx:ld h,0:ld l, constant_onTheMapX: ld a,(iy):exx inc iy ld c,32 loopY: add hl,de:ld a,h:and (voxelmapHeight-1):add a,whereVoxelMapIsHighByte ; X maybe 0 to 255, Y 0 to 31 or 63 exx:add hl,de:ld c,h:ld b,a:ld a,(bc):exx ld (ix),a:inc ix dec c jr nz,loopY dec b jr nz,loopX 3+1+2+2 = 8 1+3+1+1+2+1 = 9 ld (bc),a:inc c = 3 20 ;5+2 = 7 ;1+3 = 4 28 int maxHeight = 0; int angle = playerAngle - 32; for (int x=0; x<64; x++) { int stepX = icos(angle); int stepY = icos(angle + 64); // sin(angle) int px = onTheMapX; int py = onTheMapY; *vram = &2020 + x + 31*256; for (int y=0; y<32; y++) { px += stepX; py += stepY; int height = getFromMap(px >> 8, py >> 8) + y; //if (height > maxHeight) //{ for (int z=maxHeight; z<height; z++) { *vram = height; vram -= 256; } //} } angle++; } ld ix,heightCalcBuffer ; where to right temporarily the sampled heights ld iyh, sin1_highbyte ld iyl,playerAngle - 32; ld b,64 loopX: ld h,0:ld l, constant_onTheMapY: ld a,(iy + 64) exx:ld h,0:ld l, constant_onTheMapX: ld a,(iy):exx inc iy ld c,32 loopY: add hl,de:ld a,h:and (voxelmapHeight-1):add a,whereVoxelMapIsHighByte ; X maybe 0 to 255, Y 0 to 31 or 63 exx:add hl,de:ld c,h:ld b,a:ld a,(bc):exx add a,b loopZ: ld (ix),a cp maxHeight ; height - maxHeight dec a dec ixh jr nc,loopZ dec c jr nz,loopY dec b jr nz,loopX 21 + 12 = 33
CPC-POWER/CPCSOFTS
, programmation par
Kukulcan
© 2007-2024 tous droits réservés.
Reproduction sans autorisation interdite. Tous les titres utilisés appartiennent à leurs propriétaires respectifs.
Hébergement Web, Mail et serveurs de jeux haute performance