Changeset 2388 for trunk/MagicSoft/Cosy/gui
- Timestamp:
- 10/15/03 20:02:32 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGImage.cc
r2384 r2388 84 84 } 85 85 86 void MGImage::DrawImg16(unsigned short *d, char *s, char *e) 87 { 88 // d=destination, s=source, e=end 89 // rrrrrggg gggbbbbb 90 // 91 while (s<e) 92 { 93 *d++ = (*s&0xfc) | (*s&0xf8)<<5 | (*s&0xfc)<<11; 94 s++; 95 } 96 } 97 86 98 void MGImage::DrawImg32(char *d, char *s, char *e) 87 99 { 88 100 // d=destination, s=source, e=end 101 // rrrrrrrr gggggggg bbbbbbbb aaaaaaaa 102 // 89 103 while (s<e) 90 104 { … … 127 141 switch (gVirtualX->GetDepth()) 128 142 { 143 case 8: 144 memcpy(fImage->data, buffer, fWidth*fHeight); 145 break; 146 case 16: 147 DrawImg16((unsigned short*)fImage->data, (char*)buffer, (char*)(buffer+fWidth*fHeight)); 148 break; 129 149 case 32: 130 150 DrawImg32(fImage->data, (char*)buffer, (char*)(buffer+fWidth*fHeight)); -
trunk/MagicSoft/Cosy/gui/MGImage.h
r2384 r2388 35 35 enum { kNeedRedraw = BIT(17) }; 36 36 37 void DrawImg16(unsigned short *d, char *s, char *e); 37 38 void DrawImg32(char *d, char *s, char *e); 38 39 void DrawColImg32(char *d, char *s1, char *s2, char *e);
Note:
See TracChangeset
for help on using the changeset viewer.