home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / tegltc.zip / SAMPROGS / ANIMTST1.C < prev    next >
Text File  |  1990-05-14  |  2KB  |  69 lines

  1. /*---------------------------------------------------------------------------*
  2.  |               TEGL Windows ToolKit II                 |
  3.  |          Copyright (C) 1990, TEGL Systems Corporation             |
  4.  |                All Rights Reserved.                 |
  5.  *---------------------------------------------------------------------------*/
  6.  
  7. #include <dos.h>
  8. #include <stdio.h>
  9. #include <string.h>
  10. #include <graphics.h>
  11. #include "teglsys.h"
  12. #include "animtst1.inc"
  13.  
  14. animateobject oriental;
  15. imagestkptr   orientalfs;
  16.  
  17. unsigned orientalbow(imagestkptr frame, msclickptr mouseclickpos)
  18.    {
  19.       hideimage(frame);
  20.  
  21.       hidemouse();
  22.       resetframe(&oriental,1);
  23.       animateinit();
  24.       origin(&oriental,frame->x,frame->y);
  25.       animate(&oriental,8);
  26.       showmouse();
  27.  
  28.       showimage(frame,frame->x,frame->y);
  29.       return 1;
  30.    }
  31.  
  32. unsigned exitoption(imagestkptr frame, msclickptr mouseclickpos)
  33.    {
  34.       abort_msg("Animation Test - The Bowing oriental.");
  35.       return 0;
  36.    }
  37.  
  38.  
  39. void main(int argc, char **argv)
  40. {
  41.     teglinit(ega640x350x16,12288);
  42.  
  43.     setctrlbreakfs(exitoption);
  44.  
  45.     clearteglscreen();
  46.  
  47.     init(&oriental);
  48.     addframe(&oriental,imageCHINA,0,0,55,37,350,1200,55,BLACK);
  49.     addframe(&oriental,imageCHINA,0,0,55,37,150,1200,56,BLACK);
  50.  
  51.     addframe(&oriental,imageCHINA2,0,0,55,37,75,1100,55,BLACK);
  52.     addframe(&oriental,imageCHINA2,0,0,55,37,75,1100,56,BLACK);
  53.  
  54.     addframe(&oriental,imageCHINA3,0,0,55,37,150,900,55,BLACK);
  55.     addframe(&oriental,imageCHINA3,0,0,55,37,150,900,56,BLACK);
  56.     addframe(&oriental,imageCHINA3,0,0,55,37,600,1100,56,BLACK);
  57.  
  58.     addframe(&oriental,imageCHINA2,0,0,55,37,150,1100,0,BLACK);
  59.     addframe(&oriental,imageCHINA,0,0,55,37,500,1100,55,BLACK);
  60.  
  61.     pushimage(15,285,15 + 37,285 + 55);
  62.     putpict(15,285,imageCHINA,BLACK);
  63.     definemouseclickarea(stackptr,0,0,37,55,TRUE,orientalbow,MSCLICK);
  64.     orientalfs = stackptr;
  65.     setframemobility(stackptr,FALSE);
  66.  
  67.     teglsupervisor();
  68. }
  69.