add a direction to the command queue */
| 291 | |
| 292 | /* add a direction to the command queue */ |
| 293 | void |
| 294 | cmdq_add_dir(int q, schar dx, schar dy, schar dz) |
| 295 | { |
| 296 | struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp); |
| 297 | struct _cmd_queue *cq = gc.command_queue[q]; |
| 298 | |
| 299 | tmp->typ = CMDQ_DIR; |
| 300 | tmp->dirx = dx; |
| 301 | tmp->diry = dy; |
| 302 | tmp->dirz = dz; |
| 303 | tmp->next = NULL; |
| 304 | |
| 305 | while (cq && cq->next) |
| 306 | cq = cq->next; |
| 307 | |
| 308 | if (cq) |
| 309 | cq->next = tmp; |
| 310 | else |
| 311 | gc.command_queue[q] = tmp; |
| 312 | } |
| 313 | |
| 314 | /* add placeholder to the command queue, allows user input there */ |
| 315 | void |
no test coverage detected