DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦69fae4452⟧ TextFile

    Length: 2293 (0x8f5)
    Types: TextFile
    Names: »ast_sun.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/Sun/Asteroids/ast_sun.c« 

TextFile

 
/*  ast_sun.c
 *
 *  SUN dependent functions and procedures used by the asteroids game.
 *  Written by Rich Burridge - SUN Microsystems Australia (Melbourne).
 *
 *  Version 3.0.  -  April 1987.
 *
 *  No responsibility is taken for any errors inherent either to the code
 *  or the comments of this program, but if reported to me then an attempt
 *  will be made to fix them.
 */

#include <stdio.h>
#include <strings.h>
#include <sundev/kbd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sundev/kbio.h>
#include "bltstuff.h"
#include "asteroids.h"
#include <sys/timeb.h>
#include <suntool/sunview.h>
#include <suntool/canvas.h>
 
Cursor nullcur,syscur ;          /* Asteroids cursors. */
Pixfont *pf ;

extern Canvas canvas ;
extern Pixwin *pw ;

short nullcur_data[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0
} ;
mpr_static(nullcur_pr,16,16,1,nullcur_data) ;

short syscur_data[] = {
#include "main.cursor"
} ;
mpr_static(syscur_pr,16,16,1,syscur_data) ;

int sfunc ;
 

get_key(fd,station,value,count)
int fd,station,count ;
char value[MAXLINE] ;

{
  struct kiockey key ;

  key.kio_tablemask = 0 ;
  key.kio_entry = count ;
  key.kio_station = station ;
  IOCTL(fd,(int) KIOCGETKEY,(char *) &key) ;
  STRCPY(value,key.kio_string) ;
}


iocursormode(m)               /* Set the current cursor display mode. */
int m ;

{
  switch (m)
    {
      case OFFCURSOR   : nullcur = window_get(canvas,WIN_CURSOR) ;
                         cursor_set(nullcur,CURSOR_IMAGE,&nullcur_pr,0) ;
                         window_set(canvas,WIN_CURSOR,nullcur,0) ;
                         break ;
      case TRACKCURSOR : syscur = window_get(canvas,WIN_CURSOR) ;
                         cursor_set(syscur,CURSOR_IMAGE,&syscur_pr,0) ;
                         cursor_set(syscur,CURSOR_OP,PIX_SRC ^ PIX_DST,0) ;
                         window_set(canvas,WIN_CURSOR,syscur,0) ;
    }
}


set_key(fd,station,value,count)
int fd,station,count ;
char value[MAXLINE] ;

{
  struct kiockey key ;

  key.kio_tablemask = 0 ;
  key.kio_entry = count ;
  key.kio_station = station ;
  STRCPY(key.kio_string,value) ;
  IOCTL(fd,(int) KIOCSETKEY,(char *) &key) ;
}


write_bold(x,y,text)
int x,y ;
char text[MAXLINE] ;

{
  pw_text(pw,x,y,ROR,pf,text) ;
  pw_text(pw,x+1,y,ROR,pf,text) ;
}