Skip to content

Commit

Permalink
Cleaned example.ez80
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMachine02 committed Sep 25, 2017
1 parent 249e088 commit 32c4eea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions example.ez80
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
.db tExtTok, tAsm84CeCmp
.assume ADL=1

#define DELTA 4096

; init the virtual 3d library
call vxEngineInit
ret c ; quit if error at init
Expand All @@ -28,9 +26,12 @@
ld de, $D30000-2
call vxZX7Uncompress ; uncompress the texture generated by convpng


; setup global variable for rendering, euler angle and the translation of WorldMatrix

; about translation : the format inputed in glib is pure integer 16 bits coordinates. On blender the conversion is made like this : 1.0=256
; translation are added post transformation. So they carry the multiplication with the matrice, which aren't divided by the fixed point value of 1.0 (the matrix equivalent or 64). To have a translation of 1.0 in worldview matrix, the translation need to be 256*64 = 16384.
; However, there is two type of matrix in glib : the model matrix, which is in MODELSPACE and the world type matrix in WORLDSPACE. Modelspace matrix have only a 16 bits translation and doesn't have the 64 factor described previously.

ld hl, 0
ld (EulerAngle), hl
ld hl, WorldMatrix
Expand Down

0 comments on commit 32c4eea

Please sign in to comment.