From 1a2e1064a698b151c71ff9c6a2e59ff401c46205 Mon Sep 17 00:00:00 2001 From: Alan Aguiar Date: Mon, 19 Mar 2012 03:30:23 +0000 Subject: add utf-8 encoding to all files --- diff --git a/src/Main.py b/src/Main.py index 5ae3ef1..13e4d1b 100755 --- a/src/Main.py +++ b/src/Main.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import api import states import states.MenuState diff --git a/src/api/Button.py b/src/api/Button.py index abe5863..cc26f80 100755 --- a/src/api/Button.py +++ b/src/api/Button.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame import api.Label from api.Label import CLabel @@ -21,8 +23,6 @@ class CButton(CLabel): self.bgColor = (0xCC, 0xCC, 0xCC) self.set_text('Button') - def setCenter(self, aCenter): - self.set_center(aCenter) def clicked(self): return self.mclicked diff --git a/src/api/Game.py b/src/api/Game.py index 0b89f73..584a208 100755 --- a/src/api/Game.py +++ b/src/api/Game.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame #from pygame.locals import * import pygame.font @@ -155,4 +157,4 @@ class CGame(object): def setBackground(self, aBackgroundImage): self.mBackground = None self.mBackground = aBackgroundImage - self.mScreen.blit(self.mBackground, (0, 0)) \ No newline at end of file + self.mScreen.blit(self.mBackground, (0, 0)) diff --git a/src/api/Image.py b/src/api/Image.py index 7630c15..3351c1b 100755 --- a/src/api/Image.py +++ b/src/api/Image.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame # ------------------------------------------------------------------------------ @@ -26,4 +28,4 @@ def loadImage(aImageFilename, aIsTransparent = True): else: image = image.convert() - return image \ No newline at end of file + return image diff --git a/src/api/Label.py b/src/api/Label.py index bd7577d..f4ff9ac 100755 --- a/src/api/Label.py +++ b/src/api/Label.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame class CLabel(pygame.sprite.Sprite): diff --git a/src/api/Math.py b/src/api/Math.py index e8b4845..7ac64a8 100755 --- a/src/api/Math.py +++ b/src/api/Math.py @@ -1,5 +1,6 @@ #!/usr/bin/env python -# -*- coding: cp1252 -*- +# -*- coding: utf-8 -*- +#cp1252 import math @@ -44,4 +45,4 @@ def degToRad(aAngle): def dist(ax1, ay1, ax2, ay2): - return math.sqrt((ax2-ax1)**2 + (ay2-ay1)**2) \ No newline at end of file + return math.sqrt((ax2-ax1)**2 + (ay2-ay1)**2) diff --git a/src/api/Mouse.py b/src/api/Mouse.py index 54f3b3b..c487c56 100755 --- a/src/api/Mouse.py +++ b/src/api/Mouse.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import pygame @@ -7,4 +8,4 @@ def get_position(): return pygame.mouse.get_pos() def get_pressed(): - return pygame.mouse.get_pressed() \ No newline at end of file + return pygame.mouse.get_pressed() diff --git a/src/api/MultiLabel.py b/src/api/MultiLabel.py index 122ee13..be11511 100755 --- a/src/api/MultiLabel.py +++ b/src/api/MultiLabel.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame class CMultiLabel(pygame.sprite.Sprite): diff --git a/src/api/Sprite.py b/src/api/Sprite.py index 5639e4a..dd3b342 100755 --- a/src/api/Sprite.py +++ b/src/api/Sprite.py @@ -1,5 +1,6 @@ #!/usr/bin/env python -# -*- coding: cp1252 -*- +# -*- coding: utf-8 -*- +#cp1252 import pygame import math diff --git a/src/api/SuperSprite.py b/src/api/SuperSprite.py index e8730d6..d044541 100755 --- a/src/api/SuperSprite.py +++ b/src/api/SuperSprite.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import pygame import math diff --git a/src/api/Vector.py b/src/api/Vector.py index bbe6580..bd89b9c 100755 --- a/src/api/Vector.py +++ b/src/api/Vector.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import math from math import * @@ -124,4 +126,4 @@ class CVector(object): # public function dotXY( aX:Number, aY:Number ):Number # { # return x * aX + y * aY; -# } \ No newline at end of file +# } diff --git a/src/states/Area1Game1.py b/src/states/Area1Game1.py index 42ba362..478b18e 100755 --- a/src/states/Area1Game1.py +++ b/src/states/Area1Game1.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import pygame @@ -184,7 +185,7 @@ class CArea1Game1(CGameState): #TODO: Create a function to create image. self.mButtonBack.set_bgColor((0x99, 0x99, 0x66)) self.mButtonBack.font = pygame.font.Font('assets/fonts/fipps.ttf', 20) - self.mButtonBack.setCenter((110, 650)) + self.mButtonBack.set_center((110, 650)) self.mButtonBack.set_size((200, 40)) self.mButtonBack.set_text('Volver') CGame().addChild(self.mButtonBack) diff --git a/src/states/CreditsState.py b/src/states/CreditsState.py index 994d259..9f84f8c 100755 --- a/src/states/CreditsState.py +++ b/src/states/CreditsState.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import MenuState from MenuState import * import GameState @@ -57,4 +59,4 @@ class CCreditsState(CGameState): print "CMenuState destroy" def doEvents(self, aEvent): - print aEvent.type \ No newline at end of file + print aEvent.type diff --git a/src/states/GameState.py b/src/states/GameState.py index c40af7e..ef0453c 100755 --- a/src/states/GameState.py +++ b/src/states/GameState.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + class CGameState(object): def init(self): print "CGameState init" @@ -10,4 +12,4 @@ class CGameState(object): # print "CGameState render" def destroy(self): - print "CGameState destroy" \ No newline at end of file + print "CGameState destroy" diff --git a/src/states/MenuState.py b/src/states/MenuState.py index abc94bf..3485294 100755 --- a/src/states/MenuState.py +++ b/src/states/MenuState.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import states.GameState from states.GameState import CGameState import api.MultiLabel @@ -106,4 +108,4 @@ class CMenuState(CGameState): print "CMenuState destroy" def doEvents(self, aEvent): - print aEvent.type \ No newline at end of file + print aEvent.type -- cgit v0.9.1