Changeset 985


Ignore:
Timestamp:
Mar 17, 2014, 3:08:55 AM (11 years ago)
Author:
alloc
Message:

Daodan: Added show_triggervolumes

Location:
Daodan/src/patches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/patches/Patches.c

    r984 r985  
    123123int16_t ONICALL DD_COrTextArea_Resize(void* inTextArea, UUtRect* inBounds, int16_t inNumTextEntries) {
    124124        if (inTextArea == COgCommandLine) {
    125                 inBounds->top -= 5;
     125                inBounds->top -= 8;
    126126        }
    127127        return Oni_COrTextArea_Resize(inTextArea, inBounds, inNumTextEntries);
     
    137137        OBJtOSD_TriggerVolume   *trigger_osd = &inOSD->osd.trigger_volume_osd;
    138138        M3tPoint3D                              *points = trigger_osd->volume.worldPoints;
    139         M3tPoint3D                              trigger_center = {0, 0, 0};
    140139        UUtUns32                                shade = 0xFFFFFF;
    141140
     
    166165        M3rGeom_Line_Light(points + 3, points + 7, shade);
    167166        M3rGeom_Line_Light(points + 2, points + 6, shade);
    168 
    169         for(itr = 0; itr < M3cNumBoundingPoints; itr++)
    170         {
    171                 MUmVector_Add(trigger_center, trigger_center, points[itr]);
    172         }
    173 
    174         MUmVector_Scale(trigger_center, (1.0f / ((float) M3cNumBoundingPoints)));
    175167}
    176168
  • Daodan/src/patches/objt.h

    r984 r985  
    44#define M3cNumBoundingPoints 8// Do not change without changing references below
    55#define M3cNumBoundingFaces 6// Do not change without changing references below
    6 
    7 #define MUmVector_Add(dst, srca, srcb)\
    8         do {(dst).x = (srca).x + (srcb).x;\
    9         (dst).y = (srca).y + (srcb).y;\
    10         (dst).z = (srca).z + (srcb).z; } while (0)
    11 
    12 #define MUmVector_Scale(vec,s)\
    13         do {(vec).x*=(s); \
    14         (vec).y*=(s); \
    15         (vec).z*=(s); } while (0)
    166
    177typedef struct M3tPoint3D
     
    7868        char exit_script[SLcScript_MaxNameLength];
    7969
    80         char note[OBJcMaxNoteChars + 1];
     70        // TODO: +1 in orig, why do we have to shift here?
     71        char note[OBJcMaxNoteChars + 2];
    8172
    8273        M3tPoint3D scale;
Note: See TracChangeset for help on using the changeset viewer.