Files @ r28098:2f7e0d913c81
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/Endian.cmake

Peter Nelson
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.
# Add the definitions to indicate which endian we are building for.
#
# add_endian_definition()
#
function(add_endian_definition)
    include(TestBigEndian)
    TEST_BIG_ENDIAN(IS_BIG_ENDIAN)

    if(IS_BIG_ENDIAN)
        add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN)
    else()
        add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
    endif()
endfunction()