-
Notifications
You must be signed in to change notification settings - Fork 0
tR_general
extrazi edited this page Apr 29, 2021
·
7 revisions
![]() EN PL |
Funkcje ogólne i globalne
Funkcje globalne są dostępne dla każdej funkcji TTD. Dokładnie tak, jak funkcje wydajnościowe związane z funkcjami, służą do odpytywania rzeczywistych danych gry w łańcuchu sterowania:
| m4nfo function | nfo var | Byte | Word | DWord |
|---|---|---|---|---|
| anim_counter | 0x0A | 81 0A | 85 0A | |
| calculate | Custom | |||
| getparameter | 0x7F | 81 7F 00 FF | 85 7F 00 FF FF | |
| current_climate | 0x02 | Custom | ||
| current_date | 0x23 | 89 23 00 FF FF FF FF | ||
| dayofmonth | 0x02 | 81 02 08 1F | ||
| dayofyear | 0x02 | 85 02 10 FF FF | ||
| game_level | 0x22 | 81 22 00 FF | ||
| game_mode | 0x12 | 81 12 00 FF | ||
| getcolour / getcolour_pluscc / getcolour_plus2cc | 0x7F | Custom | ||
| leapyear | 0x02 | 81 02 0F 01 | ||
| month | 0x02 | 81 02 00 FF | ||
| setregisters | Custom | |||
| snowline | 0x20 | 81 20 00 FF | ||
| subroutine | 0x7E | 81 7E $1 00 FF | ||
| trafficside | 0x06 | 81 06 00 10 | ||
| year | 0x01/0x24 | 81 01 00 FF | 85 24 00 FF FF | |
Funkcje ogólne są funkcjami niezależnymi od funkcji do obsługi parametrów i błędów, rozgałęziania wewnątrz newGRF, definiowania ciągów tekstowych itp. W przeciwieństwie do funkcji globalnych, nigdy nie są używane w łańcuchu sterowania, ale jako samodzielne lub jako parametry innych funkcji:
| m4nfo function | nfo action/var | |
|---|---|---|
| Initialization | grfinit | Action14 |
| grfdescription | ||
| grfminversion | ||
| grfname | ||
| grfpalette | ||
| grfurl | ||
| grfversion | ||
| grfparameter | ||
| grfsetting | ||
| setdescription | ||
| setname | ||
| settype | ||
| Flow of control / parameter handling | def | Custom |
| deflabel | ||
| getothergrfparameter | Action0D | |
| getowngrfparameter | Custom | |
| patchvar | ||
| pcalc | Action0D | |
| placelabel | Action10 | |
| ref | Custom | |
| reflabel | ||
| setparameter | Action0D | |
| setbit | Custom | |
| skip | Action7/9 | |
| skipif | ||
| Error handling | deactivateset | Action0E |
| error | Action0B | |
| Funkcje pomocnicze | engine / industry / town | Custom |
| little / lots | ||
| load / move | ||
| maymodify | ||
| nibble / pos | ||
| param | ||
| shiftmask | ||
| Callback helper functions | cbfail | |
| cbr | ||
| addveh / addvehrev | ||
| attach | ||
| customcargo | ||
| animcontrol/animframe | ||
| effect | ||
| seteffort | ||
| autorefit | ||
| refsnd | ||
| grftext | ||
| Sound handling | defsnd | |
| soundtable | ||
| Recolouring | colourtable | |
| grf_override | General Action0 (11) | |
| incrbasecost | General Action0 (08) | |
| insertcomment | Action0C | |
| setproperties | Action0 | |
| setrefreshbox | 0x93 ... 0x96 | |
| snowlinetable | General action0 (10) |
