Mercurial > mm7
comparison mm7_3.cpp @ 501:6fa3ff8ef729
SubtractVariables
author | Ritor1 |
---|---|
date | Fri, 01 Mar 2013 17:37:47 +0600 |
parents | a3939d5067c4 |
children | dd5124185551 |
comparison
equal
deleted
inserted
replaced
500:63b171359be2 | 501:6fa3ff8ef729 |
---|---|
17085 { | 17085 { |
17086 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8); | 17086 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8); |
17087 } | 17087 } |
17088 | 17088 |
17089 //----- (00449B7E) -------------------------------------------------------- | 17089 //----- (00449B7E) -------------------------------------------------------- |
17090 unsigned char *_449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle) | 17090 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle) |
17091 { | 17091 { |
17092 signed int v3; // esi@1 | 17092 signed int v3; // esi@1 |
17093 unsigned char *result; // eax@1 | 17093 unsigned char set_bit; // edx@1 |
17094 unsigned int v5; // edx@1 | |
17095 | 17094 |
17096 v3 = a2 - 1; | 17095 v3 = a2 - 1; |
17097 result = &pArray[v3 / 8]; | 17096 set_bit = 0x80 >> v3 % 8; |
17098 v5 = 0x80 >> v3 % 8; | |
17099 if ( bToggle ) | 17097 if ( bToggle ) |
17100 *result |= v5; | 17098 pArray[v3 / 8] |= set_bit; |
17101 else | 17099 else |
17102 *result &= ~(unsigned char)v5; | 17100 pArray[v3 / 8] &= ~set_bit; |
17103 return result; | |
17104 } | 17101 } |
17105 | 17102 |
17106 | 17103 |
17107 //----- (0044A56A) -------------------------------------------------------- | 17104 //----- (0044A56A) -------------------------------------------------------- |
17108 void __cdecl sub_44A56A() | 17105 void __cdecl sub_44A56A() |