add an entity update effect to buffer
| 487 | |
| 488 | // add an entity update effect to buffer |
| 489 | static void EffectsBuffer_AddNodeUpdateEffect |
| 490 | ( |
| 491 | EffectsBuffer *buff, // effect buffer |
| 492 | Node *node, // updated node |
| 493 | Attribute_ID attr_id, // updated attribute ID |
| 494 | SIValue value // value |
| 495 | ) { |
| 496 | //-------------------------------------------------------------------------- |
| 497 | // effect format: |
| 498 | // effect type |
| 499 | // entity ID |
| 500 | // attribute id |
| 501 | // attribute value |
| 502 | //-------------------------------------------------------------------------- |
| 503 | |
| 504 | EffectType t = EFFECT_UPDATE_NODE; |
| 505 | EffectsBuffer_WriteBytes(&t, sizeof(t), buff); |
| 506 | |
| 507 | //-------------------------------------------------------------------------- |
| 508 | // write entity ID |
| 509 | //-------------------------------------------------------------------------- |
| 510 | |
| 511 | EffectsBuffer_WriteBytes(&ENTITY_GET_ID(node), sizeof(EntityID), buff); |
| 512 | |
| 513 | //-------------------------------------------------------------------------- |
| 514 | // write attribute ID |
| 515 | //-------------------------------------------------------------------------- |
| 516 | |
| 517 | EffectsBuffer_WriteBytes(&attr_id, sizeof(Attribute_ID), buff); |
| 518 | |
| 519 | //-------------------------------------------------------------------------- |
| 520 | // write attribute value |
| 521 | //-------------------------------------------------------------------------- |
| 522 | |
| 523 | EffectsBuffer_WriteSIValue(&value, buff); |
| 524 | |
| 525 | EffectsBuffer_IncEffectCount(buff); |
| 526 | } |
| 527 | |
| 528 | // add an entity update effect to buffer |
| 529 | static void EffectsBuffer_AddEdgeUpdateEffect |
no test coverage detected