comparison gui/app.c @ 32926:7c205a5c2a9b

Remove parameter from appInitStruct() function. Since there is only one listItems structure variable (the global appMPlayer), there is no need to pass it to the function.
author ib
date Thu, 03 Mar 2011 13:13:20 +0000
parents 992a4b9d7624
children edb972e22021
comparison
equal deleted inserted replaced
32925:992a4b9d7624 32926:7c205a5c2a9b
104 item->last_x = 0; 104 item->last_x = 0;
105 item->pressed = btnDisabled; 105 item->pressed = btnDisabled;
106 item->tmp = 0; 106 item->tmp = 0;
107 } 107 }
108 108
109 void appInitStruct(listItems *item) 109 void appInitStruct(void)
110 { 110 {
111 int i; 111 int i;
112 112
113 for (i = 0; i < item->NumberOfMainItems; i++) 113 for (i = 0; i < appMPlayer.NumberOfMainItems; i++)
114 appClearItem(&item->mainItems[i]); 114 appClearItem(&appMPlayer.mainItems[i]);
115 for (i = 0; i < item->NumberOfBarItems; i++) 115 for (i = 0; i < appMPlayer.NumberOfBarItems; i++)
116 appClearItem(&item->barItems[i]); 116 appClearItem(&appMPlayer.barItems[i]);
117 for (i = 0; i < item->NumberOfMenuItems; i++) 117 for (i = 0; i < appMPlayer.NumberOfMenuItems; i++)
118 appClearItem(&item->menuItems[i]); 118 appClearItem(&appMPlayer.menuItems[i]);
119 119
120 item->NumberOfMainItems = -1; 120 appMPlayer.NumberOfMainItems = -1;
121 memset(item->mainItems, 0, 256 * sizeof(wItem)); 121 memset(appMPlayer.mainItems, 0, 256 * sizeof(wItem));
122 122
123 item->NumberOfMenuItems = -1; 123 appMPlayer.NumberOfMenuItems = -1;
124 memset(item->menuItems, 0, 64 * sizeof(wItem)); 124 memset(appMPlayer.menuItems, 0, 64 * sizeof(wItem));
125 125
126 item->NumberOfBarItems = -1; 126 appMPlayer.NumberOfBarItems = -1;
127 memset(item->barItems, 0, 256 * sizeof(wItem)); 127 memset(appMPlayer.barItems, 0, 256 * sizeof(wItem));
128 128
129 appClearItem(&item->main); 129 appClearItem(&appMPlayer.main);
130 item->mainDecoration = 0; 130 appMPlayer.mainDecoration = 0;
131 131
132 appClearItem(&item->sub); 132 appClearItem(&appMPlayer.sub);
133 item->sub.width = 0; 133 appMPlayer.sub.width = 0;
134 item->sub.height = 0; 134 appMPlayer.sub.height = 0;
135 item->sub.x = -1; 135 appMPlayer.sub.x = -1;
136 item->sub.y = -1; 136 appMPlayer.sub.y = -1;
137 137
138 appClearItem(&item->menuBase); 138 appClearItem(&appMPlayer.menuBase);
139 appClearItem(&item->menuSelected); 139 appClearItem(&appMPlayer.menuSelected);
140 140
141 item->sub.R = item->sub.G = item->sub.B = 0; 141 appMPlayer.sub.R = appMPlayer.sub.G = appMPlayer.sub.B = 0;
142 item->bar.R = item->bar.G = item->bar.B = 0; 142 appMPlayer.bar.R = appMPlayer.bar.G = appMPlayer.bar.B = 0;
143 item->main.R = item->main.G = item->main.B = 0; 143 appMPlayer.main.R = appMPlayer.main.G = appMPlayer.main.B = 0;
144 item->barIsPresent = 0; 144 appMPlayer.barIsPresent = 0;
145 item->menuIsPresent = 0; 145 appMPlayer.menuIsPresent = 0;
146 } 146 }
147 147
148 int appFindMessage(unsigned char *str) 148 int appFindMessage(unsigned char *str)
149 { 149 {
150 int i; 150 int i;