Skip to content

Commit

Permalink
Red OW
Browse files Browse the repository at this point in the history
  • Loading branch information
Greenphx9 committed Jan 12, 2025
1 parent 240d7ef commit e2d00ca
Show file tree
Hide file tree
Showing 18 changed files with 440 additions and 48 deletions.
19 changes: 19 additions & 0 deletions graphics/object_events/pics/people/player/red/red.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
131 123 164
172 123 65
255 197 148
222 148 115
123 65 65
65 65 213
57 57 123
115 164 197
106 41 41
238 238 255
180 180 213
255 106 74
197 57 57
255 222 90
189 156 57
0 0 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion include/config/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// still has them in the ROM. This is because the developers forgot
// to define NDEBUG before release, however this has been changed as
// Ruby's actual debug build does not use the AGBPrint features.
#define NDEBUG
//#define NDEBUG

// To enable printf debugging, comment out "#define NDEBUG". This allows
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
Expand Down
13 changes: 9 additions & 4 deletions include/constants/event_object_movement.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,15 @@
#define ANIM_STD_GO_FASTEST_EAST 19
#define ANIM_STD_COUNT 20

#define ANIM_RUN_SOUTH (ANIM_STD_COUNT + 0)
#define ANIM_RUN_NORTH (ANIM_STD_COUNT + 1)
#define ANIM_RUN_WEST (ANIM_STD_COUNT + 2)
#define ANIM_RUN_EAST (ANIM_STD_COUNT + 3)
#define ANIM_RUN_SOUTH (ANIM_STD_COUNT + 0)
#define ANIM_RUN_NORTH (ANIM_STD_COUNT + 1)
#define ANIM_RUN_WEST (ANIM_STD_COUNT + 2)
#define ANIM_RUN_EAST (ANIM_STD_COUNT + 3)
#define ANIM_SPIN_SOUTH (ANIM_STD_COUNT + 4)
#define ANIM_SPIN_NORTH (ANIM_STD_COUNT + 5)
#define ANIM_SPIN_WEST (ANIM_STD_COUNT + 6)
#define ANIM_SPIN_EAST (ANIM_STD_COUNT + 7)
#define ANIM_SHAKE_HEAD_OR_WALK_IN_PLACE (ANIM_STD_COUNT + 8)

#define ANIM_EXIT_POKEBALL_FAST_SOUTH (ANIM_STD_COUNT + 0)
#define ANIM_EXIT_POKEBALL_FAST_NORTH (ANIM_STD_COUNT + 1)
Expand Down
8 changes: 7 additions & 1 deletion include/constants/event_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,16 @@
#define OBJ_EVENT_GFX_HOOH 238
#define OBJ_EVENT_GFX_POKE_BALL 239
#define OBJ_EVENT_GFX_OW_MON 240
#define OBJ_EVENT_GFX_RED_NORMAL 241
#define OBJ_EVENT_GFX_RED_BIKE 242
#define OBJ_EVENT_GFX_RED_SURF 243
#define OBJ_EVENT_GFX_RED_FIELD_MOVE 244
#define OBJ_EVENT_GFX_RED_FISH 245

// NOTE: The maximum amount of object events has been expanded from 255 to 65535.
// Since dynamic graphics ids still require at least 16 free values, the actual limit
// is 65519, but even considering follower Pokémon, this should be more than enough :)
#define NUM_OBJ_EVENT_GFX 241
#define NUM_OBJ_EVENT_GFX 246


// These are dynamic object gfx ids.
Expand Down Expand Up @@ -379,6 +384,7 @@
#define OBJ_EVENT_PAL_TAG_RS_BRENDAN 0x1122
#define OBJ_EVENT_PAL_TAG_RS_MAY 0x1123
#define OBJ_EVENT_PAL_TAG_DYNAMIC 0x1124
#define OBJ_EVENT_PAL_TAG_PLAYER_RED 0x1125

#if OW_FOLLOWERS_POKEBALLS
// Vanilla
Expand Down
18 changes: 18 additions & 0 deletions spritesheet_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4772,3 +4772,21 @@ $(OBJEVENTGFXDIR)/misc/ball_%.4bpp: $(OBJEVENTGFXDIR)/misc/ball_%.png ; $(GFX) $

graphics/door_anims/battle_tower_multi_corridor.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_bike.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 4 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_fish.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 4 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_item.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_normal.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_surf_run.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 2 -mheight 4

$(OBJEVENTGFXDIR)/people/player/red/red_surf.4bpp: %.4bpp: %.png
$(GFX) $< $@ -mwidth 4 -mheight 4
186 changes: 166 additions & 20 deletions src/data/object_events/object_event_anims.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,39 +642,39 @@ static const union AnimCmd sAnim_GoFastestEast[] =
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_RunSouth[] =
static const union AnimCmd sAnim_RunSouth[] =
{
ANIMCMD_FRAME(12, 5),
ANIMCMD_FRAME(9, 3),
ANIMCMD_FRAME(13, 5),
ANIMCMD_FRAME(9, 3),
ANIMCMD_FRAME(9, 5),
ANIMCMD_FRAME(10, 3),
ANIMCMD_FRAME(9, 5),
ANIMCMD_FRAME(11, 3),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_RunNorth[] =
static const union AnimCmd sAnim_RunNorth[] =
{
ANIMCMD_FRAME(14, 5),
ANIMCMD_FRAME(10, 3),
ANIMCMD_FRAME(15, 5),
ANIMCMD_FRAME(10, 3),
ANIMCMD_FRAME(12, 5),
ANIMCMD_FRAME(13, 3),
ANIMCMD_FRAME(12, 5),
ANIMCMD_FRAME(14, 3),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_RunWest[] =
static const union AnimCmd sAnim_RunWest[] =
{
ANIMCMD_FRAME(16, 5),
ANIMCMD_FRAME(11, 3),
ANIMCMD_FRAME(17, 5),
ANIMCMD_FRAME(11, 3),
ANIMCMD_FRAME(15, 5),
ANIMCMD_FRAME(16, 3),
ANIMCMD_FRAME(15, 5),
ANIMCMD_FRAME(17, 3),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_RunEast[] =
static const union AnimCmd sAnim_RunEast[] =
{
ANIMCMD_FRAME(16, 5, .hFlip = TRUE),
ANIMCMD_FRAME(11, 3, .hFlip = TRUE),
ANIMCMD_FRAME(17, 5, .hFlip = TRUE),
ANIMCMD_FRAME(11, 3, .hFlip = TRUE),
ANIMCMD_FRAME(15, 5, .hFlip = TRUE),
ANIMCMD_FRAME(16, 3, .hFlip = TRUE),
ANIMCMD_FRAME(15, 5, .hFlip = TRUE),
ANIMCMD_FRAME(17, 3, .hFlip = TRUE),
ANIMCMD_JUMP(0),
};

Expand Down Expand Up @@ -1536,3 +1536,149 @@ static const struct StepAnimTable sStepAnimTables[] = {
},
{},
};

// new

static const union AnimCmd sAnim_SpinSouth[] = {
ANIMCMD_FRAME(0, 2),
ANIMCMD_FRAME(2, 2, .hFlip = TRUE),
ANIMCMD_FRAME(1, 2),
ANIMCMD_FRAME(2, 2),
ANIMCMD_LOOP(1),
ANIMCMD_END,
};

static const union AnimCmd sAnim_SpinNorth[] = {
ANIMCMD_FRAME(1, 2),
ANIMCMD_FRAME(2, 2),
ANIMCMD_FRAME(0, 2),
ANIMCMD_FRAME(2, 2, .hFlip = TRUE),
ANIMCMD_LOOP(1),
ANIMCMD_END,
};

static const union AnimCmd sAnim_SpinWest[] = {
ANIMCMD_FRAME(2, 2, .hFlip = TRUE), // Starts by facing East?
ANIMCMD_FRAME(1, 2),
ANIMCMD_FRAME(2, 2),
ANIMCMD_FRAME(0, 2),
ANIMCMD_LOOP(1),
ANIMCMD_END,
};

static const union AnimCmd sAnim_SpinEast[] = {
ANIMCMD_FRAME(2, 2), // Starts by facing West?
ANIMCMD_FRAME(0, 2),
ANIMCMD_FRAME(2, 2, .hFlip = TRUE),
ANIMCMD_FRAME(1, 2),
ANIMCMD_LOOP(1),
ANIMCMD_END,
};

static const union AnimCmd sAnim_ShakeHeadOrWalkInPlace[] = {
ANIMCMD_FRAME(18, 16),
ANIMCMD_FRAME(0, 16),
ANIMCMD_FRAME(19, 16),
ANIMCMD_FRAME(0, 32),
ANIMCMD_LOOP(1),
ANIMCMD_END,
};

static const union AnimCmd *const sAnimTable_RedGreenNormal[] = {
[ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth,
[ANIM_STD_FACE_NORTH] = sAnim_FaceNorth,
[ANIM_STD_FACE_WEST] = sAnim_FaceWest,
[ANIM_STD_FACE_EAST] = sAnim_FaceEast,
[ANIM_STD_GO_SOUTH] = sAnim_GoSouth,
[ANIM_STD_GO_NORTH] = sAnim_GoNorth,
[ANIM_STD_GO_WEST] = sAnim_GoWest,
[ANIM_STD_GO_EAST] = sAnim_GoEast,
[ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth,
[ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth,
[ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest,
[ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast,
[ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth,
[ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth,
[ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest,
[ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast,
[ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth,
[ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth,
[ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest,
[ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast,
[ANIM_RUN_SOUTH] = sAnim_RunSouth,
[ANIM_RUN_NORTH] = sAnim_RunNorth,
[ANIM_RUN_WEST] = sAnim_RunWest,
[ANIM_RUN_EAST] = sAnim_RunEast,
[ANIM_SPIN_SOUTH] = sAnim_SpinSouth,
[ANIM_SPIN_NORTH] = sAnim_SpinNorth,
[ANIM_SPIN_WEST] = sAnim_SpinWest,
[ANIM_SPIN_EAST] = sAnim_SpinEast,
[ANIM_SHAKE_HEAD_OR_WALK_IN_PLACE] = sAnim_ShakeHeadOrWalkInPlace,
};

static const union AnimCmd sAnim_SurfFaceSouth[] = {
ANIMCMD_FRAME(0, 60),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_SurfFaceNorth[] = {
ANIMCMD_FRAME(1, 60),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_SurfFaceWest[] = {
ANIMCMD_FRAME(2, 60),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_SurfFaceEast[] = {
ANIMCMD_FRAME(2, 60, .hFlip = TRUE),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_GetOnOffSurfSouth[] = {
ANIMCMD_FRAME(9, 32),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_GetOnOffSurfNorth[] = {
ANIMCMD_FRAME(10, 32),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_GetOnOffSurfWest[] = {
ANIMCMD_FRAME(11, 32),
ANIMCMD_JUMP(0),
};

static const union AnimCmd sAnim_GetOnOffSurfEast[] = {
ANIMCMD_FRAME(11, 32, .hFlip = TRUE),
ANIMCMD_JUMP(0),
};

static const union AnimCmd *const sAnimTable_RedGreenSurf[] = {
[ANIM_STD_FACE_SOUTH] = sAnim_SurfFaceSouth,
[ANIM_STD_FACE_NORTH] = sAnim_SurfFaceNorth,
[ANIM_STD_FACE_WEST] = sAnim_SurfFaceWest,
[ANIM_STD_FACE_EAST] = sAnim_SurfFaceEast,
[ANIM_STD_GO_SOUTH] = sAnim_SurfFaceSouth,
[ANIM_STD_GO_NORTH] = sAnim_SurfFaceNorth,
[ANIM_STD_GO_WEST] = sAnim_SurfFaceWest,
[ANIM_STD_GO_EAST] = sAnim_SurfFaceEast,
[ANIM_STD_GO_FAST_SOUTH] = sAnim_SurfFaceSouth,
[ANIM_STD_GO_FAST_NORTH] = sAnim_SurfFaceNorth,
[ANIM_STD_GO_FAST_WEST] = sAnim_SurfFaceWest,
[ANIM_STD_GO_FAST_EAST] = sAnim_SurfFaceEast,
[ANIM_STD_GO_FASTER_SOUTH] = sAnim_SurfFaceSouth,
[ANIM_STD_GO_FASTER_NORTH] = sAnim_SurfFaceNorth,
[ANIM_STD_GO_FASTER_WEST] = sAnim_SurfFaceWest,
[ANIM_STD_GO_FASTER_EAST] = sAnim_SurfFaceEast,
[ANIM_STD_GO_FASTEST_SOUTH] = sAnim_SurfFaceSouth,
[ANIM_STD_GO_FASTEST_NORTH] = sAnim_SurfFaceNorth,
[ANIM_STD_GO_FASTEST_WEST] = sAnim_SurfFaceWest,
[ANIM_STD_GO_FASTEST_EAST] = sAnim_SurfFaceEast,
[ANIM_GET_ON_OFF_POKEMON_SOUTH] = sAnim_GetOnOffSurfSouth,
[ANIM_GET_ON_OFF_POKEMON_NORTH] = sAnim_GetOnOffSurfNorth,
[ANIM_GET_ON_OFF_POKEMON_WEST] = sAnim_GetOnOffSurfWest,
[ANIM_GET_ON_OFF_POKEMON_EAST] = sAnim_GetOnOffSurfEast,
};
10 changes: 10 additions & 0 deletions src/data/object_events/object_event_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,13 @@ const u16 gObjectEventPal_BeastBall[] = INCBIN_U16("graphics/object_events/pics/
const u16 gObjectEventPal_StrangeBall[] = INCBIN_U16("graphics/object_events/pics/misc/ball_strange.gbapal");
#endif //ITEM_STRANGE_BALL
#endif //OW_FOLLOWERS_POKEBALLS

// new

const u16 gObjectEventPal_Red[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red.gbapal");
const u16 gObjectEventPic_RedNormal[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_normal.4bpp");
const u16 gObjectEventPic_RedSurfRun[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_surf_run.4bpp");
const u16 gObjectEventPic_RedItem[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_item.4bpp");
const u16 gObjectEventPic_RedSurf[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_surf.4bpp");
const u16 gObjectEventPic_RedBike[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_bike.4bpp");
const u16 gObjectEventPic_RedFish[] = INCBIN_U16("graphics/object_events/pics/people/player/red/red_fish.4bpp");
Loading

0 comments on commit e2d00ca

Please sign in to comment.