mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
!(Coding && Hangover)
This commit is contained in:
parent
4d94385c2e
commit
c31676d9a3
3
lua.cpp
3
lua.cpp
@ -460,8 +460,7 @@ static void IsActorInSector(void) {
|
||||
const char *name = luaL_check_string(2);
|
||||
int i, numSectors = Engine::instance()->currScene()->getSectorCount();
|
||||
|
||||
warning("IsActorInSector(%s, %s): STUB", act->name(), name);
|
||||
printf("Looping over %d sectors\n", numSectors);
|
||||
warning("IsActorInSector(%s, %s): SEMI-STUB", act->name(), name);
|
||||
for (i=0; i<numSectors; i++) {
|
||||
const char *sector_name = Engine::instance()->currScene()->getSectorName(i);
|
||||
if (sector_name && strstr(sector_name, name)) {
|
||||
|
17
scene.h
17
scene.h
@ -53,22 +53,13 @@ public:
|
||||
int setup() const { return currSetup_ - setups_; }
|
||||
|
||||
// Sector access functions
|
||||
#define validSector(id) ((numSectors_ >= 0) && (id < numSectors_))
|
||||
int getSectorCount() { return numSectors_; }
|
||||
const char *getSectorName(int id) const {
|
||||
// FIXME: Will someone explain to me why my machine thinks 0 > 11?!?
|
||||
if (id > numSectors_) {
|
||||
return sectors_[id].name_.c_str();
|
||||
} else {
|
||||
printf("Sector %d > %d\n", id, numSectors_);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
int getSectorType(int id) {
|
||||
if (id > numSectors_) return sectors_[id].type_; else return -1;
|
||||
}
|
||||
int getSectorID(int id) {
|
||||
if (id > numSectors_) return sectors_[id].id_; else return -1;
|
||||
if (validSector(id)) return sectors_[id].name_.c_str(); else return NULL;
|
||||
}
|
||||
int getSectorType(int id) { if (validSector(id)) return sectors_[id].type_; else return -1; }
|
||||
int getSectorID(int id) { if (validSector(id)) return sectors_[id].id_; else return -1; }
|
||||
bool isPointInSector(int id, Vector3d point) { return false; } // FIXME: Need pointInPoly func
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user