@@ -429,9 +429,6 @@ GameMessageDisposition MetaEventTranslator::translateGameMessage(const GameMessa
429429
430430 for (const MetaMapRec *map = TheMetaMap->getFirstMetaMapRec (); map; map = map->m_next )
431431 {
432- DEBUG_ASSERTCRASH (map->m_meta > GameMessage::MSG_BEGIN_META_MESSAGES &&
433- map->m_meta < GameMessage::MSG_END_META_MESSAGES, (" hmm, expected only meta-msgs here" ));
434-
435432 if (!isMessageUsable (map->m_usableIn ))
436433 continue ;
437434
@@ -669,14 +666,14 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
669666}
670667
671668// -------------------------------------------------------------------------------------------------
672- /* static */ void MetaMap::generateMetaMap ()
669+ void MetaMap::generateMetaMap ()
673670{
674671 // TheSuperHackers @info A default mapping for MSG_META_SELECT_ALL_AIRCRAFT would be useful for Generals
675672 // but is not recommended, because it will cause key mapping conflicts with original game languages.
676673
677674 {
678675 // Is useful for Generals and Zero Hour.
679- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_INCREASE_MAX_RENDER_FPS);
676+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_INCREASE_MAX_RENDER_FPS);
680677 if (map->m_key == MK_NONE)
681678 {
682679 map->m_key = MK_KPPLUS;
@@ -687,7 +684,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
687684 }
688685 {
689686 // Is useful for Generals and Zero Hour.
690- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_DECREASE_MAX_RENDER_FPS);
687+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_DECREASE_MAX_RENDER_FPS);
691688 if (map->m_key == MK_NONE)
692689 {
693690 map->m_key = MK_KPMINUS;
@@ -698,7 +695,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
698695 }
699696 {
700697 // Is useful for Generals and Zero Hour.
701- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_INCREASE_LOGIC_TIME_SCALE);
698+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_INCREASE_LOGIC_TIME_SCALE);
702699 if (map->m_key == MK_NONE)
703700 {
704701 map->m_key = MK_KPPLUS;
@@ -709,7 +706,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
709706 }
710707 {
711708 // Is useful for Generals and Zero Hour.
712- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_DECREASE_LOGIC_TIME_SCALE);
709+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_DECREASE_LOGIC_TIME_SCALE);
713710 if (map->m_key == MK_NONE)
714711 {
715712 map->m_key = MK_KPMINUS;
@@ -720,7 +717,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
720717 }
721718 {
722719 // Is useful for Generals and Zero Hour.
723- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_TOGGLE_PLAYER_OBSERVER);
720+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_TOGGLE_PLAYER_OBSERVER);
724721 if (map->m_key == MK_NONE)
725722 {
726723 map->m_key = MK_M;
@@ -731,7 +728,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
731728 }
732729 {
733730 // Is mostly useful for Generals.
734- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_TOGGLE_FAST_FORWARD_REPLAY);
731+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_TOGGLE_FAST_FORWARD_REPLAY);
735732 if (map->m_key == MK_NONE)
736733 {
737734 map->m_key = MK_F;
@@ -742,7 +739,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
742739 }
743740 {
744741 // Is useful for Generals and Zero Hour.
745- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_TOGGLE_PAUSE);
742+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_TOGGLE_PAUSE);
746743 if (map->m_key == MK_NONE)
747744 {
748745 map->m_key = MK_P;
@@ -753,7 +750,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
753750 }
754751 {
755752 // Is useful for Generals and Zero Hour.
756- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_TOGGLE_PAUSE_ALT);
753+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_TOGGLE_PAUSE_ALT);
757754 if (map->m_key == MK_NONE)
758755 {
759756 map->m_key = MK_P;
@@ -764,7 +761,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
764761 }
765762 {
766763 // Is useful for Generals and Zero Hour.
767- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_STEP_FRAME);
764+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_STEP_FRAME);
768765 if (map->m_key == MK_NONE)
769766 {
770767 map->m_key = MK_O;
@@ -775,7 +772,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
775772 }
776773 {
777774 // Is useful for Generals and Zero Hour.
778- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_STEP_FRAME_ALT);
775+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_STEP_FRAME_ALT);
779776 if (map->m_key == MK_NONE)
780777 {
781778 map->m_key = MK_O;
@@ -786,7 +783,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
786783 }
787784 {
788785 // Is useful for Generals and Zero Hour.
789- MetaMapRec* map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_SELECT_NEXT_IDLE_WORKER);
786+ MetaMapRec * map = getMetaMapRec (GameMessage::MSG_META_SELECT_NEXT_IDLE_WORKER);
790787 if (map->m_key == MK_NONE) {
791788 map->m_key = MK_I;
792789 map->m_transition = DOWN;
@@ -798,7 +795,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
798795 }
799796 }
800797 {
801- MetaMapRec* map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT);
798+ MetaMapRec * map = getMetaMapRec (GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT);
802799 if (map->m_key == MK_NONE) {
803800 map->m_key = MK_KP4;
804801 map->m_transition = DOWN;
@@ -807,7 +804,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
807804 }
808805 }
809806 {
810- MetaMapRec* map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT);
807+ MetaMapRec * map = getMetaMapRec (GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT);
811808 if (map->m_key == MK_NONE) {
812809 map->m_key = MK_KP6;
813810 map->m_transition = DOWN;
@@ -819,7 +816,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
819816#if defined(RTS_DEBUG)
820817 {
821818 // Is useful for Generals and Zero Hour.
822- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_DEMO_REMOVE_PREREQ);
819+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_DEMO_REMOVE_PREREQ);
823820 if (map->m_key == MK_NONE)
824821 {
825822 map->m_key = MK_P;
@@ -830,7 +827,7 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
830827 }
831828 {
832829 // Is useful for Generals and Zero Hour.
833- MetaMapRec *map = TheMetaMap-> getMetaMapRec (GameMessage::MSG_META_DEMO_FREE_BUILD);
830+ MetaMapRec *map = getMetaMapRec (GameMessage::MSG_META_DEMO_FREE_BUILD);
834831 if (map->m_key == MK_NONE)
835832 {
836833 map->m_key = MK_B;
@@ -864,6 +861,20 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
864861#endif // defined(RTS_DEBUG)
865862}
866863
864+ // -------------------------------------------------------------------------------------------------
865+ void MetaMap::verifyMetaMap ()
866+ {
867+ #ifdef DEBUG_CRASHING
868+ for (const MetaMapRec *map = getFirstMetaMapRec (); map; map = map->m_next )
869+ {
870+ DEBUG_ASSERTCRASH (
871+ map->m_meta > GameMessage::MSG_BEGIN_META_MESSAGES &&
872+ map->m_meta < GameMessage::MSG_END_META_MESSAGES,
873+ (" hmm, expected only meta-msgs here" ));
874+ }
875+ #endif
876+ }
877+
867878// -------------------------------------------------------------------------------------------------
868879/* static*/ void INI::parseMetaMapDefinition ( INI* ini )
869880{
0 commit comments