annathyst: (Default)
[personal profile] annathyst
signal(SIGALRM,alarm_handler);
while(tired){
sleep(60*60);
}
void alarm_handler() {
if(wakeup_event == WAKEUP_ALARM && !snoozed){
hit(clock->snooze_button);
snoozed=1;
return;
} else if(wakeup_event == WAKEUP_PARENT && !snoozed){
say("I'm up, coming.\n");
snoozed=1;
return;
} else {
get_up();
}

yes, it's late.

Date: 2000-12-13 09:50 pm (UTC)

Date: 2000-12-14 08:03 am (UTC)
From: [identity profile] thp.livejournal.com
vec3_t pos;
pos = FindPosInListing(listing, "I'm up, coming.");

gi.WriteByte(svc_emotion_hope);
gi.WriteByte(HOPE_NMIAOW);
gi.WritePosition(pos);
gi.multicast(teferi->livejournal, MULTICAST_PVS);

Date: 2000-12-14 06:07 pm (UTC)
From: [identity profile] thp.livejournal.com
That wasn't C++, that was the Quake2 game library API.

typedef float[3] vec3_t;
typedef struct game_import_t {
/* ... */
void (*multicast) (vec3_t origin, multicast_t to);
void (*unicast) (edict_t ent, qboolean reliable);
void (*WriteChar) (int c);
void (*WriteByte) (int c);
void (*WriteShort) (int c);
void (*WriteLong) (int c);
void (*WriteFloat) (float f);
void (*WriteString) (char *s);
void (*WritePosition) (vec3_t v);
void (*WriteDir) (vec3_t v);
void (*WriteAngle) (float f);
/* ... */
} game_import_t;

/* ... */

game_export_t *GetGameAPI(game_import_t *import) {
gi = *import;
/* ... */
}

Profile

annathyst: (Default)
Anna

June 2021

S M T W T F S
  12345
67 89101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 23rd, 2026 01:03 pm
Powered by Dreamwidth Studios