home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / xaes_new / extra.c < prev    next >
C/C++ Source or Header  |  1994-10-22  |  2KB  |  82 lines

  1. /********************************************************************
  2.  *                                                                1.00*
  3.  *    XAES: Extra Routines                                            *
  4.  *    Code by Ken Hollis, GNU C Extensions by Sascha Blank            *
  5.  *                                                                    *
  6.  *    Copyright (c) 1994, Bitgate Software.  All Rights Reserved.        *
  7.  *                                                                    *
  8.  *    What else was I supposed to call this code segment?!            *
  9.  *                                                                    *
  10.  ********************************************************************/
  11.  
  12. #include <string.h>
  13. #include "xaes.h"
  14.  
  15. GLOBAL BOOL CheckMultitask(void)
  16. {
  17.     if (locate_cookie('MiNT'))
  18.         return TRUE;
  19.  
  20.     return FALSE;
  21. }
  22.  
  23. GLOBAL BOOL    CheckSpeedup(void)
  24. {
  25.     if (locate_cookie('NVDI'))
  26.         return TRUE;
  27.  
  28.     return FALSE;
  29. }
  30.  
  31. GLOBAL BOOL CheckPowerDOS(void)
  32. {
  33.     if (locate_cookie('PDOS'))
  34.         return TRUE;
  35.  
  36.     return FALSE;
  37. }
  38.  
  39. GLOBAL BOOL CheckWinX(void)
  40. {
  41.     if (locate_cookie('WINX'))
  42.         return TRUE;
  43.  
  44.     return FALSE;
  45. }
  46.  
  47. GLOBAL void WObjFixPosition(OBJECT *obj)
  48. {
  49.     int i;
  50.  
  51.     i = -1;
  52.  
  53.     do {
  54.         i++;
  55.         rsrc_obfix(obj, i);
  56.     } while(!(obj[i].ob_flags & LASTOB));
  57. }
  58.  
  59. GLOBAL void ChangeObjectText(OBJECT *obj, int idx, char *txt, int fnt, int just)
  60. {
  61.     UNUSED(fnt);
  62.  
  63.     switch(obj[idx].ob_type & 0xFF) {
  64.         case G_USERDEF:
  65.             {
  66.                 EXTINFO *exinf = (EXTINFO *)(obj[idx].ob_spec.userblk->ub_parm);
  67.  
  68.                 exinf->te_ptext = txt;
  69.                 exinf->te_txtlen = (int) strlen(txt);
  70.                 exinf->te_just = just;
  71.             }
  72.             break;
  73.  
  74.         default:
  75.             obj[idx].ob_spec.tedinfo->te_ptext = (char *) txt;
  76.             obj[idx].ob_spec.tedinfo->te_txtlen = (int) strlen(txt);
  77.             if (just>0)
  78.                 obj[idx].ob_spec.tedinfo->te_just = just;
  79.             break;
  80.     }
  81. }
  82.