All set maps initialise objects as expected so dObject has the correct ID already, no need to iterate over all active objects. Also by returning a pointer we can use this function to test if an object exists at the target position. While on msvc int8_t is typedefed to signed char we might as well match the expected data type for the dObject array
22 lines
415 B
C++
22 lines
415 B
C++
/**
|
|
* @file setmaps.cpp
|
|
*
|
|
* Interface of functionality for the special quest dungeons.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "engine.h"
|
|
#include "engine/point.hpp"
|
|
#include "objects.h"
|
|
|
|
namespace devilution {
|
|
|
|
/**
|
|
* @brief Load a quest map, the given map is specified via the global setlvlnum
|
|
*/
|
|
void LoadSetMap();
|
|
|
|
/* rdata */
|
|
extern const char *const QuestLevelNames[];
|
|
|
|
} // namespace devilution
|