From 3bc66b2b9013e6dee2d11abe09f24ffd99e65966 Mon Sep 17 00:00:00 2001 From: Miguel Angel Astor Romero Date: Tue, 15 Jan 2013 13:53:40 -0430 Subject: [PATCH] Added the story screen to MenuState. --- gfx/ForeverAlone/Idle_Front_face_hidden.png | Bin 0 -> 5986 bytes menu.py | 183 ++++++++++++++++++-- score.py | 7 +- 3 files changed, 176 insertions(+), 14 deletions(-) create mode 100644 gfx/ForeverAlone/Idle_Front_face_hidden.png diff --git a/gfx/ForeverAlone/Idle_Front_face_hidden.png b/gfx/ForeverAlone/Idle_Front_face_hidden.png new file mode 100644 index 0000000000000000000000000000000000000000..9604cff6da0701ff4e7de0be5b791cc11bf90b23 GIT binary patch literal 5986 zcmV-o7oF&dP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*Y= z5f>`Ns~E5V02bm&L_t(|+U=Zod|cI)$G`WL=_8Fa>XL0)wk+GY;D*5lV?&BJKuk%& zp@xM7NMRGwcOl8zfdC=NW)n8M$!@YFv?LHG5ZZ=N9Bdrp1};LjBwNMmWqNz>-TmW@ zgoWiITMlxf^ZCr@GoR1Q-22}B-E;2m{LXnJ7+dBBz6pHsJ;6DAf98$yjGU>$G?NG+ z08mgtanP^E_-yS@`9<9`OqftWe!dUOl7j=Ono6iYN@HUu0A;QM+?tF1(N=Wb#q@$I zR82?M9Yp%O+11;?x#yk1_r7-vUau3=v~W5dEM4+XOh^>)(%Eb9y9>cgfwTYtNF*kf zln5bE6rKO;+QOG=e=fI&8xe4WgrEPl7Ec>1C<<^%xEJ{JO%vY7H>+1u>M9rlB!Gp9 zG~)!MgD(`mpGWGS=Yy9nVa>l@M=X{Ez~Rv8>gwmSpL>AD{hfSk+BK{!TZBt@al_{O z39A{NTzm&o5$KvutiO++?E3@vtbc-EJ@ztp-Su%aEswQpe@s_bh?}Oo55L2QWkiR+ zb|H{bVw!2*TeyhdxQn^H_GjXE9h>eI;Fs{9K>Ad#p*n`Vavk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#or*90M7zn2=%nkRJ&0cM(U`5A_T4VTSY1nPG&v(x#O540eoCq zCcT}FLRE)<5={t&c(jMshOJ;*fv0kM|+n`%annF3Nf75XqtlqdtQ}2 zZTkTJ3%Gj(b94jKjdXIBFHnN+a34Ot?x1<^W*HB6N3d(NZ;qu!QaF9=>qr^y>)bD* zp$<8m1<93nt;M>OH z;+$?^J_}rCWKvxRYB!2VU)w;cKu7Z)nMy>+hQG#>SdUH7{!Y@#*x(tQN=9jVYm-RE zLs8(Wv36FTu3)NJF~OgV_0zEH6`J>MqQ9%j4u4X<2K@dc#y5c1lG#$5P*hT}5cNA= zAQtWdcrly*j@wCE1@K1(YFI*81Mh`UWL5x}H45{r7DC9Wb5_X88Rtre(<@a?lTNR9 zKtcHNI20#m%Ybf0Rb|1%N^8cl6>{E1t7Og6Wzv%ykO(1x?~Q_@G^Wjdsa$cu)qQ#fv+3(GJ>IvxkR4YK6opV{2hrXh3%hM2e3Emf zfcuisNW8bTMGVf9O-}~imsHnChufoKi}dbsFpuvD_@vLDgFi1{40hlh0%STCrFrKL ziLH^oFiP{j0zBH&w4ct#dZ{RHONRr1YPv4GfdIfFz&{S=vCRTrjYT5FV^R6Gv)Xtj zLjCO9{2J1-ny~*MX|!sJY2cqTspQM;b+w{-*PED`G^Sxl%QTTvVwsjyG>t3?a*U-= zHkNG(@S@A-cNA7u*$A5k>12}L)@ICf`W4`_*rNAnTQ0V~yI4`xNxu97G^YbaQAx(4 z#Cm&?()vAcEvMigD*qP291sa^z^*^4*=TYA_;28Gj{c{MCu=%(y>l)w9SC6mW2cHO z>wO24~q>V>9 Qj{pDw07*qoM6N<$g0voKA^-pY literal 0 HcmV?d00001 diff --git a/menu.py b/menu.py index 754b408..7030c4f 100644 --- a/menu.py +++ b/menu.py @@ -1,8 +1,7 @@ +# -*- coding: latin-1 -*- ########################################### # Created on 1-7-2013. Miguel Angel Astor # ########################################### -# Update score database: -# UPDATE score SET player_name = ?, score = ? WHERE _id IN (SELECT _id FROM score WHERE score IN (SELECT MIN(score) FROM score)) import pygame try: import android @@ -23,8 +22,8 @@ class MenuState(BaseState): self.next_transition = VALID_STATES['STAY'] self.current_menu = MENUS['MAIN'] - self.intro_time = 0 - self.intro_max_time = 5000 # Miliseconds. + self.story_time = 0 + self.story_timeout = 7000 # 7 seconds. self.then = 0 self.cursor_x = 0 @@ -60,21 +59,89 @@ class MenuState(BaseState): self.back_button.set_position([self.scoreboard.get_position()[0] + image.get_width() - (image.get_width() // 10), pygame.display.Info().current_h // 2]) - screen_prop = (42.0 / 768.0) + font_size = 42 + screen_prop = (float(font_size) / 768.0) screen_fract = (float(pygame.display.Info().current_h) * screen_prop) / 768.0 scale_factor = screen_fract / screen_prop + self.font = pygame.font.Font('font/ProfaisalEliteRiqa/Profaisal-EliteRiqaV1.0.ttf', int(font_size * scale_factor)) - self.font = pygame.font.Font('font/ProfaisalEliteRiqa/Profaisal-EliteRiqaV1.0.ttf', int(42.0 * scale_factor)) + # Score labels. self.score_1 = None self.score_2 = None self.score_3 = None self.score_4 = None self.score_5 = None + + # Story labels. + font_size = 22 + screen_prop = (float(font_size) / 768.0) + screen_fract = (float(pygame.display.Info().current_h) * screen_prop) / 768.0 + scale_factor = screen_fract / screen_prop + font_small = pygame.font.Font('font/ProfaisalEliteRiqa/Profaisal-EliteRiqaV1.0.ttf', int(font_size * scale_factor)) + + self.story_1 = font_small.render("Este es Moncho, nuestro heroe...", True, (0, 0, 0)) + self.story_2 = font_small.render("Moncho ama a toda la gente, gente como esta...", True, (0, 0, 0)) + self.story_3 = font_small.render("Ama tanto a la gente que solo quiere abrazarlos...", True, (0, 0, 0)) + self.story_5 = font_small.render("Aunque, tal vez Moncho no ame a TODA la gente...", True, (0, 0, 0)) + + font_size = 35 + screen_prop = (float(font_size) / 768.0) + screen_fract = (float(pygame.display.Info().current_h) * screen_prop) / 768.0 + scale_factor = screen_fract / screen_prop + font_big = pygame.font.Font('font/ProfaisalEliteRiqa/Profaisal-EliteRiqaV1.0.ttf', int(font_size * scale_factor)) + + self.story_4 = font_big.render("ĦĦĦABRAZARLOS HASTA QUE EXPLOTEN!!!", True, (255, 0, 0)) - self.score_text_x = int(float(image.get_width()) * 0.183) + self.scoreboard.rect.left + self.interrogation = font_big.render("?", True, (0, 0, 0)) + + self.player_label_1 = cached_image_loader.get_image_to_screen_percent('gfx/Player/player_idle_front.png') + self.player_label_2 = cached_image_loader.get_image_to_screen_percent('gfx/Player/player_idle_front_HUG.png') + + self.he_huggable_1 = cached_image_loader.get_image_to_screen_percent('gfx/HeHuggable/Idle_front.png') + self.he_huggable_2 = cached_image_loader.get_image_to_screen_percent('gfx/HeHuggable/Walking_front_1_scared.png') + + self.she_huggable_1 = cached_image_loader.get_image_to_screen_percent('gfx/SheHuggable/Idle_front.png') + self.she_huggable_2 = cached_image_loader.get_image_to_screen_percent('gfx/SheHuggable/Walking_front_2_scared.png') + + self.explosion = cached_image_loader.get_image_to_screen_percent('gfx/Explosion2.png') + self.mystery_guy = cached_image_loader.get_image_to_screen_percent('gfx/ForeverAlone/Idle_Front_face_hidden.png') + + self.score_text_x = int(float(image.get_width()) * 0.183) + self.scoreboard.rect.left # image holds the scoreboard graphic. self.score_text_1_y = int(float(image.get_height()) * 0.300) + self.scoreboard.rect.top self.score_text_inc = int(float(image.get_height()) * 0.112) + self.story_1_x = int((float(pygame.display.Info().current_w) * 177.0 ) / 1024.0) + self.story_1_y = int((float(pygame.display.Info().current_h) * 109.0 ) / 768.0) + self.story_2_x = int((float(pygame.display.Info().current_w) * 211.0 ) / 1024.0) + self.story_2_y = int((float(pygame.display.Info().current_h) * 223.0 ) / 768.0) + self.story_3_x = int((float(pygame.display.Info().current_w) * 240.0 ) / 1024.0) + self.story_3_y = int((float(pygame.display.Info().current_h) * 346.0 ) / 768.0) + self.story_4_x = int((float(pygame.display.Info().current_w) * 38.0 ) / 1024.0) + self.story_4_y = int((float(pygame.display.Info().current_h) * 517.0 ) / 768.0) + self.story_5_x = int((float(pygame.display.Info().current_w) * 244.0 ) / 1024.0) + self.story_5_y = int((float(pygame.display.Info().current_h) * 710.0 ) / 768.0) + self.interr_x = int((float(pygame.display.Info().current_w) * 173.0 ) / 1024.0) + self.interr_y = int((float(pygame.display.Info().current_h) * 650.0 ) / 768.0) + + self.moncho_1_x = int((float(pygame.display.Info().current_w) * 49.0 ) / 1024.0) + self.moncho_1_y = int((float(pygame.display.Info().current_h) * 49.0 ) / 768.0) + self.moncho_2_x = int((float(pygame.display.Info().current_w) * 98.0 ) / 1024.0) + self.moncho_2_y = int((float(pygame.display.Info().current_h) * 293.0 ) / 768.0) + self.hug_male_1_x = int((float(pygame.display.Info().current_w) * 834.0 ) / 1024.0) + self.hug_male_1_y = int((float(pygame.display.Info().current_h) * 193.0 ) / 768.0) + self.hug_male_2_x = int((float(pygame.display.Info().current_w) * 702.0 ) / 1024.0) + self.hug_male_2_y = int((float(pygame.display.Info().current_h) * 495.0 ) / 768.0) + self.hug_female_1_x = int((float(pygame.display.Info().current_w) * 738.0 ) / 1024.0) + self.hug_female_1_y = int((float(pygame.display.Info().current_h) * 184.0 ) / 768.0) + self.hug_female_2_x = int((float(pygame.display.Info().current_w) * 797.0 ) / 1024.0) + self.hug_female_2_y = int((float(pygame.display.Info().current_h) * 457.0 ) / 768.0) + self.explosion_x = int((float(pygame.display.Info().current_w) * 705.0 ) / 1024.0) + self.explosion_y = int((float(pygame.display.Info().current_h) * 428.0 ) / 768.0) + self.mystery_x = int((float(pygame.display.Info().current_w) * 117.0 ) / 1024.0) + self.mystery_y = int((float(pygame.display.Info().current_h) * 706.0 ) / 768.0) + + self.user_click = False + def input(self): for event in pygame.event.get(): if android: @@ -84,12 +151,16 @@ class MenuState(BaseState): if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: self.next_transition = VALID_STATES['QUIT'] + if self.current_menu == MENUS['INTRO']: + self.user_click = True if event.type == pygame.QUIT: self.next_transition = VALID_STATES['QUIT'] # Catch the position of a mouse click (or tap). if event.type == pygame.MOUSEBUTTONDOWN: (self.cursor_x, self.cursor_y) = event.pos + if self.current_menu == MENUS['INTRO']: + self.user_click = True def update(self): if android is None: @@ -97,10 +168,12 @@ class MenuState(BaseState): if self.next_transition != VALID_STATES['QUIT']: if self.current_menu == MENUS['MAIN']: + # Check for mouse (tap) collisions with the main menu buttons. if self.quit_button.rect.collidepoint(self.cursor_x, self.cursor_y): + # Collision with the quit button. self.next_transition = VALID_STATES['QUIT'] - elif self.scr_button.rect.collidepoint(self.cursor_x, self.cursor_y): + # Collision with the high scores button. self.current_menu = MENUS['SCORE'] # Reload the scores from the database. for row in database.scores.execute('SELECT * FROM score ORDER BY _id'): @@ -114,17 +187,32 @@ class MenuState(BaseState): self.score_4 = self.font.render("4) " + row[1] + " . . . . . . . . . " + str(max(row[2], 0)), True, (0, 0, 0)) else: self.score_5 = self.font.render("5) " + row[1] + " . . . . . . . . . " + str(max(row[2], 0)), True, (0, 0, 0)) - elif self.new_button.rect.collidepoint(self.cursor_x, self.cursor_y): + # Collision with the new game button. self.current_menu = MENUS['INTRO'] - + self.then = pygame.time.get_ticks() elif self.current_menu == MENUS['SCORE']: + # Check for mouse (tap) collisions with the high scores menu buttons. if self.back_button.rect.collidepoint(self.cursor_x, self.cursor_y): + # Collision with the go back button. self.current_menu = MENUS['MAIN'] - elif self.current_menu == MENUS['INTRO']: - pass + # Wait for a timeout before going to the game. + now = pygame.time.get_ticks() + delta_t = now - self.then + self.story_time += delta_t + if self.user_click: + # If the user taps or presses a key before the timeout, go to the game. + self.next_transition = VALID_STATES['IN_GAME'] + elif self.story_time >= self.story_timeout: + # After the timeout, reset the time counter and go to the game. + self.story_time = 0 + self.next_transition = VALID_STATES['IN_GAME'] + else: + # Keep tracking time. + self.then = now + # Recenter the mouse pointer. self.cursor_x = 0 self.cursor_y = 0 @@ -168,3 +256,74 @@ class MenuState(BaseState): rect.top = self.score_text_1_y + (4 * self.score_text_inc) rect.left = self.score_text_x canvas.blit(self.score_5, rect) + + elif self.current_menu == MENUS['INTRO']: + rect = self.story_1.get_rect() + rect.top = self.story_1_y + rect.left = self.story_1_x + canvas.blit(self.story_1, rect) + + rect = self.story_2.get_rect() + rect.top = self.story_2_y + rect.left = self.story_2_x + canvas.blit(self.story_2, rect) + + rect = self.story_3.get_rect() + rect.top = self.story_3_y + rect.left = self.story_3_x + canvas.blit(self.story_3, rect) + + rect = self.story_4.get_rect() + rect.top = self.story_4_y + rect.left = self.story_4_x + canvas.blit(self.story_4, rect) + + rect = self.story_5.get_rect() + rect.top = self.story_5_y + rect.left = self.story_5_x + canvas.blit(self.story_5, rect) + + rect = self.player_label_1.get_rect() + rect.top = self.moncho_1_y + rect.left = self.moncho_1_x + canvas.blit(self.player_label_1, rect) + + rect = self.player_label_2.get_rect() + rect.top = self.moncho_2_y + rect.left = self.moncho_2_x + canvas.blit(self.player_label_2, rect) + + rect = self.she_huggable_1.get_rect() + rect.top = self.hug_female_1_y + rect.left = self.hug_female_1_x + canvas.blit(self.she_huggable_1, rect) + + rect = self.he_huggable_1.get_rect() + rect.top = self.hug_male_1_y + rect.left = self.hug_male_1_x + canvas.blit(self.he_huggable_1, rect) + + rect = self.explosion.get_rect() + rect.top = self.explosion_y + rect.left = self.explosion_x + canvas.blit(self.explosion, rect) + + rect = self.she_huggable_2.get_rect() + rect.top = self.hug_female_2_y + rect.left = self.hug_female_2_x + canvas.blit(self.she_huggable_2, rect) + + rect = self.he_huggable_2.get_rect() + rect.top = self.hug_male_2_y + rect.left = self.hug_male_2_x + canvas.blit(self.he_huggable_2, rect) + + rect = self.mystery_guy.get_rect() + rect.top = self.mystery_y + rect.left = self.mystery_x + canvas.blit(self.mystery_guy, rect) + + rect = self.interrogation.get_rect() + rect.top = self.interr_y + rect.left = self.interr_x + canvas.blit(self.interrogation, rect) diff --git a/score.py b/score.py index 5651d7b..da6e8e6 100644 --- a/score.py +++ b/score.py @@ -1,5 +1,8 @@ -# Miguel Angel Astor Romero. Created on 7-1-2013. # -################################################### +########################################### +# Created on 1-7-2013. Miguel Angel Astor # +########################################### +# Update score database: +# UPDATE score SET player_name = ?, score = ? WHERE _id IN (SELECT _id FROM score WHERE score IN (SELECT MIN(score) FROM score)) import pygame try: