C++ Jag har gjort klart ett litet adventurespel, behöver en hosting sida.

Permalänk
Medlem

C++ Jag har gjort klart ett litet adventurespel, behöver en hosting sida.

/edit/ Länk - http://sharpmeadow.se/download/escape from madness.rar

Har gjort ett kort adventure som skoluppgift och behöver en sida att hosta det på.
Det är ca 45MB packat.

Vilken sida är gratis och bäst med minst tjafs?

Gjort i C++ med Allegro biblioteket.

Permalänk
Medlem

Prova: http://www.mediafire.com/ , gör bara som sidan påvisar och drag-släpp din packade fil utan inloggingar. Spara länken efter uppladdning och dela ut den. Annars hitta någon vänlig själ som kan tänka sig hålla i dina filer på sin server.

Permalänk
Medlem

Jag kan hosta det på min 100/100-lina som är tillgänglig 24/7, skicka ett PM

Visa signatur

R7 5800X3D | MSI X470 GAMING PLUS | 32GB 3200MHz CL16 | ASUS GeForce RTX 4070 Super 12GB Dual EVO OC | Samsung 850 EVO 500GB | Samsung 860 EVO 1TB | Kingston A2000 1TB | 2x 3TB HDD | Seasonic FOCUS Plus 650W Gold | Acer 24" Predator XF240H 144Hz

Permalänk

testkör gärna spelet

Visa signatur

I5 2500K | 16GB DDR3 "1600" | CORSAIR FORCE GT 128GB | 38TB WD | |ASUS P8P67 DELUXE REV 3 | XFX 7970 | OCZ ZX 1000W | LG 27" | 6.0 STEREO

Permalänk
Medlem
Skrivet av toxicstone:

testkör gärna spelet

Jag med

Permalänk
Skrivet av toxicstone:

testkör gärna spelet

Samma

Permalänk
Medlem

Jag skulle också kunna tänka mig testköra.

Visa signatur

Ingen part kan vinna eller förlora en diskussion, då en diskussion är för gruppens gemensamma utveckling kring ett ämne.
►Jag förbehåller mig rätten att ha helt upp åt väggarna fel◄

Permalänk
Medlem
Skrivet av toxicstone:

testkör gärna spelet

Jag med

Visa signatur

Kom ihåg att ALLTID citera mig om du vill ha svar!

|CPU: AMD Ryzen 7 7800 3XD Kyld av: Cooler Master ML240L Core GPU: MSI GeForce RTX 4080 Super 16GB Ventus 3X OC Chassi: Corsair 4000D Airflow MOBO: Asus TUF Gaming A620-Pro WIFI Nätagg: Gigabyte Ultra Durable 850W V2 PCIe5 SSD: WD Black SN850X 1TB Gen4

Permalänk
Medlem

Har en server hos glesys.se och kan ge dig en mirror om du så vill.

Visa signatur

weeeee

Permalänk
Medlem

Ok här är länken.
http://www.mediafire.com/?e02bxs91cwhlmt3

Tack för hjälpen, det var otroligt smidigt. Tack också för erbjudandet att hosta.

Jag vill bara säga att spelet är inte fullt så cleant som det ser ut i menyen.
Sänk era förväntningar lite så blir ni inte besvikna.

MÅSTE HA:
1200x990 minst annars krachar det.
Ljud - gärna ganska högt

Permalänk
Medlem
Visa signatur

5700x3D | RTX 3080 | 2 TB M.2 | 32 GB RAM

Permalänk
Medlem

tnx dude

Permalänk
Medlem
Skrivet av Kriistoffer:

MÅSTE HA:
1200x990 minst annars krachar det.
Ljud - gärna ganska högt

Det kan ju vara bra att fixa problemet med upplösningen, många laptops som exempel kör 1280x800 eller liknande

Permalänk
Medlem

Det är igentligen inte ett problem, utan bilderna är den storleken och ska ses i naturlig storlek.

Jag visste vad läraren hade för upplösning innan jag startade och gjorde bilderna så stora jag kunde.

Permalänk
Medlem

Vill tillägga att jag kunde 0 om programmering innan detta.
Kunde typ:
10 PRINT "Hello World!"
20 GOTO 10

Sålänge jag får godkänt så är jag nöjd. Och det får jag, för det hade räckt med ett textadventure för att få godkännt, utan grafik och utan ljud.

Spelet är redan inskickat så jag la det här bara för att någon kanske tycker det är lite kul......

Permalänk
Medlem

Går ju inte "klara" spelet man kan ju inte klara draken oavsett vilket av dem 3 alternativen man väljer

Visa signatur

Ryzen 5 3600 | Gigabyte Aorus B450 Elite | 1TB m.2, 500GB kingston ssd | HyperX Fury RGB 3200mhz 16GB | NZXT H440W Silent Ultra | RTX 3070Ti 8GB

Permalänk
Medlem

Hmm.. Huvudmenyn buggar när man byter fönster, ex. till Firefox men inte när man väl startat spelet.
Med buggar menar jag att ljudet fastnar på en viss sekund och loopar =/ Liten heads up!

Permalänk
Medlem

Joda, det går att klara spelet. Om du väljer rätt.
Nu spoilade du lite da ..... grrr

du sa "draken"

Dold text

Jag vet att ljudet fastnar om man byter fönster, har inte hittat något fix för detta.
Du får spela, sen avsluta, och sen surfa

Permalänk
Medlem
Skrivet av Kriistoffer:

Joda, det går att klara spelet. Om du väljer rätt.
Nu spoilade du lite da ..... grrr

du sa "draken"

Dold text

Jag vet att ljudet fastnar om man byter fönster, har inte hittat något fix för detta.
Du får spela, sen avsluta, och sen surfa

oops ^^

Visa signatur

Ryzen 5 3600 | Gigabyte Aorus B450 Elite | 1TB m.2, 500GB kingston ssd | HyperX Fury RGB 3200mhz 16GB | NZXT H440W Silent Ultra | RTX 3070Ti 8GB

Permalänk
Medlem

Men testa igen. Det fungerar för alla andra att klara spelet.
Det är lätt gjort att man väljer samma när man väl är där igen.

Permalänk
Medlem
Skrivet av Träpuben:

Hmm.. Huvudmenyn buggar när man byter fönster, ex. till Firefox men inte när man väl startat spelet.
Med buggar menar jag att ljudet fastnar på en viss sekund och loopar =/ Liten heads up!

Tror jag vet varför nu.

Menymusiken är en .wav och spelmusiken är MIDI.

Permalänk
Medlem

kommer en till mirror strax ...

EDIT :: http://www.linjeinc.com/files/escape%20from%20madness.rar

Visa signatur

WS: Asus ROG Strix B550-I Gaming | R5 5600x | 64GB | RTX 3060 OC 12GB | Ghost S1 MKIII
NAS: Asus AS1104T - 1x12TB
Phone: Xiaomi Redmi Note 11 Pro 5G

Permalänk
Medlem

Ljudet fryser om man tabbar över till ngt annat D: för övrigt hade jag väldigt roligt åt de olika sätten att då på ^.^

Permalänk
Medlem
Skrivet av Kriistoffer:

Men testa igen. Det fungerar för alla andra att klara spelet.
Det är lätt gjort att man väljer samma när man väl är där igen.

Men det finns ju 3 alternativ när man är framme vid draken och ja har testa alla 3 alternativ och det blir gameover varje gång

Visa signatur

Ryzen 5 3600 | Gigabyte Aorus B450 Elite | 1TB m.2, 500GB kingston ssd | HyperX Fury RGB 3200mhz 16GB | NZXT H440W Silent Ultra | RTX 3070Ti 8GB

Permalänk
Medlem

Finns det någon chans att källkoden delas ut?

Permalänk
Medlem
Skrivet av mOOpiTh:

Men det finns ju 3 alternativ när man är framme vid draken och ja har testa alla 3 alternativ och det blir gameover varje gång

Någon annan som har detta problem?

Jag har inte sett det problemet någon gång så jag vet inte alls vad det kan vara.

Permalänk
Medlem
Skrivet av P1raten:

Finns det någon chans att källkoden delas ut?

Javisst.

Först ska jag säga att jag hade tänkt skriva det i C, men eftersom jag ville ha bilder med så var jag tvungen att använda mig av Allegro. Detta gjorde så att scanf inte funkar, det funkar bara i konsolfönstret.
Dessutom fungerar inte funktioner inne i spelet för man har en sk. gameloop där hele spelet måste vara innanför.

Detta gör att typ hela spelet är inne i main, och det är mycket Allegro-specifika kommandon.

Så i C såg spelmotorn ut såhär:

// Spill // #include <stdlib.h> #include <stdio.h> #include <tchar.h> void Display_intro( void ); void Display_tier1 ( void ); void Display_choices1 ( void ); int GetChoice( int min, int max ); void Display_actions1( int Choice ); int _tmain(int argc, _TCHAR* argv[]) { int Choice; Display_intro(); Display_tier1(); Display_choices1(); Choice = GetChoice( 1, 3 ); Display_actions1( Choice ); return 0; } void Display_intro( void ) { printf( "Intro\n" ); } void Display_tier1 ( void ) { printf( "\n\nSomething is shown\n\n" ); } void Display_choices1 ( void ) { printf( "You may choose:\n" ); printf( "1. Do this\n" ); printf( "2. Do that\n" ); printf( "3. Do all of the above\n" ); } int GetChoice( int min, int max ) { int Choice; do { printf( "\nYour choice? " ); scanf( "%d", &Choice ); } while( Choice < min || Choice > max ); return( Choice ); } void Display_actions1( int Choice ) { if ( Choice == 1 ) { printf( "\nSomething happens!\n" ); printf( "You are surprised.\n" ); } else if ( Choice == 2 ) { printf( "\nSomething else happens.\n" ); printf( "You are not very surprised.\n" ); printf( "But a little.\n" ); } else if ( Choice ==3 ) { printf( "\nYou are both suprised and not surprised?!\n" ); printf( "What an eerie feeling.\n" ); } else { printf( "\nYou chose a choice that is not a choice.\n" ); printf( "You smell and then you die.\n" ); exit (0); } }

Och med Allegro ser hela spelet ut såhär:

#include <allegro.h> #include <cstdlib> #include <ctime> #include <string> void initAllegro(); // Function to initialize Allegro volatile long speed_counter = 0; // Long integer stores value of speedcounter void increment_speed_counter(); // Function to increment the speed counter volatile int closeWindow = false; volatile long timer = 0; void Increment(){timer++;} END_OF_FUNCTION(Increment); int main(int argc, char *argv[]) { initAllegro(); increment_speed_counter(); FONT *myfont7 = load_font("myfont7.pcx", NULL, NULL); // Load font FONT *m2 = load_font("m2.pcx", NULL, NULL); BITMAP *buffer = create_bitmap(1200,983); // create buffer of 1200x983 BITMAP *menu = load_bitmap("menu.bmp", NULL); // load bitmap BITMAP *about = load_bitmap("about.bmp",NULL); BITMAP *me = load_bitmap("me.bmp",NULL); BITMAP *swamp = load_bitmap("swamp.bmp",NULL); BITMAP *road = load_bitmap("road.bmp",NULL); BITMAP *raft = load_bitmap("raft.bmp",NULL); BITMAP *book = load_bitmap("book.bmp",NULL); BITMAP *cave = load_bitmap("cave.bmp",NULL); BITMAP *dragon1 = load_bitmap("dragon1.bmp",NULL); BITMAP *dragon2 = load_bitmap("dragon2.bmp",NULL); BITMAP *dragon3 = load_bitmap("dragon3.bmp",NULL); BITMAP *dragon4 = load_bitmap("dragon4.bmp",NULL); BITMAP *end = load_bitmap("end.bmp",NULL); BITMAP *raftdead = load_bitmap("raftdead.bmp",NULL); BITMAP *swampdead = load_bitmap("swampdead.bmp",NULL); BITMAP *roaddead = load_bitmap("roaddead.bmp",NULL); BITMAP *cavedead = load_bitmap("cavedead.bmp",NULL); BITMAP *bookdead = load_bitmap("bookdead.bmp",NULL); BITMAP *tummy = load_bitmap("tummy.bmp",NULL); BITMAP *Bunny = load_bitmap ("Bunny.bmp", NULL); MIDI *gamemusic = load_midi("gamemusic.mid"); // load midi MIDI *ending = load_midi("ending.mid"); MIDI *gameover = load_midi("gameover.mid"); MIDI *hack = load_midi("hack.mid"); SAMPLE *menumusic = load_sample("menumusic.wav"); // load wav SAMPLE *bookdeadwav = load_sample("bookdeadwav.wav"); SAMPLE *cavedead1 = load_sample("cavedead1.wav"); SAMPLE *drown = load_sample("drown.wav"); SAMPLE *error1 = load_sample("error1.wav"); SAMPLE *error2 = load_sample("error2.wav"); SAMPLE *heartbeat = load_sample("heartbeat.wav"); int song_frequency = 1000; // how fast the music is playing bool done = false; bool keydown = false; int Screen = 1; // Bunny animation: enum Source {Left, Right}; int Position[2] = {450, 850}; // x, y int currentFrame[2] = {0, Right}; // start position int Frames[2] = {3, 2}; // how many frames in the picture int Dimensions[2] = {Bunny->w / Frames[0], Bunny->h / Frames[1]}; // where is the different animations in the picture int moveSpeed = 3; int switchFrame = 8; // switch from image to image int frameCounter = 0; // counting up to switchframe bool isActive; // check to see if you press the button to activate sprite // end Bunny animation while (!done) // start of gameloop { while (speed_counter > 0) // start of speedcounter { if (Screen == 1 && keydown == false) // menu screen { stop_midi(); play_sample(menumusic, 50, 128, song_frequency, true); if (key[KEY_1]) { Screen = 3; play_midi(gamemusic, true);} // start game if (key[KEY_2]) { Screen = 2;} // about if (key[KEY_3]) { done = true; } // quit } else if (Screen == 2 && keydown == false) //About (Screen with Bunny animation) { if (key[KEY_ESC]) { Screen = 1; } //esc = go back to menu screen. // here starts bunny animation stuff isActive = true; if(key[KEY_RIGHT]) { Position[0] += moveSpeed; currentFrame[1] = Right; } else if(key[KEY_LEFT]) { Position[0] -= moveSpeed; currentFrame[1] = Left; } else isActive = false; if(isActive) { frameCounter += 1; // increment framecounter by 1 if(frameCounter >= switchFrame) { currentFrame[0] += Dimensions[0]; // where to start drawing from, and jump to next frame frameCounter = 0; // reset framecounter, so it cycles through the images } if (currentFrame[0] >= Bunny->w) // if its drawing last picture currentFrame[0] = 0; // reset } else { currentFrame[0] = 0; // if not active, reset to 0 frameCounter = 0; } timer--; } // end bunny animation else if (Screen == 3 && keydown == false) // raft { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 4; } // swamp else if (key[KEY_2]) { Screen = 14; play_sample(drown, 255, 128, 1000, 0); play_midi(gameover, true);} // death1 - raftdead else if (key[KEY_3]) { Screen = 4; } } else if (Screen == 4 && keydown == false) // swamp { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 15; play_sample(drown, 255, 128, 1000, 0); play_midi(gameover, true);} // death2 - swampdead else if (key[KEY_2]) { Screen = 15; play_sample(drown, 255, 128, 1000, 0); play_midi(gameover, true);} // death2 else if (key[KEY_3]) { Screen = 5; } // road } else if (Screen == 5 && keydown == false) // road { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 6; } // cave1 else if (key[KEY_2]) { Screen = 16; play_sample(heartbeat, 255, 128, 1000, 0); play_midi(gameover, true); } // death3 - roaddead else if (key[KEY_3]) { Screen = 7; } // cave2 } else if (Screen == 6 && keydown == false) // cave1 { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 17; play_sample(cavedead1, 255, 128, 1000, 0);play_midi(gameover, true); } // death4 - cavedead else if (key[KEY_2]) { Screen = 8; } // book else if (key[KEY_3]) { Screen = 18; play_sample(cavedead1, 255, 128, 1000, 0); play_midi(gameover, true);} // death5 - cavedead } else if (Screen == 7 && keydown == false) // cave2 { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 17; play_sample(cavedead1, 255, 128, 1000, 0); play_midi(gameover, true);} // death4 else if (key[KEY_2]) { Screen = 8; } // book else if (key[KEY_3]) { Screen = 18; play_sample(cavedead1, 255, 128, 1000, 0); play_midi(gameover, true);} // death5 } else if (Screen == 8 && keydown == false) // book { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 19; play_sample(bookdeadwav, 255, 128, 1000, 0); play_midi(gameover, true);} // death6 bookdead else if (key[KEY_2]) { Screen = 9; } // dragon else if (key[KEY_3]) { Screen = 20; play_sample(cavedead1, 255, 128, 1000, 0); play_midi(gameover, true);} // death7 cavedead } else if (Screen == 9 && keydown == false) // dragon { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 10; } // dragon2 else if (key[KEY_2]) { Screen = 10; } // dragon2 else if (key[KEY_3]) { Screen = 21; play_sample(heartbeat, 255, 128, 1000, 0); play_midi(gameover, true);} // death8 - tummy } else if (Screen == 10 && keydown == false) // dragon2 { if (key[KEY_ESC]) { Screen = 1; } if (key[KEY_1]) { Screen = 11; play_sample(error2, 255, 0, 1000, 0); play_sample(error1, 255, 255, 1000, 0); play_sample(error2, 255, 0, 1000, 0); play_sample(error1, 255, 255, 1000, 0); play_midi(hack, true);} //dragon3 } else if (Screen == 11 && keydown == false) // dragon3 { if (key[KEY_ESC]) { Screen = 1; } if (key[KEY_1]) { Screen = 12; play_midi(gamemusic, true);} // dragon4 } else if (Screen == 12 && keydown == false) // dragon4 { if (key[KEY_ESC]) { Screen = 1; } else if (key[KEY_1]) { Screen = 22; play_sample(heartbeat, 255, 128, 1000, 0); play_midi(gameover, true);} // death9 - tummy else if (key[KEY_2]) { Screen = 22; play_sample(heartbeat, 255, 128, 1000, 0); play_midi(gameover, true);} // death9 else if (key[KEY_3]) { Screen = 13; play_midi(ending, true);} // end } else if (Screen == 13 && keydown == false) // end { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 14 && keydown == false) // death1 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 15 && keydown == false) // death2 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 16 && keydown == false) // death3 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 17 && keydown == false) // death4 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 18 && keydown == false) // death5 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 19 && keydown == false) // death6 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 20 && keydown == false) // death7 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 21 && keydown == false) // death8 { if (key[KEY_ESC]) { Screen = 1; } } else if (Screen == 22 && keydown == false) // death9 { if (key[KEY_ESC]) { Screen = 1; } } if(!key[KEY_1] && !key[KEY_2] && !key[KEY_3]) // handle single keypress, keydown = false; // so one have to release key before its registering again else keydown = true; speed_counter--; // end of speedcounter } if (Screen == 1) // menu { draw_sprite(buffer, menu, 0,0); textout_ex(buffer,myfont7,"Press (1) to start the game.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Press (2) for about screen.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Press (3) to quit.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"You can always press (esc) to return to this screen",30,860,makecol(255,255,255), -1 ); } else if (Screen == 2) // about { draw_sprite(buffer, about, 0,0); draw_sprite(buffer, me, 770,100); textout_ex(buffer,myfont7,"My name is Christoffer and I am 37 years old. Thats me in ASCII -->",30,160,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"This little game is made as a school project for The Noroff Institute.",30,185,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"It is written in C with the Allegro library.",30,210,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"The graphics are drawn by me with charcoal, except for the boss ",30,255,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"who is made on a Wacom tablet by my GF. I tried to paint with the ",30,280,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"tablet myself, but the pictures came out even worse then they are now. ",30,305,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"(believe it or not)",30,330,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"The audio is taken from free libraries around the net, and they",30,355,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"are in .WAV and .MID format.",30,380,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"The game is a tribute to the oldschool textadventures,",30,425,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"now ''improved'' with graphics ^^",30,450,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"You navigate the game with the 1, 2 or 3 numberbuttons,",30,475,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"and you can always press the esc-key to return to main menu.",30,500,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Oh and you can walk the little bunny down there with the key-left and key-right.",30,545,makecol(255,255,255), -1 ); masked_blit(Bunny, buffer, currentFrame[0], currentFrame[1] * Dimensions[1], Position[0], Position[1], Dimensions[0], Dimensions[1]); // draw the bunny textout_ex(buffer,myfont7,"Press (esc) to return to menu.",30,770,makecol(255,255,255), -1 ); } else if (Screen == 3) // raft { stop_sample(menumusic); draw_sprite(buffer, raft, 0, 0); textout_ex(buffer,myfont7,"You awaken on a raft gliding down the river. You dont remember how you came here, or even what your name is.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Suddenly the raft comes to an abrupt halt, it seems to have stopped on a big rock by the riverside.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"What do you do:",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Carefully climb over the rock and into the dark woods.",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. Heroically jump to the shore.",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. Go into the water and try to reach the edge and climb up, then go into the woods.",40,920,makecol(255,255,255), -1 ); } else if (Screen == 4) // swamp { draw_sprite(buffer, swamp, 0, 0); textout_ex(buffer,myfont7,"You stumble across the dens woods, still trying to figure out what happened to you. Nothing about your past ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"seems to enter your mind and all of a sudden you feel wet on the feet. You have come to the edge of a swamp.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"How do you proceed:",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Run straight across the swamp and re-enter the dark woods on the other side.",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. Walk on all four across the swamp - that should be easy.",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. Walk across but thread only on the grass.",40,920,makecol(255,255,255), -1 ); } else if (Screen == 5) // road { draw_sprite(buffer, road, 0, 0); textout_ex(buffer,m2,"You make it across and continue your travel through the dense vegetation, still confused, tired, hungry and weak.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"From out of nowhere a road apperas before you. You must have been deep in thought about what happened to you and",30,795,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"didn't notice how the woods became more and more open. Focus. In the middle of the road lies a golden key.",30,820,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"What is your choice:",30,850,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"1. Damn it all to hell! What would I ever need a key for. Kick the key as hard as you can!",40,875,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"2. You are actually very hungry - you eat the key.",40,900,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"3. You pick up the key.",40,925,makecol(255,255,255), -1 ); } else if (Screen == 6) // cave1 { draw_sprite(buffer, cave, 0, 0); textout_ex(buffer,myfont7,"The key flings sideways and into the woods. You cant even kick a key straight....",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"You follow it and see a cave entrance. This was not visible from the road. There is a big rock above the entrance.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"This cant be good:",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Throw yourself into the darkness as fast as humanly possible - speed is good!",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. Slowly walk into the cave.",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. Go and stand directly under the rock to inspect if its safe to walk under the rock.",40,920,makecol(255,255,255), -1 ); } else if (Screen == 7) // cave2 { draw_sprite(buffer, cave, 0, 0); textout_ex(buffer,myfont7,"When you bend down and pick up the key you see something in the woods on the side of the road. ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Its an entrance to a cave. When you aproach it you notice that It seems to be a big rock above the entrance.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"This cant be good:",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Throw yourself into the darkness as fast as humanly possible - speed is good!",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. Slowly walk into the cave.",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. Go and stand directly under the rock to inspect if its safe to walk under the rock.",40,920,makecol(255,255,255), -1 ); } else if (Screen == 8) // book { draw_sprite(buffer, book, 0, 0); textout_ex(buffer,myfont7,"You walk about 20 meters into the cave and notice a candle in a niche. Underneath it is a book bound in leather.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"You pick it up and start to read. The ink is wet and its written in a wierd language that you cant understand.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"What now:",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Mmmm fresh ink - you eat the book.",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. Place the book back on the shelf and continue deep inside the cave.",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. Fresh ink....this is too wierd. You throw the book away and run out from the cave",40,920,makecol(255,255,255), -1 ); } else if (Screen == 9) // dragon { draw_sprite(buffer, dragon1, 0, 0); textout_ex(buffer,m2,"Is this a dream?? In the end of the cave you see a living breathing firespewing dragon!! ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"Ok its not actually spewing fire, its really sound asleep. But still, a dragon!? ",30,795,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"The dragon is lying on top of a big pile of gold just like in the fairytales.",30,820,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"This should be good:",30,850,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"1. Wake the dragon (sounds like a good idea)",40,875,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"2. Dont wake the dragon (duh)",40,900,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"3. Take all the money from the dragon (are you kidding?)",40,925,makecol(255,255,255), -1 ); } else if (Screen == 10) // dragon2 { draw_sprite(buffer, dragon2, 0, 0); textout_ex(buffer,myfont7,"As soon as you move, the dragon instantly awakes, wow he can talk!",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"- Who in the name of ..........are you? I'm Natchayullucaca. Says the dragon with a rumbling voice.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"- It doesn't really matter, I will now mindmeld with you (vulcan style) and boil your brain, get ready for it!! ",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Wow, this dragon has some issues, only one thing to do:",30,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. Quit the game.",40,890,makecol(255,255,255), -1 ); } else if (Screen == 11) // dragon3 { draw_sprite(buffer, dragon3, 0, 0); textout_ex(buffer,myfont7,"[dragon_mastah@root]c:/specialshell/trojan.msx",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"ps aux | kill firewall",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"some leet hacker command...",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"load backdoor mystajli.doom -A -dOiT",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"if killswitch == yes then goto special hightech -(use all of the 640k memory)",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"/me trying !@$#%",40,920,makecol(255,255,255), -1 ); } else if (Screen == 12) // dragon4 { draw_sprite(buffer, dragon4, 0, 0); textout_ex(buffer,myfont7,"-Oh....it seems you might have a newer OS then OS/2 Warp (wich I use) so I cant really acces your drive.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Since you are very leet and all, I will give you 1 chance to escape. If you can say my name backwards you will ",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"be teleported to freedom. If not......well, lets just say we will become close.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"1. acaculluyachtaN",40,860,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"2. a-KAKA! *cough* taN...",40,890,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"3. acaculluyahctaN",40,920,makecol(255,255,255), -1 ); } else if (Screen == 13) // end { draw_sprite(buffer, end, 0, 0); textout_ex(buffer,myfont7,"You pop down on a road. You see a town in the distance, its not far, you will make it. ",50,775,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"As you walk closer you think about all that has happened. Was it just a dream? ",50,805,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Still fuzzy in the head from everything you feel happy. Yes its truly a joy to be alive!",50,835,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"The wind is blowing in your hair and the sun is smiling on your face. ",50,865,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"Cant wait to take a bath, eat some and have a good night sleep. The future is looking bright.",50,895,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 14) // death1 { draw_sprite(buffer, raftdead, 0, 0); textout_ex(buffer,myfont7,"Just as you jump you slip on the raft and fall into the water. The current is too strong for your weak body",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"and the cold water numbs your brain as you drown. May your soul rest in peace.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 15) // death2 { draw_sprite(buffer, swampdead, 0, 0); textout_ex(buffer,myfont7,"As you try and make it across, the ground is just too loose, you sink deeper and deeper and due to exhaustion",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"there is nothing more you can do but think about how bad it smells and how annoying the insects are when you",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"slowly drown and leave no trace.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 16) // death3 { draw_sprite(buffer, roaddead, 0, 0); textout_ex(buffer,myfont7,"You put the key into your mouth, shove it down your throat and choke on it. You die. ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"There is no sense in eating a big golden key and this is what happens. Better luck next time.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 17) // death4 { draw_sprite(buffer, cavedead, 0, 0); textout_ex(buffer,myfont7,"You try to jump forward but stumble on your own feet, diving straight into the cave wall, resulting in the big rock ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"falling down on you. Ouch, it really hurts inside the brain as you die, fortunately its kinda quick.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 18) // death5 { draw_sprite(buffer, cavedead, 0, 0); textout_ex(buffer,myfont7,"Really? Stand directly under a rock? How did you ever make it this far is beyond me. The rock falls on you, ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"crushes you, and you die instantly. There is no real pain, but c'mon, you could have done better.",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 19) // death6 { draw_sprite(buffer, bookdead, 0, 0); textout_ex(buffer,myfont7,"Your tummy is wrong, a book is not food no matter how fresh the ink is. Also, the ink is poisonous, and",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"while you fall, your brain interprets the poison as numerous wierd colors. The last thing you hear before you",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"die is the voice of an hungry stomach, displeased with the chain of events.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 20) // death7 { draw_sprite(buffer, cavedead, 0, 0); textout_ex(buffer,myfont7,"While running out from the cave you acidentally hit the sidewall. Uh-oh the big rock. Yes, it falls on you,",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"snapping every bone in your spine and pins you to the ground in a big pile of FAIL! ",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"May you have better luck in the afterlife.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 21) // death8 { draw_sprite(buffer, tummy, 0, 0); textout_ex(buffer,myfont7,"You grab all the golden coins as you can, trying to fit them inside your pockets. You dont even notice when the ",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"dragon wakes up, and in one swift motion eats you alive. Well this sucks. Atleast you have some gold, its not ",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"much but its the only kind of poor help you have while slowly being digested.",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"May your kinda sucky soul rest in peace. (sorry but really.....take stuff from a dragon?)",30,860,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } else if (Screen == 22) // death9 { draw_sprite(buffer, tummy, 0, 0); textout_ex(buffer,myfont7,"'moms a-nom nom' is the sound when a dragon eats you alive. You really should pay more attention to detail.",30,770,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"At least you dont have to be afraid of the dragon eating you anymore....since it already happened. ",30,800,makecol(255,255,255), -1 ); textout_ex(buffer,myfont7,"You also lie on top of a big pile of gold.....if thats any comfort. ",30,830,makecol(255,255,255), -1 ); textout_ex(buffer,m2,"-:( press (esc) to return to main menu ):-",400,940,makecol(255,255,255), -1 ); } acquire_screen(); // get control of the screen blit(buffer, screen, 0, 0, 0, 0, 1200, 983); // draw from the buffer to the screen clear_bitmap(buffer); // clear the buffer bitmap release_screen(); // release control of the screen } // while not done destroy_bitmap(menu); // here we destroy everything loaded- destroy_bitmap(about);// so there is no memory leaks. destroy_bitmap(me); destroy_bitmap(road); destroy_bitmap(swamp); destroy_bitmap(raft); destroy_bitmap(end); destroy_bitmap(book); destroy_bitmap(cave); destroy_bitmap(dragon1); destroy_bitmap(dragon2); destroy_bitmap(dragon3); destroy_bitmap(dragon4); destroy_bitmap(raftdead); destroy_bitmap(roaddead); destroy_bitmap(cavedead); destroy_bitmap(bookdead); destroy_bitmap(swampdead); destroy_bitmap(tummy); destroy_bitmap(buffer); destroy_bitmap(Bunny); destroy_font(myfont7); destroy_font(m2); destroy_sample(menumusic); destroy_sample(bookdeadwav); destroy_sample(cavedead1); destroy_sample(drown); destroy_sample(error1); destroy_sample(error2); destroy_sample(heartbeat); destroy_midi(ending); destroy_midi(gamemusic); destroy_midi(gameover); destroy_midi(hack); allegro_exit(); // safety for compatability return 0; } END_OF_MAIN(); // Allegro specific void initAllegro() // function to initialize Allegro { allegro_init(); install_keyboard(); install_timer(); install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, "A"); LOCK_VARIABLE(speed_counter); //sets the timer - to regulate speed LOCK_FUNCTION(increment_speed_counter); install_int_ex(increment_speed_counter, BPS_TO_TIMER(60));//Set BPS (60 frames per second) set_color_depth( 32 ); set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1200, 983, 0, 0); set_window_title ("Escape From Madness"); LOCK_FUNCTION(Increment); // Locking because of interrupts, LOCK_VARIABLE(counter); // so it works as expected install_int_ex(Increment, BPS_TO_TIMER(60)); // 60 Beats per second (refreshrate) } END_OF_FUNCTION(initAllegro); void increment_speed_counter() { speed_counter++; } END_OF_FUNCTION(increment_speed_counter);

Permalänk
Medlem

provat lite snabbt på lunchen på jobbet, funkar bra i Win XP också

Visa signatur

|Workstation: AMD Ryzen 9 7900X 4.7GHz | ASRock X670E | AMD Radeon 7900 XT | 32GB DDR5 | NVMe 2.0TB | HDD 4.0TB |
|Fedora Srv VM Host: AMD Threadripper 2920x | ASUS PRIME X399-A | 24GB DDR4 | 10TB Storage |
|HTPC: AMD Ryzen 3 2200G 3.7 GHz | Gigabyte B450M DS3H | Radeon Vega 8 | 8GB RAM | SSD 120GB | *Test rig för div Linux distar, drivers m.m.

Permalänk
Medlem

Koden ligger också i "src" -mappen i rar-filen.

Det är bara en justering jag gjort som inte är med i den koden, och det är att jag la alla filer i sina egna kataloger.
Av någon anledning fungerade det inte att kompilera i den versionen av DEV jag hade så jag har kompilerat det på en annan version....glömde sen att lägga över senaste koden och har inte den datorn här så...

Men som sagt det är bara "pics/menu.bmp" istället för "menu.bmp" som är skillnaden.

Permalänk
Medlem
Visa signatur

weeeee