-
Notifications
You must be signed in to change notification settings - Fork 5
/
notes.txt
86 lines (75 loc) · 3.03 KB
/
notes.txt
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
notes:
#include "../particles/particles.hpp"
ParticleSystem particles;
sf::Vector2i mouse = sf::Mouse::getPosition(window);
this->particles.setEmitter(window.mapPixelToCoords(mouse));
this->particles.update(elapsed);
window.draw(this->particles);
bag :
pocket :
- id : int
- quantity : int
map format :
width
height
map / map2 / map3 (layers)
id: int
colliding: bool
spawns
oncase: int
frommap: int
tp
oncase: int
tomap: int
dex format :
creature name: string
struct dex_info =>
- viewed: bool
- captured: bool
- type: Type
- stade: int
- evolution: string
- file: string
types table format :
array of arrays containing :
8 elements, 1 for each type
=> float representing the resistance/weakness against a type
# array[attack type][defending type] => coeff
objects table format :
objects: string
array =>
dict describing the object :
- id: int
- name: string
- desc: string (optionnal)
- price: int (0 = can not be sold)
- limited_use: bool (if false, we do not count its uses ; eg: running shoes)
- throwaway: bool (useful for the rare object)
- value: int
- type: int
- 0 => player
- 1 => healpv
- 2 => healpp
- 3 => healstatus
- 4 => capture
- 5 => levelup
- 6 => lowercooldown
- 7 => none
adding a new view :
create two new files in src/views/ (.hpp, .cpp)
heritate from View (public)
create a new id in constants.hpp, section Views id
add all the case YOURVIEWID needed in src/abstract/statemachine.cpp (update view, render view, process ev view)
add an instance of your view in src/abstract/statemachine.hpp, do not forget to create the getter (returning a pointer)
adding new sounds :
put them in assets/sounds folder
add them in sounds_name in src/abstract/musicplayer.cpp
(IDEA)
adding namespace in python scripting :
class namespace: pass
def update(*args, **kwargs):
# code ...
pass
namespace.update = update
we will get a reference to a namespace in a file by checking the values in __namespaces__ (must be a list) in the python file assets/scripts/init.py
we will check the existence of a method by using hasattr(namespace, "update") => True|False