static void PrintExprConstant(FLispString &out, ZCC_TreeNode *node) { ZCC_ExprConstant *enode = (ZCC_ExprConstant *)node; assert(enode->Operation == PEX_ConstValue); out.Open("expr-const"); if (enode->Type == TypeString) { PrintStringConst(out, *enode->StringVal); } else if (enode->Type == TypeFloat64) { out.AddFloat(enode->DoubleVal, false); } else if (enode->Type == TypeFloat32) { out.AddFloat(enode->DoubleVal, true); } else if (enode->Type == TypeName) { out.AddName(ENamedName(enode->IntVal)); } else if (enode->Type->isIntCompatible()) { out.AddInt(enode->IntVal, static_cast<PInt *>(enode->Type)->Unsigned); } out.Close(); }
PClassActor *P_GetSpawnableType(int spawnnum) { if (spawnnum < 0) { // A named arg from a UDMF map FName spawnname = FName(ENamedName(-spawnnum)); if (spawnname.IsValidName()) { return PClass::FindActor(spawnname); } } else { // A numbered arg from a Hexen or UDMF map PClassActor **type = SpawnableThings.CheckKey(spawnnum); if (type != NULL) { return *type; } } return NULL; }
void G_WorldDone (void) { cluster_info_t *nextcluster; cluster_info_t *thiscluster; gameaction = ga_worlddone; if (level.flags & LEVEL_CHANGEMAPCHEAT) return; thiscluster = FindClusterInfo (level.cluster); if (strncmp (nextlevel, "enDSeQ", 6) == 0) { FName endsequence = ENamedName(strtol(nextlevel.GetChars()+6, NULL, 16)); // Strife needs a special case here to choose between good and sad ending. Bad is handled elsewherw. if (endsequence == NAME_Inter_Strife) { if (players[0].mo->FindInventory (QuestItemClasses[24]) || players[0].mo->FindInventory (QuestItemClasses[27])) { endsequence = NAME_Inter_Strife_Good; } else { endsequence = NAME_Inter_Strife_Sad; } } F_StartFinale (thiscluster->MessageMusic, thiscluster->musicorder, thiscluster->cdtrack, thiscluster->cdid, thiscluster->FinaleFlat, thiscluster->ExitText, thiscluster->flags & CLUSTER_EXITTEXTINLUMP, thiscluster->flags & CLUSTER_FINALEPIC, thiscluster->flags & CLUSTER_LOOKUPEXITTEXT, true, endsequence); } else { nextcluster = FindClusterInfo (FindLevelInfo (nextlevel)->cluster); if (nextcluster->cluster != level.cluster && !deathmatch) { // Only start the finale if the next level's cluster is different // than the current one and we're not in deathmatch. if (nextcluster->EnterText.IsNotEmpty()) { F_StartFinale (nextcluster->MessageMusic, nextcluster->musicorder, nextcluster->cdtrack, nextcluster->cdid, nextcluster->FinaleFlat, nextcluster->EnterText, nextcluster->flags & CLUSTER_ENTERTEXTINLUMP, nextcluster->flags & CLUSTER_FINALEPIC, nextcluster->flags & CLUSTER_LOOKUPENTERTEXT, false); } else if (thiscluster->ExitText.IsNotEmpty()) { F_StartFinale (thiscluster->MessageMusic, thiscluster->musicorder, thiscluster->cdtrack, nextcluster->cdid, thiscluster->FinaleFlat, thiscluster->ExitText, thiscluster->flags & CLUSTER_EXITTEXTINLUMP, thiscluster->flags & CLUSTER_FINALEPIC, thiscluster->flags & CLUSTER_LOOKUPEXITTEXT, false); } } } }