blob: bc70b7a52cf835c4278fde35b15ab04eacab6439 (
plain) (
blame)
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
32
33
34
35
36
37
38
39
40
|
#include "samantha.h"
#include "ui.h"
void initSamantha(Entity* entity)
{
entity->box = (BoundingBox){
.min = (Vector3){-SAMANTHA_WIDTH, -SAMANTHA_HEIGHT, -SAMANTHA_THICKNESS},
.max = (Vector3){SAMANTHA_WIDTH, SAMANTHA_HEIGHT, SAMANTHA_THICKNESS}
};
}
void updateSamantha(Entity* entity, Game* game)
{
// silly tv static effect.
game->assets.models[SAMANTHA_MODEL].materials[0]
.maps[MATERIAL_MAP_DIFFUSE].texture =
game->assets.textures[
SAMANTHA_1_TEXTURE + ((int)(GetTime() * SAMANTHA_STATIC_SPEED) %
SAMANTHA_STATIC_FRAMES)];
DrawModel(game->assets.models[SAMANTHA_MODEL], entity->position, 1.0, WHITE);
}
InteractionCommand interactWithSamantha(Entity* entity, Game* game,
Selection selection)
{
InteractionChat* chat = &game->chat;
switch (selection)
{
case SELECTION_INTERACT:
writeToInteractionChat(chat, "hihi");
return INTERACTION_TALK;
case SELECTION_NEXT_MESSAGE:
case SELECTION_LEAVE:
return INTERACTION_END;
default:
return INTERACTION_END;
}
}
|