-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsprite.h
46 lines (39 loc) · 1.4 KB
/
sprite.h
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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _ACE_UTILS_SPRITE_H_
#define _ACE_UTILS_SPRITE_H_
/**
* @file sprite.h
* @brief Useful utilities for sprite management if you don't intend to use the
* ACE's sprite manager.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <ace/managers/copper.h>
/**
* @brief Disables given sprites on supplied copperlist at given cmd offset.
*
* This function doesn't add any WAIT cmd, be sure to put those cmds in VBlank.
* Number of MOVE instructions added equals two times number of sprites disabled.
*
* @param pList Copperlist to be edited.
* @param eSpriteMask Determines sprites to be disabled.
* @param uwCmdOffs Start position on raw copperlist.
* @return Number of MOVE instructions added.
*/
UBYTE spriteDisableInCopRawMode(
tCopList *pList, tSpriteMask eSpriteMask, UWORD uwCmdOffs
);
/**
* @brief Adds copBlock which disables given sprites.
* Resulting copBlock is placed at 0,0 so that it will be executed during VBlank.
*
* @param pList Copperlist to be edited.
* @param eSpriteMask Determines sprites to be disabled.
*
* @return Pointer to newly created copBlock.
*/
tCopBlock *spriteDisableInCopBlockMode(tCopList *pList, tSpriteMask eSpriteMask);
#endif // _ACE_UTILS_SPRITE_H_