Add: Mock sprite cache intialization.
This fills up the sprite cache with SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT zero-size sprites, to allow GetSpriteSize() calls to continue from unit-tests.
This commit is contained in:

committed by
Peter Nelson

parent
05436d9c2f
commit
1c94fb0389
15
src/tests/mock_spritecache.h
Normal file
15
src/tests/mock_spritecache.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file mock_spritecache.h Mock sprite cache definition. */
|
||||
|
||||
#ifndef MOCK_SPRITECACHE_H
|
||||
#define MOCK_SPRITECACHE_H
|
||||
|
||||
void MockGfxLoadSprites();
|
||||
|
||||
#endif /* MOCK_SPRITECACHE_H */
|
Reference in New Issue
Block a user