Overview
Comment: | Implement more of the class/image select menu |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
39715134ca1367a36025a9201dd1445f |
User & Date: | user on 2018-10-31 23:35:01 |
Other Links: | manifest | tags |
Context
2019-02-10
| ||
18:10 | Allow left and right arrow keys in class select menu to select which image check-in: 2da745c85b user: user tags: trunk | |
2018-10-31
| ||
23:35 | Implement more of the class/image select menu check-in: 39715134ca user: user tags: trunk | |
2018-10-28
| ||
18:51 | Start implementing class/image selection menu check-in: 68e715091a user: user tags: trunk | |
Changes
Modified edit.c from [928ca89952] to [ac0c1161ab].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + - + | typedef struct { Uint16 class; Uint8 img,dir; Value misc1,misc2,misc3; } MRU; #define MRUCOUNT 32 |
︙ | |||
69 70 71 72 73 74 75 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + - + - + | draw_text(8,32,buf,0xF0,0xFD); draw_text(24,32,"x",0xF0,0xF5); x=x>=left_margin?(x-left_margin)/picture_size+1:0; y=y/picture_size+1; if(x>0 && y>0 && x<=pfwidth && y<=pfheight) snprintf(buf,8,"(%2d,%2d)",x,y); else strcpy(buf," "); draw_text(0,40,buf,0xF0,0xF3); |
︙ | |||
122 123 124 125 126 127 128 129 130 131 132 133 134 135 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | + + + + + + + + + + | sqlite3_str_appendall(m,basefilename); sqlite3_str_appendall(m,r+c+1); } s=sqlite3_str_finish(m); if(s) SDL_WM_SetCaption(s,s); else SDL_WM_SetCaption("Free Hero Mesh","Free Hero Mesh"); sqlite3_free(s); } static void add_mru(int cl,int img) { int i; for(i=0;i<MRUCOUNT-1;i++) if(mru[i].class==cl && mru[i].img==img) break; memmove(mru+1,mru,i*sizeof(MRU)); mru[0].class=cl; mru[0].img=img; mru[0].dir=0; mru[0].misc1=mru[0].misc2=mru[0].misc3=NVALUE(0); } static void class_image_select(void) { SDL_Event ev; SDL_Rect r; int clscroll=0; int imgscroll=0; int clcount=0; |
︙ | |||
212 213 214 215 216 217 218 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if(i<0 || i>=clcount) break; namei=0; cl=cllist[i]; setclass: imgscroll=imgcount=0; for(i=0;i<classes[cl]->nimages;i++) if(classes[cl]->images[i]&0x8000) imglist[imgcount++]=i; img=*imglist; |
︙ |