Skip to content

Commit 0f3462f

Browse files
committed
import some more assets
1 parent a189777 commit 0f3462f

30 files changed

+92
-11
lines changed
877 KB
Binary file not shown.
917 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
882 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

assets/images/enemies/enemy1.png

1.22 KB
Loading

assets/images/spell/symbols.png

-2.54 KB
Loading
1.56 KB
Loading
1.52 KB
Loading
1.61 KB
Loading
4.57 KB
Loading

assets/images/stone_indoor/wall1.png

1.6 KB
Loading

assets/materials/materials.blend

767 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"tex0": "../../images/stone_indoor/floor_small1.png",
3+
"combineMode": [{
4+
"color": ["TEX0", "0", "SHADE", "0"],
5+
"alpha": ["0", "0", "0", "1"]
6+
}],
7+
"blendMode": "OPAQUE",
8+
"lighting": false,
9+
"zBuffer": true
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"tex0": {
3+
"filename": "../../images/stone_indoor/floor_large1.png",
4+
"s": {
5+
"mirror": true
6+
},
7+
"t": {
8+
"mirror": true
9+
}
10+
},
11+
"combineMode": [{
12+
"color": ["TEX0", "0", "SHADE", "0"],
13+
"alpha": ["0", "0", "0", "1"]
14+
}],
15+
"blendMode": "OPAQUE",
16+
"lighting": false,
17+
"zBuffer": true
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"tex0": "../../images/stone_indoor/floor_small1.png",
3+
"combineMode": [{
4+
"color": ["0", "0", "0", "TEX0"],
5+
"alpha": ["0", "0", "0", "1"]
6+
}],
7+
"blendMode": "OPAQUE",
8+
"lighting": false,
9+
"zBuffer": true
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"tex0": "../../images/stone_indoor/floor_small2.png",
3+
"combineMode": [{
4+
"color": ["0", "0", "0", "TEX0"],
5+
"alpha": ["0", "0", "0", "1"]
6+
}],
7+
"blendMode": "OPAQUE",
8+
"lighting": false,
9+
"zBuffer": true
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"tex0": "../../images/stone_indoor/floorbutton.png",
3+
"combineMode": [{
4+
"color": ["0", "0", "0", "TEX0"],
5+
"alpha": ["0", "0", "0", "1"]
6+
}],
7+
"blendMode": "OPAQUE",
8+
"lighting": false,
9+
"zBuffer": true
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"tex0": {
3+
"filename": "../../images/stone_indoor/wall1.png",
4+
"s": {
5+
"mirror": true
6+
},
7+
"t": {
8+
"mirror": true
9+
}
10+
},
11+
"combineMode": [{
12+
"color": ["TEX0", "0", "SHADE", "0"],
13+
"alpha": ["0", "0", "0", "1"]
14+
}],
15+
"blendMode": "OPAQUE",
16+
"lighting": false,
17+
"zBuffer": true
18+
}

assets/worlds/test.blend

107 KB
Binary file not shown.

src/main.c

-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#define RDPQ_VALIDATE_DETACH_ADDR 0x00800000
3333

3434
struct world* current_world;
35-
struct crate crate_test;
3635
struct collectable collectable_test;
3736

3837
struct spell_symbol test_spell_symbols[] = {
@@ -66,8 +65,6 @@ void setup() {
6665
def.position.z = 0.0f;
6766
def.rotation = gRight2;
6867

69-
crate_init(&crate_test, &def);
70-
7168
struct collectable_definition collect_def;
7269
collect_def.position.x = 4.0f;
7370
collect_def.position.y = 1.0f;

src/scene/world_loader.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void world_load_entity(struct world* world, struct entity_data* entity_data, FIL
5858
fread(entity_def_data, definition_size, entity_data->entity_count, file);
5959

6060
for (int entity_index = 0; entity_index < entity_data->entity_count; entity_index += 1) {
61-
def->init(entity, entity_def_data);
61+
def->init(entity, entity_def);
6262

6363
entity += def->entity_size;
6464
entity_def += def->definition_size;

src/spell/recast.c

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ void recast_update_end_cast(struct recast* recast, struct spell_event_listener*
4444
recast->output->position = recast->original_source->position;
4545
recast->output->direction = recast->original_source->direction;
4646
recast->output->flags = recast->original_source->flags;
47+
// recast consumes this flag
48+
recast->output->flags.reversed = 0;
4749
recast->output->flags.cast_state = SPELL_CAST_STATE_ACTIVE;
4850
recast->output->target = recast->original_source->target;
4951

src/spell/spell.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ enum spell_symbol_type {
1313
SPELL_SYMBOL_PROJECTILE,
1414
SPELL_SYMBOL_PUSH,
1515
SPELL_SYMBOL_RECAST,
16-
SPELL_SYMBOL_STICKY_CAST,
16+
SPELL_SYMBOL_SHIELD,
17+
SPELL_SYMBOL_REVERSE,
18+
SPELL_SYMBOL_TARGET,
19+
SPELL_SYMBOL_UP,
20+
SPELL_SYMBOL_TIME_DIALATION,
1721

1822
SPELL_SYMBOL_PASS_DOWN,
1923

src/spell/spell_data_source.h

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ enum spell_cast_state {
1717
union spell_source_flags {
1818
struct {
1919
uint16_t flaming: 1;
20+
uint16_t icy: 1;
21+
uint16_t fast: 1;
22+
uint16_t slow: 1;
23+
uint16_t up: 1;
24+
uint16_t around: 1;
25+
uint16_t reversed: 1;
2026
uint16_t controlled: 1;
2127
uint16_t cast_state: 2;
2228
};

src/spell/spell_exec.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ void spell_slot_init(
3939
break;
4040
case SPELL_SYMBOL_RECAST:
4141
slot->type = SPELL_EXEC_SLOT_TYPE_RECAST;
42-
recast_init(&slot->data.recast, input, event_options, RECAST_MODE_RECAST);
43-
break;
44-
case SPELL_SYMBOL_STICKY_CAST:
45-
slot->type = SPELL_EXEC_SLOT_TYPE_RECAST;
46-
recast_init(&slot->data.recast, input, event_options, REACT_MODE_STICKY);
42+
recast_init(&slot->data.recast, input, event_options, input->flags.reversed ? REACT_MODE_STICKY : RECAST_MODE_RECAST);
4743
break;
4844
case SPELL_SYMBOL_PUSH:
4945
slot->type = SPELL_EXEC_SLOT_TYPE_PUSH;

tools/mesh_export/world.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def process_scene():
6767

6868
mesh_source = None
6969

70-
if mesh.library or 'type' in mesh:
70+
if 'type' in mesh:
7171
process_linked_object(world, obj, mesh, definitions)
7272
elif len(mesh.materials) > 0:
7373
world.static.append(StaticEntry(obj, mesh, final_transform))

0 commit comments

Comments
 (0)