-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.lua
69 lines (62 loc) · 1.59 KB
/
test.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--[[
local newBMP = BMP()
newBMP:load("test.bmp")
newBMP.pixels:resize(newBMP.pixels.width*2,newBMP.pixels.height*2,"pixel")
newBMP:save("a.bmp")]]
--[[
dff = DFFIO()
dff:createClump()
dff.clump:addComponent()
]]
--local theTXD = engineLoadTXD("hillrace.txd")
--engineImportTXD(theTXD,3458)
--[[
local IMG = engineLoadIMGContainer("gta3.img")
local dffFile = IMG:getFile("mlamppost.dff")
local dff = DFFIO()
dff:load(dffFile)
dff.clump.geometryList.geometries[1].extension.effect2D.effects[1].color={255,255,255,255}
dff.clump.geometryList.geometries[1].extension.effect2D.effects[1].coronaShowMode=10
local theDFF = engineLoadDFF(dff:save())
engineReplaceModel(theDFF,1294)]]
------------------------TXD
--[[
--Simple TXD Load
local txd = TXDIO()
txd:load("infernus.txd")
]]
------------------------DFF
--[[
--Simple DFF Load/Save
local dff = DFFIO()
dff:load("object.dff")
dff:save("test.dff")
]]
--[[
--Simple Object Conversion from GTAVC to GTASA
local dff = DFFIO()
dff:load("object.dff")
dff:convert("GTASA")
if localPlayer then --Clientsided
local theDFF = engineLoadDFF(dff:save())
engineReplaceModel(theDFF,3458)
end
]]
-----------------------Collisions
--[[
--Simple Collision Load/Save
local col = COLIO()
col:load("object.col")
col:save("test.col")
]]
--[[
--Collision Generation
local dff = DFFIO()
dff:load("object.dff")
local col = COLIO()
col:generateFromGeometry("COLL",dff.clumps[1].geometryList.geometries[1],{
textureA = 26, --find material ID by texture name, and convert to col material
[{255,255,255}] = 1, --find material ID by color, and convert to col material
})
col:save("test.col")
]]