Rev 5388 | Rev 5415 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5388 | Rev 5393 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | include '../../../../programs/develop/libraries/TinyGL/asm_fork/opengl_const.inc' |
16 | include '../../../../programs/develop/libraries/TinyGL/asm_fork/opengl_const.inc' |
17 | include 'vox_3d.inc' |
17 | include 'vox_3d.inc' |
18 | include '../trunk/str.inc' |
18 | include '../trunk/str.inc' |
Line 19... | Line 19... | ||
19 | 19 | ||
20 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
20 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
Line 21... | Line 21... | ||
21 | caption db 'Voxel viewer 29.01.15',0 ;¯®¤¯¨áì ®ª |
21 | caption db 'Voxel viewer 11.02.15',0 ;¯®¤¯¨áì ®ª |
22 | 22 | ||
23 | struct FileInfoBlock |
23 | struct FileInfoBlock |
24 | Function dd ? |
24 | Function dd ? |
Line 32... | Line 32... | ||
32 | 32 | ||
33 | run_file_70 FileInfoBlock |
33 | run_file_70 FileInfoBlock |
Line 34... | Line 34... | ||
34 | image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
34 | image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
35 | 35 | ||
36 | IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 |
36 | IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3 |
Line 37... | Line 37... | ||
37 | IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*9 |
37 | IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10 |
Line 38... | Line 38... | ||
38 | image_data_toolbar dd 0 |
38 | image_data_toolbar dd 0 |
Line 93... | Line 93... | ||
93 | mcall 40,0x27 |
93 | mcall 40,0x27 |
94 | stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£ |
94 | stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª ¤¨ «®£ |
Line 95... | Line 95... | ||
95 | 95 | ||
Line 96... | Line 96... | ||
96 | stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à |
96 | stdcall [buf2d_create], buf_0 ;ᮧ¤ ¨¥ ¡ãä¥à |
- | 97 | ||
- | 98 | load_image_file 'toolbar_t.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE*2 ;*2 for gray icons |
|
- | 99 | mov eax,[image_data_toolbar] |
|
Line 97... | Line 100... | ||
97 | 100 | add eax,IMAGE_TOOLBAR_SIZE |
|
98 | load_image_file 'toolbar_t.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE |
101 | stdcall img_to_gray, [image_data_toolbar],eax,(IMAGE_TOOLBAR_SIZE)/3 |
Line 99... | Line 102... | ||
99 | 102 | ||
Line 196... | Line 199... | ||
196 | int 0x40 |
199 | int 0x40 |
197 | add ebx,25 shl 16 |
200 | add ebx,25 shl 16 |
198 | mov edx,12 |
201 | mov edx,12 |
199 | int 0x40 |
202 | int 0x40 |
Line -... | Line 203... | ||
- | 203 | ||
- | 204 | call draw_toolbar_i |
|
- | 205 | ||
- | 206 | stdcall [buf2d_draw], buf_0 |
|
- | 207 | stdcall [kosglSwapBuffers] |
|
- | 208 | ||
- | 209 | mcall 12,2 |
|
- | 210 | popad |
|
- | 211 | ret |
|
- | 212 | ||
- | 213 | ||
- | 214 | align 4 |
|
200 | 215 | draw_toolbar_i: |
|
201 | ; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
216 | ; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å *** |
202 | mov edx,(7 shl 16)+7 ;icon new |
217 | mov edx,(7 shl 16)+7 ;icon new |
Line 203... | Line 218... | ||
203 | mcall 7,[image_data_toolbar],(16 shl 16)+16 |
218 | mcall 7,[image_data_toolbar],(16 shl 16)+16 |
Line 213... | Line 228... | ||
213 | add edx,(30 shl 16) ;zoom + |
228 | add edx,(30 shl 16) ;zoom + |
214 | int 0x40 |
229 | int 0x40 |
215 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
230 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
216 | add edx,(25 shl 16) ;zoom - |
231 | add edx,(25 shl 16) ;zoom - |
217 | int 0x40 |
232 | int 0x40 |
- | 233 | ||
218 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
234 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
- | 235 | cmp word[opt_light],0 |
|
- | 236 | jne @f |
|
- | 237 | add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon |
|
- | 238 | @@: |
|
219 | add edx,(25 shl 16) ;light on/off |
239 | add edx,(25 shl 16) ;light on/off |
220 | int 0x40 |
240 | int 0x40 |
- | 241 | cmp word[opt_light],0 |
|
- | 242 | jne @f |
|
- | 243 | sub ebx,IMAGE_TOOLBAR_SIZE |
|
- | 244 | @@: |
|
- | 245 | ||
221 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
246 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
- | 247 | cmp word[opt_cube_box],0 |
|
- | 248 | jne @f |
|
- | 249 | add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon |
|
- | 250 | @@: |
|
222 | add edx,(25 shl 16) ;box on/off |
251 | add edx,(25 shl 16) ;box on/off |
223 | int 0x40 |
252 | int 0x40 |
- | 253 | cmp word[opt_cube_box],0 |
|
- | 254 | jne @f |
|
- | 255 | sub ebx,IMAGE_TOOLBAR_SIZE |
|
- | 256 | @@: |
|
- | 257 | ||
224 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
258 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
- | 259 | cmp word[opt_auto_rotate],0 |
|
- | 260 | jne @f |
|
- | 261 | add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon |
|
- | 262 | @@: |
|
225 | add edx,(25 shl 16) ;auto rotate on/off |
263 | add edx,(25 shl 16) ;auto rotate on/off |
226 | int 0x40 |
264 | int 0x40 |
- | 265 | cmp word[opt_auto_rotate],0 |
|
- | 266 | jne @f |
|
- | 267 | sub ebx,IMAGE_TOOLBAR_SIZE |
|
- | 268 | @@: |
|
- | 269 | ||
227 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
270 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
228 | add edx,(25 shl 16) ;info voxels |
271 | add edx,(25 shl 16) ;info voxels |
229 | int 0x40 |
272 | int 0x40 |
230 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
273 | add ebx,IMAGE_TOOLBAR_ICON_SIZE |
231 | add edx,(25 shl 16) ;refresh |
274 | add edx,(25 shl 16) ;refresh |
232 | int 0x40 |
275 | int 0x40 |
233 | - | ||
234 | stdcall [buf2d_draw], buf_0 |
- | |
235 | stdcall [kosglSwapBuffers] |
- | |
236 | - | ||
237 | mcall 12,2 |
- | |
238 | popad |
- | |
239 | ret |
276 | ret |
Line 240... | Line 277... | ||
240 | 277 | ||
241 | 278 | ||
242 | align 4 |
279 | align 4 |
Line 243... | Line 280... | ||
243 | key: |
280 | key: |
244 | mcall 2 |
281 | mcall 2 |
245 | 282 | ||
246 | cmp ah,178 ;Up |
283 | cmp ah,178 ;Up |
247 | jne @f |
284 | jne @f |
248 | fld dword[angle_z] |
285 | fld dword[angle_x] |
249 | fadd dword[delt_size] |
286 | fadd dword[delt_size] |
250 | fstp dword[angle_z] |
287 | fstp dword[angle_x] |
251 | call draw_3d |
288 | call draw_3d |
252 | stdcall [kosglSwapBuffers] |
289 | stdcall [kosglSwapBuffers] |
253 | @@: |
290 | @@: |
254 | cmp ah,177 ;Down |
291 | cmp ah,177 ;Down |
255 | jne @f |
292 | jne @f |
256 | fld dword[angle_z] |
293 | fld dword[angle_x] |
257 | fsub dword[delt_size] |
294 | fsub dword[delt_size] |
258 | fstp dword[angle_z] |
295 | fstp dword[angle_x] |
259 | call draw_3d |
296 | call draw_3d |
260 | stdcall [kosglSwapBuffers] |
297 | stdcall [kosglSwapBuffers] |
261 | @@: |
298 | @@: |
262 | cmp ah,176 ;Left |
299 | cmp ah,176 ;Left |
263 | jne @f |
300 | jne @f |
264 | fld dword[angle_x] |
301 | fld dword[angle_y] |
265 | fadd dword[delt_size] |
302 | fadd dword[delt_size] |
266 | fstp dword[angle_x] |
303 | fstp dword[angle_y] |
267 | call draw_3d |
304 | call draw_3d |
268 | stdcall [kosglSwapBuffers] |
305 | stdcall [kosglSwapBuffers] |
269 | @@: |
306 | @@: |
270 | cmp ah,179 ;Right |
307 | cmp ah,179 ;Right |
271 | jne @f |
308 | jne @f |
272 | fld dword[angle_x] |
309 | fld dword[angle_y] |
273 | fsub dword[delt_size] |
310 | fsub dword[delt_size] |
274 | fstp dword[angle_x] |
311 | fstp dword[angle_y] |
Line 275... | Line 312... | ||
275 | call draw_3d |
312 | call draw_3d |
Line 318... | Line 355... | ||
318 | jne @f |
355 | jne @f |
319 | call but_6 |
356 | call but_6 |
320 | @@: |
357 | @@: |
321 | cmp ah,12 |
358 | cmp ah,12 |
322 | jne @f |
359 | jne @f |
323 | call but_7 |
360 | call but_draw_cadr |
324 | @@: |
361 | @@: |
325 | cmp ah,1 |
362 | cmp ah,1 |
326 | jne still |
363 | jne still |
327 | .exit: |
364 | .exit: |
328 | stdcall [buf2d_delete],buf_0 |
365 | stdcall [buf2d_delete],buf_0 |
Line 332... | Line 369... | ||
332 | mcall -1 |
369 | mcall -1 |
Line 333... | Line 370... | ||
333 | 370 | ||
334 | 371 | ||
335 | align 4 |
372 | align 4 |
336 | but_new_file: |
373 | but_new_file: |
337 | mov dword[angle_x], 0.0 |
374 | mov dword[angle_x], 30.0 |
338 | mov [angle_y], 0.0 |
375 | mov dword[angle_y], 180.0 |
Line 339... | Line 376... | ||
339 | mov [angle_z], 180.0 |
376 | mov dword[angle_z], 180.0 |
340 | ret |
377 | ret |
341 | 378 | ||
Line 472... | Line 509... | ||
472 | 509 | ||
473 | stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥ |
510 | stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥ |
Line 474... | Line 511... | ||
474 | ret |
511 | ret |
475 | 512 | ||
Line 476... | Line 513... | ||
476 | align 4 |
513 | align 4 |
477 | rot_angles dd 0,45,90,135,180,225,270,315 |
514 | rot_angles dd 180,225,270,315,0,45,90,135 |
478 | 515 | ||
479 | align 4 |
516 | align 4 |
Line 552... | Line 589... | ||
552 | @@: |
589 | @@: |
553 | ret |
590 | ret |
554 | endp |
591 | endp |
Line 555... | Line 592... | ||
555 | 592 | ||
556 | align 4 |
593 | align 4 |
557 | proc but_3 uses eax |
594 | proc but_3 uses eax ebx ecx edx |
558 | xor word[opt_light],1 |
595 | xor word[opt_light],1 |
559 | cmp word[opt_light],0 |
596 | cmp word[opt_light],0 |
560 | je @f |
597 | je @f |
561 | stdcall [glEnable], GL_LIGHTING |
598 | stdcall [glEnable], GL_LIGHTING |
562 | stdcall [glEnable], GL_LIGHT0 |
599 | stdcall [glEnable], GL_LIGHT0 |
563 | jmp .end_light |
600 | jmp .end_light |
564 | @@: |
601 | @@: |
565 | stdcall [glDisable], GL_LIGHTING |
602 | stdcall [glDisable], GL_LIGHTING |
566 | stdcall [glDisable], GL_LIGHT0 |
603 | stdcall [glDisable], GL_LIGHT0 |
- | 604 | .end_light: |
|
567 | .end_light: |
605 | call draw_toolbar_i |
568 | call draw_3d |
606 | call draw_3d |
569 | stdcall [kosglSwapBuffers] |
607 | stdcall [kosglSwapBuffers] |
570 | ret |
608 | ret |
Line 571... | Line 609... | ||
571 | endp |
609 | endp |
572 | 610 | ||
573 | align 4 |
611 | align 4 |
- | 612 | proc but_4 uses eax ebx ecx edx |
|
574 | proc but_4 uses eax |
613 | xor word[opt_cube_box],1 |
575 | xor word[opt_cube_box],1 |
614 | call draw_toolbar_i |
576 | call draw_3d |
615 | call draw_3d |
577 | stdcall [kosglSwapBuffers] |
616 | stdcall [kosglSwapBuffers] |
Line 578... | Line 617... | ||
578 | ret |
617 | ret |
579 | endp |
618 | endp |
580 | 619 | ||
- | 620 | align 4 |
|
581 | align 4 |
621 | proc but_5 uses eax ebx ecx edx |
582 | proc but_5 uses eax |
622 | xor word[opt_auto_rotate],1 |
Line 583... | Line 623... | ||
583 | xor word[opt_auto_rotate],1 |
623 | call draw_toolbar_i |
584 | ret |
624 | ret |
Line 645... | Line 685... | ||
645 | txt_stat_m2: |
685 | txt_stat_m2: |
646 | db 13,10,'â®¡à ¦ ¥¬ëå £à ¥©: ' |
686 | db 13,10,'â®¡à ¦ ¥¬ëå £à ¥©: ' |
647 | .v: rb 20 |
687 | .v: rb 20 |
Line 648... | Line 688... | ||
648 | 688 | ||
649 | align 4 |
689 | align 4 |
- | 690 | proc but_draw_cadr uses eax ebx ecx edx |
|
- | 691 | mov ebx,[angle_x] |
|
- | 692 | mov ecx,[angle_y] |
|
650 | proc but_7 uses eax |
693 | mov edx,[angle_z] |
- | 694 | call draw_cadr_8 |
|
- | 695 | mov [angle_x],ebx |
|
- | 696 | mov [angle_y],ecx |
|
- | 697 | mov [angle_z],edx |
|
- | 698 | cmp word[opt_auto_rotate],0 |
|
- | 699 | jne @f |
|
- | 700 | call draw_3d |
|
- | 701 | ;stdcall [kosglSwapBuffers] |
|
651 | call draw_cadr_8 |
702 | @@: |
652 | ret |
703 | ret |
Line 653... | Line 704... | ||
653 | endp |
704 | endp |
654 | 705 | ||
Line 664... | Line 715... | ||
664 | stdcall [glTranslatef], 0.0,0.0,0.5 ;ª®®à¤¨ âë ¯® ®á¨ z ¤®«¦ë ¡ëâì ¢ ¯à¥¤¥« å ®â 0.0 ¤® 1.0, ¨ ç¥ ¨§®¡à ¦¥¨¥ ¡ã¤¥â ®âᥪ âìáï |
715 | stdcall [glTranslatef], 0.0,0.0,0.5 ;ª®®à¤¨ âë ¯® ®á¨ z ¤®«¦ë ¡ëâì ¢ ¯à¥¤¥« å ®â 0.0 ¤® 1.0, ¨ ç¥ ¨§®¡à ¦¥¨¥ ¡ã¤¥â ®âᥪ âìáï |
665 | ;¢®ªá¥«ìë© ®¡ê¥ªâ ¨¬¥¥â ª®®à¤¨ âë ¯® ®áï¬ ®â -0.5 ¤® 0.5, ¯®â®¬ã ¥£® ¤¢¨£ ¥¬ +0.5 |
716 | ;¢®ªá¥«ìë© ®¡ê¥ªâ ¨¬¥¥â ª®®à¤¨ âë ¯® ®áï¬ ®â -0.5 ¤® 0.5, ¯®â®¬ã ¥£® ¤¢¨£ ¥¬ +0.5 |
666 | ;® ¢á¥ ¦¥ ¯à¨ ¯®¢®à®â å ¡ã¤ãâ ®âᥪ âáï ªà ï, ª®â®àë¥ ¢ë«¥§ãâ § ¯à¥¤¥«ë ¯«®áª®á⥩ ®âá¥ç¥¨ï |
717 | ;® ¢á¥ ¦¥ ¯à¨ ¯®¢®à®â å ¡ã¤ãâ ®âᥪ âáï ªà ï, ª®â®àë¥ ¢ë«¥§ãâ § ¯à¥¤¥«ë ¯«®áª®á⥩ ®âá¥ç¥¨ï |
667 | ;¢ ¢¥àᨨ opengl ¯®¤ Win ª®®à¤¨ âë ¨¤ãâ ®â -1.0 ¤® 1.0 ¯®â®¬ã â ¬ í⮣® ¤¥« âì ¥ 㦮 |
718 | ;¢ ¢¥àᨨ opengl ¯®¤ Win ª®®à¤¨ âë ¨¤ãâ ®â -1.0 ¤® 1.0 ¯®â®¬ã â ¬ í⮣® ¤¥« âì ¥ 㦮 |
668 | stdcall [glScalef], [scale], [scale], [scale] ;㢥«¨ç¨¢ ¥¬ ¢®ªá¥«ìë© ®¡ê¥ªâ, çâ®-¡ë ¥ ¡ë« ®ç¥ì ¬ «¥ìª¨¬ |
719 | stdcall [glScalef], [scale], [scale], [scale] ;㢥«¨ç¨¢ ¥¬ ¢®ªá¥«ìë© ®¡ê¥ªâ, çâ®-¡ë ¥ ¡ë« ®ç¥ì ¬ «¥ìª¨¬ |
669 | stdcall [glRotatef], [angle_y],0.0,1.0,0.0 |
- | |
670 | stdcall [glRotatef], [angle_x],1.0,0.0,0.0 |
720 | stdcall [glRotatef], [angle_x],1.0,0.0,0.0 |
- | 721 | stdcall [glRotatef], [angle_y],0.0,1.0,0.0 |
|
671 | stdcall [glRotatef], [angle_z],0.0,0.0,1.0 |
722 | stdcall [glRotatef], [angle_z],0.0,0.0,1.0 |
672 | stdcall draw_voxels_3d,[open_file_ogl] |
723 | stdcall draw_voxels_3d,[open_file_ogl] |
Line 673... | Line 724... | ||
673 | 724 | ||
674 | stdcall [glPopMatrix] |
725 | stdcall [glPopMatrix] |
Line 693... | Line 744... | ||
693 | 744 | ||
694 | ;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE |
745 | ;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE |
695 | ret |
746 | ret |
Line 696... | Line -... | ||
696 | endp |
- | |
697 | - | ||
698 | ;input: |
- | |
699 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
- | |
700 | ;output: |
747 | endp |
701 | ; eax - ç¨á«® |
748 | |
702 | align 4 |
- | |
703 | proc conv_str_to_int, buf:dword |
749 | align 4 |
704 | xor eax,eax |
750 | proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword |
705 | push ebx ecx esi |
751 | pushad |
706 | xor ebx,ebx |
- | |
707 | mov esi,[buf] |
752 | mov esi,[buf_rgb] |
708 | ;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥« |
753 | mov edi,[buf_g24] |
709 | xor ecx,ecx |
- | |
710 | inc ecx |
- | |
711 | cmp byte[esi],'-' |
- | |
712 | jne @f |
754 | mov ecx,[pixels] |
713 | dec ecx |
755 | mov ebx,3 |
714 | inc esi |
- | |
715 | @@: |
- | |
716 | - | ||
717 | cmp word[esi],'0x' |
- | |
718 | je .load_digit_16 |
- | |
719 | 756 | align 4 |
|
720 | .load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
- | |
721 | mov bl,byte[esi] |
- | |
722 | cmp bl,'0' |
- | |
723 | jl @f |
- | |
724 | cmp bl,'9' |
- | |
725 | jg @f |
757 | @@: |
726 | sub bl,'0' |
758 | movzx eax,byte[esi] |
727 | imul eax,10 |
- | |
728 | add eax,ebx |
- | |
729 | inc esi |
- | |
730 | jmp .load_digit_10 |
- | |
731 | jmp @f |
- | |
732 | - | ||
733 | .load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
- | |
734 | add esi,2 |
759 | movzx edx,byte[esi+1] |
735 | .cycle_16: |
760 | add eax,edx |
736 | mov bl,byte[esi] |
- | |
737 | cmp bl,'0' |
761 | movzx edx,byte[esi+2] |
738 | jl @f |
- | |
739 | cmp bl,'f' |
762 | add eax,edx |
740 | jg @f |
- | |
741 | cmp bl,'9' |
- | |
742 | jle .us1 |
- | |
743 | cmp bl,'A' |
- | |
744 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
763 | xor edx,edx |
745 | .us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
- | |
746 | cmp bl,'F' |
764 | div ebx ;shr eax,2 |
747 | jle .us2 |
- | |
748 | cmp bl,'a' |
- | |
749 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
- | |
750 | sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
- | |
751 | .us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
765 | mov ah,al |
752 | sub bl,'0' |
- | |
753 | cmp bl,9 |
- | |
754 | jle .cor1 |
- | |
755 | sub bl,7 ;convert 'A' to '10' |
766 | mov word[edi],ax |
756 | .cor1: |
767 | mov byte[edi+2],al |
757 | shl eax,4 |
- | |
758 | add eax,ebx |
- | |
759 | inc esi |
- | |
760 | jmp .cycle_16 |
- | |
761 | @@: |
768 | add esi,3 |
762 | or ecx,ecx ;¥á«¨ ç¨á«® ®âà¨æ ⥫쮥 |
- | |
763 | jnz @f |
- | |
764 | neg eax |
769 | add edi,3 |
765 | inc eax |
- | |
766 | @@: |
770 | loop @b |
767 | pop esi ecx ebx |
771 | popad |
Line -... | Line 772... | ||
- | 772 | ret |
|
768 | ret |
773 | endp |
769 | endp |
774 | |
770 | 775 | ||
771 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
776 | ;¤ ë¥ ¤«ï ¤¨ «®£ ®âªàëâ¨ï ä ©«®¢ |
772 | align 4 |
777 | align 4 |
Line 1002... | Line 1007... | ||
1002 | angle_z dd 0.0 |
1007 | angle_z dd 0.0 |
1003 | delt_size dd 3.0 |
1008 | delt_size dd 3.0 |
Line 1004... | Line 1009... | ||
1004 | 1009 | ||
1005 | opt_light dw 0 ;®¯æ¨ï ¤«ï ¢ª«î票ï/¢ëª«î票ï ᢥâ |
1010 | opt_light dw 0 ;®¯æ¨ï ¤«ï ¢ª«î票ï/¢ëª«î票ï ᢥâ |
1006 | opt_cube_box dw 1 ;®¯æ¨ï ¤«ï à¨á®¢ ¨ï à ¬ª¨ ¢®ªà㣠®¡ê¥ªâ |
1011 | opt_cube_box dw 1 ;®¯æ¨ï ¤«ï à¨á®¢ ¨ï à ¬ª¨ ¢®ªà㣠®¡ê¥ªâ |
Line 1007... | Line 1012... | ||
1007 | opt_auto_rotate dw 1 ;®¯æ¨ï ¤«ï ¢â®¬ â¨ç¥áª®£® ¯®¢®à®â ®¡ê¥ªâ |
1012 | opt_auto_rotate dw 0 ;®¯æ¨ï ¤«ï ¢â®¬ â¨ç¥áª®£® ¯®¢®à®â ®¡ê¥ªâ |
1008 | 1013 | ||
1009 | light_position dd 0.0, 0.0, 2.0, 1.0 ; ᯮ«®¦¥¨¥ ¨áâ®ç¨ª [0][1][2] |
1014 | light_position dd 0.0, 0.0, 2.0, 1.0 ; ᯮ«®¦¥¨¥ ¨áâ®ç¨ª [0][1][2] |