_MAP_H inside a machine

#ifndef _MAP_H at work today i was inside a
#define _MAP_H machine. i had been asked to

#include "types.h" clean out all  the waste
#include "defs.h" product,   by  a  setter,
#include "actions.h" before      production
#include <stdio.h> resumed.  to  enter,   i

typedef struct squeezed   between   plastic
    xy_t x; pipes and metal structure.
    xy_t y; it was arkward to get the  thin
}xy; plastic  lids into the rubbish bag due

typedef struct to  the  confined area where
    ss_t x; various  parts   of   machinary
    ss_t y; jutted into.  a while later the
}xy_offset; setter returned and told me  he

typedef struct would  open a side panel which i  might  be
    map_t*  word;       /* word as icons/map data       */
    xy      pos;        /* position of first letter     */
    su_t    dir;        /* direction of word            */
    bool    state;      /* solved yet?                  */
    xy      unblock_pos;/* unblock pos when solved      */
    map_t*  unblock_ptr;/* ptr to map data of coord     */
    map_t** word_ptr;   /* array of ptrs to map coords  */
    map_t   block; able to  squeeze  through to reach  the
}xg_word; remainder of the plastic lids unlucky enough  to

typedef struct have fallen  into the  machine  instead  of  continuing
    char*       filename; their journey along the production line  and
    char*       title; reaching the customer. i was getting hot inside
    ctr_t       max_moves;      /* max moves allowed to complete map*/
    su_t        width; the machine, and bothered too. I wanted to  get
    su_t        height; out of the machine as fast as I could. It  had
    map_t**     data; been a rather tight fit to  squeeze through  the
    xy          player[2];      /* initial positions            */
    xy          mappc[4];       /* coords of map piece 0 1 2 3  */
    xy          teleport[2];    /* positions, scanned           */
    su_t        level;          /* user's choice                */
    su_t        mask_count; panel and into the machine. it  was  dirty
    xg_word     words[MAX_WORDS_TO_SOLVE]; and oily in there.  i  left
    bool        complete; the panel open so I could throw the lids out
}xg_map; for i would not have been able to remove the rubbish bag if i

/*  the solutions take the form of:                             *
 *  1) a list of words                                          *
 *  2) a list of x,y positions for first letter of each word    *
 *  3) a list of directions right,down how each word should be  *
 *     placed.                                                  *
 *  (once the player has arranged letters such that these words *
 *   can be read at the respective positions in the map, then   *
 *   player can finish the level and go through the exit.)      */

extern xg_map* map; had  of  filled it  within the machine.    the

void xg_map_create(const char* title, int width,int height); panel
void xg_map_destroy(); kept closing and so i propped it open  with
void xg_map_load(su_t level); plasic lids. a short while later the

char* xg_map_load_read_name(su_t level); side panel  closed  again

/*  map_get_teleport checks the coordinates passed against
    those in the map->teleports array and returns 0 if
    coordinate is teleport 0, and 1 if coordinate is teleport
    1. returns 99 if coord is not a teleport.
su_t map_get_teleport(xy_t x, xy_t y); and so i pushed it open and

void xg_map_apply_edging(); then it closed again  so i  pushed  it

bool is_wall(xy_t x, xy_t y); open and then it closed again  so  i

/*  test map against word solutions, return TRUE if all matches */
bool map_check_solved(); pushed it open and this  time  felt  that

#ifdef MAPDEVMODE somebody was trying to close it with me inside!!
void map_dump_solve_state(); i was rather worried it  was  someone
#endif who had not seen me  inside the machine  and was  going  to

#endif /* _MAP_H */ start it up with me inside!! So  I  pushed  it
open again. This time it flew open and an angry young face  stared
at me and shouted "we're trying to get past with the fork-lift! if
you push  this door  open again  i'll f##king crush  you in it!!!"


"_MAP_H inside a machine"

An incident at work, today told inside a C header file.

Journal entry - 22:33 Tuesday 12 May 2009

DISCLAIMER: The opinions and attitudes of James W. Morris as expressed here in the past may or may not accurately reflect the opinions and attitudes of James W. Morris at present, moreover, they may never have.


this page last updated:29th April 2013 jwm-art.net (C) 2003 - 2017 James W. Morris

script time:0.0465