📄 spr8x8_16.s
字号:
/******************************************************************************//* *//* RAINE 8x8 TILE DRAWING *//* *//******************************************************************************//*MappedTransparent MappedDirect-MappedTransparent Direct-Mapped*/#include "asmdefs.inc"CODE_SEG FUNC(Draw8x8_Mapped_16) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_00: movl %edx,endc_00-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movb (%edi),%dl movb (%esi),%al movb 15(%edi),%cl movb 4(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,(%edi) movw %dx,8(%edi) movb 1(%esi),%al movb 5(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,2(%edi) movw %dx,10(%edi) movb 2(%esi),%al movb 6(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,4(%edi) movw %dx,12(%edi) movb 3(%esi),%al movb 7(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,6(%edi) movw %dx,14(%edi) addl $8,%esi // Next Tile Line addl $0xDEADBEEF,%edi // Next Screen Linebitw_00: cmp $0xDEADBEEF,%esiendc_00: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Mapped_16_FlipY) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_01: movl %edx,endc_01-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movb (%edi),%dl movb (%esi),%al movb 15(%edi),%cl movb 4(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14(%edi) movw %dx,14-8(%edi) movb 1(%esi),%al movb 5(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-2(%edi) movw %dx,14-10(%edi) movb 2(%esi),%al movb 6(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-4(%edi) movw %dx,14-12(%edi) movb 3(%esi),%al movb 7(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-6(%edi) movw %dx,14-14(%edi) addl $8,%esi // Next Tile Line addl $0xDEADBEEF,%edi // Next Screen Linebitw_01: cmp $0xDEADBEEF,%esiendc_01: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Mapped_16_FlipX) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_02: movl %edx,endc_02-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movb (%edi),%dl movb (%esi),%al movb 15(%edi),%cl movb 4(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,(%edi) movw %dx,8(%edi) movb 1(%esi),%al movb 5(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,2(%edi) movw %dx,10(%edi) movb 2(%esi),%al movb 6(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,4(%edi) movw %dx,12(%edi) movb 3(%esi),%al movb 7(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,6(%edi) movw %dx,14(%edi) addl $8,%esi // Next Tile Line subl $0xDEADBEEF,%edi // Next Screen Linebitw_02: cmp $0xDEADBEEF,%esiendc_02: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Mapped_16_FlipXY) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_03: movl %edx,endc_03-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movb (%edi),%dl movb (%esi),%al movb 15(%edi),%cl movb 4(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14(%edi) movw %dx,14-8(%edi) movb 1(%esi),%al movb 5(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-2(%edi) movw %dx,14-10(%edi) movb 2(%esi),%al movb 6(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-4(%edi) movw %dx,14-12(%edi) movb 3(%esi),%al movb 7(%esi),%bl movw (%ebp,%eax,2),%cx movw (%ebp,%ebx,2),%dx movw %cx,14-6(%edi) movw %dx,14-14(%edi) addl $8,%esi // Next Tile Line subl $0xDEADBEEF,%edi // Next Screen Linebitw_03: cmp $0xDEADBEEF,%esiendc_03: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Trans_Mapped_16) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_04: movl %edx,endc_04-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movw (%edi),%dx movb (%esi),%al movw 14(%edi),%cx movb 4(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,8(%edi)7: movb 1(%esi),%al movb 5(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,2(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,10(%edi)7: movb 2(%esi),%al movb 6(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,4(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,12(%edi)7: movb 3(%esi),%al movb 7(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,6(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14(%edi)7: addl $8,%esi // Next Tile Line addl $0xDEADBEEF,%edi // Next Screen Linebitw_04: cmp $0xDEADBEEF,%esiendc_04: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Trans_Mapped_16_FlipY) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_05: movl %edx,endc_05-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movw (%edi),%dx movb (%esi),%al movw 14(%edi),%cx movb 4(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-8(%edi)7: movb 1(%esi),%al movb 5(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-2(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-10(%edi)7: movb 2(%esi),%al movb 6(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-4(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-12(%edi)7: movb 3(%esi),%al movb 7(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-6(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-14(%edi)7: addl $8,%esi // Next Tile Line addl $0xDEADBEEF,%edi // Next Screen Linebitw_05: cmp $0xDEADBEEF,%esiendc_05: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Trans_Mapped_16_FlipX) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_06: movl %edx,endc_06-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movw (%edi),%dx movb (%esi),%al movw 14(%edi),%cx movb 4(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,8(%edi)7: movb 1(%esi),%al movb 5(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,2(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,10(%edi)7: movb 2(%esi),%al movb 6(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,4(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,12(%edi)7: movb 3(%esi),%al movb 7(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,6(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14(%edi)7: addl $8,%esi // Next Tile Line subl $0xDEADBEEF,%edi // Next Screen Linebitw_06: cmp $0xDEADBEEF,%esiendc_06: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_Trans_Mapped_16_FlipXY) pushl %ebp pushl %edi pushl %esi pushl %ebx movl 20(%esp),%esi // source movl 28(%esp),%eax // y movl %esi,%edx sall $2,%eax addl $8*8,%edx // tile end movl 0xDEADBEEF(%eax),%ediblin_07: movl %edx,endc_07-4 movl 32(%esp),%ebp // cmap addl 24(%esp),%edi // x addl 24(%esp),%edi // x xorl %edx,%edx xorl %ecx,%ecx xorl %ebx,%ebx xorl %eax,%eax9: movw (%edi),%dx movb (%esi),%al movw 14(%edi),%cx movb 4(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-8(%edi)7: movb 1(%esi),%al movb 5(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-2(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-10(%edi)7: movb 2(%esi),%al movb 6(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-4(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-12(%edi)7: movb 3(%esi),%al movb 7(%esi),%bl testb %al,%al jz 7f movw (%ebp,%eax,2),%cx movw %cx,14-6(%edi)7: testb %bl,%bl jz 7f movw (%ebp,%ebx,2),%dx movw %dx,14-14(%edi)7: addl $8,%esi // Next Tile Line subl $0xDEADBEEF,%edi // Next Screen Linebitw_07: cmp $0xDEADBEEF,%esiendc_07: jne 9b popl %ebx popl %esi popl %edi popl %ebp retFUNC(Draw8x8_16) pushl %edi pushl %esi pushl %ebx movl 16(%esp),%esi // source movl 24(%esp),%ebx // y movl 28(%esp),%eax // cmap sall $2,%ebx movb %al,%ah // cmap movl 0xDEADBEEF(%ebx),%ediblin_08: mov %ax,%cx // cmap addl 20(%esp),%edi // x shll $16,%ecx // cmap
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -