mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-10-19 22:27:36 -04:00
Improve appearance of light rail endcaps
This commit is contained in:
parent
5bdefbf465
commit
d08cbbb0b8
3
Makefile
3
Makefile
|
@ -223,7 +223,8 @@ DYNAMIC_MODEL_LIST = assets/models/cube/cube.blend \
|
|||
assets/models/signage/clock_digits.blend \
|
||||
assets/models/signage/clock.blend \
|
||||
assets/models/props/box_dropper_glass.blend \
|
||||
assets/models/props/portal_cleanser.blend
|
||||
assets/models/props/portal_cleanser.blend \
|
||||
assets/models/props/light_rail_endcap.blend
|
||||
|
||||
DYNAMIC_ANIMATED_MODEL_LIST = assets/models/pedestal.blend \
|
||||
assets/models/props/box_dropper.blend \
|
||||
|
|
6
assets/materials/models/props/light_rail_endcap.ims
Normal file
6
assets/materials/models/props/light_rail_endcap.ims
Normal file
|
@ -0,0 +1,6 @@
|
|||
-alpha off
|
||||
\( -clone 0 -crop 32x32+116+88 -repage +0+0 \)
|
||||
\( -clone 0 -crop 32x8+109+230 -repage +0+012 \)
|
||||
-compose Over
|
||||
-layers merge
|
||||
-crop 32x32+0+0
|
|
@ -820,6 +820,21 @@ materials:
|
|||
gDPSetCombineMode:
|
||||
color: ["SHADE", "0", "TEXEL0", "0"]
|
||||
|
||||
light_rail_endcap:
|
||||
gDPSetTile:
|
||||
filename: ../../portal_pak_modified/materials/models/props/light_rail_endcap.png
|
||||
fmt: G_IM_FMT_RGBA
|
||||
siz: G_IM_SIZ_16b
|
||||
s:
|
||||
wrap: true
|
||||
t:
|
||||
wrap: false
|
||||
|
||||
gSPGeometryMode:
|
||||
set: [G_LIGHTING, G_SHADE]
|
||||
gDPSetCombineMode:
|
||||
color: ["SHADE", "0", "TEXEL0", "0"]
|
||||
|
||||
light_rail_beam:
|
||||
gDPSetTile:
|
||||
filename: ../../portal_pak_modified/materials/effects/light_rail_beam1.png
|
||||
|
|
BIN
assets/models/props/light_rail_endcap.blend
Normal file
BIN
assets/models/props/light_rail_endcap.blend
Normal file
Binary file not shown.
1
assets/models/props/light_rail_endcap.flags
Normal file
1
assets/models/props/light_rail_endcap.flags
Normal file
|
@ -0,0 +1 @@
|
|||
--rotate 90,0,180 -m assets/materials/static.skm.yaml -m assets/materials/objects.skm.yaml --default-material light_rail_endcap
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,6 +3,7 @@
|
|||
#include "../../build/assets/materials/static.h"
|
||||
#include "../../build/src/audio/clips.h"
|
||||
#include "../../build/assets/models/dynamic_model_list.h"
|
||||
#include "../../build/assets/models/props/light_rail_endcap.h"
|
||||
|
||||
#include "../physics/collision_cylinder.h"
|
||||
#include "../physics/collision_box.h"
|
||||
|
@ -111,7 +112,22 @@ struct DecorObjectDefinition gDecorObjectDefinitions[] = {
|
|||
.materialIndex = AUTOPORTAL_FRAME_INDEX,
|
||||
.soundClipId = -1,
|
||||
.soundFizzleId = -1,
|
||||
}
|
||||
},
|
||||
[DECOR_TYPE_LIGHT_RAIL_ENDCAP] = {
|
||||
{
|
||||
CollisionShapeTypeNone,
|
||||
NULL,
|
||||
0.0f,
|
||||
0.0f,
|
||||
NULL,
|
||||
},
|
||||
0.0f,
|
||||
1.0f,
|
||||
PROPS_LIGHT_RAIL_ENDCAP_DYNAMIC_MODEL,
|
||||
.materialIndex = LIGHT_RAIL_ENDCAP_INDEX,
|
||||
.soundClipId = -1,
|
||||
.soundFizzleId = -1,
|
||||
},
|
||||
};
|
||||
|
||||
struct DecorObjectDefinition* decorObjectDefinitionForId(int id) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define DECOR_TYPE_CUBE 2
|
||||
#define DECOR_TYPE_CUBE_UNIMPORTANT 3
|
||||
#define DECOR_TYPE_AUTOPORTAL_FRAME 4
|
||||
#define DECOR_TYPE_LIGHT_RAIL_ENDCAP 5
|
||||
|
||||
struct DecorObjectDefinition* decorObjectDefinitionForId(int id);
|
||||
int decorIdForObjectDefinition(struct DecorObjectDefinition* def);
|
||||
|
|
|
@ -28,10 +28,14 @@ void staticRenderPopulateRooms(struct FrustrumCullingInformation* cullingInfo, M
|
|||
|
||||
struct Vector3 boxCenter;
|
||||
|
||||
u64 startTime = profileStart();
|
||||
|
||||
if (transformIndex == NO_TRANSFORM_INDEX) {
|
||||
if (isOutsideFrustrum(cullingInfo, box)) {
|
||||
profileEnd(startTime, 2);
|
||||
continue;
|
||||
}
|
||||
profileEnd(startTime, 2);
|
||||
|
||||
boxCenter.x = (float)((box->minX + box->maxX) * (0.5f / SCENE_SCALE));
|
||||
boxCenter.y = (float)(box->minY + box->maxY) * (0.5f / SCENE_SCALE);
|
||||
|
@ -57,15 +61,19 @@ void staticRenderPopulateRooms(struct FrustrumCullingInformation* cullingInfo, M
|
|||
shiftedBox.maxZ = box->maxZ + z;
|
||||
|
||||
if (isOutsideFrustrum(cullingInfo, &shiftedBox)) {
|
||||
profileEnd(startTime, 2);
|
||||
continue;
|
||||
}
|
||||
profileEnd(startTime, 2);
|
||||
|
||||
boxCenter.x = (float)(shiftedBox.minX + shiftedBox.maxX) * (0.5f / SCENE_SCALE);
|
||||
boxCenter.y = (float)(shiftedBox.minY + shiftedBox.maxY) * (0.5f / SCENE_SCALE);
|
||||
boxCenter.z = (float)(shiftedBox.minZ + shiftedBox.maxZ) * (0.5f / SCENE_SCALE);
|
||||
}
|
||||
|
||||
|
||||
startTime = profileStart();
|
||||
renderSceneAdd(renderScene, gCurrentLevel->staticContent[i].displayList, matrix, gCurrentLevel->staticContent[i].materialIndex, &boxCenter, NULL);
|
||||
profileEnd(startTime, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue