Debian Codegraph @

prboom2/src/dsda/hud_components/big_artifact.c

raw
1 //
2 // Copyright(C) 2022 by Ryan Krafnick
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Big Artifact HUD Component
16 //
17
18 #include "base.h"
19
20 #include "big_artifact.h"
21
22 typedef struct {
23 dsda_patch_component_t component;
24 } local_component_t;
25
26 static local_component_t* local;
27
28 void dsda_InitBigArtifactHC(int x_offset, int y_offset, int vpt, int* args, int arg_count, void** data) {
29 *data = Z_Calloc(1, sizeof(local_component_t));
30 local = *data;
31
32 dsda_InitPatchHC(&local->component, x_offset, y_offset, vpt);
33 }
34
35 void dsda_UpdateBigArtifactHC(void* data) {
36 local = data;
37 }
38
39 void dsda_DrawBigArtifactHC(void* data) {
40 extern void DrawArtifact(int x, int y, int vpt);
41
42 local = data;
43
44 DrawArtifact(local->component.x, local->component.y, local->component.vpt);
45 }