No Description

check_tileset.c 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /****************************************************************************
  2. * Copyright (C) 2015-2017 by the SotS Team *
  3. * *
  4. * This file is part of Sovereign of the Skies. *
  5. * *
  6. * Sovereign of the Skies is free software: you can redistribute it *
  7. * and/or modify it *
  8. * under the terms of the GNU Lesser General Public License as published *
  9. * by the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version provided you include a copy of the *
  11. * licence and this header. *
  12. * *
  13. * Sovereign of the Skies is distributed in the hope that it will be *
  14. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU Lesser General Public License for more details. *
  17. * *
  18. * You should have received a copy of the GNU Lesser General Public *
  19. * License along with Sovereign of the Skies. *
  20. * If not, see <http://www.gnu.org/licenses/>. *
  21. ****************************************************************************/
  22. /**
  23. * @file check_tileset.c
  24. * @author Sturmvogel
  25. * @date 21 may 2017
  26. * @brief Check tileset stuff and store on last result
  27. *
  28. */
  29. #include <map.h>
  30. #include <game_engine.h>
  31. #include <agb_debug.h>
  32. void sp_check_tileset(void)
  33. {
  34. u16 x;
  35. u16 y;
  36. player_get_pos_to(&x, &y);
  37. dprintf("sp_check_tileset: reading from %d %d\n", x,y);
  38. u16 block_id = current_map_block_id_at(x,y);
  39. dprintf("sp_check_tileset: block id: %d\n", block_id);
  40. var_set(0x800D, current_map_block_id_at(x,y));
  41. }