add an attribute addition effect to buffer
| 765 | |
| 766 | // add an attribute addition effect to buffer |
| 767 | void EffectsBuffer_AddNewAttributeEffect |
| 768 | ( |
| 769 | EffectsBuffer *buff, // effect buffer |
| 770 | const char *attr // attribute name |
| 771 | ) { |
| 772 | //-------------------------------------------------------------------------- |
| 773 | // effect format: |
| 774 | // effect type |
| 775 | // attribute name |
| 776 | //-------------------------------------------------------------------------- |
| 777 | |
| 778 | EffectType t = EFFECT_ADD_ATTRIBUTE; |
| 779 | EffectsBuffer_WriteBytes(&t, sizeof(t), buff); |
| 780 | |
| 781 | //-------------------------------------------------------------------------- |
| 782 | // write attribute name |
| 783 | //-------------------------------------------------------------------------- |
| 784 | |
| 785 | EffectsBuffer_WriteString(attr, buff); |
| 786 | |
| 787 | EffectsBuffer_IncEffectCount(buff); |
| 788 | } |
| 789 | |
| 790 | static inline void EffectsBufferBlock_Free |
| 791 | ( |
no test coverage detected