diff --git a/data/.wolf3d/N3Ddata.cdogscpn/character_classes.json b/data/.wolf3d/N3Ddata.cdogscpn/character_classes.json index ca7d8fb37..374595158 100644 --- a/data/.wolf3d/N3Ddata.cdogscpn/character_classes.json +++ b/data/.wolf3d/N3Ddata.cdogscpn/character_classes.json @@ -76,7 +76,7 @@ "Type": "Directional", "Sprites": "chars/heads/sheep" }, - "Body": "big", + "Body": "camel", "Sounds": "camel" }, { diff --git a/data/.wolf3d/N3Ddata.cdogscpn/characters.json b/data/.wolf3d/N3Ddata.cdogscpn/characters.json index 4bb1ca5af..b5084743b 100644 --- a/data/.wolf3d/N3Ddata.cdogscpn/characters.json +++ b/data/.wolf3d/N3Ddata.cdogscpn/characters.json @@ -135,12 +135,12 @@ }, { "Class": "Camel", - "Skin": "ffbf73ff", + "Skin": "f5921dff", "Arms": "0c08f0ff", "Body": "0016ffff", - "Legs": "0820fcff", - "Hair": "fcfa0aff", - "Feet": "0200f7ff", + "Legs": "fc9b08ff", + "Hair": "bf7f00ff", + "Feet": "f79722ff", "Facehair": "fcfa0aff", "Hat": "fcfa0aff", "Glasses": "fcfa0aff", diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/data.json b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/data.json index 5cc112408..62618b7f9 100644 --- a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/data.json +++ b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/data.json @@ -35,7 +35,7 @@ }, "Dir": { "Head": [ - [0, -3], [4, -3], [6, 0], [6, 4], [0, 6], [-6, 4], [-7, 0], [-5, -3] + [-1, -15], [11, -12], [15, -7], [12, 3], [0, 6], [-12, 3], [-16, -6], [-12, -12] ] } } diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_24x24.png deleted file mode 100644 index b5e41ab30..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_30x30.png new file mode 100644 index 000000000..53a025285 Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_idle_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_24x24.png deleted file mode 100644 index ec0d50835..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_30x30.png new file mode 100644 index 000000000..46fae300d Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/legs_run_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/src.blend b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/src.blend index 9f4304d80..054e22dad 100644 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/src.blend and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/src.blend differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_24x24.png deleted file mode 100644 index 9ebe338e3..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_30x30.png new file mode 100644 index 000000000..ae63d631c Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_24x24.png deleted file mode 100644 index b8b4eba49..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_30x30.png new file mode 100644 index 000000000..ae63d631c Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_idle_handgun_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_24x24.png deleted file mode 100644 index 3335a73cc..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_30x30.png new file mode 100644 index 000000000..50b5f6cbe Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_24x24.png deleted file mode 100644 index 3335a73cc..000000000 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_24x24.png and /dev/null differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_30x30.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_30x30.png new file mode 100644 index 000000000..50b5f6cbe Binary files /dev/null and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/camel/upper_run_handgun_30x30.png differ diff --git a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/sheep/upper_run_24x24.png b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/sheep/upper_run_24x24.png index 3335a73cc..b8eb7763e 100644 Binary files a/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/sheep/upper_run_24x24.png and b/data/.wolf3d/N3Ddata.cdogscpn/graphics/chars/bodies/sheep/upper_run_24x24.png differ diff --git a/graphics/chars/bodies/render.py b/graphics/chars/bodies/render.py index 7032a60b2..6d6a30de5 100644 --- a/graphics/chars/bodies/render.py +++ b/graphics/chars/bodies/render.py @@ -28,6 +28,8 @@ axis = 2 # z-axis platform = D.objects["armature"] scene = D.scenes[0] +# Zoom out to show big characters - change RESOLUTION to account for this +scene.camera.data.ortho_scale = RESOLUTION try: platform.animation_data.action = D.actions[action] except KeyError: diff --git a/src/cdogsed/char_editor.c b/src/cdogsed/char_editor.c index 8eccdf0e3..2e73137f4 100644 --- a/src/cdogsed/char_editor.c +++ b/src/cdogsed/char_editor.c @@ -48,11 +48,11 @@ typedef struct char *PickupNames; CArray texidsChars; // of GLuint[BODY_PART_COUNT] GLuint texidsPreview[BODY_PART_COUNT]; - CArray texIdsCharClasses; // of GLuint - CArray texIdsHeadParts[HEAD_PART_COUNT]; // of GLuint - CArray texIdsGuns; // of GLuint - CArray texIdsMelees; // of GLuint - CArray texIdsPickups; // of GLuint + CArray texIdsCharClasses; // of GLuint + CArray texIdsHeadParts[HEAD_PART_COUNT]; // of GLuint + CArray texIdsGuns; // of GLuint + CArray texIdsMelees; // of GLuint + CArray texIdsPickups; // of GLuint Animation anim; direction_e previewDir; gunstate_e gunState; @@ -115,12 +115,11 @@ void CharEditor( ec.CharacterClassNames = GetClassNames(NumCharacterClasses(), IndexCharacterClassName); const char *(*indexHeadPartFuncs[HEAD_PART_COUNT])(int) = { - IndexHairName, IndexFacehairName, IndexHatName, IndexGlassesName - }; + IndexHairName, IndexFacehairName, IndexHatName, IndexGlassesName}; for (HeadPart hp = HEAD_PART_HAIR; hp < HEAD_PART_COUNT; hp++) { - ec.HeadPartNames[hp] = - GetClassNames(gPicManager.headPartNames[hp].size, *indexHeadPartFuncs[hp]); + ec.HeadPartNames[hp] = GetClassNames( + gPicManager.headPartNames[hp].size, *indexHeadPartFuncs[hp]); } ec.GunNames = GetClassNames(NumGuns(), IndexGunName); ec.MeleeNames = GetClassNames(NumMelees(), IndexMeleeName); @@ -145,10 +144,12 @@ void CharEditor( for (HeadPart hp = HEAD_PART_HAIR; hp < HEAD_PART_COUNT; hp++) { - TexArrayInit(&ec.texIdsHeadParts[hp], gPicManager.headPartNames[hp].size); + TexArrayInit( + &ec.texIdsHeadParts[hp], gPicManager.headPartNames[hp].size); CA_FOREACH(const GLuint, texid, ec.texIdsHeadParts[hp]) const char *name = IndexHeadPartName(_ca_index, hp); - LoadTexFromPic(*texid, GetHeadPartPic(name, hp, DIRECTION_DOWN, false, &cc)); + LoadTexFromPic( + *texid, GetHeadPartPic(name, hp, DIRECTION_DOWN, false, &cc)); CA_FOREACH_END() } @@ -157,7 +158,7 @@ void CharEditor( const WeaponClass *wc = IndexWeaponClassReal(_ca_index); LoadTexFromPic(*texid, wc->Icon); CA_FOREACH_END() - + TexArrayInit(&ec.texIdsMelees, NumMelees()); CA_FOREACH(const GLuint, texid, ec.texIdsMelees) const WeaponClass *wc = IndexWeaponClassMelee(_ca_index); @@ -194,9 +195,8 @@ void CharEditor( (GLsizei)(BODY_PART_COUNT * ec.texidsChars.size), ec.texidsChars.data); CArrayTerminate(&ec.texidsChars); glDeleteTextures(BODY_PART_COUNT, ec.texidsPreview); -#define DELTEX(_tx) \ - glDeleteTextures( \ - (GLsizei)(_tx).size, (_tx).data); \ +#define DELTEX(_tx) \ + glDeleteTextures((GLsizei)(_tx).size, (_tx).data); \ TexArrayTerminate(&(_tx)); DELTEX(ec.texIdsCharClasses); for (HeadPart hp = HEAD_PART_HAIR; hp < HEAD_PART_COUNT; hp++) @@ -219,8 +219,8 @@ static const char *IndexHeadPartName(const int i, const HeadPart hp) } static int NumCharacterClasses(void) { - return ( - int)(gCharacterClasses.Classes.size + gCharacterClasses.CustomClasses.size); + return (int)(gCharacterClasses.Classes.size + + gCharacterClasses.CustomClasses.size); } static const char *IndexGunName(const int i) { @@ -364,7 +364,9 @@ static int NumMelees(void) } static int NumPickups(void) { - return (int)(gPickupClasses.Classes.size + gPickupClasses.CustomClasses.size + gPickupClasses.KeyClasses.size + 1); + return (int)(gPickupClasses.Classes.size + + gPickupClasses.CustomClasses.size + + gPickupClasses.KeyClasses.size + 1); } static int GunIndex(const WeaponClass *wc) { @@ -566,7 +568,7 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) if (ec->Char != NULL) { - const float previewWidth = 80; + const float previewWidth = 100; if (nk_begin( ctx, "Preview", nk_rect( @@ -587,7 +589,7 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) (int)ec->previewDir - 1, 0, DIRECTION_UPLEFT); } // Preview - nk_layout_row_dynamic(ctx, 32 * PIC_SCALE, 1); + nk_layout_row_dynamic(ctx, 48 * PIC_SCALE, 1); gunstate_e gunStates[MAX_BARRELS]; for (int i = 0; i < MAX_BARRELS; i++) { @@ -642,16 +644,21 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) if (hasStyle) { nk_layout_row(ctx, NK_DYNAMIC, ROW_HEIGHT, 2, colRatios); - const int current = HeadPartIndex(ec->Char->HeadParts[hp], hp); + const int current = + HeadPartIndex(ec->Char->HeadParts[hp], hp); sprintf(buf, "%s:", HeadPartStr(hp)); - int selected = DrawClassSelection(ctx, ec, buf, ec->texIdsHeadParts[hp].data, ec->HeadPartNames[hp], current, gPicManager.headPartNames[hp].size); + int selected = DrawClassSelection( + ctx, ec, buf, ec->texIdsHeadParts[hp].data, + ec->HeadPartNames[hp], current, + gPicManager.headPartNames[hp].size); if (selected == -1) { selected = 0; } if (current != selected) { - CharacterSetHeadPart(ec->Char, hp, IndexHeadPartName(selected, hp)); + CharacterSetHeadPart( + ec->Char, hp, IndexHeadPartName(selected, hp)); } } else @@ -670,7 +677,9 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) { *ec->FileChanged = true; } - if (ColorPicker(ctx, ROW_HEIGHT, "Facial Hair:", &ec->Char->Colors.Facehair)) + if (ColorPicker( + ctx, ROW_HEIGHT, + "Facial Hair:", &ec->Char->Colors.Facehair)) { *ec->FileChanged = true; } @@ -678,7 +687,8 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) { *ec->FileChanged = true; } - if (ColorPicker(ctx, ROW_HEIGHT, "Glasses:", &ec->Char->Colors.Glasses)) + if (ColorPicker( + ctx, ROW_HEIGHT, "Glasses:", &ec->Char->Colors.Glasses)) { *ec->FileChanged = true; } @@ -749,7 +759,8 @@ static bool Draw(SDL_Window *win, struct nk_context *ctx, void *data) nk_property_int( ctx, "Max Health:", 10, &ec->Char->maxHealth, 2000, 10, 1); nk_property_int( - ctx, "Excess Health:", ec->Char->maxHealth, &ec->Char->excessHealth, 2000, 10, 1); + ctx, "Excess Health:", ec->Char->maxHealth, + &ec->Char->excessHealth, 2000, 10, 1); nk_layout_row_dynamic(ctx, ROW_HEIGHT, 2); DrawFlag(ctx, ec, "Asbestos", FLAGS_ASBESTOS, "Immune to fire");