Compare commits

..

28 Commits

Author SHA1 Message Date
Mr-Wiseguy
d05444e034 Merge branch 'master' into base/lighting-engine 2022-06-17 01:14:04 -04:00
Mr-Wiseguy
f3a97f3510 Removed negatives in geolayout light direction 2022-06-12 23:04:17 -04:00
Mr-Wiseguy
3b5fd86225 Fixed directional lights specified in geo layouts 2022-06-12 23:01:13 -04:00
Mr-Wiseguy
5f23b22e22 Fixed typo in lighting engine documentation 2022-06-08 17:17:32 -04:00
Reonu
17d7d32fd3 Fixed level mesh not updating when building (#414) 2022-06-08 13:19:59 -04:00
Reonu
10ff5ba8dc actually fixed snowman for lighting engine 2022-04-10 12:02:35 +03:00
Reonu
5adfaefd79 Actually fixed bully for lighting engine 2022-04-09 11:28:20 +03:00
Mr-Wiseguy
c6d79a82ed Merge branch 'develop/2.1.0-matrix-stack-change' into base/lighting-engine 2022-04-05 19:51:24 -04:00
Mr-Wiseguy
04ebaf034b Fixed clip planes not scaling based on WORLD_SCALE 2022-04-05 19:50:38 -04:00
Mr-Wiseguy
6ebe9a664e Merge branch 'develop/2.1.0-matrix-stack-change' into base/lighting-engine 2022-04-05 17:07:05 -04:00
Mr-Wiseguy
59b423fd93 Fixed handling of WORLD_SCALE in view matrix so it doesn't get cancelled out 2022-04-05 17:03:58 -04:00
Reonu
d976334d61 fix line jump oopsie 2022-03-29 11:38:33 +03:00
Reonu
6d361a88a4 made snowman lighting engine compatible 2022-03-29 11:35:55 +03:00
Reonu
a256a22e38 made bully lighting engine compatible 2022-03-29 11:35:37 +03:00
Mr-Wiseguy
70ff3079c0 Fixed visual debug with new matstack and cleaned up visual debug code 2022-03-27 03:19:21 -04:00
Mr-Wiseguy
9f99848580 Added fixlights script to build system for fixing custom assets and added option to disable it if needed 2022-03-27 00:10:16 -04:00
Mr-Wiseguy
253aeb8074 Removed set light color from breakable box model that broke lighting on it 2022-03-17 12:46:17 -04:00
Mr-Wiseguy
cc91c06d0a Moved setup_global_light to an earlier point in the frame so that behaviors can set light parameters 2022-03-17 12:43:18 -04:00
Mr-Wiseguy
8d7658c8ba Simplified some code in geo_process_camera 2022-02-17 00:22:08 -05:00
Mr-Wiseguy
57e3b1f31b Merged matrix stack changes 2022-02-17 00:15:08 -05:00
Mr-Wiseguy
d5f62fac42 Fixed gbi.h so that F3DZEX_NoN still defines G_POINT_LIGHTING correctly (#315) 2022-01-15 13:32:05 -05:00
Mr-Wiseguy
56be09724d Merge ucode downgrade into lighting engine (#314)
* Fix level enum conflict with 99+ levels (#307)

* Set oDrawingDistance to 4500 for WF breakable walls (#304)

* Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo (#313)

* Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo

* Swapped to MM's rspboot to fix bug caused by MM's F3DZEX2

Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
2022-01-15 10:50:30 +00:00
Mr-Wiseguy
3146970844 Merge pending 2.0.2 changes into lighting engine branch #310 2022-01-14 22:32:43 -05:00
Reonu
d7251a268e merge with master 2022-01-12 20:53:00 +00:00
Mr-Wiseguy
2b9f736b20 Fixed crash caused by duplicate geo commands and fixed world scale lighting issues 2022-01-01 18:36:52 -05:00
Reonu
d84bc0633b meme 2022-01-01 22:19:59 +00:00
Reonu
2e0c964646 pain 2022-01-01 22:01:48 +00:00
Reonu
865638eb7f pain 2022-01-01 22:00:34 +00:00
398 changed files with 44178 additions and 23631 deletions

View File

@@ -85,6 +85,9 @@ else ifeq ($(VERSION),sh)
DEFINES += VERSION_SH=1
endif
# FIXLIGHTS - converts light objects to light color commands for assets, needed for vanilla-style lighting
FIXLIGHTS ?= 1
DEBUG_MAP_STACKTRACE_FLAG := -D DEBUG_MAP_STACKTRACE
TARGET := sm64
@@ -423,8 +426,8 @@ DEP_FILES := $(O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(B
# detect prefix for MIPS toolchain
ifneq ($(call find-command,mips64-elf-ld),)
CROSS := mips64-elf-
else ifneq ($(call find-command,mips-n64-ld),)
CROSS := mips-n64-
# else ifneq ($(call find-command,mips-n64-ld),)
# CROSS := mips-n64-
else ifneq ($(call find-command,mips64-ld),)
CROSS := mips64-
else ifneq ($(call find-command,mips-linux-gnu-ld),)
@@ -513,6 +516,7 @@ AIFF_EXTRACT_CODEBOOK := $(TOOLS_DIR)/aiff_extract_codebook
VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
SKYCONV := $(TOOLS_DIR)/skyconv
FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py
ifeq ($(GZIPVER),std)
GZIP := gzip
else
@@ -526,9 +530,9 @@ else
endif
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
EMULATOR = mupen64plus
EMU_FLAGS = --noosd
LOADER = UNFLoader
LOADER_FLAGS = -d
EMU_FLAGS =
LOADER = loader64
LOADER_FLAGS = -vwf
SHA1SUM = sha1sum
PRINT = printf
@@ -579,7 +583,7 @@ test-pj64: $(ROM)
# someone2639
load: $(ROM)
$(LOADER) $(LOADER_FLAGS) -r $<
$(LOADER) $(LOADER_FLAGS) $<
libultra: $(BUILD_DIR)/libultra.a
@@ -630,8 +634,7 @@ $(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wn
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
# File specific opt flags
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
$(BUILD_DIR)/src/audio/*.o: OPT_FLAGS := -Os -fno-jump-tables
$(BUILD_DIR)/src/engine/surface_collision.o: OPT_FLAGS := $(COLLISION_OPT_FLAGS)
$(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := $(MATH_UTIL_OPT_FLAGS)
@@ -814,6 +817,11 @@ $(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
#==============================================================================#
# Compile C code
ifeq ($(FIXLIGHTS),1)
# This must not be run multiple times at once, so we run it ahead of time rather than in a rule
DUMMY != $(FIXLIGHTS_PY) actors
DUMMY != $(FIXLIGHTS_PY) levels
endif
$(BUILD_DIR)/%.o: %.c
$(call print,Compiling:,$<,$@)
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<

View File

@@ -18,13 +18,13 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: Platform Displacement 2
- **Fazana**: PuppyLib, ucode swapping, audio load time optimizations (with Arctic), general hacker qol improvements, visual debug
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
- **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimizations, better hanging, breath meter, z offset geo command, star glow, painting objects, implementation of frameperfection's rounded corners fix, naming most unknowns, various hacker qol improvements, and various optimizations/fixes
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimizations, instant input patch, cake screen fix, segmented code support, matrix stack fix, and various optimizations/fixes
- **Kaze Emanuar**: Graph node & math util optimizations, automatic optimal collision distance, cell buffer fix
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimisations, instant input patch, cake screen fix, segmented code support, and various optimizations/fixes
- **Kaze**: Graph node optimisations, automatic optimal collision distance
- **Pyro Jay**: Texture improvements, repo banner art, some QoL stuff
- **CrashOveride**: creating the [ultrasm64](https://github.com/CrashOveride95/ultrasm64) repo
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds
@@ -33,8 +33,18 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
**Lighting Engine by Wiseguy**
- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch.
- Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it.
- Lighting Engine is NOT finished. It's a WIP. Expect issues and expect it to be somewhat hard to use. Point lights in particular are extremely finnicky.
- In order for lighting engine to work, your materials must have Shade Color in the combiner, **but you have to DISABLE Shade Color in sources**. If you leave Shade Color ticked for even a single material, the lighting will break **for the entire mesh**. Until Fast64 gets some sort of Lighting Engine support, it's recommended you create some custom presets to make this less annoying.
- You can intentionally make a material fullbright by leaving Shade Color out of the combiner for that material. Useful for, say, a lamp.
- Use the function `set_directional_light` to set the directional light for the current area. It takes a `Vec3f` for the direction and three `s32` for the RGB values.
- Use the function `set_ambient_light` to set the ambient light for the current area. It takes three `s32` for the RGB values.
- You can use the function `emit_light` to emit a point light via code. It takes a `Vec3f` for the position, three `s32` for the RGB values and three `u32` for each one of the falloff types. The falloff is basically how strong the light is: the HIGHER the falloff is, the DIMMER the light will be. The three types of falloffs can be stacked, and work like this:
- 2 for constant falloff = the point light is half as bright always.
- 2 for linear falloff = the point light is half as bright when you double the distance
- 2 for quadratic falloff = the point is half as bright when you double the square of the distance
- Important note regarding point lights: They are affected by WORLD_SCALE, which is set based on your extended bounds mode. Esentially, at 2x bounds lights will be twice as bright as in 1x bounds, and with 4x bounds they will be twice as bright as that. This can be dealt with simply by using high falloffs, but it can be annoying if you decide to change the extended bounds mode mid-development.
- You can also make an object emit light by using the `OBJ_FLAG_EMIT_LIGHT` object flag, as well as `SET_LIGHT_COLOR` and `SET_LIGHT_FALLOFF` in the script.
**Puppycam**
- Puppycam is available on the master branch now, you can toggle it in `config/config_camera.h`. *

View File

@@ -44,8 +44,6 @@ static const Vtx breakable_box_seg8_vertex[] = {
// 0x08012C30 - 0x08012CD8
const Gfx breakable_box_seg8_sub_dl_end[] = {
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x3f3f3fff),
gsSPVertex(breakable_box_seg8_vertex, 26, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),

View File

@@ -44,8 +44,7 @@ const Gfx bully_seg5_dl_050002E0[] = {
// 0x05000398 - 0x05000408
const Gfx bully_seg5_dl_05000398[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEI, G_CC_MODULATEI),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -55,7 +54,6 @@ const Gfx bully_seg5_dl_05000398[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -296,9 +294,10 @@ static const Vtx bully_seg5_vertex_05003608[] = {
// 0x05003708 - 0x050037A0
const Gfx bully_seg5_dl_05003708[] = {
gsSPLightColor(LIGHT_1, 0xe300ff),
gsSPLightColor(LIGHT_2, 0x3800ff),
gsSPVertex(bully_seg5_vertex_05002C68, 14, 0),
gsDPPipeSync(),
gsDPSetPrimColor(0, 0, 0, 227, 00, 255),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
gsSP2Triangles( 2, 3, 4, 0x0, 1, 5, 6, 0x0),
gsSP2Triangles( 1, 6, 7, 0x0, 0, 5, 1, 0x0),
@@ -312,8 +311,6 @@ const Gfx bully_seg5_dl_05003708[] = {
// 0x050037A0 - 0x05003838
const Gfx bully_seg5_dl_050037A0[] = {
gsSPLightColor(LIGHT_1, 0xff00ff),
gsSPLightColor(LIGHT_2, 0x3f00ff),
gsSPVertex(bully_seg5_vertex_05002D88, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 1, 0x0),
gsSP2Triangles( 3, 1, 0, 0x0, 5, 6, 7, 0x0),
@@ -328,8 +325,6 @@ const Gfx bully_seg5_dl_050037A0[] = {
// 0x05003878 - 0x05003C50
const Gfx bully_seg5_dl_05003878[] = {
gsSPLightColor(LIGHT_1, 0xff),
gsSPLightColor(LIGHT_2, 0xff),
gsSPVertex(bully_seg5_vertex_05002F08, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
@@ -436,8 +431,7 @@ const Gfx bully_seg5_dl_05003D08[] = {
// 0x05003D40 - 0x05003DB8
const Gfx bully_seg5_dl_05003D40[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -448,7 +442,6 @@ const Gfx bully_seg5_dl_05003D40[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -491,8 +484,7 @@ const Gfx bully_seg5_dl_05003E70[] = {
// 0x05003EA8 - 0x05003F20
const Gfx bully_seg5_dl_05003EA8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -503,7 +495,6 @@ const Gfx bully_seg5_dl_05003EA8[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -531,8 +522,7 @@ const Gfx bully_seg5_dl_05003F80[] = {
// 0x05003FC8 - 0x05004038
const Gfx bully_seg5_dl_05003FC8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -542,6 +532,5 @@ const Gfx bully_seg5_dl_05003FC8[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};

View File

@@ -1,5 +1,6 @@
// Chain Ball
// 0x06020AA0
static const Vtx chain_ball_seg6_vertex_06020AA0[] = {
{{{ -26, -26, 0}, 0, { 0, 992}, {0xff, 0xff, 0xff, 0xff}}},

View File

@@ -315,6 +315,7 @@ const Gfx coin_seg3_dl_red_45_r[] = {
gsSPBranchList(coin_seg3_dl_end),
};
const Gfx coin_seg3_dl_red_22_5_r[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_8b, 64, coin_seg3_texture_22_5_ia8),
@@ -379,6 +380,7 @@ const Gfx coin_seg3_dl_secret_45_r[] = {
gsSPBranchList(coin_seg3_dl_end),
};
const Gfx coin_seg3_dl_secret_22_5_r[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_8b, 64, coin_seg3_texture_22_5_ia8),

View File

@@ -226,9 +226,6 @@ extern const Gfx mushroom_1up_seg3_dl_0302A660[];
// number
extern const GeoLayout number_geo[];
// painting
extern const GeoLayout painting_geo[];
// pebble
extern const Gfx pebble_seg3_dl_0301CB00[];

View File

@@ -18,7 +18,6 @@
#include "leaves/geo.inc.c"
#include "mario_cap/geo.inc.c"
#include "number/geo.inc.c"
#include "painting/geo.inc.c"
#include "mushroom_1up/geo.inc.c"
#include "star/geo.inc.c"
#include "dirt/geo.inc.c"

View File

@@ -8,6 +8,7 @@ ALIGNED8 static const Texture cyan_fish_seg6_texture_0600D468[] = {
#include "actors/cyan_fish/cyan_fish.rgba16.inc.c"
};
// 0x0600DC80
static const Vtx cyan_fish_seg6_vertex_0600DC80[] = {
{{{ -95, 32, 0}, 0, { 32, 436}, {0xa9, 0x5b, 0xff, 0xff}}},

View File

@@ -476,6 +476,7 @@ const Gfx door_seg3_sub_dl_key_door[] = {
gsSPEndDisplayList(),
};
// 0x03014370
static const Vtx door_seg3_vertex_lock[] = {
{{{ 600, 916, 60}, 0, { 480, 0}, {0x00, 0x00, 0x7f, 0xff}}},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 995 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -10,7 +10,7 @@ ALIGNED8 static const Texture flyguy_seg8_texture_0800E088[] = {
// 0x0800F088
ALIGNED8 static const Texture flyguy_seg8_texture_0800F088[] = {
#include "actors/flyguy/flyguy_face.custom.rgba16.inc.c"
#include "actors/flyguy/flyguy_face.rgba16.inc.c"
};
// 0x0800F888

View File

@@ -155,8 +155,10 @@ static const Vtx goomba_seg8_vertex_0801B238[] = {
// 0x0801B2E8 - 0x0801B560
const Gfx goomba_seg8_dl_0801B2E8[] = {
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
// gsSPLight(&goomba_seg8_lights_0801AD30.l, 1),
// gsSPLight(&goomba_seg8_lights_0801AD30.a, 2),
gsDPPipeSync(),
gsDPSetEnvColor(0xFF, 0xFF, 0xFF, 0xFF),
gsSPVertex(goomba_seg8_vertex_0801AD48, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 5, 4, 0x0, 5, 7, 3, 0x0),
@@ -220,7 +222,7 @@ const Gfx goomba_seg8_dl_0801B5A0[] = {
gsSPDisplayList(goomba_seg8_dl_0801B2E8),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE),
gsSPEndDisplayList(),
};
@@ -262,10 +264,10 @@ const Gfx floomba_seg8_dl_blink[] = {
// 0x0801B618
static const Vtx goomba_seg8_vertex_0801B618[] = {
{{{ 18, 18, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -18, 18, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -18, -18, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 18, -18, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 18, 18, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ -18, 18, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ -18, -18, 0}, 0, { 0, 990}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ 18, -18, 0}, 0, { 990, 990}, {0x00, 0x00, 0x7f, 0xff}}},
};
// 0x0801B658 - 0x0801B690
@@ -281,8 +283,8 @@ const Gfx goomba_seg8_dl_0801B658[] = {
// 0x0801B690 - 0x0801B700
const Gfx goomba_seg8_dl_0801B690[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA),
// gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -291,7 +293,7 @@ const Gfx goomba_seg8_dl_0801B690[] = {
gsSPDisplayList(goomba_seg8_dl_0801B658),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -772,8 +774,10 @@ static const Vtx goomba_seg8_vertex_0801CDF0[] = {
// 0x0801CE20 - 0x0801CF78
const Gfx goomba_seg8_dl_0801CE20[] = {
gsSPLightColor(LIGHT_1, 0x542e10ff),
gsSPLightColor(LIGHT_2, 0x150b04ff),
// gsSPLight(&goomba_seg8_lights_080194D0.l, 1),
// gsSPLight(&goomba_seg8_lights_080194D0.a, 2),
gsDPPipeSync(),
gsDPSetEnvColor(0x54, 0x2e, 0x10, 0xFF),
gsSPVertex(goomba_seg8_vertex_0801B700, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -801,8 +805,10 @@ const Gfx goomba_seg8_dl_0801CE20[] = {
// 0x0801CF78 - 0x0801D0D0
const Gfx goomba_seg8_dl_0801CF78[] = {
gsSPLightColor(LIGHT_1, 0x613413ff),
gsSPLightColor(LIGHT_2, 0x180d04ff),
// gsSPLight(&goomba_seg8_lights_080194E8.l, 1),
// gsSPLight(&goomba_seg8_lights_080194E8.a, 2),
gsDPPipeSync(),
gsDPSetEnvColor(0x61, 0x34, 0x13, 0xFF),
gsSPVertex(goomba_seg8_vertex_0801BA50, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 1, 4, 5, 0x0, 1, 5, 2, 0x0),
@@ -830,8 +836,10 @@ const Gfx goomba_seg8_dl_0801CF78[] = {
// 0x0801D0D0 - 0x0801D360
const Gfx goomba_seg8_dl_0801D0D0[] = {
gsSPLightColor(LIGHT_1, 0x774220ff),
gsSPLightColor(LIGHT_2, 0x1d1008ff),
// gsSPLight(&goomba_seg8_lights_08019500.l, 1),
// gsSPLight(&goomba_seg8_lights_08019500.a, 2),
gsDPPipeSync(),
gsDPSetEnvColor(0x77, 0x42, 0x20, 0xFF),
gsSPVertex(goomba_seg8_vertex_0801BDC0, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -882,8 +890,10 @@ const Gfx goomba_seg8_dl_0801D0D0[] = {
// 0x0801D360 - 0x0801D760
const Gfx goomba_seg8_dl_0801D360[] = {
gsSPLightColor(LIGHT_1, 0xdeb44eff),
gsSPLightColor(LIGHT_2, 0x372d13ff),
// gsSPLight(&goomba_seg8_lights_08019518.l, 1),
// gsSPLight(&goomba_seg8_lights_08019518.a, 2),
gsDPPipeSync(),
gsDPSetEnvColor(0xde, 0xb4, 0x4e, 0xFF),
gsSPVertex(goomba_seg8_vertex_0801C620, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 1, 0x0, 4, 1, 0, 0x0),
@@ -957,6 +967,6 @@ const Gfx goomba_seg8_dl_0801D360[] = {
// 0x0801D760 - 0x0801D770
const Gfx goomba_seg8_dl_0801D760[] = {
gsSPNumLights(NUMLIGHTS_1),
// gsSPNumLights(NUMLIGHTS_1),
gsSPEndDisplayList(),
};

View File

@@ -30,3 +30,4 @@
#include "src/s2d_engine/config.h"
#include FONT_C_FILE
#endif
#include "lantern/model.inc.c"

View File

@@ -331,4 +331,8 @@ extern const Gfx white_particle_small_dl_end[];
extern const Gfx white_particle_small_dl[];
extern const Gfx white_particle_small_unused_dl[];
#include "mario/geo_header.h"
#include "lantern/geo_header.h"
#endif

View File

@@ -16,3 +16,5 @@
#include "water_splash/geo.inc.c"
#include "sparkle_animation/geo.inc.c"
#include "mario/geo.inc.c"
#include "lantern/geo.inc.c"

View File

@@ -43,17 +43,6 @@ const GeoLayout klepto_geo[] = {
GEO_TRANSLATE_ROTATE_WITH_DL(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 0, 100, 0, 180, 270, 0, star_seg3_dl_body),
GEO_ASM(0, geo_offset_klepto_held_object),
GEO_TRANSLATE_ROTATE_WITH_DL(LAYER_OCCLUDE_SILHOUETTE_ALPHA, 0, 100, 0, 180, 270, 0, star_seg3_dl_eyes),
#if STAR_GLOW
GEO_OPEN_NODE(),
GEO_BILLBOARD(),
GEO_OPEN_NODE(),
GEO_Z_OFFSET(48),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT_INTER, dl_star_glow),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
#endif
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_NODE_START(), // KLEPTO_ANIM_STATE_HOLDING_TRANSPARENT_STAR

13
actors/lantern/geo.inc.c Normal file
View File

@@ -0,0 +1,13 @@
#include "src/game/envfx_snow.h"
const GeoLayout lantern_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lantern_Lantern_mesh),
GEO_BILLBOARD_WITH_PARAMS_AND_DL(LAYER_TRANSPARENT, 0, 0, 0, lantern_Flame_mesh),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, lantern_Glass_mesh),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lantern_material_revert_render_settings),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, lantern_material_revert_render_settings),
GEO_CLOSE_NODE(),
GEO_END(),
};

View File

@@ -0,0 +1,19 @@
extern const GeoLayout lantern_geo[];
extern Vtx lantern_Lantern_mesh_vtx_0[20];
extern Gfx lantern_Lantern_mesh_tri_0[];
extern Vtx lantern_Lantern_mesh_vtx_1[6];
extern Gfx lantern_Lantern_mesh_tri_1[];
extern Vtx lantern_Lantern_mesh_vtx_2[18];
extern Gfx lantern_Lantern_mesh_tri_2[];
extern Vtx lantern_Lantern_mesh_vtx_3[16];
extern Gfx lantern_Lantern_mesh_tri_3[];
extern Vtx lantern_Flame_mesh_vtx_0[3];
extern Gfx lantern_Flame_mesh_tri_0[];
extern Vtx lantern_Glass_mesh_vtx_0[13];
extern Gfx lantern_Glass_mesh_tri_0[];
extern Gfx lantern_Lantern_mesh[];
extern Gfx lantern_Flame_mesh[];
extern Gfx lantern_Glass_mesh[];
extern Gfx lantern_material_revert_render_settings[];

Some files were not shown because too many files have changed in this diff Show More