Subversion Repositories Kolibri OS

Rev

Rev 6873 | Rev 8408 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. format MS COFF
  2. public EXPORTS
  3. section '.flat' code readable align 16
  4.  
  5. include '../../../../proc32.inc'
  6. include '../../../../macros.inc'
  7. include '../../../../KOSfuncs.inc'
  8.  
  9. DEBUG equ 0
  10.  
  11. include 'zgl.inc'
  12. include 'zmath.asm'
  13. include 'clip.asm'
  14. include 'vertex.asm'
  15. include 'api.asm'
  16. include 'list.asm' ;gl_add_op
  17. include 'init.asm'
  18. include 'matrix.asm' ;gl_print_matrix
  19. include 'texture.asm'
  20. include 'misc.asm'
  21. include 'clear.asm'
  22. include 'light.asm'
  23. include 'select.asm'
  24. ;include 'get.asm'
  25. ;include 'error.asm'
  26. include 'zbuffer.asm'
  27. include 'zline.asm'
  28. ;include 'zdither.asm'
  29. include 'ztriangle.asm'
  30. include 'image_util.asm'
  31. ;include 'msghandling.asm'
  32. include 'arrays.asm'
  33. include 'specbuf.asm'
  34.  
  35. include 'kosgl.asm'
  36. include 'glu.asm'
  37.  
  38. if DEBUG
  39. include 'info_fun_float.inc'
  40.  
  41. align 4
  42. txt_nl db 13,10,0
  43. txt_sp db ' ',0
  44. txt_op db 'Op_code',0
  45. txt_zp_sp db ', ',0
  46. m_1 db '(1)',13,10,0
  47. m_2 db '(2)',13,10,0
  48. m_3 db '(3)',13,10,0
  49. m_4 db '(4)',13,10,0
  50. m_5 db '(5)',13,10,0
  51. m_6 db '(6)',13,10,0
  52. m_7 db '(7)',13,10,0
  53. m_8 db '(8)',13,10,0
  54. m_9 db '(9)',13,10,0
  55.  
  56. buf_param rb 80
  57.  
  58. align 4
  59. proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n_len:dword
  60.         mov esi,dword[str2]
  61.         mov ecx,dword[n_len]
  62.         mov edi,dword[str1]
  63.         stdcall str_len,edi
  64.         add edi,eax
  65.         cld
  66.         repne movsb
  67.         mov byte[edi],0
  68.         ret
  69. endp
  70.  
  71. ;input:
  72. ; eax - число
  73. ; edi - буфер для строки
  74. ; len - длинна буфера
  75. ;output:
  76. align 4
  77. proc convert_int_to_str, len:dword
  78. pushad
  79.         mov esi,[len]
  80.         add esi,edi
  81.         dec esi
  82.         call .str
  83. popad
  84.         ret
  85. endp
  86.  
  87. align 4
  88. .str:
  89.         mov ecx,10
  90.         cmp eax,ecx
  91.         jb @f
  92.                 xor edx,edx
  93.                 div ecx
  94.                 push edx
  95.                 call .str
  96.                 pop eax
  97.         @@:
  98.         cmp edi,esi
  99.         jge @f
  100.                 or al,0x30
  101.                 stosb
  102.                 mov byte[edi],0
  103.         @@:
  104.         ret
  105. end if
  106.  
  107. ; ***
  108. glVertex2d: ;(double ,double)
  109. glVertex2dv: ;(double *)
  110. glVertex3d: ;(double ,double ,double)
  111. glVertex3dv: ;(double *)
  112. glVertex4d: ;(double ,double ,double, double )
  113. glVertex4dv: ;(double *)
  114. glColor3d: ;(double ,double ,double)
  115. glColor3dv: ;(double *)
  116. glColor4d: ;(double ,double ,double, double )
  117. glColor4dv: ;(double *)
  118. glNormal3d: ;(double ,double ,double)
  119. glNormal3dv: ;(double *)
  120. glTexCoord1f: ;(float)
  121. glTexCoord1d: ;(double)
  122. glTexCoord1fv: ;(float *)
  123. glTexCoord1dv: ;(double *)
  124. glTexCoord2d: ;(double ,double)
  125. glTexCoord2dv: ;(double *)
  126. glTexCoord3f: ;(float ,float ,float)
  127. glTexCoord3d: ;(double ,double ,double)
  128. glTexCoord3fv: ;(float *)
  129. glTexCoord3dv: ;(double *)
  130. glTexCoord4d: ;(double ,double ,double, double )
  131. glTexCoord4fv: ;(float *)
  132. glTexCoord4dv: ;(double *)
  133. glGetIntegerv: ;(int pname,int *params)
  134. glGetFloatv: ;(int pname, float *v)
  135.  
  136. align 4
  137. err_0 db 'Error while initializing Z buffer',13,10,0
  138. f_zb_opn db ' ZB_open',0
  139. err_1 db 'gl_malloc(sizeof.ZBuffer)==0',13,10,0
  140. err_2 db 'gl_malloc(xsize*ysize*4)==0',13,10,0
  141. err_3 db 'bit mode not correct',13,10,0
  142. err_4 db 'error while resizing display',13,10,0
  143. err_5 db 'size too small',13,10,0
  144. err_6 db 'unsupported option',13,10,0
  145. err_7 db 'assert(target == GL_TEXTURE_2D && texture >= 0)',13,10,0
  146. err_8 db 'combinaison of parameters not handled',13,10,0
  147. err_9 db 'GL_INVALID_ENUM',13,10,0
  148. f_zbz db ' ZB_line_z',0
  149. f_zb db ' ZB_line',0
  150. f_find_l db 'find_list',0
  151. f_alloc_l db 'alloc_list',0
  152. f_fill_tr db 'ZB_fillTriangle...',0
  153. f_fill_tr_nl db ' lines',0
  154. f_fill_tr_nll db ' len',0
  155.  
  156. align 4
  157. proc dbg_print, fun:dword, mes:dword
  158. pushad
  159.         mov eax,SF_BOARD
  160.         mov ebx,SSF_DEBUG_WRITE
  161.  
  162.         mov esi,[fun]
  163.         @@:
  164.                 mov cl,byte[esi]
  165.                 int 0x40
  166.                 inc esi
  167.                 cmp byte[esi],0
  168.                 jne @b
  169.         mov cl,':'
  170.         int 0x40
  171.         mov cl,' '
  172.         int 0x40
  173.         mov esi,[mes]
  174.         @@:
  175.                 mov cl,byte[esi]
  176.                 int 0x40
  177.                 inc esi
  178.                 cmp byte[esi],0
  179.                 jne @b
  180. popad
  181.         ret
  182. endp
  183.  
  184. align 16
  185. EXPORTS:
  186. macro E_LIB n
  187. {
  188.         dd sz_#n, n
  189. }
  190. include 'export.inc'
  191.         dd 0,0
  192. macro E_LIB n
  193. {
  194.         sz_#n db `n,0
  195. }
  196. include 'export.inc'
  197.