From 3ec4d484e273e5cba7562d3e6f5f0e455578d587 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 7 Apr 2016 09:09:51 +0200 Subject: [PATCH 1/5] Fix for 64bits build --- Sources/Engine/Base/Types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Engine/Base/Types.h b/Sources/Engine/Base/Types.h index d0905a9..fbcc21f 100644 --- a/Sources/Engine/Base/Types.h +++ b/Sources/Engine/Base/Types.h @@ -221,8 +221,8 @@ typedef unsigned int UINT; typedef char CHAR; typedef UBYTE BYTE; typedef unsigned short WORD; - typedef unsigned long int DWORD; - typedef signed long int LONG; + typedef unsigned int DWORD; + typedef signed int LONG; typedef void *LPVOID; typedef char *LPSTR; typedef signed long int WPARAM; From 0c16613056b1d60b282b512bd842eadbad2062de Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 7 Apr 2016 09:10:09 +0200 Subject: [PATCH 2/5] Fix a nasty typo --- Sources/Engine/Light/LayerMixer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Engine/Light/LayerMixer.cpp b/Sources/Engine/Light/LayerMixer.cpp index e32982f..66762a2 100644 --- a/Sources/Engine/Light/LayerMixer.cpp +++ b/Sources/Engine/Light/LayerMixer.cpp @@ -1998,7 +1998,7 @@ __forceinline void CLayerMixer::FillShadowLayer( COLOR col) { #if (defined USE_PORTABLE_C) DWORD* dst = (DWORD*)lm_pulShadowMap; - int n = lm_pixCanvasSizeV*lm_pixCanvasSizeV; + int n = lm_pixCanvasSizeU*lm_pixCanvasSizeV; DWORD color = __builtin_bswap32(col); while(n--) {*(dst++)=color;} #elif (defined __MSVC_INLINE__) From 19bd3f733bc22a781a3e83291b57f4a9ab56688d Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 7 Apr 2016 10:45:45 +0200 Subject: [PATCH 3/5] Use SDL constants for mouse buttons --- Sources/Engine/Base/SDL/SDLEvents.cpp | 4 ++-- Sources/Engine/Base/SDL/SDLInput.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/Engine/Base/SDL/SDLEvents.cpp b/Sources/Engine/Base/SDL/SDLEvents.cpp index 512cfce..6ef1800 100644 --- a/Sources/Engine/Base/SDL/SDLEvents.cpp +++ b/Sources/Engine/Base/SDL/SDLEvents.cpp @@ -59,7 +59,7 @@ BOOL PeekMessage(MSG *msg, void *hwnd, UINT wMsgFilterMin, break; case SDL_MOUSEBUTTONDOWN: - if (sdlevent.button.button == 2) // right button... + if (sdlevent.button.button == SDL_BUTTON_RIGHT) // right button... { msg->message = WM_RBUTTONDOWN; } // if @@ -78,7 +78,7 @@ BOOL PeekMessage(MSG *msg, void *hwnd, UINT wMsgFilterMin, break; case SDL_MOUSEBUTTONUP: - if (sdlevent.button.button == 2) // right button... + if (sdlevent.button.button == SDL_BUTTON_RIGHT) // right button... { msg->message = WM_RBUTTONUP; } // if diff --git a/Sources/Engine/Base/SDL/SDLInput.cpp b/Sources/Engine/Base/SDL/SDLInput.cpp index 332fa72..07f985d 100644 --- a/Sources/Engine/Base/SDL/SDLInput.cpp +++ b/Sources/Engine/Base/SDL/SDLInput.cpp @@ -328,13 +328,13 @@ static void sdl_event_handler(const SDL_Event *event) case SDL_MOUSEBUTTONDOWN: switch (event->button.button) { - case 1: + case SDL_BUTTON_LEFT: _abKeysPressed[KID_MOUSE1] = TRUE; break; - case 2: + case SDL_BUTTON_RIGHT: _abKeysPressed[KID_MOUSE2] = TRUE; break; - case 3: + case SDL_BUTTON_MIDDLE: _abKeysPressed[KID_MOUSE3] = TRUE; break; @@ -351,13 +351,13 @@ static void sdl_event_handler(const SDL_Event *event) case SDL_MOUSEBUTTONUP: switch (event->button.button) { - case 1: + case SDL_BUTTON_LEFT: _abKeysPressed[KID_MOUSE1] = FALSE; break; - case 2: + case SDL_BUTTON_RIGHT: _abKeysPressed[KID_MOUSE2] = FALSE; break; - case 3: + case SDL_BUTTON_MIDDLE: _abKeysPressed[KID_MOUSE3] = FALSE; break; From 253df3ec464bc900ee95bd59f3d7d903c534a5f7 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 7 Apr 2016 12:07:12 +0200 Subject: [PATCH 4/5] A closing bracket seemed missplaced --- Sources/EntitiesMP/Devil.es | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 Sources/EntitiesMP/Devil.es diff --git a/Sources/EntitiesMP/Devil.es b/Sources/EntitiesMP/Devil.es old mode 100644 new mode 100755 index 05825e7..f0ed658 --- a/Sources/EntitiesMP/Devil.es +++ b/Sources/EntitiesMP/Devil.es @@ -1568,7 +1568,7 @@ procedures: } InflictHoofDamage( DEVIL_HIT_HOOF_OFFSET); - autowait(GetModelObject()->GetAnimLength(DEVIL_ANIM_ATTACKCLOSE-1.4f)-_pTimer->TickQuantum); + autowait(GetModelObject()->GetAnimLength(DEVIL_ANIM_ATTACKCLOSE)-1.4f-_pTimer->TickQuantum); // misplaced ) here ??? return EReturn(); }; @@ -1599,7 +1599,7 @@ procedures: case DAP_PLAYER_HUNT: if( _pTimer->CurrentTick()-m_tmLastAngry > 10.0f) { - m_fAttackFireTime = 7.5+FRnd()*5; + m_fAttackFireTime = 7.5f+FRnd()*5.0f; m_tmLastAngry = _pTimer->CurrentTick(); SelectRandomAnger(); jump Angry(); @@ -1715,7 +1715,7 @@ procedures: FLOAT3D vShooting = GetPlacement().pl_PositionVector; FLOAT3D vTarget = m_penEnemy->GetPlacement().pl_PositionVector; FLOAT fDistanceFactor = 1.0f-ClampUp( (vShooting-vTarget).Length()/250.0f, 1.0f); - fWantedPitch = 20-fDistanceFactor*50.0f; + fWantedPitch = 20.0f-fDistanceFactor*50.0f; } CAttachmentModelObject &amo = *GetModelObject()->GetAttachmentModel(m_iAttID); @@ -2028,7 +2028,7 @@ procedures: autowait( m_tmLastPause); // fire one guided projectile ShootProjectile(PRT_DEVIL_GUIDED_PROJECTILE, MAGIC_PROJECTILE_EXIT, - ANGLE3D( AngleDeg(10.0f*Cos(m_iFiredProjectiles*360.0/6.0f)), -AngleDeg(20.0f*Sin(m_iFiredProjectiles*180.0/6.0f)), 0)); + ANGLE3D( AngleDeg(10.0f*Cos(m_iFiredProjectiles*360.0f/6.0f)), -AngleDeg(20.0f*Sin(m_iFiredProjectiles*180.0f/6.0f)), 0)); PlayWeaponSound( SOUND_ATTACK_BREATH_FIRE); autowait(0.8f-m_tmLastPause); @@ -2244,9 +2244,9 @@ procedures: SetHealth(5000); } m_fMaxHealth = BOSS_HEALTH; - m_fBlowUpAmount = 1e6; - m_fBodyParts = 6; - m_fDamageWounded = 1e9; + m_fBlowUpAmount = 1e6f; + m_fBodyParts = 6.0f; + m_fDamageWounded = 1e9f; en_fDensity = 2500.0f; m_bHasUpperWeapons = FALSE; m_bRenderElectricity = FALSE; From 6a2800e2587cbc48aff3f49ad7d835e9f48d7218 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 7 Apr 2016 15:19:13 +0200 Subject: [PATCH 5/5] Preparing First Encounter (but it doesn't work for now) --- Sources/SeriousSam/SeriousSam.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Sources/SeriousSam/SeriousSam.cpp b/Sources/SeriousSam/SeriousSam.cpp index 68547c9..7963471 100644 --- a/Sources/SeriousSam/SeriousSam.cpp +++ b/Sources/SeriousSam/SeriousSam.cpp @@ -123,6 +123,20 @@ CTextureObject *_ptoLogoCT = NULL; CTextureObject *_ptoLogoODI = NULL; CTextureObject *_ptoLogoEAX = NULL; +#if 0 // First Encounter (not working for now) +CTString sam_strVersion = "1.10"; +CTString sam_strModName = TRANS("- O P E N S O U R C E -"); +#if _SE_DEMO + CTString sam_strFirstLevel = "Levels\\KarnakDemo.wld"; +#else + CTString sam_strFirstLevel = "Levels\\01_Hatshepsut.wld"; +#endif +CTString sam_strIntroLevel = "Levels\\Intro.wld"; +CTString sam_strGameName = "serioussamfe"; + +CTString sam_strTechTestLevel = "Levels\\TechTest.wld"; +CTString sam_strTrainingLevel = "Levels\\KarnakDemo.wld"; +#else // Second Encounter CTString sam_strVersion = "1.10"; CTString sam_strModName = TRANS("- O P E N S O U R C E -"); @@ -130,12 +144,12 @@ CTString sam_strFirstLevel = "Levels\\LevelsMP\\1_0_InTheLastEpisode.wld"; CTString sam_strIntroLevel = "Levels\\LevelsMP\\Intro.wld"; CTString sam_strGameName = "serioussamse"; -CTString sam_strTechTestLevel = "Levels\\LevelsMP\\TechTest.wld"; +CTString sam_strTechTestLevel = "Levels\\LevelsMP\\Technology\\TechTest.wld"; CTString sam_strTrainingLevel = "Levels\\KarnakDemo.wld"; +#endif ENGINE_API extern INDEX snd_iFormat; - // main window canvas CDrawPort *pdp; CDrawPort *pdpNormal;