############################################################################## # # # IAR ARM ANSI C/C++ Compiler V4.42A/W32 EVALUATION 20/Sep/2008 20:14:32 # # Copyright 1999-2005 IAR Systems. All rights reserved. # # # # Cpu mode = interwork # # Endian = little # # Stack alignment = 4 # # Source file = D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\select_smile.c # # Command line = D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\select_smile.c # # -D NEWSGOLD -D ELKA -D kluchnik -D BCFG -D ICONBAR # # -D DEBUG --preprocess D:\Pasha\elf\_MY_PROJECT_\nati # # cq_mod2\kluchnik_debug\List\ -lC # # D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\kluchnik_debug # # \List\ -o D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\kluc # # hnik_debug\Obj\ -s9 --cpu_mode arm --endian little # # --cpu ARM926EJ-S --stack_align 4 --interwork -e # # --fpu None --dlib_config "D:\Pasha\Embedded # # Workbench 4.0 Evaluation2\ARM\LIB\dl5tpainl8n.h" -I # # "D:\Pasha\Embedded Workbench 4.0 # # Evaluation2\ARM\INC\" --inline_threshold=2 # # List file = D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\kluchnik_debug # # \List\select_smile.lst # # Object file = D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\kluchnik_debug # # \Obj\select_smile.r79 # # # # # ############################################################################## D:\Pasha\elf\_MY_PROJECT_\naticq_mod2\select_smile.c 1 #include "../inc/swilib.h" 2 #include "../inc/pnglist.h" 3 #include "NatICQ.h" 4 #include "main.h" 5 #include "smiles.h" 6 #include "rect_patcher.h" 7 #include "select_smile.h" 8 #include "strings.h" 9 #include "language.h" 10 #include "configs.h" 11 12 #define MAX_ICON_IN_ROW 32 13 14 typedef struct 15 { 16 int icon_in_row; 17 struct 18 { 19 IMGHDR *img; 20 int wchar; 21 }w_chars[MAX_ICON_IN_ROW]; 22 }IMGH_SMILE; 23 24 typedef struct 25 { 26 GUI gui; 27 EDCHAT_STRUCT *ed_struct; 28 int view_line; 29 int cur_pos_x; 30 int cur_pos_y; 31 int total_lines; 32 IMGH_SMILE *icons; 33 WSHDR *ws; 34 }SMILE_GUI; 35 36 extern S_SMILES *s_top; 37 extern DYNPNGICONLIST *SmilesImgList; 38 \ In segment CODE, align 4, keep-with-next 39 IMGHDR *FindSmileIMGHDR(int pic) 40 { 41 DYNPNGICONLIST *d=SmilesImgList; \ FindSmileIMGHDR: \ 00000000 ........ LDR R1,??DataTable3 ;; SmilesImgList \ 00000004 002091E5 LDR R2,[R1, #+0] 42 IMGHDR *img=NULL; \ 00000008 0010A0E3 MOV R1,#+0 \ 0000000C 000000EA B ??FindSmileIMGHDR_0 43 while(d) 44 { 45 if (d->icon==pic) 46 { 47 img=d->img; 48 break; 49 } 50 d=d->next; \ ??FindSmileIMGHDR_1: \ 00000010 002092E5 LDR R2,[R2, #+0] \ ??FindSmileIMGHDR_0: \ 00000014 000052E3 CMP R2,#+0 \ 00000018 0300000A BEQ ??FindSmileIMGHDR_2 \ 0000001C 043092E5 LDR R3,[R2, #+4] \ 00000020 000053E1 CMP R3,R0 \ 00000024 F9FFFF1A BNE ??FindSmileIMGHDR_1 \ 00000028 081092E5 LDR R1,[R2, #+8] 51 } 52 return img; \ ??FindSmileIMGHDR_2: \ 0000002C 0100A0E1 MOV R0,R1 \ 00000030 1EFF2FE1 BX LR ;; return 53 } 54 \ In segment CODE, align 4, keep-with-next 55 void DrwImg(IMGHDR *img, int x, int y) 56 { \ DrwImg: \ 00000000 10402DE9 PUSH {R4,LR} \ 00000004 2CD04DE2 SUB SP,SP,#+44 \ 00000008 0040A0E1 MOV R4,R0 57 RECT rc; 58 DRWOBJ drwobj; 59 StoreXYWHtoRECT(&rc,x,y,img->w,img->h); \ 0000000C B200D4E1 LDRH R0,[R4, #+2] \ 00000010 01002DE9 PUSH {R0} \ 00000014 B030D4E1 LDRH R3,[R4, #+0] \ 00000018 04008DE2 ADD R0,SP,#+4 \ 0000001C 330100EF SWI +307 60 SetPropTo_Obj5(&drwobj,&rc,0,img); \ 00000020 0430A0E1 MOV R3,R4 \ 00000024 0020A0E3 MOV R2,#+0 \ 00000028 04108DE2 ADD R1,SP,#+4 \ 0000002C 0C008DE2 ADD R0,SP,#+12 \ 00000030 510100EF SWI +337 61 SetColor(&drwobj,GetPaletteAdrByColorIndex(100),GetPaletteAdrByColorIndex(101)); \ 00000034 6500A0E3 MOV R0,#+101 \ 00000038 2E0100EF SWI +302 \ 0000003C 0040A0E1 MOV R4,R0 \ 00000040 6400A0E3 MOV R0,#+100 \ 00000044 2E0100EF SWI +302 \ 00000048 0420A0E1 MOV R2,R4 \ 0000004C 0010A0E1 MOV R1,R0 \ 00000050 0C008DE2 ADD R0,SP,#+12 \ 00000054 4B0100EF SWI +331 62 DrawObject(&drwobj); \ 00000058 0C008DE2 ADD R0,SP,#+12 \ 0000005C 2A0100EF SWI +298 63 } \ 00000060 30D08DE2 ADD SP,SP,#+48 \ 00000064 1080BDE8 POP {R4,PC} ;; return 64 \ In segment CODE, align 4, keep-with-next 65 void PasteCharEditControl(EDCHAT_STRUCT *ed_struct, int wchar) 66 { \ PasteCharEditControl: \ 00000000 F0402DE9 PUSH {R4-R7,LR} \ 00000004 2CD04DE2 SUB SP,SP,#+44 \ 00000008 0040A0E1 MOV R4,R0 67 WSHDR *ed_ws; 68 EDITCONTROL ec; 69 int pos; 70 ExtractEditControl(ed_struct->ed_chatgui,ed_struct->ed_answer,&ec); \ 0000000C 040094E5 LDR R0,[R4, #+4] \ 00000010 0150A0E1 MOV R5,R1 \ 00000014 081094E5 LDR R1,[R4, #+8] \ 00000018 0D20A0E1 MOV R2,SP \ 0000001C 690100EF SWI +361 71 ed_ws=AllocWS(ec.pWS->wsbody[0]+1); \ 00000020 28009DE5 LDR R0,[SP, #+40] \ 00000024 000090E5 LDR R0,[R0, #+0] \ 00000028 B000D0E1 LDRH R0,[R0, #+0] \ 0000002C 010080E2 ADD R0,R0,#+1 \ 00000030 250100EF SWI +293 72 wstrcpy(ed_ws,ec.pWS); \ 00000034 28109DE5 LDR R1,[SP, #+40] \ 00000038 0060A0E1 MOV R6,R0 \ 0000003C 1F0100EF SWI +287 73 pos=EDIT_GetCursorPos(ed_struct->ed_chatgui); \ 00000040 040094E5 LDR R0,[R4, #+4] \ 00000044 D30100EF SWI +467 \ 00000048 0070A0E1 MOV R7,R0 74 wsInsertChar(ed_ws,wchar,pos); \ 0000004C 0720A0E1 MOV R2,R7 \ 00000050 0510A0E1 MOV R1,R5 \ 00000054 0600A0E1 MOV R0,R6 \ 00000058 1D0000EF SWI +29 75 EDIT_SetTextToEditControl(ed_struct->ed_chatgui,ed_struct->ed_answer,ed_ws); \ 0000005C 081094E5 LDR R1,[R4, #+8] \ 00000060 040094E5 LDR R0,[R4, #+4] \ 00000064 0620A0E1 MOV R2,R6 \ 00000068 DE0100EF SWI +478 76 EDIT_SetCursorPos(ed_struct->ed_chatgui,pos+1); \ 0000006C 040094E5 LDR R0,[R4, #+4] \ 00000070 011087E2 ADD R1,R7,#+1 \ 00000074 D40100EF SWI +468 77 FreeWS(ed_ws); \ 00000078 0600A0E1 MOV R0,R6 \ 0000007C 290100EF SWI +297 78 } \ 00000080 2CD08DE2 ADD SP,SP,#+44 \ 00000084 F080BDE8 POP {R4-R7,PC} ;; return 79 //------------ smiles color -----------------// 80 81 extern char SmBGcolor[4];//={0x00,0x00,0x00,100}; 82 extern char SmSelectColor[4];//={0xFF,0x00,0x00,100}; 83 extern char SmFontColor[4];//={0xFF,0x00,0x00,100}; 84 //extern unsigned int color_choose; 85 extern void DrawSoftKeys(char *right,char *left); 86 extern void DrawHeader(); 87 extern int hy; 88 89 \ In segment CODE, align 4, keep-with-next 90 S_SMILES *FindSmByN(int n) 91 { 92 S_SMILES *sm=s_top; \ FindSmByN: \ 00000000 ........ LDR R1,??DataTable6 ;; s_top 93 int i=0; \ 00000004 0020A0E3 MOV R2,#+0 \ 00000008 001091E5 LDR R1,[R1, #+0] \ 0000000C 010000EA B ??FindSmByN_0 94 while(sm) 95 { 96 if(i==n) return sm; 97 i++; 98 sm=sm->next; \ ??FindSmByN_1: \ 00000010 001091E5 LDR R1,[R1, #+0] \ 00000014 012082E2 ADD R2,R2,#+1 \ ??FindSmByN_0: \ 00000018 000051E3 CMP R1,#+0 \ 0000001C 0300000A BEQ ??FindSmByN_2 \ 00000020 000052E1 CMP R2,R0 \ 00000024 F9FFFF1A BNE ??FindSmByN_1 \ 00000028 0100A0E1 MOV R0,R1 \ 0000002C 1EFF2FE1 BX LR 99 } 100 return 0; \ ??FindSmByN_2: \ 00000030 0000A0E3 MOV R0,#+0 \ 00000034 1EFF2FE1 BX LR ;; return 101 } 102 \ In segment CODE, align 4, keep-with-next 103 IMGHDR *imgdhrcmp(IMGHDR *img) 104 { \ imgdhrcmp: \ 00000000 30402DE9 PUSH {R4,R5,LR} \ 00000004 0040A0E1 MOV R4,R0 105 S_SMILES *sm=s_top; \ 00000008 ........ LDR R0,??DataTable6 ;; s_top \ 0000000C 005090E5 LDR R5,[R0, #+0] \ 00000010 000000EA B ??imgdhrcmp_0 106 while(sm) 107 { 108 if(img==FindSmileIMGHDR(GetPicNByUnicodeSymbol(sm->uni_smile))) return FindSmileIMGHDR(GetPicNByUnicodeSymbol(sm->uni_smile)); 109 sm=sm->next; \ ??imgdhrcmp_1: \ 00000014 005095E5 LDR R5,[R5, #+0] \ ??imgdhrcmp_0: \ 00000018 000055E3 CMP R5,#+0 \ 0000001C 0800000A BEQ ??imgdhrcmp_2 \ 00000020 040095E5 LDR R0,[R5, #+4] \ 00000024 E40100EF SWI +484 \ 00000028 ........ BL FindSmileIMGHDR \ 0000002C 000054E1 CMP R4,R0 \ 00000030 F7FFFF1A BNE ??imgdhrcmp_1 \ 00000034 040095E5 LDR R0,[R5, #+4] \ 00000038 E40100EF SWI +484 \ 0000003C 3040BDE8 POP {R4,R5,LR} ;; Pop \ 00000040 ........ B FindSmileIMGHDR ;; tailcall 110 } 111 return 0; \ ??imgdhrcmp_2: \ 00000044 0000A0E3 MOV R0,#+0 \ 00000048 3080BDE8 POP {R4,R5,PC} ;; return 112 } 113 114 extern volatile int total_smiles; \ In segment CODE, align 4, keep-with-next 115 DYNPNGICONLIST *GetSMByItem(int curitem) 116 { \ GetSMByItem: \ 00000000 10402DE9 PUSH {R4,LR} \ 00000004 0040A0E1 MOV R4,R0 117 PNGTOP_DESC *pltop=PNG_TOP(); \ 00000008 B98100EF SWI +33209 118 pltop->dyn_pltop=SmilesImgList; \ 0000000C ........ LDR R1,??DataTable3 ;; SmilesImgList \ 00000010 001091E5 LDR R1,[R1, #+0] \ 00000014 081080E5 STR R1,[R0, #+8] 119 int i=total_smiles-1; \ 00000018 40109FE5 LDR R1,??GetSMByItem_0 ;; total_smiles \ 0000001C 001091E5 LDR R1,[R1, #+0] \ 00000020 012041E2 SUB R2,R1,#+1 \ 00000024 020000EA B ??GetSMByItem_1 120 while(pltop->dyn_pltop && i>=0) 121 { 122 if(i==curitem) 123 return pltop->dyn_pltop; 124 i--; 125 pltop->dyn_pltop=pltop->dyn_pltop->next; \ ??GetSMByItem_2: \ 00000028 001091E5 LDR R1,[R1, #+0] \ 0000002C 012042E2 SUB R2,R2,#+1 \ 00000030 081080E5 STR R1,[R0, #+8] \ ??GetSMByItem_1: \ 00000034 081090E5 LDR R1,[R0, #+8] \ 00000038 000051E3 CMP R1,#+0 \ 0000003C 0500000A BEQ ??GetSMByItem_3 \ 00000040 000052E3 CMP R2,#+0 \ 00000044 0300004A BMI ??GetSMByItem_3 \ 00000048 040052E1 CMP R2,R4 \ 0000004C F5FFFF1A BNE ??GetSMByItem_2 \ 00000050 0100A0E1 MOV R0,R1 \ 00000054 1080BDE8 POP {R4,PC} 126 } 127 return 0; \ ??GetSMByItem_3: \ 00000058 0000A0E3 MOV R0,#+0 \ 0000005C 1080BDE8 POP {R4,PC} ;; return \ ??GetSMByItem_0: \ 00000060 ........ DC32 total_smiles 128 } 129 \ In segment CODE, align 4, keep-with-next 130 int RenderPage(SMILE_GUI *data, int is_draw) //Возвращает номер последней нарисованной линии 131 { \ RenderPage: \ 00000000 F24F2DE9 PUSH {R1,R4-R11,LR} \ 00000004 1CD04DE2 SUB SP,SP,#+28 \ 00000008 0040A0E1 MOV R4,R0 132 int scr_w=ScreenW()-1; \ 0000000C 888100EF SWI +33160 \ 00000010 010040E2 SUB R0,R0,#+1 \ 00000014 18008DE5 STR R0,[SP, #+24] 133 int scr_h=ScreenH()-1; \ 00000018 898100EF SWI +33161 \ 0000001C 010040E2 SUB R0,R0,#+1 \ 00000020 10008DE5 STR R0,[SP, #+16] 134 int res=0; \ 00000024 0010A0E3 MOV R1,#+0 \ 00000028 0C108DE5 STR R1,[SP, #+12] 135 int font=FONT_SMALL; 136 int font_size=GetFontYSIZE(font); \ 0000002C 0800A0E3 MOV R0,#+8 \ 00000030 C50100EF SWI +453 137 int y=hy;//YDISP; \ 00000034 ........ LDR R2,??DataTable5 ;; hy \ 00000038 002092E5 LDR R2,[R2, #+0] \ 0000003C 04208DE5 STR R2,[SP, #+4] 138 int y2=y+font_size+2; \ 00000040 020080E0 ADD R0,R0,R2 \ 00000044 08008DE5 STR R0,[SP, #+8] 139 S_SMILES *sm;//=s_top; 140 // IMGHDR *img; 141 // DYNPNGICONLIST *d;//GetSMByItem 142 for (int i=data->view_line, max=data->total_lines; i=0?i-1:0)*(data->icons[i].icon_in_row)); 148 d=GetSMByItem(((i-1)==0?1:i-1)*data->icons[i].icon_in_row); 149 while(kicons[i].icon_in_row) 150 { 151 // if(d) img=d->img; 152 // else break; 153 //img=FindSmileIMGHDR(GetPicNByUnicodeSymbol(sm->uni_smile)); 154 img=imgdhrcmp(d->img); 155 if(!img) break; 156 if(i==data->cur_pos_y && k==data->cur_pos_x) 157 DrawRectangle(x,y2,x+img->w-1,y2+img->h-1,0,SmSelectColor,SmSelectColor); 158 DrwImg(img,x,y2); 159 x+=img->w; 160 if (img->h>h_max) h_max=img->h; 161 k++; 162 d=d->next; 163 // sm=sm->next; 164 }*/ 165 for (int k=0, m=data->icons[i].icon_in_row; kicons[i].w_chars[k].img; 168 if (is_draw) 169 { 170 if (i==data->cur_pos_y && k==data->cur_pos_x) 171 { 172 DrawRectangle(x,y2,x+img->w-1,y2+img->h-1,0,SmSelectColor,SmSelectColor); 173 } 174 DrwImg(img,x,y2); 175 } 176 x+=img->w; 177 if (img->h>h_max) h_max=img->h; 178 } 179 y2+=h_max; 180 if (y2>=scr_h) break; 181 res=i; \ ??RenderPage_1: \ 0000005C 0C608DE5 STR R6,[SP, #+12] \ 00000060 016086E2 ADD R6,R6,#+1 \ ??RenderPage_0: \ 00000064 14009DE5 LDR R0,[SP, #+20] \ 00000068 000056E1 CMP R6,R0 \ 0000006C 370000AA BGE ??RenderPage_2 \ 00000070 411FA0E3 MOV R1,#+260 \ 00000074 910602E0 MUL R2,R1,R6 \ 00000078 0080A0E3 MOV R8,#+0 \ 0000007C 00208DE5 STR R2,[SP, #+0] \ 00000080 481094E5 LDR R1,[R4, #+72] \ 00000084 0070A0E3 MOV R7,#+0 \ 00000088 01A092E7 LDR R10,[R2, +R1] \ 0000008C 0790A0E1 MOV R9,R7 \ 00000090 01005AE3 CMP R10,#+1 \ 00000094 270000AA BGE ??RenderPage_3 \ 00000098 280000EA B ??RenderPage_4 \ ??RenderPage_5: \ 0000009C 00009DE5 LDR R0,[SP, #+0] \ 000000A0 481094E5 LDR R1,[R4, #+72] \ 000000A4 010080E0 ADD R0,R0,R1 \ 000000A8 890180E0 ADD R0,R0,R9, LSL #+3 \ 000000AC 04B090E5 LDR R11,[R0, #+4] \ 000000B0 1C009DE5 LDR R0,[SP, #+28] \ 000000B4 000050E3 CMP R0,#+0 \ 000000B8 1800000A BEQ ??RenderPage_6 \ 000000BC 400094E5 LDR R0,[R4, #+64] \ 000000C0 000056E1 CMP R6,R0 \ 000000C4 3C009405 LDREQ R0,[R4, #+60] \ 000000C8 00005901 CMPEQ R9,R0 \ 000000CC 0F00001A BNE ??RenderPage_7 \ 000000D0 14019FE5 LDR R0,??RenderPage_8 ;; SmSelectColor \ 000000D4 0010A0E1 MOV R1,R0 \ 000000D8 02002DE9 PUSH {R1} \ 000000DC 01002DE9 PUSH {R0} \ 000000E0 0000A0E3 MOV R0,#+0 \ 000000E4 01002DE9 PUSH {R0} \ 000000E8 B200DBE1 LDRH R0,[R11, #+2] \ 000000EC 0510A0E1 MOV R1,R5 \ 000000F0 050080E0 ADD R0,R0,R5 \ 000000F4 013040E2 SUB R3,R0,#+1 \ 000000F8 B000DBE1 LDRH R0,[R11, #+0] \ 000000FC 000088E0 ADD R0,R8,R0 \ 00000100 012040E2 SUB R2,R0,#+1 \ 00000104 0800A0E1 MOV R0,R8 \ 00000108 B40100EF SWI +436 \ 0000010C 0CD08DE2 ADD SP,SP,#+12 \ ??RenderPage_7: \ 00000110 0520A0E1 MOV R2,R5 \ 00000114 0810A0E1 MOV R1,R8 \ 00000118 0B00A0E1 MOV R0,R11 \ 0000011C ........ BL DrwImg \ ??RenderPage_6: \ 00000120 B000DBE1 LDRH R0,[R11, #+0] \ 00000124 019089E2 ADD R9,R9,#+1 \ 00000128 088080E0 ADD R8,R0,R8 \ 0000012C B200DBE1 LDRH R0,[R11, #+2] \ 00000130 000057E1 CMP R7,R0 \ 00000134 0070A0B1 MOVLT R7,R0 \ ??RenderPage_3: \ 00000138 0A0059E1 CMP R9,R10 \ 0000013C D6FFFFBA BLT ??RenderPage_5 \ ??RenderPage_4: \ 00000140 10009DE5 LDR R0,[SP, #+16] \ 00000144 055087E0 ADD R5,R7,R5 \ 00000148 000055E1 CMP R5,R0 \ 0000014C C2FFFFBA BLT ??RenderPage_1 182 } 183 if (is_draw) \ ??RenderPage_2: \ 00000150 1C009DE5 LDR R0,[SP, #+28] \ 00000154 000050E3 CMP R0,#+0 \ 00000158 2000000A BEQ ??RenderPage_9 184 { 185 sm=FindSmileByUni(data->icons[data->cur_pos_y].w_chars[data->cur_pos_x].wchar); \ 0000015C 401094E5 LDR R1,[R4, #+64] \ 00000160 3C0094E5 LDR R0,[R4, #+60] \ 00000164 483094E5 LDR R3,[R4, #+72] \ 00000168 412FA0E3 MOV R2,#+260 \ 0000016C 923121E0 MLA R1,R2,R1,R3 \ 00000170 800181E0 ADD R0,R1,R0, LSL #+3 \ 00000174 080090E5 LDR R0,[R0, #+8] \ 00000178 ........ _BLF FindSmileByUni,??FindSmileByUni??rA 186 if (sm) \ 0000017C 000050E3 CMP R0,#+0 \ 00000180 1600000A BEQ ??RenderPage_9 187 { 188 ascii2ws(data->ws,sm->lines->text); \ 00000184 080090E5 LDR R0,[R0, #+8] \ 00000188 0C1080E2 ADD R1,R0,#+12 \ 0000018C 4C0094E5 LDR R0,[R4, #+76] \ 00000190 ........ _BLF ascii2ws,??ascii2ws??rA 189 DrawString(data->ws,1,y+1,scr_w,y+1+font_size,font,0,SmFontColor,GetPaletteAdrByColorIndex(23)); \ 00000194 1700A0E3 MOV R0,#+23 \ 00000198 2E0100EF SWI +302 \ 0000019C 01002DE9 PUSH {R0} \ 000001A0 48009FE5 LDR R0,??RenderPage_8+0x4 ;; SmFontColor \ 000001A4 0110A0E3 MOV R1,#+1 \ 000001A8 01002DE9 PUSH {R0} \ 000001AC 0000A0E3 MOV R0,#+0 \ 000001B0 01002DE9 PUSH {R0} \ 000001B4 0800A0E3 MOV R0,#+8 \ 000001B8 01002DE9 PUSH {R0} \ 000001BC 18009DE5 LDR R0,[SP, #+24] \ 000001C0 010080E2 ADD R0,R0,#+1 \ 000001C4 01002DE9 PUSH {R0} \ 000001C8 2C309DE5 LDR R3,[SP, #+44] \ 000001CC 18009DE5 LDR R0,[SP, #+24] \ 000001D0 012080E2 ADD R2,R0,#+1 \ 000001D4 4C0094E5 LDR R0,[R4, #+76] \ 000001D8 4C0100EF SWI +332 \ 000001DC 14D08DE2 ADD SP,SP,#+20 190 } 191 } 192 return (res); \ ??RenderPage_9: \ 000001E0 0C009DE5 LDR R0,[SP, #+12] \ 000001E4 20D08DE2 ADD SP,SP,#+32 \ 000001E8 F08FBDE8 POP {R4-R11,PC} ;; return \ ??RenderPage_8: \ 000001EC ........ DC32 SmSelectColor \ 000001F0 ........ DC32 SmFontColor 193 } 194 \ In segment CODE, align 4, keep-with-next 195 static void method0(SMILE_GUI *data) 196 { \ method0: \ 00000000 30402DE9 PUSH {R4,R5,LR} \ 00000004 0040A0E1 MOV R4,R0 197 #ifdef ELKA 198 DisableIconBar(1); \ 00000008 0100A0E3 MOV R0,#+1 \ 0000000C 3B0200EF SWI +571 199 #endif 200 int scr_w=ScreenW()-1; \ 00000010 888100EF SWI +33160 \ 00000014 015040E2 SUB R5,R0,#+1 201 int scr_h=ScreenH()-1; \ 00000018 898100EF SWI +33161 \ 0000001C 013040E2 SUB R3,R0,#+1 202 DrawRectangle(0,/*YDISP*/hy,scr_w,scr_h,0,SmBGcolor,SmBGcolor); \ 00000020 38009FE5 LDR R0,??method0_0 ;; SmBGcolor \ 00000024 0520A0E1 MOV R2,R5 \ 00000028 0010A0E1 MOV R1,R0 \ 0000002C 02002DE9 PUSH {R1} \ 00000030 01002DE9 PUSH {R0} \ 00000034 0000A0E3 MOV R0,#+0 \ 00000038 01002DE9 PUSH {R0} \ 0000003C ........ LDR R0,??DataTable5 ;; hy \ 00000040 001090E5 LDR R1,[R0, #+0] \ 00000044 0000A0E3 MOV R0,#+0 \ 00000048 B40100EF SWI +436 203 DrawHeader(); \ 0000004C ........ _BLF DrawHeader,??DrawHeader??rA 204 RenderPage(data,1); \ 00000050 0110A0E3 MOV R1,#+1 \ 00000054 0400A0E1 MOV R0,R4 \ 00000058 ........ BL RenderPage 205 // DrawSoftKeys(LG_MENU,LG_CLOSE); 206 } \ 0000005C 3780BDE8 POP {R0-R2,R4,R5,PC} ;; return \ ??method0_0: \ 00000060 ........ DC32 SmBGcolor 207 \ In segment CODE, align 4, keep-with-next 208 static void method1(SMILE_GUI *data,void *(*malloc_adr)(int)) 209 { \ method1: \ 00000000 F0412DE9 PUSH {R4-R8,LR} \ 00000004 0040A0E1 MOV R4,R0 210 S_SMILES *sm=s_top; \ 00000008 ........ LDR R0,??DataTable6 ;; s_top \ 0000000C 006090E5 LDR R6,[R0, #+0] 211 IMGHDR *img; 212 int pic; 213 int row_w=ScreenW(); // заведомо большая ширина чтобы начать с новой линии \ 00000010 888100EF SWI +33160 \ 00000014 0080A0E1 MOV R8,R0 \ 00000018 000056E3 CMP R6,#+0 \ 0000001C 2B00000A BEQ ??method1_0 214 IMGH_SMILE *cur_img; 215 while(sm) 216 { 217 pic=GetPicNByUnicodeSymbol(sm->uni_smile); \ ??method1_1: \ 00000020 040096E5 LDR R0,[R6, #+4] \ 00000024 E40100EF SWI +484 218 img=FindSmileIMGHDR(pic); \ 00000028 ........ BL FindSmileIMGHDR \ 0000002C 0070B0E1 MOVS R7,R0 219 if (img) \ 00000030 2300000A BEQ ??method1_2 220 { 221 row_w+=img->w; \ 00000034 B000D7E1 LDRH R0,[R7, #+0] \ 00000038 088080E0 ADD R8,R0,R8 222 if (row_w>(ScreenW()-1) || cur_img->icon_in_row>=MAX_ICON_IN_ROW) \ 0000003C 888100EF SWI +33160 \ 00000040 010040E2 SUB R0,R0,#+1 \ 00000044 080050E1 CMP R0,R8 \ 00000048 020000BA BLT ??method1_3 \ 0000004C 000095E5 LDR R0,[R5, #+0] \ 00000050 200050E3 CMP R0,#+32 \ 00000054 100000BA BLT ??method1_4 223 { 224 row_w=img->w; 225 cur_img=data->icons=realloc(data->icons,(data->total_lines+1)*sizeof(IMGH_SMILE)); \ ??method1_3: \ 00000058 440094E5 LDR R0,[R4, #+68] \ 0000005C B080D7E1 LDRH R8,[R7, #+0] \ 00000060 010080E2 ADD R0,R0,#+1 \ 00000064 412FA0E3 MOV R2,#+260 \ 00000068 920001E0 MUL R1,R2,R0 \ 0000006C 480094E5 LDR R0,[R4, #+72] \ 00000070 BA0000EF SWI +186 \ 00000074 480084E5 STR R0,[R4, #+72] 226 cur_img+=data->total_lines; \ 00000078 440094E5 LDR R0,[R4, #+68] \ 0000007C 482094E5 LDR R2,[R4, #+72] \ 00000080 411FA0E3 MOV R1,#+260 \ 00000084 912025E0 MLA R5,R1,R0,R2 227 zeromem(cur_img,sizeof(IMGH_SMILE)); \ 00000088 0500A0E1 MOV R0,R5 \ 0000008C 1D0100EF SWI +285 228 data->total_lines++; \ 00000090 440094E5 LDR R0,[R4, #+68] \ 00000094 010080E2 ADD R0,R0,#+1 \ 00000098 440084E5 STR R0,[R4, #+68] 229 } 230 cur_img->w_chars[cur_img->icon_in_row].img=img; \ ??method1_4: \ 0000009C 000095E5 LDR R0,[R5, #+0] \ 000000A0 800185E0 ADD R0,R5,R0, LSL #+3 \ 000000A4 047080E5 STR R7,[R0, #+4] 231 cur_img->w_chars[cur_img->icon_in_row].wchar=sm->uni_smile; \ 000000A8 000095E5 LDR R0,[R5, #+0] \ 000000AC 041096E5 LDR R1,[R6, #+4] \ 000000B0 800185E0 ADD R0,R5,R0, LSL #+3 \ 000000B4 081080E5 STR R1,[R0, #+8] 232 cur_img->icon_in_row++; \ 000000B8 000095E5 LDR R0,[R5, #+0] \ 000000BC 010080E2 ADD R0,R0,#+1 \ 000000C0 000085E5 STR R0,[R5, #+0] 233 } 234 sm=sm->next; \ ??method1_2: \ 000000C4 006096E5 LDR R6,[R6, #+0] 235 } \ 000000C8 000056E3 CMP R6,#+0 \ 000000CC D3FFFF1A BNE ??method1_1 236 data->ws=AllocWS(50); \ ??method1_0: \ 000000D0 3200A0E3 MOV R0,#+50 \ 000000D4 250100EF SWI +293 \ 000000D8 4C0084E5 STR R0,[R4, #+76] 237 data->gui.state=1; \ 000000DC 0100A0E3 MOV R0,#+1 \ 000000E0 0C00C4E5 STRB R0,[R4, #+12] 238 } \ 000000E4 F081BDE8 POP {R4-R8,PC} ;; return 239 \ In segment CODE, align 4, keep-with-next 240 static void method2(SMILE_GUI *data,void (*mfree_adr)(void *)) 241 { \ method2: \ 00000000 10402DE9 PUSH {R4,LR} \ 00000004 0040A0E1 MOV R4,R0 242 data->gui.state=0; \ 00000008 0000A0E3 MOV R0,#+0 \ 0000000C 0C00C4E5 STRB R0,[R4, #+12] 243 mfree(data->icons); \ 00000010 480094E5 LDR R0,[R4, #+72] \ 00000014 150000EF SWI +21 244 FreeWS(data->ws); \ 00000018 4C0094E5 LDR R0,[R4, #+76] \ 0000001C 290100EF SWI +297 245 } \ 00000020 1080BDE8 POP {R4,PC} ;; return 246 \ In segment CODE, align 4, keep-with-next 247 static void method3(SMILE_GUI *data,void *(*malloc_adr)(int),void (*mfree_adr)(void *)) 248 { \ method3: \ 00000000 10402DE9 PUSH {R4,LR} \ 00000004 0040A0E1 MOV R4,R0 249 DisableIDLETMR(); \ 00000008 7F0100EF SWI +383 250 data->gui.state=2; \ 0000000C 0200A0E3 MOV R0,#+2 \ 00000010 0C00C4E5 STRB R0,[R4, #+12] 251 } \ 00000014 1080BDE8 POP {R4,PC} ;; return 252 \ In segment CODE, align 4, keep-with-next 253 static void method4(SMILE_GUI *data,void (*mfree_adr)(void *)) 254 { 255 if (data->gui.state!=2) \ method4: \ 00000000 0C10D0E5 LDRB R1,[R0, #+12] \ 00000004 020051E3 CMP R1,#+2 256 return; 257 data->gui.state=1; \ 00000008 0110A003 MOVEQ R1,#+1 \ 0000000C 0C10C005 STRBEQ R1,[R0, #+12] 258 } \ 00000010 1EFF2FE1 BX LR ;; return 259 \ In segment CODE, align 4, keep-with-next 260 static int method5(SMILE_GUI *data,GUI_MSG *msg) 261 { \ method5: \ 00000000 70402DE9 PUSH {R4-R6,LR} \ 00000004 0040A0E1 MOV R4,R0 262 int i; 263 int m=msg->gbsmsg->msg; \ 00000008 040091E5 LDR R0,[R1, #+4] \ 0000000C 042090E5 LDR R2,[R0, #+4] 264 int key=msg->gbsmsg->submess; \ 00000010 081090E5 LDR R1,[R0, #+8] 265 if ((m==KEY_DOWN)||(m==LONG_PRESS)) \ 00000014 9300A0E3 MOV R0,#+147 \ 00000018 400F80E3 ORR R0,R0,#0x100 \ 0000001C 000052E1 CMP R2,R0 \ 00000020 02008012 ADDNE R0,R0,#+2 \ 00000024 00005211 CMPNE R2,R0 \ 00000028 7000001A BNE ??method5_1 266 { 267 if (key==GREEN_BUTTON || (key>='0' && key<='9')) \ 0000002C 442094E5 LDR R2,[R4, #+68] \ 00000030 340094E5 LDR R0,[R4, #+52] \ 00000034 483094E5 LDR R3,[R4, #+72] \ 00000038 0B0051E3 CMP R1,#+11 \ 0000003C 0300000A BEQ ??method5_2 \ 00000040 300051E3 CMP R1,#+48 \ 00000044 2A0000BA BLT ??method5_3 \ 00000048 3A0051E3 CMP R1,#+58 \ 0000004C 280000AA BGE ??method5_3 268 { 269 int c; 270 int n=0; 271 int d; 272 273 if(!UseStandartSmileSel) \ ??method5_2: \ 00000050 3C529FE5 LDR R5,??method5_4 ;; UseStandartSmileSel \ 00000054 0040A0E3 MOV R4,#+0 \ 00000058 005095E5 LDR R5,[R5, #+0] \ 0000005C 30C041E2 SUB R12,R1,#+48 \ 00000060 000055E3 CMP R5,#+0 \ 00000064 0D00001A BNE ??method5_5 274 { 275 if (key=='0') c=10; \ 00000068 300051E3 CMP R1,#+48 \ 0000006C 0100001A BNE ??method5_6 \ ??method5_7: \ 00000070 0AC0A0E3 MOV R12,#+10 \ 00000074 110000EA B ??method5_8 276 else if (key=='1') c=1; \ ??method5_6: \ 00000078 310051E3 CMP R1,#+49 \ 0000007C 01C0A003 MOVEQ R12,#+1 \ 00000080 0E00000A BEQ ??method5_8 277 else if (key=='2') c=6; \ 00000084 320051E3 CMP R1,#+50 \ 00000088 06C0A003 MOVEQ R12,#+6 \ 0000008C 0B00000A BEQ ??method5_8 278 else if (key=='3') c=35; \ 00000090 330051E3 CMP R1,#+51 \ 00000094 0900001A BNE ??method5_8 \ 00000098 23C0A0E3 MOV R12,#+35 \ 0000009C 070000EA B ??method5_8 279 else c=key-'0'; 280 } 281 else 282 { 283 if (key==GREEN_BUTTON) c=0; \ ??method5_5: \ 000000A0 0B0051E3 CMP R1,#+11 \ 000000A4 00C0A003 MOVEQ R12,#+0 \ 000000A8 0400000A BEQ ??method5_8 284 else if (key=='0') c=10; \ 000000AC 300051E3 CMP R1,#+48 \ 000000B0 0200001A BNE ??method5_8 \ 000000B4 EDFFFFEA B ??method5_7 285 else c=key-'0'; 286 } 287 288 while(c>=(d=data->icons[n].icon_in_row) && ntotal_lines) 289 { 290 c-=d; \ ??method5_9: \ 000000B8 01C04CE0 SUB R12,R12,R1 291 n++; \ 000000BC 014084E2 ADD R4,R4,#+1 292 } \ ??method5_8: \ 000000C0 411FA0E3 MOV R1,#+260 \ 000000C4 91342EE0 MLA LR,R1,R4,R3 \ 000000C8 00109EE5 LDR R1,[LR, #+0] \ 000000CC 01005CE1 CMP R12,R1 \ 000000D0 010000BA BLT ??method5_10 \ 000000D4 020054E1 CMP R4,R2 \ 000000D8 F6FFFFBA BLT ??method5_9 293 if (c>=0 && ntotal_lines) \ ??method5_10: \ 000000DC 00005CE3 CMP R12,#+0 \ 000000E0 4200004A BMI ??method5_1 \ 000000E4 020054E1 CMP R4,R2 \ 000000E8 400000AA BGE ??method5_1 294 { 295 PasteCharEditControl(data->ed_struct,data->icons[n].w_chars[c].wchar); \ 000000EC 8C118EE0 ADD R1,LR,R12, LSL #+3 \ 000000F0 610000EA B ??method5_11 296 return (1); 297 } 298 } 299 else 300 { 301 switch(key) \ ??method5_3: \ 000000F4 40C094E5 LDR R12,[R4, #+64] \ 000000F8 3CE094E5 LDR LR,[R4, #+60] \ 000000FC 415FA0E3 MOV R5,#+260 \ 00000100 953C23E0 MLA R3,R5,R12,R3 \ 00000104 012042E2 SUB R2,R2,#+1 \ 00000108 0050A0E3 MOV R5,#+0 \ 0000010C 011041E2 SUB R1,R1,#+1 \ 00000110 3D0051E3 CMP R1,#+61 \ 00000114 3500008A BHI ??method5_1 \ 00000118 016F8FE2 ADR R6,??method5_0 \ 0000011C 0160D6E7 LDRB R6,[R6, R1] \ 00000120 06F18FE0 ADD PC,PC,R6, LSL #+2 \ ??method5_0: \ 00000124 54323259 DC8 +84,+50,+50,+89 \ 00000128 32323232 DC8 +50,+50,+50,+50 \ 0000012C 32325459 DC8 +50,+50,+84,+89 \ 00000130 32323232 DC8 +50,+50,+50,+50 \ 00000134 32323232 DC8 +50,+50,+50,+50 \ 00000138 32323232 DC8 +50,+50,+50,+50 \ 0000013C 32543232 DC8 +50,+84,+50,+50 \ 00000140 32323232 DC8 +50,+50,+50,+50 \ 00000144 32323232 DC8 +50,+50,+50,+50 \ 00000148 32323232 DC8 +50,+50,+50,+50 \ 0000014C 32323232 DC8 +50,+50,+50,+50 \ 00000150 32323232 DC8 +50,+50,+50,+50 \ 00000154 32323232 DC8 +50,+50,+50,+50 \ 00000158 32323232 DC8 +50,+50,+50,+50 \ 0000015C 32320F35 DC8 +50,+50,+15,+53 \ 00000160 454B0000 DC8 +69,+75,+0,+0 302 { 303 case UP_BUTTON: 304 if (data->cur_pos_y>0) \ ??method5_12: \ 00000164 01005CE3 CMP R12,#+1 \ 00000168 060000BA BLT ??method5_13 305 { 306 data->cur_pos_y--; \ 0000016C 01004CE2 SUB R0,R12,#+1 \ 00000170 400084E5 STR R0,[R4, #+64] 307 if (data->cur_pos_y<=data->view_line) data->view_line=data->cur_pos_y; \ 00000174 381094E5 LDR R1,[R4, #+56] \ 00000178 000051E1 CMP R1,R0 \ 0000017C 110000BA BLT ??method5_14 \ ??method5_15: \ 00000180 380084E5 STR R0,[R4, #+56] \ 00000184 0F0000EA B ??method5_14 308 } 309 else 310 { 311 data->cur_pos_y=data->total_lines-1; \ ??method5_13: \ 00000188 402084E5 STR R2,[R4, #+64] 312 data->view_line=0; \ 0000018C 385084E5 STR R5,[R4, #+56] \ 00000190 020000EA B ??method5_16 313 while(data->view_linetotal_lines) 314 { 315 if (data->cur_pos_y==RenderPage(data,0)) break; 316 data->view_line++; \ ??method5_17: \ 00000194 380094E5 LDR R0,[R4, #+56] \ 00000198 010080E2 ADD R0,R0,#+1 \ 0000019C 380084E5 STR R0,[R4, #+56] \ ??method5_16: \ 000001A0 380094E5 LDR R0,[R4, #+56] \ 000001A4 441094E5 LDR R1,[R4, #+68] \ 000001A8 010050E1 CMP R0,R1 \ 000001AC 050000AA BGE ??method5_14 \ 000001B0 0010A0E3 MOV R1,#+0 \ 000001B4 0400A0E1 MOV R0,R4 \ 000001B8 ........ BL RenderPage \ 000001BC 401094E5 LDR R1,[R4, #+64] \ 000001C0 000051E1 CMP R1,R0 \ 000001C4 F2FFFF1A BNE ??method5_17 317 } 318 } 319 if (data->cur_pos_x>=(i=data->icons[data->cur_pos_y].icon_in_row)) data->cur_pos_x=i-1; // Проверяем на выход за пределы \ ??method5_14: \ 000001C8 400094E5 LDR R0,[R4, #+64] \ 000001CC 482094E5 LDR R2,[R4, #+72] \ 000001D0 411FA0E3 MOV R1,#+260 \ 000001D4 912020E0 MLA R0,R1,R0,R2 \ 000001D8 3C1094E5 LDR R1,[R4, #+60] \ 000001DC 000090E5 LDR R0,[R0, #+0] \ 000001E0 000051E1 CMP R1,R0 \ 000001E4 010000BA BLT ??method5_1 \ ??method5_18: \ 000001E8 010040E2 SUB R0,R0,#+1 \ 000001EC 3C0084E5 STR R0,[R4, #+60] 320 break; 321 322 case DOWN_BUTTON: 323 if (data->cur_pos_ytotal_lines-1) 324 { 325 data->cur_pos_y++; 326 if (data->cur_pos_y>RenderPage(data,0)) data->view_line++; 327 } 328 else 329 { 330 data->cur_pos_y=data->view_line=0; 331 } 332 if (data->cur_pos_x>=(i=data->icons[data->cur_pos_y].icon_in_row)) data->cur_pos_x=i-1; // Проверяем на выход за пределы 333 break; 334 335 case LEFT_BUTTON: 336 if (data->cur_pos_x>0) data->cur_pos_x--; 337 else data->cur_pos_x=data->icons[data->cur_pos_y].icon_in_row-1; 338 /*{ 339 data->cur_pos_x=data->icons[data->cur_pos_y].icon_in_row-1; 340 if (data->cur_pos_y>0) 341 { 342 data->cur_pos_y--; 343 if (data->cur_pos_y<=data->view_line) data->view_line=data->cur_pos_y; 344 } 345 else 346 { 347 data->cur_pos_y=data->total_lines-1; 348 data->view_line=0; 349 while(data->view_linetotal_lines) 350 { 351 if (data->cur_pos_y==RenderPage(data,0)) break; 352 data->view_line++; 353 } 354 } 355 if (data->cur_pos_x>=(i=data->icons[data->cur_pos_y].icon_in_row)) data->cur_pos_x=i-1; // Проверяем на выход за пределы 356 }*/ 357 break; 358 359 case RIGHT_BUTTON: 360 data->cur_pos_x++; 361 if (data->cur_pos_x>=(i=data->icons[data->cur_pos_y].icon_in_row)) data->cur_pos_x=0; // Переходим на первый в ряду 362 /* { 363 data->cur_pos_x=0; 364 if (data->cur_pos_ytotal_lines-1) 365 { 366 data->cur_pos_y++; 367 if(data->cur_pos_y>RenderPage(data,0)) data->view_line++; 368 } 369 else 370 { 371 data->cur_pos_y=data->view_line=0; 372 } 373 if (data->cur_pos_x>=(i=data->icons[data->cur_pos_y].icon_in_row)) data->cur_pos_x=i-1; // Проверяем на выход за пределы 374 }*/ 375 break; 376 377 case LEFT_SOFT: 378 case ENTER_BUTTON: 379 #ifdef kluchnik 380 case GREEN_BUTTON: 381 #endif 382 PasteCharEditControl(data->ed_struct,data->icons[data->cur_pos_y].w_chars[data->cur_pos_x].wchar); 383 return (1); 384 385 case RIGHT_SOFT: 386 case RED_BUTTON: 387 return (1); 388 } 389 } 390 } 391 DirectRedrawGUI(); \ ??method5_1: \ 000001F0 3F0100EF SWI +319 392 return(0); \ 000001F4 0000A0E3 MOV R0,#+0 \ 000001F8 7080BDE8 POP {R4-R6,PC} ;; return \ ??method5_19: \ 000001FC 02005CE1 CMP R12,R2 \ 00000200 0A0000AA BGE ??method5_20 \ 00000204 01008CE2 ADD R0,R12,#+1 \ 00000208 400084E5 STR R0,[R4, #+64] \ 0000020C 0010A0E3 MOV R1,#+0 \ 00000210 0400A0E1 MOV R0,R4 \ 00000214 ........ BL RenderPage \ 00000218 401094E5 LDR R1,[R4, #+64] \ 0000021C 010050E1 CMP R0,R1 \ 00000220 E8FFFFAA BGE ??method5_14 \ 00000224 380094E5 LDR R0,[R4, #+56] \ 00000228 010080E2 ADD R0,R0,#+1 \ 0000022C D3FFFFEA B ??method5_15 \ ??method5_20: \ 00000230 385084E5 STR R5,[R4, #+56] \ 00000234 405084E5 STR R5,[R4, #+64] \ 00000238 E2FFFFEA B ??method5_14 \ ??method5_21: \ 0000023C 01005EE3 CMP LR,#+1 \ 00000240 01004EA2 SUBGE R0,LR,#+1 \ 00000244 3C0084A5 STRGE R0,[R4, #+60] \ 00000248 E8FFFFAA BGE ??method5_1 \ 0000024C 000093E5 LDR R0,[R3, #+0] \ 00000250 E4FFFFEA B ??method5_18 \ ??method5_22: \ 00000254 01008EE2 ADD R0,LR,#+1 \ 00000258 3C0084E5 STR R0,[R4, #+60] \ 0000025C 001093E5 LDR R1,[R3, #+0] \ 00000260 010050E1 CMP R0,R1 \ 00000264 E1FFFFBA BLT ??method5_1 \ 00000268 3C5084E5 STR R5,[R4, #+60] \ 0000026C 3F0100EF SWI +319 \ 00000270 0000A0E3 MOV R0,#+0 \ 00000274 7080BDE8 POP {R4-R6,PC} \ ??method5_23: \ 00000278 8E1183E0 ADD R1,R3,LR, LSL #+3 \ ??method5_11: \ 0000027C 081091E5 LDR R1,[R1, #+8] \ 00000280 ........ BL PasteCharEditControl \ 00000284 0100A0E3 MOV R0,#+1 \ 00000288 7080BDE8 POP {R4-R6,PC} \ ??method5_24: \ 0000028C 0100A0E3 MOV R0,#+1 \ 00000290 7080BDE8 POP {R4-R6,PC} \ ??method5_4: \ 00000294 ........ DC32 UseStandartSmileSel 393 } 394 \ In segment CODE, align 4, keep-with-next 395 static int method8(void){return(0);} \ method8: \ 00000000 0000A0E3 MOV R0,#+0 \ 00000004 1EFF2FE1 BX LR ;; return 396 \ In segment CODE, align 4, keep-with-next 397 static int method9(void){return(0);} \ method9: \ 00000000 0000A0E3 MOV R0,#+0 \ 00000004 1EFF2FE1 BX LR ;; return 398 399 extern void kill_data(void *p, void (*func_p)(void *)); 400 static const void * const gui_methods[11]={ 401 (void *)method0, //Redraw 402 (void *)method1, //Create 403 (void *)method2, //Close 404 (void *)method3, //Focus 405 (void *)method4, //Unfocus 406 (void *)method5, //OnKey 407 0, 408 (void *)kill_data, //method7, //Destroy 409 (void *)method8, 410 (void *)method9, 411 0 412 }; 413 \ In segment CODE, align 4, keep-with-next 414 int CreateSmileSelectGUI(EDCHAT_STRUCT *ed_struct) 415 { \ CreateSmileSelectGUI: \ 00000000 70402DE9 PUSH {R4-R6,LR} \ 00000004 0040A0E1 MOV R4,R0 416 static const RECT Canvas={0,0,0,0}; 417 SMILE_GUI *smile_gui=malloc(sizeof(SMILE_GUI)); \ 00000008 5000A0E3 MOV R0,#+80 \ 0000000C 140000EF SWI +20 \ 00000010 0050A0E1 MOV R5,R0 418 zeromem(smile_gui,sizeof(SMILE_GUI)); \ 00000014 5010A0E3 MOV R1,#+80 \ 00000018 1D0100EF SWI +285 419 patch_rect((RECT*)&Canvas,0,0,ScreenW()-1,ScreenH()-1); \ 0000001C 898100EF SWI +33161 \ 00000020 0060A0E1 MOV R6,R0 \ 00000024 888100EF SWI +33160 \ 00000028 38209FE5 LDR R2,??CreateSmileSelectGUI_0 ;; ??Canvas \ 0000002C 011046E2 SUB R1,R6,#+1 \ 00000030 010040E2 SUB R0,R0,#+1 \ 00000034 0030A0E3 MOV R3,#+0 \ 00000038 003082E5 STR R3,[R2, #+0] \ 0000003C B400C2E1 STRH R0,[R2, #+4] \ 00000040 B610C2E1 STRH R1,[R2, #+6] 420 smile_gui->gui.canvas=(void *)(&Canvas); \ 00000044 002085E5 STR R2,[R5, #+0] 421 smile_gui->gui.methods=(void *)gui_methods; \ 00000048 080082E2 ADD R0,R2,#+8 \ 0000004C 040085E5 STR R0,[R5, #+4] 422 smile_gui->gui.item_ll.data_mfree=(void (*)(void *))mfree_adr(); \ 00000050 158000EF SWI +32789 \ 00000054 200085E5 STR R0,[R5, #+32] 423 smile_gui->ed_struct=ed_struct; \ 00000058 344085E5 STR R4,[R5, #+52] 424 return CreateGUI(smile_gui); \ 0000005C 0500A0E1 MOV R0,R5 \ 00000060 370100EF SWI +311 \ 00000064 7080BDE8 POP {R4-R6,PC} ;; return \ ??CreateSmileSelectGUI_0: \ 00000068 ........ DC32 ??Canvas 425 } \ In segment DATA_C, align 4, align-sorted \ ??Canvas: \ 00000000 000000000000 DC16 0, 0, 0, 0 \ 0000 \ 00000008 ............ DC32 method0, method1, method2, method3, method4, method5, 0H \ ............ \ ............ \ ............ \ 00000000 \ 00000024 ............ DC32 kill_data, method8, method9, 0H \ ............ \ 00000000 \ In segment CODE, align 4, keep-with-next \ ??DataTable3: \ 00000000 ........ DC32 SmilesImgList \ In segment CODE, align 4, keep-with-next \ ??DataTable5: \ 00000000 ........ DC32 hy \ In segment CODE, align 4, keep-with-next \ ??DataTable6: \ 00000000 ........ DC32 s_top Maximum stack usage in bytes: Function CSTACK -------- ------ CreateSmileSelectGUI 16 DrwImg 56 FindSmByN 0 FindSmileIMGHDR 0 GetSMByItem 8 PasteCharEditControl 64 RenderPage 88 imgdhrcmp 12 method0 24 method1 24 method2 8 method3 8 method4 0 method5 16 method8 0 method9 0 Segment part sizes: Function/Label Bytes -------------- ----- FindSmileIMGHDR 52 DrwImg 104 PasteCharEditControl 136 FindSmByN 56 imgdhrcmp 76 GetSMByItem 100 RenderPage 500 method0 100 method1 232 method2 36 method3 24 method4 20 method5 664 method8 8 method9 8 CreateSmileSelectGUI 108 Canvas 52 ??DataTable3 4 ??DataTable5 4 ??DataTable6 4 Others 100 2 336 bytes in segment CODE 52 bytes in segment DATA_C 2 236 bytes of CODE memory (+ 100 bytes shared) 52 bytes of CONST memory Errors: none Warnings: none