version 1.53 | | version 1.54 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.53 2001/11/27 04:33:46 michtoen Exp $"; | | * "$Id: apply.c,v 1.54 2001/12/18 08:58:03 garbled Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
#include <living.h> | | #include <living.h> |
#include <spells.h> | | #include <spells.h> |
#include <skills.h> | | #include <skills.h> |
| | #include <tod.h> |
| | |
#ifndef __CEXTRACT__ | | #ifndef __CEXTRACT__ |
#include <sproto.h> | | #include <sproto.h> |
| | |
case CLOCK: | | case CLOCK: |
if (op->type == PLAYER) { | | if (op->type == PLAYER) { |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
time_t t = time(NULL); | | timeofday_t tod; |
strftime(buf, sizeof(buf), "Time is %I:%M %p", localtime(&t)); | | |
| | get_tod(&tod); |
| | sprintf(buf, "It is %d minute%s past %d o'clock %s", |
| | tod.minute+1, ((tod.minute+1 < 2) ? "" : "s"), |
| | ((tod.hour % 14 == 0) ? 14 : ((tod.hour)%14)), |
| | ((tod.hour >= 14) ? "pm" : "am")); |
play_sound_player_only(op->contr, SOUND_CLOCK,0,0); | | play_sound_player_only(op->contr, SOUND_CLOCK,0,0); |
new_draw_info(NDI_UNIQUE, 0,op, buf); | | new_draw_info(NDI_UNIQUE, 0,op, buf); |
return 1; | | return 1; |