Overview
Comment: | Correct a few problems in the animation handling |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
3608bd2d5da7cbd66f4c9f586ff5651a |
User & Date: | user on 2020-12-16 00:37:33 |
Other Links: | manifest | tags |
Context
2020-12-16
| ||
05:00 | Add the backslash key code to the quarks file check-in: 9aaca3d1c5 user: user tags: trunk | |
00:37 | Correct a few problems in the animation handling check-in: 3608bd2d5d user: user tags: trunk | |
00:08 | Start the implementation of animations. check-in: 0f84344e70 user: user tags: trunk | |
Changes
Modified class.c from [dde1df9612] to [33b921b461].
︙ | ︙ | |||
1630 1631 1632 1633 1634 1635 1636 | case OP_SYNCHRONIZE: nxttok(); if(tokent!=TF_INT) ParseError("Number expected\n"); i=tokenv; if(i&~7) ParseError("Animation slot number out of range\n"); nxttok(); if(tokent!=TF_INT) ParseError("Number expected\n"); | | | 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 | case OP_SYNCHRONIZE: nxttok(); if(tokent!=TF_INT) ParseError("Number expected\n"); i=tokenv; if(i&~7) ParseError("Animation slot number out of range\n"); nxttok(); if(tokent!=TF_INT) ParseError("Number expected\n"); if(tokenv<1 || tokenv>255) ParseError("Length of synchronized animation out of range\n"); anim_slot[i].length=tokenv; nxttok(); if(tokent!=TF_INT) ParseError("Number expected\n"); if(tokenv<1 || tokenv>255) ParseError("Synchronized animation speed out of range\n"); anim_slot[i].speed=tokenv; nxttok(); if(tokent!=TF_CLOSE) ParseError("Expected close parenthesis\n"); |
︙ | ︙ |
Modified game.c from [fc378111c4] to [d0dfda7e81].
︙ | ︙ | |||
78 79 80 81 82 83 84 | } static void continue_animation(void) { Uint32 n=firstobj; Object*o; Animation*a; int i; | | | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | } static void continue_animation(void) { Uint32 n=firstobj; Object*o; Animation*a; int i; for(i=0;i<8;i++) if(anim_slot[i].length && ++anim_slot[i].vtime==anim_slot[i].speed && (anim_slot[i].vtime=0,++anim_slot[i].frame==anim_slot[i].length)) anim_slot[i].frame=0; while(n!=VOIDLINK) { o=objects[n]; if((a=o->anim) && (a->status&ANISTAT_VISUAL)) { i=a->vstep; if(a->step[i].flag&ANI_SYNC) { i=anim_slot[a->step[i].slot].frame+a->step[i].start; if(i!=a->vimage) { |
︙ | ︙ | |||
465 466 467 468 469 470 471 472 473 474 475 | if(i==-1) exit(0); if(i==-2) { main_options['e']=1; SDL_SetTimer(0,0); return; } redraw_game(); break; } } } | > | 465 466 467 468 469 470 471 472 473 474 475 476 | if(i==-1) exit(0); if(i==-2) { main_options['e']=1; SDL_SetTimer(0,0); return; } redraw_game(); timerflag=0; break; } } } |