object mappings
This commit is contained in:
parent
ab524834d6
commit
bf037daf88
1 changed files with 50 additions and 0 deletions
50
main.odin
50
main.odin
|
|
@ -1,3 +1,5 @@
|
||||||
|
#+feature dynamic-literals
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|
@ -336,6 +338,54 @@ JmapObjectInstance :: struct {
|
||||||
x, y, object_index: int,
|
x, y, object_index: int,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jmap_object_map := map[int]string {
|
||||||
|
1 = "block",
|
||||||
|
2 = "miniBlock",
|
||||||
|
3 = "spikeUp",
|
||||||
|
4 = "spikeRight",
|
||||||
|
5 = "spikeLeft",
|
||||||
|
6 = "spikeDown",
|
||||||
|
7 = "miniSpikeUp",
|
||||||
|
8 = "miniSpikeRight",
|
||||||
|
9 = "miniSpikeLeft",
|
||||||
|
10 = "miniSpikeDown",
|
||||||
|
11 = "fruit",
|
||||||
|
12 = "save",
|
||||||
|
13 = "platform",
|
||||||
|
14 = "water1",
|
||||||
|
15 = "water3",
|
||||||
|
16 = "vineR",
|
||||||
|
17 = "vineL",
|
||||||
|
18 = "killerBlock",
|
||||||
|
20 = "playerStart",
|
||||||
|
21 = "warp",
|
||||||
|
22 = "jumpRefresher",
|
||||||
|
23 = "water2",
|
||||||
|
24 = "gravityFlipperUp",
|
||||||
|
25 = "gravityFlipperDown",
|
||||||
|
26 = "saveFlipped",
|
||||||
|
27 = "bulletBlocker",
|
||||||
|
28 = "sidewaysPlatform",
|
||||||
|
30 = "miniWater1",
|
||||||
|
31 = "miniWater3",
|
||||||
|
32 = "miniWater2",
|
||||||
|
33 = "miniCatharsisWater",
|
||||||
|
34 = "waterNekoron",
|
||||||
|
35 = "miniWaterNekoron",
|
||||||
|
36 = "spikeUp",
|
||||||
|
37 = "spikeRight",
|
||||||
|
38 = "spikeLeft",
|
||||||
|
39 = "spikeDown",
|
||||||
|
40 = "spikeUp",
|
||||||
|
41 = "spikeRight",
|
||||||
|
42 = "spikeLeft",
|
||||||
|
43 = "spikeDown",
|
||||||
|
44 = "lineBlockHorizontal",
|
||||||
|
45 = "lineBlockVertical",
|
||||||
|
46 = "miniLineBlockHorizontal",
|
||||||
|
47 = "miniLineBlockVertical",
|
||||||
|
}
|
||||||
|
|
||||||
jmap_object_list_from_text :: proc(text: string, allocator: mem.Allocator, temp_allocator: mem.Allocator) -> (_object_list: []JmapObjectInstance, _error: JmapObjectListError) {
|
jmap_object_list_from_text :: proc(text: string, allocator: mem.Allocator, temp_allocator: mem.Allocator) -> (_object_list: []JmapObjectInstance, _error: JmapObjectListError) {
|
||||||
object_start_marker := "objects: (x, y, type)\n"
|
object_start_marker := "objects: (x, y, type)\n"
|
||||||
object_start_marker_index := strings.index(text, object_start_marker)
|
object_start_marker_index := strings.index(text, object_start_marker)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue