~ares-developers/ares/gd03

« back to all changes in this revision

Viewing changes to src/Ext/TechnoType/Hooks.cpp

  • Committer: Renegade
  • Date: 2010-05-29 08:12:17 UTC
  • Revision ID: git-v1:0a1bb6321f04d723afe64d1b843dc87b4da783ec
Creating /trunk/src.

git-svn-id: svn://svn.renegadeprojects.com/ares/trunk@622 859b54a9-7a54-0410-aeb3-f8d2f1fa40fd

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "Body.h"
 
2
//include "Side.h"
 
3
#include "../../Enum/Prerequisites.h"
 
4
#include "../../Misc/Debug.h"
 
5
 
 
6
// =============================
 
7
// other hooks
 
8
 
 
9
 
 
10
DEFINE_HOOK(732D10, TacticalClass_CollectSelectedIDs, 5)
 
11
{
 
12
        return 0;
 
13
}
 
14
 
 
15
DEFINE_HOOK(5F8480, ObjectTypeClass_Load3DArt, 6)
 
16
{
 
17
        GET(ObjectTypeClass *, O, ESI);
 
18
        if(O->WhatAmI() == abs_UnitType) {
 
19
                TechnoTypeExt::ExtData *pData = TechnoTypeExt::ExtMap.Find(reinterpret_cast<TechnoTypeClass*>(O));
 
20
                if(pData->WaterAlt) {
 
21
                        return 0x5F848C;
 
22
                }
 
23
        }
 
24
        return 0;
 
25
}
 
26
 
 
27
 
 
28
DEFINE_HOOK(715320, TechnoTypeClass_LoadFromINI_EarlyReader, 6)
 
29
{
 
30
        GET(CCINIClass *, pINI, EDI);
 
31
        GET(TechnoTypeClass *, pType, EBP);
 
32
 
 
33
        TechnoTypeExt::ExtData *pData = TechnoTypeExt::ExtMap.Find(pType);
 
34
 
 
35
        if(pINI->ReadString(pType->ID, "WaterVoxel", "", Ares::readBuffer, Ares::readLength)) {
 
36
                pData->WaterAlt = 1;
 
37
//              _strncpy
 
38
        }
 
39
 
 
40
        return 0;
 
41
}