Skip to content

Conversation

@stubhead
Copy link
Contributor

this pull request SUPERSEDES pull request #127. it is functionally identical to #127, but solves the dev conflicts that arose due to my taking so long on this. there should now be no conflicts w/dev work done by other contributors. please DISREGARD pull request #127 and use this one in its place.

sorry about the mix-up !

=== details ===

  • plugins/areas/nwnx_areas.nss - added GetAreaTileset, GetAreaHeight, GetAreaWidth, GetAreaLighting, GetNoRest, Set/GetAreaListenMod, Set/GetAreaSpotMod, DumpArea
  • plugins/areas/NWNXAreas.cpp - integrated above functions
  • plugins/areas/area_info.h - support structure for area info output routines
  • plugins/areas/NWNXAreas.h - include area_info.h
  • plugins/areas/funcs/GetAreaHeight.cpp - implementation of above-named function
  • plugins/areas/funcs/GetAreaLighting.cpp - implementation of above-named function
  • plugins/areas/funcs/GetAreaListen.cpp - implementation of above-named function
  • plugins/areas/funcs/GetAreaSpot.cpp - implementation of above-named function
  • plugins/areas/funcs/GetAreaTileset.cpp - implementation of above-named function
  • plugins/areas/funcs/GetAreaWidth.cpp - implementation of above-named function
  • plugins/areas/funcs/GetNoRest.cpp - implementation of above-named function
  • plugins/areas/funcs/SetAreaListen.cpp - implementation of above-named function
  • plugins/areas/funcs/SetAreaName.cpp - implementation of above-named function
  • plugins/areas/funcs/SetAreaSpot.cpp - implementation of above-named function
  • plugins/areas/funcs/DumpArea.cpp - dump an area structure to log file
  • plugins/areas/funcs/Funcs.h - advance declarations for above functions
  • plugins/areas/CMakeLists.txt - added above files
  • plugins/funcs/funcs/area/f_GetFirstNextArea.c - fastidious variable declaration to avoid compile-time warnings
  • plugins/funcs/funcs/other/f_DumpObject.c - updated to output more intelligent header and use new hexdump utility
  • CMakeLists.txt - added hexdump to lib
  • lib/hexdump.c - new hexdump utility
  • include/hexdump.h - required for linkage to new hexdump utility

stubhead added 2 commits February 16, 2018 23:21
…routine to nwn2 lib.

- plugins/areas/nwnx_areas.nss - added GetAreaTileset, GetAreaHeight, GetAreaWidth, GetAreaLighting, GetNoRest, Set/GetAreaListenMod, Set/GetAreaSpotMod, DumpArea
- plugins/areas/NWNXAreas.cpp - integrated above functions
- plugins/areas/area_info.h - support structure for area info output routines
- plugins/areas/NWNXAreas.h - include area_info.h
- plugins/areas/funcs/GetAreaHeight.cpp - implementation of above-named function
- plugins/areas/funcs/GetAreaLighting.cpp - implementation of above-named function
- plugins/areas/funcs/GetAreaListen.cpp - implementation of above-named function
- plugins/areas/funcs/GetAreaSpot.cpp - implementation of above-named function
- plugins/areas/funcs/GetAreaTileset.cpp - implementation of above-named function
- plugins/areas/funcs/GetAreaWidth.cpp - implementation of above-named function
- plugins/areas/funcs/GetNoRest.cpp - implementation of above-named function
- plugins/areas/funcs/SetAreaListen.cpp - implementation of above-named function
- plugins/areas/funcs/SetAreaName.cpp - implementation of above-named function
- plugins/areas/funcs/SetAreaSpot.cpp - implementation of above-named function
- plugins/areas/funcs/DumpArea.cpp - dump an area structure to log file
- plugins/areas/funcs/Funcs.h - advance declarations for above functions
- plugins/areas/CMakeLists.txt - added above files
- plugins/funcs/funcs/area/f_GetFirstNextArea.c - fastidious variable declaration to avoid compile-time warnings
- plugins/funcs/funcs/other/f_DumpObject.c - updated to output more intelligent header and use new hexdump utility
- CMakeLists.txt - added hexdump to lib
- lib/hexdump.c - new hexdump utility
- include/hexdump.h - required for linkage to new hexdump utility
new functions: GetAreaLoadscreen(), GetAreaPVP(), GetTileAtLocation()
new structure: tile_info.h
updates to area_info.h, DumpArea().
# - no-omit-frame-pointer: breaks assembly on -O1/-O2 for some plugins
# - no-accumulate-outgoing-args: same
SET(OUR_CFLAGS_MUST_HAVES "${OUR_CFLAGS_MUST_HAVES} -mno-accumulate-outgoing-args -fno-omit-frame-pointer -fno-pic")
SET(OUR_CFLAGS_MUST_HAVES "${OUR_CFLAGS_MUST_HAVES} -mno-accumulate-outgoing-args -fno-omit-frame-pointer")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes flags that were added recently. Seems like an unintentional change. Can you revert this?

area_info.h
this structure details the information contained in the nwn in-memory
area structure. it differs from CNWSArea in that this structure is
complete, whereas CNWSArea contains data starting only from offset 0xd4.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CNWSArea inherits from superclasses, so their fields precede CNWSArea fields and run until 0xd4. This is expected.

# removes stuff like -fPIC, which breaks nwnx plugin loading
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
set(CMAKE_POSITION_INDEPENDENT_CODE FALSE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

#include "../NWNXAreas.h"
#include "hexdump.h"

void dump_area(struct area_info *ap)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it a separate method from NWNXDumpArea?

areas.Log(0, "dump_area: DUMP ENDS ----------------\n");
}

void NWNXDumpArea(void *pModule, dword areaId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation uses custom structs instead of the API, while nwnx_areas has been updated to use the new API, and also it's mostly for debug purposes.
I think it should go into nwnx_funcs, with the other object dump function.

@stubhead
Copy link
Contributor Author

stubhead commented Mar 22, 2018 via email

@stubhead
Copy link
Contributor Author

stubhead commented Mar 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants