~rabbits/hiversaires

ref: 48e00fcdd82d1c3e02fabb9c29dceaf4d461f02c hiversaires/src/delays.h -rw-r--r-- 812 bytes
48e00fcdRezmason Remade the splash animation sequence 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

/*
Copyright (c) 2013-2021 Devine Lu Linvega
2018 web port by rezmason
2021 C89 port by rezmason

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/

/*
	This module implements delays— functions to be called
	at some point in the future.
*/

typedef struct {
	double endTime;
	void (*onComplete)(void *data);
	void *data;
} Delay;

void Delays_Init(int numDelays);
void Delays_Quit();
int Delays_Add(double duration, void (*onComplete)(), void *data);
void Delays_Cancel(int uid, int complete);
void Delays_Update(double totalTime);